/*!
 * Shared Navigation Component - Gastroenterologie am Claraplatz
 * Pixel-perfect CSS based on Figma design (node 191:1158)
 * Wiederverwendbar auf allen Seiten
 */

/* ========================================
   NAVIGATION (Figma Design - Desktop)
   ======================================== */

.navigation {
  position: relative;
  width: 100%;
  height: 117px;
  z-index: 100;
  flex-shrink: 0;
  margin-bottom: 16px;
}

.nav-background {
  position: absolute;
  inset: 0;
  background-color: #ffffff;
}

.navigation nav {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 18px 96px;
}

/* Logo */
.logo-container {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 80px;
  gap: 16px;
}

.main-logo {
  width: 212px;
  height: 80px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo-text-line1,
.logo-text-line2 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #003974;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.logo-text-line1 {
  margin-bottom: 2px;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-button {
  background-color: transparent; /* Kein Hintergrund im Normal-Zustand */
  border: none;
  padding: 16px 32px; /* Pillenform: Vertikal 16px, Horizontal 32px */
  border-radius: 999px; /* Vollständige Pillenform */
  text-decoration: none;
  color: #003974;
  font-family: 'Dosis', sans-serif;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.72px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(15px); /* Baseline-Alignment mit Logo-Text */
}

.nav-button:hover {
  background-color: rgba(109, 200, 191, 0.55); /* Dunklerer Türkis beim Hover */
  transform: translateY(13px); /* 15px base - 2px hover */
}

.nav-button:active {
  transform: translateY(15px); /* Zurück zur base position */
}

/* Active state - aktuelle Seite */
.nav-button.active {
  background-color: rgba(109, 200, 191, 0.33); /* Türkis für aktive Seite */
  transform: translateY(15px); /* Baseline beibehalten */
}

/* Verhindert Transform-Sprung beim Hovern über aktive Buttons */
.nav-button.active:hover {
  transform: translateY(15px); /* Kein Hover-Effekt, aber Baseline bleibt */
  background-color: rgba(109, 200, 191, 0.33); /* Behalte Türkis bei Hover über aktive Seite */
}

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

/* Tablet (768px - 1024px) - Use Hamburger Menu */
@media (min-width: 768px) and (max-width: 1024px) {
  .navigation {
    height: 100px;
  }

  .navigation nav {
    padding: 16px 40px;
    align-items: center;
    justify-content: space-between;
  }

  .logo-container {
    height: 70px;
  }

  .main-logo {
    width: auto;
    height: 70px;
    max-width: 190px;
  }

  /* Keep logo text visible on tablet */
  .logo-text {
    display: flex;
  }

  /* Hide desktop navigation on tablet */
  .desktop-nav {
    display: none !important;
  }

  /* Show hamburger menu on tablet */
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* Mobile (< 768px) - New Hamburger Menu Design */
@media (max-width: 767px) {
  .navigation {
    height: auto;
    min-height: 80px;
  }

  .navigation nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
  }

  .logo-container {
    height: 60px;
    gap: 12px;
  }

  .main-logo {
    width: auto;
    height: 60px;
    max-width: 200px;
  }

  .logo-text-line1,
  .logo-text-line2 {
    font-size: 11px;
    letter-spacing: 1.1px;
  }

  /* Hide logo text on very small mobile to save space */
  .logo-text {
    display: none;
  }

  /* Hide desktop navigation on mobile */
  .desktop-nav {
    display: none !important;
  }

  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
  .logo-text-line1,
  .logo-text-line2 {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .main-logo {
    height: 50px;
    max-width: 170px;
  }

  .logo-container {
    height: 50px;
  }
}

/* ==========================================
 * MOBILE NAVIGATION OVERLAY
 * ========================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: var(--z-modal, 1050);
  transition: var(--transition-base);
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background-color: #003974; /* Dark blue - same as brand color */
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger Animation States - Hide when menu is active */
.mobile-menu-toggle.active {
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-toggle:hover .hamburger-line {
  background-color: #6DC8BF; /* Turquoise brand color */
}

/* Mobile Navigation Overlay - Full Screen Dark Blue */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #003974; /* Dark blue background */
  z-index: var(--z-modal-backdrop, 1040);
  opacity: 0;
  visibility: hidden;
  display: none; /* Hidden by default */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  display: block; /* Show when active */
}

.mobile-nav-content {
  position: relative;
  width: 100%;
  max-width: 393px;
  height: 100vh;
  max-height: 852px;
  margin: 0 auto;
  padding: 60px 22px calc(80px + env(safe-area-inset-bottom, 0px)) 22px;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  z-index: 1;
}

.mobile-nav-overlay.active .mobile-nav-content {
  transform: scale(1);
  opacity: 1;
}

.mobile-menu-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1051;
}

.mobile-menu-close:hover {
  opacity: 0.7;
}

.close-icon {
  font-size: 28px;
  color: #ffffff; /* White on dark blue background */
  line-height: 1;
  font-weight: 400;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 62px 0 0 0; /* Start at y:122px from top (60px padding + 62px margin) */
  flex-shrink: 0;
}

.mobile-nav-links li {
  margin-bottom: 12px;
}

.mobile-nav-links li:last-child {
  margin-bottom: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 349px;
  height: 48px;
  border-radius: 999px; /* Perfect pill shape */
  text-decoration: none;
  font-family: 'Dosis', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: none;
  color: #003974; /* Dark blue text by default */
}

/* Individual button colors per Figma */
.mobile-nav-angebot {
  background-color: #BBD976; /* Light green */
}

.mobile-nav-arzt {
  background-color: #6DC8BF; /* Turquoise */
}

.mobile-nav-team {
  background-color: #00A88E; /* Teal */
}

.mobile-nav-link-links {
  background-color: #00698C; /* Deep teal - specific for LINKS button */
}

.mobile-nav-kontakt {
  background-color: #FFFFFF; /* White */
  color: #003974; /* Dark blue text */
}

/* Hover states */
.mobile-nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-nav-link:active {
  transform: translateY(0);
}

/* Mobile Navigation Photos */
.mobile-nav-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding: 0 12px;
  flex-shrink: 0;
}

.mobile-nav-photo-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
}

.mobile-nav-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Practice Information Section */
.mobile-nav-practice-info {
  margin-top: 76px; /* Position at y:510px (approx) */
  text-align: center;
  flex-shrink: 0;
}

.mobile-nav-practice-info p {
  margin: 0 0 8px 0;
  color: #FFFFFF;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.practice-name {
  font-weight: 600;
  margin-bottom: 12px !important;
}

.practice-address {
  margin-bottom: 12px !important;
}

.practice-email a {
  color: #FFFFFF;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.practice-email a:hover {
  opacity: 0.8;
}

/* Phone Button - White Border */
.mobile-nav-phone {
  margin-top: 30px; /* Position at y:672px (approx) */
  flex-shrink: 0;
}

.mobile-phone-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background-color: transparent;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Dosis', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.72px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.mobile-phone-button:hover {
  background-color: #FFFFFF;
  color: #003974;
}

/* Footer Links */
.mobile-nav-footer {
  margin-top: auto; /* Push to bottom */
  padding-top: 32px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-shrink: 0;
}

.mobile-nav-footer a {
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 400;
  transition: opacity 0.3s ease;
}

.mobile-nav-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Mobile/Desktop Navigation Display Control */
@media (max-width: 1024px) {
  /* Show hamburger menu on mobile/tablet */
  .mobile-menu-toggle {
    display: flex !important;
  }

  /* Hide desktop navigation on mobile/tablet */
  .desktop-nav {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  /* Hide mobile navigation completely on desktop */
  .mobile-menu-toggle,
  .mobile-nav-overlay,
  .mobile-menu-close {
    display: none !important;
  }

  /* Ensure desktop nav is visible */
  .desktop-nav {
    display: flex !important;
  }
}
