/* ===========================
   DIE ZAHNÄRZTE am Rathausplatz
   Modern Dental Practice Website
   =========================== */

/* --- Variables --- */
:root {
  --green: #28AE7B;
  --green-light: #ebfaf5;
  --green-dark: #0f402d;
  --green-hover: #2eca8f;
  --anthracite: #2C3E50;
  --anthracite-light: #34495E;
  --text: #2C3E50;
  --text-light: #5b686f;
  --bg: #ffffff;
  --bg-light: #f8fafa;
  --bg-accent: #f0faf6;
  --border: #e6e6e6;
  --white: #ffffff;
  --shadow: 0 2px 16px rgba(44,62,80,0.07);
  --shadow-lg: 0 8px 32px rgba(44,62,80,0.10);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Lexend', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--anthracite);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.75rem; font-weight: 600; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 600; font-family: var(--font-body); }

p {
  margin-bottom: 1em;
  color: var(--text-light);
}

ul, ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.4em;
  color: var(--text-light);
}

strong {
  color: var(--text);
}

blockquote {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--white);
  border-left: 4px solid var(--green);
  padding: 0.5em 0 0.5em 1.5em;
  margin: 1.5em 0;
  line-height: 1.5;
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(40, 174, 123, 0.3);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--anthracite);
}

.btn-outline-dark {
  background: transparent;
  color: var(--anthracite);
  border-color: var(--anthracite);
}

.btn-outline-dark:hover {
  background: var(--anthracite);
  color: var(--white);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
}

.nav-logo .logo-main {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--anthracite);
  letter-spacing: 0.02em;
}

.nav-logo .logo-sub {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-menu > li > a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--green);
  background: var(--green-light);
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: none !important;
  width: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: none;
  position: absolute;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.dropdown li a:hover {
  color: var(--green);
  background: var(--green-light);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--anthracite);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--anthracite) 0%, var(--green-dark) 100%);
  padding-top: 72px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(40, 174, 123, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(40, 174, 123, 0.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  padding: 60px 24px;
}

.hero h1 {
  color: var(--white);
  font-size: 3.2rem;
  margin-bottom: 0.6em;
  line-height: 1.25;
}

.hero h1 .highlight {
  color: var(--green);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-light {
  background: var(--bg-light);
}

.section-accent {
  background: linear-gradient(135deg, var(--anthracite) 0%, var(--green-dark) 100%);
  color: var(--white);
}

.section-accent h2 {
  color: var(--white);
}

.section-accent p {
  color: rgba(255,255,255,0.85);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-accent .section-subtitle {
  color: rgba(255,255,255,0.7);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 32px;
}

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

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

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

.align-center {
  align-items: center;
}

/* --- Content Block --- */
.content-block {
  padding: 0;
}

.content-block h3 {
  color: var(--green);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.content-block h3:first-child {
  margin-top: 0;
}

/* --- Service Cards --- */
.service-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
  color: var(--text);
}

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--green);
  margin-bottom: 16px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
  font-family: var(--font-body);
  font-weight: 600;
}

.service-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Philosophy Block --- */
.philosophy-block {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-block blockquote {
  border-left: none;
  padding: 0;
  text-align: center;
}

/* --- Info Card --- */
.info-card {
  background: var(--bg-light);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.info-card h3 {
  color: var(--green);
  margin-bottom: 1em;
}

/* --- Hours Table --- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.hours-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 40%;
}

.hours-table td:last-child {
  color: var(--text-light);
}

.hours-table em {
  color: var(--green);
  font-size: 0.85rem;
}

/* --- Contact Quick --- */
.contact-quick {
  margin-top: 16px;
}

.contact-quick p {
  font-size: 0.9rem;
  margin-bottom: 0.5em;
}

.contact-quick a {
  color: var(--green);
}

/* --- Page Header --- */
.page-header {
  padding: 120px 0 48px;
  background: linear-gradient(135deg, var(--anthracite) 0%, var(--green-dark) 100%);
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.3em;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
}

/* --- Service Detail Sections --- */
.service-detail {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail h2 {
  color: var(--green);
  margin-bottom: 0.3em;
}

.service-detail h2 .section-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: var(--green-light);
  color: var(--green);
  border-radius: 50%;
  font-size: 0.9rem;
  margin-right: 12px;
  font-family: var(--font-body);
}

.service-detail h3 {
  color: var(--anthracite);
  margin-top: 1.5em;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-grid a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  transition: transform var(--transition);
}

.gallery-grid a:hover {
  transform: scale(1.03);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  line-height: 1;
}

/* --- Contact Form Area --- */
.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-light);
  border: 1px solid var(--border);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Impressum --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
}

.legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* --- Feature List --- */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: 50%;
}

/* --- Accordion --- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-header {
  padding: 16px 20px;
  background: var(--bg-light);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--green-light);
}

.accordion-header::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--green);
  font-weight: 400;
  transition: transform var(--transition);
}

.accordion-item.active .accordion-header::after {
  content: '−';
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-body-inner {
  padding: 16px 20px;
}

/* --- Two Column Content --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.two-col-reverse {
  direction: rtl;
}

.two-col-reverse > * {
  direction: ltr;
}

/* --- Highlight Box --- */
.highlight-box {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5em 0;
}

.highlight-box p {
  margin-bottom: 0;
  color: var(--text);
}

/* --- Footer --- */
.footer {
  background: var(--anthracite);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 0;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.footer-logo .logo-main {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-logo .logo-sub {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

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

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin-bottom: 0;
}

/* --- Emergency Banner --- */
.emergency-banner {
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 1.5em 0;
}

.emergency-banner h3 {
  color: #c0392b;
}

/* --- Programs Table --- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 1.5em 0;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.program-card:hover {
  box-shadow: var(--shadow);
}

.program-card h4 {
  color: var(--green);
  margin-bottom: 0.8em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 { font-size: 2.2rem; }
  .hero { min-height: 70vh; }

  .section { padding: 56px 0; }

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  /* Mobile Nav */
  .navbar {
    overflow: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    z-index: 9999;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-menu > li {
    width: 100%;
  }

  .has-dropdown {
    display: flex;
    flex-wrap: wrap;
  }

  .has-dropdown > a {
    flex: 1;
  }

  .nav-menu > li > a {
    padding: 14px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .dropdown-toggle {
    display: flex !important;
    position: static;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: auto;
    overflow: visible;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    color: var(--green);
    padding: 0;
    margin: 0;
    transition: transform var(--transition);
  }

  .dropdown-toggle svg {
    transition: transform var(--transition);
  }

  .has-dropdown.open .dropdown-toggle svg {
    transform: rotate(180deg);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg-light);
    border-radius: 0;
    width: 100%;
    display: none;
    padding: 0;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

  .dropdown li a {
    padding: 12px 16px 12px 32px;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
