/* ============================================
   ALC Metalltechnik GmbH - Hauptstylesheet
   schlossermeister.cc
   Mobile-First Responsive Design
   ============================================ */

@import url('variables.css');

/* ---- SELBST GEHOSTETE SCHRIFTEN (DSGVO: keine Google-Fonts-Anfrage) ---- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/montserrat-v31-latin_latin-ext-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/montserrat-v31-latin_latin-ext-600.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/montserrat-v31-latin_latin-ext-700.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/open-sans-v44-latin_latin-ext-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/open-sans-v44-latin_latin-ext-600.woff2') format('woff2');
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  line-height: 1.7;
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-cta);
}

ul, ol {
  list-style: none;
}

/* ---- TYPOGRAFIE ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 { font-size: var(--font-size-3xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--font-size-2xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-xl); margin-bottom: var(--space-sm); }
h4 { font-size: var(--font-size-lg); margin-bottom: var(--space-sm); }

@media (min-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
}

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

/* ---- LAYOUT UTILITIES ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

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

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

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- SKIP NAVIGATION ---- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-cta);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}

.skip-nav:focus {
  top: var(--space-md);
  color: var(--color-white);
}

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: transparent;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  height: var(--header-height-scrolled);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--color-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
  transition: color var(--transition-normal), text-shadow var(--transition-normal);
}

.header.scrolled .header__logo {
  color: var(--color-primary);
  text-shadow: none;
}

.header__logo img {
  height: 50px;
  width: auto;
  min-width: 50px;
  object-fit: contain;
  transition: height var(--transition-normal);
}

.header.scrolled .header__logo img {
  height: 40px;
  min-width: 40px;
}

/* ---- NAVIGATION ---- */
.nav {
  display: none;
}

.nav.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3xl) var(--space-xl);
  z-index: 200;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: var(--space-sm) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-md);
  color: var(--color-dark);
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-cta);
}

/* Dropdown */
.nav__dropdown {
  display: none;
  padding-left: var(--space-md);
}

.nav__item.open .nav__dropdown {
  display: block;
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-xs) 0;
  font-size: var(--font-size-sm);
  color: var(--color-gray);
}

.nav__dropdown-link:hover {
  color: var(--color-cta);
}

.nav__dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: inherit;
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.nav__item.open .nav__dropdown-toggle {
  transform: rotate(180deg);
}

/* Phone CTA in Nav */
.nav__cta {
  margin-top: var(--space-lg);
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .nav__list {
    flex-direction: row;
    gap: var(--space-md);
  }

  .nav__link {
    padding: var(--space-sm) 0;
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
    font-weight: 700;
  }

  .header.scrolled .nav__link {
    color: var(--color-dark);
    text-shadow: none;
  }

  .header.scrolled .nav__link:hover,
  .header.scrolled .nav__link--active {
    color: var(--color-cta);
  }

  .nav__link:hover,
  .nav__link--active {
    color: var(--color-accent);
  }

  /* Desktop Dropdown */
  .nav__item:hover .nav__dropdown,
  .nav__item:focus-within .nav__dropdown {
    display: block;
  }

  .nav__dropdown {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: var(--color-white);
    min-width: 220px;
    padding: var(--space-sm) 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
  }

  .nav__dropdown-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-dark);
    font-size: var(--font-size-sm);
  }

  .nav__dropdown-link:hover {
    background: var(--color-gray-light);
    color: var(--color-cta);
  }

  .nav__dropdown-toggle {
    display: none;
  }

  .nav__cta {
    margin-top: 0;
  }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 300;
}

.hamburger__line {
  width: 28px;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.header.scrolled .hamburger__line {
  background: var(--color-dark);
}

.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
  background: var(--color-dark);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
  background: var(--color-dark);
}

@media (min-width: 1024px) {
  .hamburger { display: none; }
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
}

.nav-overlay.active {
  display: block;
}

/* Mobile: Leistungen-Dropdown immer ausgeklappt wenn Nav offen */
@media (max-width: 1023px) {
  .nav.is-open .nav__dropdown {
    display: block;
  }

  .header:not(.scrolled) .nav__link {
    color: var(--color-dark);
  }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-md);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  line-height: 1.4;
}

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

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

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

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

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

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

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: var(--font-size-sm);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  background-color: var(--color-gray-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__video.loaded {
  opacity: 1;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--space-xl) var(--container-padding);
}

.hero__title {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  /* Lange Einzelwoerter ("Schlossermeister", "Poolabdeckungen") duerfen auf
     schmalen Viewports umbrechen bzw. per Silbentrennung (lang=de-AT) getrennt
     werden, statt vom .hero{overflow:hidden} abgeschnitten zu werden. */
  overflow-wrap: break-word;
  hyphens: auto;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* Page Hero (kleiner) */
/* Kleiner Hero fuer Rechts-/Info-/Fehlerseiten (ohne Video) */
.hero--small {
  min-height: 34vh;
}

.hero--small .hero__title {
  font-size: var(--font-size-3xl);
}

.hero--page {
  min-height: 40vh;
}

.hero--page .hero__title {
  font-size: var(--font-size-3xl);
}

/* Sehr schmale Viewports (< 480px): Hero-Titel verkleinern, damit lange
   Einzelwoerter ("Schlossermeister" ~404px @45px, "Poolabdeckungen") komplett
   im Viewport bleiben und nicht vom .hero{overflow:hidden} beschnitten werden.
   TC-23. Ab 480px passen die Woerter bei voller Groesse. */
@media (max-width: 480px) {
  .hero__title,
  .hero--page .hero__title {
    font-size: var(--font-size-2xl);
  }

  /* Lange Einzelwoerter in Zwischenueberschriften ("Poolabdeckungen", "Standardmodelle")
     duerfen auf schmalen Viewports umbrechen statt ueber den Container zu laufen. */
  h2, h3 {
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}

.breadcrumb {
  font-size: var(--font-size-sm);
  margin-top: var(--space-md);
  opacity: 0.8;
}

.breadcrumb a {
  color: var(--color-white);
  opacity: 0.8;
}

.breadcrumb a:hover {
  opacity: 1;
}

/* ---- SECTIONS ---- */
.section {
  padding: var(--space-3xl) 0;
}

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

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

.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

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

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

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

.section__header h2 {
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(199, 91, 18, 0.4);
}

.section__header p {
  color: var(--color-gray);
  font-size: var(--font-size-lg);
}

.section--dark .section__header p {
  color: var(--color-accent);
}

/* ---- CARDS ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  overflow: hidden;
}

/* Kartenbilder beliebigen Seitenverhaeltnisses fuellen den 4:3-Rahmen (Audit: object-fit
   auf dem Wrapper-<div> wirkt nicht; erst auf dem <img> greift es). */
.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__body {
  padding: var(--space-lg);
}

.card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  color: var(--color-cta);
}

.card__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--color-gray);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
}

.card__link {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-cta);
}

.card__link:hover {
  color: var(--color-primary);
}

/* ---- STATS / ZAHLEN ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

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

.stat__number {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-accent);
  display: block;
}

.stat__label {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-top: var(--space-xs);
}

/* ---- CTA BANNER ---- */
.cta-banner {
  text-align: center;
  padding: var(--space-3xl) var(--container-padding);
}

.cta-banner h2 {
  color: var(--color-white);
}

.cta-banner p {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.cta-banner .btn {
  margin: 0 var(--space-sm);
}

.cta-banner__phone {
  display: block;
  margin-top: var(--space-md);
  font-size: var(--font-size-lg);
  color: var(--color-white);
  font-weight: 600;
}

/* ---- KONTAKT INLINE ---- */
.kontakt-inline {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  text-align: left;
}

@media (min-width: 768px) {
  .kontakt-inline {
    grid-template-columns: 1fr 1fr;
  }
}

.kontakt-inline__info p {
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.kontakt-inline__link {
  color: var(--color-white) !important;
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.kontakt-inline__link:hover {
  /* Panel-Hintergrund ist die Primaerfarbe (dunkelbraun): Akzent-Beige laege
     nur bei ~3,2:1. Weiss + Unterstreichung haelt den Kontrast bei ~7:1. */
  color: var(--color-white) !important;
  text-decoration: underline;
}

.kontakt-inline__map {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
  color: var(--color-white);
}

.map-consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  width: 100%;
  height: 100%;
}

.map-consent-placeholder p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.map-consent-btn {
  background: var(--color-cta);
  color: var(--color-white);
  border: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.map-consent-btn:hover {
  opacity: 0.85;
}

.cta-banner__phone:hover {
  /* Auf der Primaerfarbe (dunkelbraun) bleibt Weiss + Unterstreichung lesbar
     (Akzent-Beige laege unter 4,5:1). */
  color: var(--color-white);
  text-decoration: underline;
}

/* ---- ABOUT PREVIEW ---- */
.about-preview {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 768px) {
  .about-preview {
    grid-template-columns: 1fr 1fr;
  }
}

.about-preview__image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.about-preview__image,
.about-preview__image-hover {
  border-radius: var(--radius-md);
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.about-preview__image-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.about-preview__image-wrapper:hover .about-preview__image {
  opacity: 0;
}

.about-preview__image-wrapper:hover .about-preview__image-hover {
  opacity: 1;
}

/* ---- GALERIE ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.gallery-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--color-white);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item:focus .gallery-item__overlay,
.gallery-item:focus-within .gallery-item__overlay {
  /* Caption auch per Tastatur sichtbar (Item ist tabindex="0"), nicht nur bei Maus-Hover */
  transform: translateY(0);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

.gallery-item__title {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.gallery-item__category {
  font-size: 0.75rem;
  opacity: 0.8;
}

.gallery-item.hidden {
  display: none;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 500;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

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

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  padding: var(--space-sm);
  line-height: 1;
}

/* ---- FORMS ---- */
.form__group {
  margin-bottom: var(--space-lg);
}

.form__label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  transition: border-color var(--transition-fast);
  background: var(--color-white);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-cta);
  box-shadow: 0 0 0 3px rgba(199, 91, 18, 0.15);
}

.form__textarea {
  resize: vertical;
  min-height: 150px;
}

.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.form__checkbox input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-cta);
}

.form__error {
  color: var(--color-error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  display: none;
}

.form__group.error .form__input,
.form__group.error .form__textarea,
.form__group.error .form__select {
  border-color: var(--color-error);
}

.form__group.error .form__error {
  display: block;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
  padding-top: var(--space-3xl);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
}

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

.footer__grid {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

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

.footer__title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-md);
}

.footer__text {
  font-size: var(--font-size-sm);
  line-height: 1.8;
}

.footer__list li {
  margin-bottom: var(--space-xs);
}

.footer__list a {
  font-size: var(--font-size-sm);
}

.footer__social a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer__social svg {
  flex-shrink: 0;
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--color-cta);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-fast);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

/* ---- CONTENT PAGES ---- */
.content-page {
  padding: var(--space-2xl) 0;
  min-height: 60vh;
}

.content-page h2 {
  margin-top: var(--space-2xl);
}

.content-page h3 {
  margin-top: var(--space-xl);
}

.content-page ul {
  list-style: disc;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.content-page li {
  margin-bottom: var(--space-xs);
}

/* ---- ADVANTAGES / VORTEILE ---- */
.advantages {
  display: grid;
  gap: var(--space-xl);
}

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

@media (min-width: 1024px) {
  .advantages { grid-template-columns: repeat(4, 1fr); }
}

.advantage {
  text-align: center;
  padding: var(--space-lg);
}

.advantage__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  color: var(--color-cta);
}

.advantage__title {
  font-size: var(--font-size-md);
  margin-bottom: var(--space-sm);
}

.advantage__text {
  font-size: var(--font-size-sm);
  color: var(--color-gray);
}

/* ---- CONTACT INFO ---- */
.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.contact-info__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-cta);
}

/* ---- ANIMATIONS ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- REDUCED MOTION (Barrierefreiheit, WCAG 2.3.3 / 2.2.2) ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Hero-Video ausblenden – das Poster (Hintergrundbild der .hero-Section) bleibt sichtbar.
     Das Laden der .mp4 unterbindet zusaetzlich js/main.js (initHeroVideo). */
  .hero__video {
    display: none !important;
  }

  /* Scroll-Einblendungen sofort sichtbar statt animiert */
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Alle Bewegungs-/Transition-Effekte praktisch abschalten */
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- FOCUS STYLES ---- */
:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

/* ---- PRINT STYLES ---- */
@media print {
  .header, .footer, .nav, .hamburger, .cta-banner, .hero::before {
    display: none !important;
  }
  .hero {
    min-height: auto;
    color: var(--color-dark);
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  a { color: #000; text-decoration: underline; }
}

/* ============================================
   DARK MODE
   Nur Hauptinhalt (Sections, Cards, Body).
   Header/Nav, Hero, Zahlen&Fakten, Kontakt
   und Footer bleiben immer im hellen Modus.
   ============================================ */

[data-theme="dark"] body {
  background-color: #1A1A1A;
  color: #E8E8E8;
}

[data-theme="dark"] .section--light {
  background-color: #2A2A2A;
}

[data-theme="dark"] .card {
  background: #2A2A2A;
  border-color: #333;
}

[data-theme="dark"] .card__body,
[data-theme="dark"] .card__body p {
  color: #CCCCCC;
}

[data-theme="dark"] .legal-content {
  color: #E8E8E8;
}

[data-theme="dark"] .cookie-section {
  background: #2A2A2A;
}

/* ---- Cookie-Richtlinien: Tabellen (Dark-Mode-faehig, ersetzt inline #f5f5f5) ---- */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
}
.cookie-table th,
.cookie-table td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ddd;
}
.cookie-table thead th {
  background: var(--color-primary);
  color: #fff;
}
.cookie-table__alt {
  background: var(--color-gray-light);
}
[data-theme="dark"] .cookie-table th,
[data-theme="dark"] .cookie-table td {
  border-color: #444;
}

/* ---- Prosa-Links im Dark Mode ----
   Das Primaerbraun (#8B4513) der Standard-Links faellt auf dunklem Grund auf
   ~2,4:1 durch. Ein warmer, heller Akzent haelt >=4.5:1 auf Body (#1A1A1A, 7,8:1)
   und auf .section--light (#2A2A2A, 6,5:1). Buttons (.btn) und inline-gefaerbte
   Links (kontakt-inline__link !important, CTA-Links mit style="color") bleiben
   durch hoehere Spezifitaet bzw. :not(.btn) ausgenommen. */
[data-theme="dark"] .legal-content a:not(.btn),
[data-theme="dark"] .content-text a:not(.btn),
[data-theme="dark"] .section p a:not(.btn) {
  color: var(--color-accent);
}
[data-theme="dark"] .legal-content a:not(.btn):hover,
[data-theme="dark"] .content-text a:not(.btn):hover,
[data-theme="dark"] .section p a:not(.btn):hover {
  color: #E8C4A0;
}

/* ---- Dark-Mode Kontrast-Korrekturen (Phase 10, A1/A6) ----
   Ursache: --color-white wird im Dark Mode zu #1A1A1A (für Karten-/Body-
   Hintergründe gedacht). Als TEXTfarbe auf farbigen Buttons kippt es dadurch
   auf Dunkel und wird unlesbar (z. B. weiß-auf-Orange -> ~2,9:1). Hier für die
   betroffenen farbigen Flächen wieder auf echtes Weiß setzen. */
[data-theme="dark"] .btn--primary,
[data-theme="dark"] .skip-nav,
[data-theme="dark"] .back-to-top,
[data-theme="dark"] .map-consent-btn,
[data-theme="dark"] .form-status--success,
[data-theme="dark"] .form-status--error {
  color: #FFFFFF;
}

/* Outline-Dark-Buttons: Primärbraun (#8B4513) ist auf dunklem Grund unlesbar
   (~2,0:1) -> heller Akzent (Text & Rahmen, 7,8:1 auf #1A1A1A). */
[data-theme="dark"] .btn--outline-dark {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
[data-theme="dark"] .btn--outline-dark:hover {
  background: var(--color-accent);
  color: #1A1A1A;
}

/* Card-Link (CTA-Orange) auf dunkler Karte (~2,4:1) -> hellerer Akzent (6,5:1). */
[data-theme="dark"] .card__link {
  color: var(--color-accent);
}
[data-theme="dark"] .card__link:hover {
  color: #E8C4A0;
}

/* Zahlen-&-Fakten-Band bleibt im Dark Mode dunkel (statt über --color-dark auf
   Hell zu invertieren), damit die goldenen Akzent-Zahlen ihren Kontrast behalten
   (Akzent auf #1A1A1A = 7,8:1 statt 1,8:1 auf hellem Grund). */
[data-theme="dark"] .section--dark {
  background: #1A1A1A;
  color: #FFFFFF;
}

/* Sections die IMMER hell bleiben: Variablen zuruecksetzen */
[data-theme="dark"] .header,
[data-theme="dark"] .hero,
[data-theme="dark"] .stats,
[data-theme="dark"] .cta-banner,
[data-theme="dark"] .footer,
[data-theme="dark"] .kontakt-inline {
  --color-dark: #1A1A1A;
  --color-gray-dark: #333333;
  --color-gray: #666666;
  --color-gray-light: #F5F5F0;
  --color-white: #FFFFFF;
}

/* ---- THEME TOGGLE + TRANSLATE TOGGLE ---- */

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

.theme-toggle,
.translate-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  color: var(--color-white);
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.header.scrolled .theme-toggle,
.header.scrolled .translate-toggle {
  color: var(--color-dark);
  border-color: rgba(0,0,0,0.2);
}

.theme-toggle:hover,
.translate-toggle:hover {
  border-color: var(--color-accent);
}

.theme-toggle:disabled,
.translate-toggle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 1023px) {
  .nav__toolbar {
    margin-top: var(--space-md);
    justify-content: center;
  }

  .theme-toggle,
  .translate-toggle {
    color: var(--color-dark);
    border-color: rgba(0,0,0,0.2);
  }

}

/* ---- TRANSLATE MODAL ---- */

.translate-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.translate-modal.active {
  display: flex;
}

.translate-modal__content {
  background: var(--color-white, #fff);
  color: var(--color-dark, #1A1A1A);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .translate-modal__content {
  background: #2A2A2A;
  color: #E8E8E8;
}

.translate-modal__title {
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-lg);
  font-family: var(--font-heading);
}

.translate-modal__reset {
  margin-top: var(--space-md);
  width: 100%;
}

.translate-modal__close-btn {
  display: block;
  width: 100%;
  margin-top: var(--space-sm);
  background: var(--color-gray-light);
  color: var(--color-gray);
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
}

.translate-modal__close-btn:hover {
  background: var(--color-gray);
  color: var(--color-white);
}

/* Hide Google Translate top bar */
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

/* ============================================
   KONTAKTFORMULAR (Phase 06)
   Erscheint in der .section--primary/.cta-banner (heller Text auf Primaerfarbe).
   Grundstile fuer .form__group/.form__error/.form__input etc. stehen weiter oben.
   ============================================ */
.contact-form {
  max-width: 640px;
  margin: var(--space-2xl) auto 0;
  text-align: left;
}

/* Eingabefelder: heller Feld-Hintergrund braucht dunklen Text
   (im CTA-Kontext erbt der Text sonst die weisse Section-Farbe). */
.contact-form .form__input,
.contact-form .form__textarea,
.contact-form .form__select {
  color: var(--color-dark);
  background: var(--color-white);
}

.contact-form .form__input::placeholder,
.contact-form .form__textarea::placeholder {
  color: var(--color-gray);
  opacity: 1;
}

/* Datenschutz-Checkbox-Link erbt die Textfarbe des Umfelds */
.contact-form .form__checkbox a {
  color: inherit;
  text-decoration: underline;
}

/* Fehlermeldungen: Der Formular-Abschnitt hat die Primaerfarbe (dunkelbraun)
   als Hintergrund; rote Schrift (#C62828) darauf laege bei nur ~1,3:1. Daher
   als roter Chip mit weisser Schrift (~5,6:1). Die Sichtbarkeit (display) bleibt
   von .form__group.error .form__error gesteuert. */
.contact-form .form__error {
  color: var(--color-white);
  background: var(--color-error);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.contact-form .btn {
  width: 100%;
  margin: var(--space-sm) 0 0;
}

/* Honeypot: visuell entfernt, aber NICHT display:none (manche Bots
   ueberspringen display:none-Felder). Aus dem Barrierefreiheits-Baum genommen. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Status-/Ergebnismeldung nach dem Absenden */
.form-status {
  margin: var(--space-md) 0 0;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.form-status:empty {
  display: none;
}

.form-status--success {
  color: var(--color-white);
  background: var(--color-success);
  padding: var(--space-md);
}

.form-status--error {
  color: var(--color-white);
  background: var(--color-error);
  padding: var(--space-md);
}

body { top: 0 !important; }

/* ---- FAQ (Accordion, Phase 08 SEO) ---- */
.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-gray-light, #e5e5e5);
}

.faq__question {
  cursor: pointer;
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: var(--space-xl);
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
  content: "+";
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4em;
  line-height: 1;
  color: var(--color-accent-text);
}

.faq__item[open] .faq__question::after { content: "\2013"; }

.faq__answer {
  padding: 0 0 var(--space-md);
}

.faq__answer p { margin: 0; }


/* ============================================
   STARTSEITE: zufällige Projektauswahl (js/featured.js) + Google-Bewertungen
   ============================================ */
.gallery-item--link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gallery-item--link:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

.reviews__score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg);
  font-size: var(--font-size-lg);
}

.reviews__stars {
  display: inline-flex;
  gap: 2px;
  color: #E0A100; /* Google-Bewertungsgelb, auf hell und dunkel lesbar */
}

.reviews__stars svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.reviews__meta {
  color: var(--color-gray);
  font-size: var(--font-size-md);
}

.review {
  height: 100%;
  margin: 0;
}

.review .card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.review__stars {
  color: #E0A100;
  font-size: var(--font-size-md);
  letter-spacing: 2px;
}

.review__text {
  font-style: italic;
  margin: 0;
}

.review__author {
  color: var(--color-gray);
  font-size: var(--font-size-sm);
  margin-top: auto;
}

[data-theme="dark"] .review__author,
[data-theme="dark"] .reviews__meta {
  color: var(--color-gray);
}


/* ============================================
   ZEITSTRAHL (ueber-uns.html) – aus dem Seiten-<style> uebernommen 09/2026
   ============================================ */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 820px;
}
.timeline__item {
  position: relative;
  padding: 0 0 var(--space-xl) var(--space-lg);
  border-left: 2px solid var(--color-accent);
}
.timeline__item:last-child {
  padding-bottom: 0;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 3px solid var(--color-white);
}
.timeline__year {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--font-size-lg);
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}
.timeline__body h3 {
  font-size: var(--font-size-lg);
  color: var(--color-dark);
  margin-bottom: var(--space-xs);
}
.timeline__body p {
  color: var(--color-gray-dark);
  margin-bottom: 0;
}
 /* Ab Tablet: Jahr in eigener Spalte links, darunter der Text; mobil untereinander. */
@media (min-width: 768px) {
  .timeline__item {
    display: grid;
    grid-template-columns: 7rem 1fr;
    column-gap: var(--space-lg);
    padding-left: var(--space-2xl);
  }
  .timeline__year {
    margin-bottom: 0;
  }
}
 /* Dark Mode: --color-primary (#8B4513) ist auf dunklem Grund zu kontrastarm,
   daher die helle Akzentfarbe fuer die Jahreszahl. */
[data-theme="dark"] .timeline__year {
  color: var(--color-accent);
}



/* ============================================
   PROJEKTGALERIE: schrittweises Nachladen (js/gallery-lazy.js)
   ============================================ */
.gallery-item[hidden] {
  display: none !important;
}

.gallery-more {
  text-align: center;
  margin-top: var(--space-xl);
}

.gallery-more[hidden] {
  display: none;
}

.gallery-more__status {
  display: block;
  margin-top: var(--space-sm);
  color: var(--color-gray);
  font-size: var(--font-size-sm);
}

.gallery-sentinel {
  height: 1px;
}


/* ============================================
   404-SEITE: kurzes Werkstatt-Video (Loop) mit Standbild-Fallback
   ============================================ */
.notfound__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-dark);
  box-shadow: var(--shadow-lg);
}

.notfound__video,
.notfound__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.notfound__poster {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .notfound__video { display: none; }
  .notfound__poster { display: block; }
}
