/* ==========================================================================
   Gemeinsames Stylesheet für alle Demo-Landingpages (Zahnarzt, Anwalt, Restaurant)
   Nutzt dieselbe Kieweg-Design-Farbpalette wie die Hauptseite (siehe theme.css).
   Die .theme-* Klassen am <body> steuern nur noch dezente typografische Akzente.
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-bg);
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typografische Akzente je Branche ---------- */
.theme-dental {
  --font-heading: "Segoe UI", Roboto, sans-serif;
}

.theme-law,
.theme-restaurant {
  --font-heading: Georgia, "Times New Roman", serif;
}

h1, h2, h3 {
  font-family: var(--font-heading, inherit);
}

/* ---------- Zurück-Link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-olive-dark);
}

.back-brand-mark {
  height: 26px;
  width: auto;
  flex-shrink: 0;
}

.back-bar {
  background-color: var(--color-taupe);
  border-bottom: 1px solid var(--color-dark-soft);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-dark);
  border-bottom: 1px solid rgba(224, 228, 231, 0.08);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-bg);
}

.logo span {
  color: var(--color-olive);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-weight: 600;
  color: var(--color-bg);
  transition: color 0.25s ease;
}

.nav a:hover {
  color: var(--color-olive);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-bg);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    transform 0.25s ease, box-shadow 0.3s ease;
}

.btn-primary {
  background-color: var(--color-olive);
  color: var(--color-dark);
}

.btn-primary:hover {
  background-color: var(--color-olive-dark);
  color: var(--color-bg);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px var(--shadow-color);
}

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

.btn-secondary:hover {
  background-color: var(--color-olive-dark);
  border-color: var(--color-olive-dark);
  color: var(--color-bg);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px var(--shadow-color);
}

.hero .btn-secondary {
  border-color: var(--color-bg);
  color: var(--color-bg);
}

.hero .btn-secondary:hover {
  background-color: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-dark);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-dark);
  color: var(--color-bg);
  padding: 120px 0 100px;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: rgba(224, 228, 231, 0.08);
  color: var(--color-olive);
  border: 1px solid rgba(120, 140, 57, 0.4);
}

.hero-badge svg {
  width: 40px;
  height: 40px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-olive);
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  margin-bottom: 36px;
  color: var(--color-taupe);
}

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

/* ---------- Klickbares Hero-Bild ---------- */
.hero-photo {
  display: block;
  position: relative;
  margin: 40px auto 0;
  max-width: 420px;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(27, 14, 2, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-photo:hover,
.hero-photo:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 26px 55px rgba(27, 14, 2, 0.5);
}

.hero-photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-photo:hover img {
  transform: scale(1.06);
}

.hero-photo-zoom {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(224, 228, 231, 0.92);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(27, 14, 2, 0.35);
}

.hero-photo-zoom svg {
  width: 18px;
  height: 18px;
}

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

.section-alt {
  background-color: var(--color-taupe);
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.section-sub {
  text-align: center;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 56px;
}

.grid {
  display: grid;
  gap: 32px;
}

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

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

/* ---------- Karten (Leistungen) ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-dark-soft);
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  box-shadow: 0 20px 36px var(--shadow-color);
  transform: translateY(-8px);
  border-color: var(--color-olive);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--color-olive-soft);
  color: var(--color-olive-dark);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon {
  background: var(--color-olive);
  color: var(--color-bg);
}

.card:hover .card-icon svg {
  transform: scale(1.15) rotate(-8deg);
}

.card h3 {
  margin-bottom: 10px;
  color: var(--color-dark);
}

.card p {
  color: var(--color-muted);
}

/* ---------- Galerie ---------- */
/* Flexbox statt Grid: dadurch zentriert sich eine unvollständige letzte Zeile
   (z. B. 2 von 5 Bildern) automatisch, statt linksbündig "schief" zu wirken. */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.gallery-item {
  position: relative;
  flex: 1 1 300px;
  max-width: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-dark-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 36px var(--shadow-color);
  border-color: var(--color-olive);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark);
}

/* ---------- Öffnungszeiten ---------- */
.hours-table {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--color-dark-soft);
}

.hours-table td {
  padding: 12px 8px;
  color: var(--color-muted);
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--color-dark);
}

/* ---------- Kontakt ---------- */
.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 960px;
  margin: 0 auto;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 16px;
  color: var(--color-dark);
}

.contact-info p {
  margin-bottom: 10px;
  color: var(--color-muted);
}

.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-dark-soft);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.form-row input,
.form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-taupe);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-white);
  color: var(--color-dark);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-olive);
  box-shadow: 0 0 0 3px var(--color-olive-soft);
}

.form-status {
  font-weight: 600;
  min-height: 1.2em;
}

.form-status.success {
  color: var(--color-olive-dark);
}

.form-status.error {
  color: #b3261e;
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-taupe);
  padding: 32px 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(224, 228, 231, 0.08);
}

.site-footer a {
  font-weight: 700;
  color: var(--color-olive);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.footer-links a {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-taupe);
}

.footer-links a:hover {
  color: var(--color-olive);
  text-decoration: underline;
}

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

@media (max-width: 700px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav.open {
    max-height: 300px;
  }

  .nav a {
    padding: 14px 0;
    width: 100%;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-photo img {
    height: 200px;
  }

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