/* Custom styles for Hausarztpraxis Holzweiler */

/* Base */
html {
  scroll-behavior: smooth;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Cards */
.perspective-card {
  background: linear-gradient(145deg, #ffffff, #e6e6e6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: inherit;
  text-decoration: none;
}

.perspective-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

a.perspective-card {
  cursor: pointer;
  display: block;
}

/* Brand */
.brand-link {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0.875rem !important;
  text-decoration: none;
  color: #81a1a2;
}

.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 0.92;
  white-space: nowrap;
  color: #81a1a2;
  display: block;
}

.footer-brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0.75rem !important;
  margin-bottom: 1rem;
}

.footer-brand-lockup .brand-mark {
  width: 2.75rem;
  height: 2.75rem;
}

.footer-brand-lockup .brand-wordmark {
  font-size: 1.35rem;
  font-style: normal;
  font-weight: 300;
  color: #81a1a2;
}

/* Baender - etwas dunkleres Grau (#dcdcdc) mit dunklem/sage Text */
section.bg-surface-container-low {
  background-color: #dcdcdc;
}
.sanctuary-gradient {
  background: #dcdcdc;
  color: #2f2f2f;
}
.sanctuary-gradient .text-white,
.sanctuary-gradient [class~="text-white/90"] {
  color: #2f2f2f;
}
.sanctuary-gradient-warm {
  background: #dcdcdc;
}

/* Pillen-Tags neutral (grau statt sage) */
a[class*="bg-primary/10"][class*="border-primary/20"] {
  background-color: rgba(119, 120, 120, 0.1);
  border-color: rgba(119, 120, 120, 0.22);
  color: #4d4d4a;
}
a[class*="bg-primary/10"][class*="border-primary/20"]:hover {
  background-color: rgba(119, 120, 120, 0.18);
}

/* Parallax */
.parallax-fixed {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Scroll animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu animation */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  overscroll-behavior: contain;
}

#mobileMenu.open {
  max-height: min(1500px, calc(100svh - 4.5rem));
  overflow-y: auto;
}

/* Navigation dropdowns */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-dropdown-trigger .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger .material-symbols-outlined {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  min-width: 260px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(182, 182, 182, 0.3);
  border-radius: 1rem;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  z-index: 30;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease;
  font-family: 'Montserrat', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 0.875rem;
  color: #5d5d57;
}

.nav-dropdown-menu a:hover {
  background: rgba(197, 205, 197, 0.25);
  color: #81a1a2;
}

.nav-dropdown-menu a .material-symbols-outlined {
  font-size: 1.125rem;
  color: #81a1a2;
}

.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: rgba(182, 182, 182, 0.3);
  margin: 0.375rem 0.75rem;
}

/* Mobile submenu */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 1rem;
}

.mobile-submenu.open {
  max-height: 500px;
}

/* Active nav link */
.nav-active {
  color: #81a1a2 !important;
  font-weight: 600;
}

/* Secondary accent line */
.accent-line {
  width: 3rem;
  height: 3px;
  background: #bc6a48;
  border-radius: 2px;
}

/* Back to top */
#backToTop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: all;
}

/* Cookie banner */
#cookieBanner {
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

#cookieBanner.visible {
  transform: translateY(0);
}

@media (max-width: 767px) {
  body.menu-open {
    overflow: hidden;
  }

  .parallax-fixed {
    background-attachment: scroll;
  }

  nav[aria-label="Hauptnavigation"] > div {
    padding: 1rem;
    gap: 0.75rem;
  }

  nav[aria-label="Hauptnavigation"] > div > a.brand-link {
    gap: 0.625rem !important;
    max-width: calc(100% - 4rem);
    min-width: 0;
  }

  .brand-mark {
    width: 2.55rem;
    height: 2.55rem;
  }

  .brand-wordmark {
    font-size: 1.05rem;
    line-height: 1;
    white-space: normal;
  }

  .footer-brand-lockup {
    gap: 0.75rem;
  }

  .footer-brand-lockup .brand-mark {
    width: 2.4rem;
    height: 2.4rem;
  }

  .footer-brand-lockup .brand-wordmark {
    font-size: 1.05rem;
  }

  #mobileMenu > div {
    padding: 1rem 1.25rem 1.25rem;
  }

  #mobileMenu .mobile-submenu {
    padding-left: 0.5rem;
  }

  #hinweisBanner > div {
    padding: 0.75rem 1rem;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  main[role="main"] > section[class*="pt-32"] {
    padding-top: 6.5rem !important;
    padding-bottom: 3rem !important;
  }

  main[role="main"] > section[class*="py-24"] {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  main[role="main"] > section[class*="py-16"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  main[role="main"] > section[class*="px-8"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .perspective-card {
    border-radius: 1.25rem;
  }

  #cookieBanner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    border: 1px solid rgba(182, 182, 182, 0.45);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  }

  #cookieBanner .max-w-screen-2xl {
    align-items: flex-start;
    gap: 0.75rem;
  }

  #cookieBanner p {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  #cookieAccept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
  }

  #backToTop {
    right: 1rem;
    bottom: 6.25rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #81a1a2;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  nav,
  footer,
  #cookieBanner,
  #backToTop,
  .sanctuary-gradient {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  a {
    color: black !important;
    text-decoration: underline !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .perspective-card {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Timeline step line connector */
.step-connector {
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 3.5rem;
  bottom: -1rem;
  width: 2px;
  background: #c8d4ce;
}

.step-connector:last-child::after {
  display: none;
}
