/* ============================================
   Zahnarztpraxis Säger - Design System
   Modern, Clean, DSGVO-konform
   ============================================ */

/* ============================================
   1. CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Farben - Primär */
  --color-primary: #2a7d8c;          /* Petrol - Vertrauen, Medizin */
  --color-primary-dark: #1e5a66;
  --color-primary-light: #3a9db0;

  /* Farben - Sekundär */
  --color-secondary: #f8f5f0;        /* Warmweiß/Creme */
  --color-secondary-dark: #e8e2d9;

  /* Farben - Akzent */
  --color-accent: #c9a227;           /* Gedämpftes Gold - Qualität */
  --color-accent-light: #dbb84a;

  /* Farben - Neutral */
  --color-white: #ffffff;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  --color-black: #0a0a0a;

  /* Farben - Semantisch */
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Typografie - System Font Stack (DSGVO-konform!) */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji',
               'Segoe UI Emoji';
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;

  /* Schriftgrößen */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  /* Zeilenhöhen */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Schriftgewichte */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Abstände */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */

  /* Schatten */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius: 0.5rem;        /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;

  /* Übergänge */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --header-height: 80px;
  --header-height-mobile: 64px;
}

/* ============================================
   2. CSS Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

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

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

/* ============================================
   3. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--color-gray-900);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
}

p {
  margin-bottom: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
}

/* ============================================
   4. Layout Components
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-sm {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section-lg {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* ============================================
   5. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

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

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

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

.btn-accent:hover {
  background-color: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: var(--color-white);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* ============================================
   6. Cards
   ============================================ */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card-text {
  color: var(--color-gray-600);
  margin-bottom: var(--space-4);
}

/* ============================================
   7. Header & Navigation
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--color-white);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: background-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  color: var(--color-gray-700);
  font-weight: var(--font-medium);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-gray-100);
}

.nav-cta {
  margin-left: var(--space-4);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-gray-800);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ============================================
   8. Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + var(--space-10));
  padding-bottom: var(--space-16);
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-white) 100%);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  color: var(--color-gray-900);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-gray-600);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-image {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 600px;
  height: 400px;
  object-fit: cover;
  object-position: center bottom;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* ============================================
   9. Footer
   ============================================ */
.footer {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-title {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  color: var(--color-gray-400);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-contact p {
  margin-bottom: var(--space-2);
}

.footer-contact a {
  color: var(--color-primary-light);
}

.footer-contact a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-800);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-copyright {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
}

.footer-legal a:hover {
  color: var(--color-white);
}

/* ============================================
   10. Utilities
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-gray-500); }

.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-white { background-color: var(--color-white); }
.bg-gray { background-color: var(--color-gray-100); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================
   11. Responsive Breakpoints
   ============================================ */
@media (max-width: 1024px) {
  .hero-image {
    width: 40%;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  .header {
    height: var(--header-height-mobile);
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-white);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--space-4);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
    width: 100%;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height-mobile) + var(--space-8));
    padding-bottom: var(--space-10);
    flex-direction: column;
  }

  .hero-image {
    position: relative;
    width: calc(100% - var(--space-8));
    max-width: none;
    height: 200px;
    margin: var(--space-6) var(--space-4) 0;
    transform: none;
    top: auto;
    right: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .footer-legal {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* ============================================
   12. Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* Scroll Animation (aktiviert via JS) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   13. Page Banner
   ============================================ */
.page-banner {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .page-banner {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .page-banner {
    height: 140px;
  }
}

/* ============================================
   14. Praxis-Galerie
   ============================================ */
.praxis-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4);
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-main img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.gallery-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gallery-item img {
  width: 100%;
  height: calc(200px - var(--space-2));
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .praxis-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-main img {
    height: 250px;
  }

  .gallery-side {
    flex-direction: row;
  }

  .gallery-item {
    flex: 1;
  }

  .gallery-item img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .praxis-gallery {
    gap: var(--space-3);
  }

  .gallery-main img {
    height: 200px;
  }

  .gallery-side {
    flex-direction: column;
    gap: var(--space-3);
  }

  .gallery-item img {
    height: 180px;
  }
}
