/* =========================================================
   SMARTER.YACHTS – PREMIUM UI FRAMEWORK (FINAL CLEAN)
   ========================================================= */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================================================
   SMARTER.YACHTS — DESIGN TOKENS
   All colors and shared component styling live here.
   ========================================================= */
:root {
  /* Brand */
  --color-brand-primary: #4aa3b4;
  --color-brand-hover: #5ab4c3;
  --color-brand-bright: #67d9f2;
  --color-brand-hero: #67d3e6;

  /* Dark surfaces */
  --color-page-start: #0a2a5c;
  --color-page-end: #071f45;
  --color-section-deep: #061935;
  --color-section-footer: #08142b;
  --color-card: #18437a;
  --color-card-hover: #225391;
  --color-card-gradient-start: #214a80;
  --color-card-gradient-end: #173b67;
  --color-field: #0b1b3a;
  --color-field-hover: #1f3a6b;
  --color-field-border: #2a4a7a;
  --color-quantity-button: #285588;
  --color-progress-track: #0b2f61;

  /* Text */
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.78);
  --color-text-subtle: rgba(255, 255, 255, 0.55);
  --color-text-on-light: #0b1b3a;
  --color-text-on-light-muted: #4a5568;
  --color-text-on-light-soft: #657080;

  /* Transparent surfaces and borders */
  --color-overlay-subtle: rgba(255, 255, 255, 0.03);
  --color-overlay: rgba(255, 255, 255, 0.05);
  --color-overlay-hover: rgba(255, 255, 255, 0.08);
  --color-overlay-active: rgba(255, 255, 255, 0.15);
  --color-border-subtle: rgba(255, 255, 255, 0.14);
  --color-border-strong: rgba(255, 255, 255, 0.24);
  --color-accent-soft: rgba(74, 163, 180, 0.14);
  --color-accent-medium: rgba(74, 163, 180, 0.25);
  --color-backdrop: rgba(0, 0, 0, 0.70);
  --color-transparent: transparent;

  /* Light surfaces */
  --color-surface-light: #f8fafc;
  --color-surface-light-alt: #eef3f8;
  --color-surface-white: #ffffff;
  --color-border-on-light: #b8c6d8;

  /* Status */
  --color-success: #157442;
  --color-success-strong: #1c8f45;
  --color-success-text: #0f6d3c;
  --color-success-border: #6ecb8b;
  --color-success-surface: #e9f8ee;
  --color-success-surface-soft: #eef9f1;
  --color-success-on-dark: #70dfa0;
  --color-error: #d83b3b;
  --color-error-border: #d85a5a;
  --color-error-strong: #c62828;
  --color-error-text: #8e1c13;
  --color-error-on-dark: #ffb4b4;
  --color-error-border-light: #e4a19c;
  --color-error-surface: #fff3f2;
  --color-error-surface-soft: #fff4f4;
  --color-warning: #ffcc00;
  --color-info: #0b5cab;

  /* Hero-specific artwork */
  --color-hero-background: #071d40;
  --color-hero-glow: rgba(85, 194, 220, 0.16);
  --color-hero-overlay-start: rgba(5, 23, 50, 0.80);
  --color-hero-overlay-middle: rgba(7, 31, 66, 0.60);
  --color-hero-overlay-end: rgba(10, 47, 91, 0.28);
  --color-hero-overlay-mobile-start: rgba(5, 21, 48, 0.90);
  --color-hero-overlay-mobile-end: rgba(7, 31, 66, 0.88);
  --color-hero-control: rgba(5, 24, 52, 0.48);

  /* Shadow colors */
  --shadow-card-soft: rgba(0, 0, 0, 0.20);
  --shadow-card: rgba(0, 0, 0, 0.35);
  --shadow-card-strong: rgba(0, 0, 0, 0.55);

  /* Shared component tokens */
  --card-background: var(--color-card);
  --card-background-hover: var(--color-card-hover);
  --card-border: #3b6fa3;
  --card-border-hover: var(--color-brand-hover);
  --card-radius: 18px;
  --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.35);

  --field-background: var(--color-overlay);
  --field-background-readonly: var(--color-overlay-hover);
  --field-border: var(--color-border-subtle);
  --field-border-hover: var(--color-border-strong);
  --field-border-focus: var(--color-brand-primary);
  --field-text: var(--color-text-primary);
  --field-placeholder: var(--color-text-subtle);
  --field-radius: 10px;
  --field-focus-ring: 0 0 0 3px var(--color-accent-soft);

  --button-background: var(--color-brand-primary);
  --button-background-hover: var(--color-brand-hover);
  --button-text: var(--color-text-primary);
  --button-radius: 10px;

  --transition-ui: 0.2s ease;

  /* Backward-compatible aliases */
  --bg-main: var(--color-page-start);
  --bg-dark: var(--color-page-end);
  --accent: var(--color-brand-primary);
  --accent-light: var(--color-brand-hover);
  --accent-soft: var(--color-accent-soft);
  --text-main: var(--color-text-primary);
  --text-muted: var(--color-text-secondary);
  --surface-0: var(--color-section-deep);
  --surface-1: var(--color-page-end);
  --surface-2: var(--color-page-start);
  --card-bg: var(--card-background);
  --card-bg-hover: var(--card-background-hover);
  --border-soft: var(--color-border-subtle);
  --radius: var(--card-radius);
  --shadow-1: var(--card-shadow);
  --shadow-2: var(--card-shadow-hover);
}

/* BASE */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-main), var(--bg-dark));
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* CONTAINER */
.container {
  max-width: 1300px;
  margin: auto;
  padding: 40px 20px;
}

/* TYPO */
h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 20px;
}

p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 700px;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 30px;

  backdrop-filter: blur(12px);
  background: var(--color-page-end);
  border-bottom: 1px solid var(--border-soft);

  z-index: 999;
}

/* LOGO */
.logo img {
  height: 48px;
}

/* DESKTOP MENU */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  position: relative; /* FIX für Close Button */
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s;
}

.nav-menu a:hover {
  background: var(--accent-soft);
  color: var(--text-main);
}

/* CTA */
.nav-menu .cta {
  background: var(--accent);
  color: var(--color-text-primary);
  padding: 8px 14px;
  border-radius: 10px;
}

.nav-menu .cta:hover {
  background: var(--accent-light);
  box-shadow: 0 0 20px var(--color-accent-medium);
}

/* BURGER */
.nav-toggle {
  display: none;
  font-size: 26px;
  color: var(--color-text-primary);
  cursor: pointer;
}

/* =========================================================
   SUBMENU (DESKTOP)
   ========================================================= */

.nav-item {
  position: relative;
}

.submenu {
  position: absolute;
  top: 120%;
  left: 0;

  min-width: 220px;

  background: var(--color-page-end);
  backdrop-filter: blur(12px);

  border: 1px solid var(--border-soft);
  border-radius: 12px;

  padding: 10px 0;

  display: flex;
  flex-direction: column;
  gap: 2px;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);

  transition: all 0.25s ease;
  z-index: 1000;
}

/* Links im Submenu */
.submenu a {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.2s;
}

.submenu a:hover {
  background: var(--accent-soft);
  color: var(--text-main);
}

/* Hover aktiviert Menü */
.nav-item:hover .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================================
   MOBILE NAV
   ========================================================= */

@media (max-width: 900px) {

  .nav {
    padding: 0 20px;
  }

  .nav-toggle {
    display: block;
  }


  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;

    width: 80%;
    max-width: 320px;
    height: 100vh;

    overflow-y: auto;              /* 🔥 FIX */
    -webkit-overflow-scrolling: touch; /* 🔥 smooth iOS */

    background: linear-gradient(180deg, var(--bg-main), var(--bg-dark));

    display: flex;
    flex-direction: column;

    justify-content: flex-start;   /* 🔥 FIX (nicht center!) */
    align-items: flex-start;

    padding: 100px 30px 40px;      /* 🔥 unten Luft */
    gap: 25px;

    transition: 0.3s ease;
    z-index: 998;
  }


  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    font-size: 18px;
  }
}

/* =========================================================
   MOBILE SUBMENU
   ========================================================= */

@media (max-width: 900px) {

  .nav-item {
    width: 100%;
  }

  .nav-item > a {
    width: 100%;
    display: block;
  }

  .submenu {
    position: static;
    background: none;
    border: none;
    padding: 0;
    margin-top: 5px;

    opacity: 1;
    pointer-events: auto;
    transform: none;

    display: none;
  }

  .nav-item.active .submenu {
    display: flex;
  }

  .submenu a {
    padding-left: 20px;
    font-size: 16px;
  }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* =========================================================
   BUTTON
   ========================================================= */

.btn {
  display: inline-block;
  padding: 14px 28px;

  background: var(--accent);
  color: var(--color-text-primary);

  border-radius: 12px;
  text-decoration: none;
  margin-top: 20px;

  font-weight: 600;             
  letter-spacing: 0.3px;

  border: 1px solid var(--color-overlay-active);  /* 🔥 Kontrast */
  box-shadow: 0 8px 25px var(--shadow-card-soft);   /* 🔥 hebt ihn ab */

  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px var(--shadow-card);
}

/* =========================================================
   CARD / GRID
   ========================================================= */

.card {
  background: var(--color-overlay-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;           /* 🔥 verhindert blau */
  border: none;             /* 🔥 verhindert underline */
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px var(--shadow-card-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* =========================================================
   MEDIA
   ========================================================= */

.image-block img {
  width: 100%;
  border-radius: 20px;
}

/* =========================================================
   SPACING SYSTEM (CLEAN)
   ========================================================= */

/* default section spacing */
.section {
  padding: 80px 0;
}

/* tighter PRODUCT → HARDWARE transition (target ~50px total) */
.product.section {
  padding-bottom: 25px;
}

.product + .product-block {
  padding-top: 25px;
}

/* =========================================================
   OVERLAY + SCROLL LOCK
   ========================================================= */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--shadow-card);
  backdrop-filter: blur(6px);

  opacity: 0;
  pointer-events: none;

  transition: 0.3s;
  z-index: 997;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.no-scroll {
  overflow: hidden;
}

/* =========================================================
   NAV
   ========================================================= */

#navClose {
  display: none;
}

.nav-menu.active #navClose {
  display: block;
}

@media (min-width: 901px) {
  #navClose {
    display: none !important;
  }
}

/* ===== SPEC CARDS ===== */

.specs {
  background: var(--color-surface-light);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.spec-card {
  background: var(--color-text-primary);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 25px var(--shadow-card-soft);
  transition: all 0.25s ease;
}

.spec-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--shadow-card-soft);
}

.spec-card h3 {
  margin-bottom: 15px;
  color: var(--color-text-on-light);
}

.spec-card ul {
  list-style: none;
  padding: 0;
}

.spec-card li {
  margin-bottom: 8px;
  color: var(--color-text-on-light-muted);
}

.spec-card li strong {
  color: var(--color-text-on-light);
}

/* ===== HIGHLIGHT ===== */

.spec-card.highlight {
  background: linear-gradient(135deg, var(--color-text-on-light), var(--color-field-hover));
  color: var(--color-text-primary);
}

.spec-card.highlight h3,
.spec-card.highlight li,
.spec-card.highlight strong {
  color: var(--color-text-primary);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1000px) {
  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .product-block-grid {
    grid-template-columns: 1fr;
  }
}

.spec-table {
  margin-top: 25px;
  border-top: 1px solid var(--border-soft);
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.spec-label {
  font-weight: 600;
  color: var(--text-main);
}

.spec-value {
  color: var(--text-muted);
}

/* LIGHT SECTION SUPPORT */
.product-block.alt .spec-label {
  color: var(--color-text-on-light);
}

.product-block.alt .spec-value {
  color: var(--color-text-on-light-muted);
}

/* MOBILE */
@media (max-width: 600px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: var(--color-section-footer);
  border-top: 1px solid var(--border-soft);
  margin-top: 80px;
}

/* GRID */

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 50px;

  max-width: 1200px;
  margin: 0 auto;   

  padding: 60px 20px;
}

/* COLS */

.footer-col h4 {
  font-size: 14px;
  margin-bottom: 15px;
  color: var(--text-main);
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
}

/* BRAND */

.footer-brand img {
  max-width: 160px;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-note {
  font-size: 13px;
  opacity: 0.7;
}

/* BOTTOM */

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* MOBILE */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   LINKS
   ========================================================= */

.section a:not(.btn):not(.card-link) {
  color: var(--accent);
  border-bottom: 1px solid var(--color-accent-medium);
}

.section a:not(.btn):not(.card-link):hover {
  color: var(--accent-light);
  border-bottom: 1px solid var(--accent);
}

/* =========================================================
   GLOBAL FIXES (OVERRIDE CHAOS)
   ========================================================= */

/* prevent broken grids */
.solution-grid,
.product-grid,
.product-block-grid {
  display: grid !important;
}

/* fix images shrinking / exploding */
.solution-image img,
.product-image img,
.product-block-image img {
  max-width: 420px !important;
  width: 100%;
  margin: 0 auto;
  display: block;
}

/* fix flex conflicts */
.solution-image,
.product-image {
  display: block !important;
}

/* fix footer alignment */
.footer-grid {
  margin: 0 auto;
  max-width: 1200px;
}




/* =========================================================
   3RD PARTY PRODUCTS GRID
   ========================================================= */

#productList {
  margin-top: 40px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  gap: 20px;

  justify-content: start;
}

@media (max-width: 600px) {

  #productList{
    justify-content: center;
  }

}

/* =========================================================
   GLOBAL BUTTON SYSTEM – FORCE CONSISTENCY
   ========================================================= */

/* ALL BUTTON-LIKE ELEMENTS */
.btn,
.download-action a,
.solution-video a,
.filter-btn,
.faq-filter-btn,
.firmware-actions a,
.download-filters button,
.usecase-filters button,
.supplier-item a {
  
  background: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  color: var(--color-text-primary) !important;

  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;

  transition: all 0.2s ease;
}

/* HOVER */
.btn:hover,
.download-action a:hover,
.solution-video a:hover,
.filter-btn:hover,
.faq-filter-btn:hover,
.firmware-actions a:hover,
.download-filters button:hover,
.usecase-filters button:hover,
.supplier-item a:hover {

  background: var(--accent-light) !important;
  border-color: var(--accent-light) !important;

  transform: translateY(-1px);
}

/* ACTIVE / SELECTED STATES */
.filter-btn.active,
.faq-filter-btn.active,
.usecase-filters button.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--color-text-primary) !important;
}

/* =========================================================
   GLOBAL CARD SYSTEM
   ========================================================= */

.card,
.usecase-card,
.solution-block,
.support-card,
.download-card,
.firmware-card,
.news-card,
.product-card {

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);

  backdrop-filter: blur(10px);

  box-shadow: var(--card-shadow);

  transition: all 0.25s ease;
}

.card:hover,
.usecase-card:hover,
.solution-block:hover,
.support-card:hover,
.download-card:hover,
.firmware-card:hover,
.news-card:hover,
.product-card:hover {

  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);

  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.solutions,
.usecases,
.support,
.news,
.downloads,
.support-products {
  background: linear-gradient(
    180deg,
    var(--color-section-deep),
    var(--color-page-end)
  );
}	

.card,
.usecase-card,
.product-card,
.support-card,
.firmware-card,
.faq-card,
.download-card {

  background: var(--card-bg);
  border: 1px solid var(--card-border);

  border-radius: var(--card-radius);

  /* 🔥 DAS ist der Gamechanger */
  outline: 1px solid var(--color-overlay);

}

.card {
  background: linear-gradient(
    180deg,
    var(--color-overlay-hover),
    var(--color-overlay-subtle)
  );
}

.card::after,
.usecase-card::after,
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at top right,
    var(--color-accent-soft),
    var(--color-transparent) 60%
  );

  opacity: 0;
  transition: 0.3s;
}

.card:hover::after,
.usecase-card:hover::after,
.product-card:hover::after {
  opacity: 1;
}

.solutions,
.usecases,
.support,
.news,
.downloads,
.support-products {
  background: var(--surface-1);
}

.card,
.usecase-card,
.product-card,
.support-card,
.download-card {

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);

  box-shadow: var(--shadow-1);

  transition: all 0.2s ease;
}

.card:hover,
.usecase-card:hover,
.product-card:hover {

  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);

  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
}

p {
  color: var(--text-muted);
}

.card p {
  color: var(--text-muted);
}

/* =========================
INSTALL 
================ */

/* =========================================================
   BUTTON VARIANTS
   ========================================================= */

/* SECONDARY BUTTON (z.B. Close / Cancel) */
.btn-secondary {
  display: inline-block;
  padding: 12px 22px;

  border-radius: 10px;

  background: var(--color-overlay);
  border: 1px solid var(--border-soft);

  color: var(--text-muted);

  cursor: pointer;
  text-decoration: none;

  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--color-overlay-hover);
  border-color: var(--accent);
  color: var(--text-main);

  transform: translateY(-1px);
}

/* ========================================
LOGIN 
=========================================== */

#loadingOverlay {

    position: fixed;
    inset: 0;

    background: var(--color-page-end);

    backdrop-filter: blur(8px);

    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;
}

.loading-content {

    text-align: center;
}

.loading-spinner {

    width: 80px;
    height: 80px;

    border-radius: 50%;

    border: 5px solid var(--color-overlay-active);

    border-top-color: var(--color-brand-primary);

    animation: spin 1s linear infinite;

    margin: 0 auto 20px auto;
}

.loading-text {

    color: var(--color-text-primary);

    font-size: 18px;

    letter-spacing: 1px;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }
}