/* 
   ==========================================================================
   DESIGN SYSTEM & CUSTOM STYLESHEET FOR HAUSARZTPRAXIS SCHWAKE
   Premium Agency-Level Hand-crafted Web Design
   ========================================================================== 
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- Root Variables --- */
:root {
  /* Colors */
  --color-primary: #02adea;          /* Original Cyan, refined */
  --color-primary-dark: #008cc0;     /* Deep Cyan for active states */
  --color-accent: #ff776f;           /* Original Lachsrot/Coral, refined */
  --color-accent-dark: #e85951;      /* Darker Coral for hover states */
  
  --color-bg-main: #f8fafc;          /* Off-white, soft slate background */
  --color-bg-card: #ffffff;          /* Pure white for containers */
  --color-bg-dark: #121824;          /* Premium dark slate for footer/accents */
  
  --color-text-main: #1e293b;        /* Dark slate gray for body text */
  --color-text-muted: #64748b;       /* Muted slate for captions/subtitles */
  --color-text-light: #f1f5f9;       /* Light gray for dark background text */
  
  --color-border: #e2e8f0;           /* Soft border gray */
  --color-border-focus: #93c5fd;     /* Focus outline ring */

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Layout & Spacing */
  --container-max-width: 1200px;
  --content-max-width: 680px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-round: 9999px;
  
  /* Transitions */
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease-out;
  
  /* Shadows */
  --shadow-subtle: 0 4px 20px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Typography System --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-main);
  line-height: 1.25;
  font-weight: 600;
}

/* Fluid responsive typography using CSS clamp */
h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw + 0.5rem, 2.75rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.4rem, 2vw + 0.5rem, 1.85rem);
}

h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  font-size: 1.0625rem; /* Premium size: 17px */
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* --- Grid & Containers --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-padding {
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.asymmetric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .asymmetric-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
  
  .asymmetric-grid.reverse {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

/* --- Navigation Header --- */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(248, 250, 252, 0.85); /* Blurred bg-main */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: var(--transition-smooth);
}

.header-nav.scrolled {
  box-shadow: var(--shadow-subtle);
  background-color: rgba(255, 255, 255, 0.95);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: var(--transition-smooth);
}

.header-nav.scrolled .nav-container {
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header-nav.scrolled .logo-img {
  height: 38px;
}

.nav-menu {
  display: none;
}

@media (min-width: 992px) {
  .nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
  }
  
  .nav-item a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-main);
    padding: 0.5rem 0;
    position: relative;
  }
  
  .nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-smooth);
  }
  
  .nav-item a:hover::after,
  .nav-item.active a::after {
    width: 100%;
  }
  
  .nav-cta {
    margin-left: 1rem;
  }
}

/* Mobile Menu Button */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--color-text-main);
  transition: var(--transition-smooth);
}

.menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Menu */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--color-bg-card);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  padding: 100px 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transition: var(--transition-smooth);
}

.mobile-drawer.active {
  right: 0;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-item a {
  font-size: 1.25rem;
  font-family: var(--font-display);
  color: var(--color-text-main);
  font-weight: 500;
  display: block;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  box-shadow: var(--shadow-subtle);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  box-shadow: 0 4px 14px rgba(255, 119, 111, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: rgba(2, 173, 234, 0.05);
  color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-dark {
  background-color: var(--color-bg-dark);
  color: white;
}

.btn-dark:hover {
  background-color: #1e293b;
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

.btn-icon {
  gap: 0.5rem;
}

/* --- Hero Section --- */
.hero {
  padding-top: calc(80px + 4rem);
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(2, 173, 234, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-text {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: var(--content-max-width);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.hero-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center;
  transition: transform 6s ease-out;
}

.hero-image-wrapper:hover .hero-image {
  transform: scale(1.04);
}

/* --- Quick Info / Emergency Ribbon --- */
.quick-info-ribbon {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 2rem 0;
  box-shadow: var(--shadow-card);
}

.ribbon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .ribbon-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ribbon-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.ribbon-icon-box {
  background-color: rgba(2, 173, 234, 0.15);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ribbon-item-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: white;
}

.ribbon-item-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* --- Section Dividers --- */
.divider-wavy {
  height: 40px;
  width: 100%;
  fill: var(--color-bg-main);
  background-color: var(--color-bg-card);
}

.section-header {
  margin-bottom: 4rem;
  text-align: left;
}

.section-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: block;
}

.section-header h2 {
  margin-bottom: 1.25rem;
}

.section-header-desc {
  max-width: var(--content-max-width);
  font-size: 1.0625rem;
}

/* --- Card Styles --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.premium-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-smooth);
}

.premium-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(2, 173, 234, 0.2);
}

.premium-card:hover::before {
  transform: scaleX(1);
}

.card-icon-box {
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  display: inline-flex;
}

.card-icon-box svg {
  width: 32px;
  height: 32px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-text-main);
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-link svg {
  transition: transform var(--transition-fast);
}

.card-link:hover svg {
  transform: translateX(3px);
}

/* --- Trust / Lehrpraxis Feature Section --- */
.trust-banner {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.trust-flex {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .trust-flex {
    flex-direction: row;
    align-items: center;
  }
}

.trust-badge-img {
  width: 150px;
  height: auto;
  flex-shrink: 0;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .trust-badge-img {
    margin: 0;
  }
}

.trust-content {
  flex-grow: 1;
}

.trust-content h3 {
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.trust-content p {
  margin-bottom: 1.5rem;
}

/* --- Accordions & Tabs for Services page --- */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
  list-style: none;
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--color-text-main);
  background-color: rgba(226, 232, 240, 0.5);
}

.tab-btn.active {
  color: white;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-subtle);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Accordion list details */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-main);
  padding: 0.5rem 0;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: transform var(--transition-smooth);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
}

.accordion-content-inner {
  padding: 1rem 0;
  font-size: 0.975rem;
  line-height: 1.6;
}

/* --- Formular & Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-detail-card {
  display: flex;
  gap: 1.25rem;
  background-color: var(--color-bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.contact-detail-icon {
  background-color: rgba(2, 173, 234, 0.08);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  flex-shrink: 0;
}

.contact-detail-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-detail-content p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.info-highlight-box {
  background-color: rgba(255, 119, 111, 0.08);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
}

.info-highlight-box strong {
  color: var(--color-accent-dark);
}

/* --- Map styling --- */
.map-outer {
  height: 380px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  z-index: 1;
}

#map {
  height: 100%;
  width: 100%;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding-top: 5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr;
  }
}

.footer-col h3 {
  color: white;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1); /* Force White Logo */
}

.footer-brand-text {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  font-size: 0.95rem;
  color: #94a3b8;
}

.footer-links-list a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

.footer-contact-icon {
  color: var(--color-primary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copy {
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom-links a:hover {
  color: var(--color-text-light);
}

/* --- Scroll Animation Triggers (Intersection Observer) --- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger reveals */
.stagger-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-group.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-group.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-group.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-group.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-group.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-group.revealed > *:nth-child(5) { transition-delay: 0.5s; }
