/* ================================================================
   EBHARDT – TAFELSYSTEME
   Seitenspezifisches Stylesheet
   ================================================================ */

:root {
  --tafel-bg: #b6b2c0;
  --tafel-text: #5e3813;
}

/* ----------------------------------------------------------------
   NAV
   ---------------------------------------------------------------- */
.tafel-nav .site-nav__logo-img {
  filter: none;
}

.tafel-menu-btn {
  border-color: var(--tafel-text) !important;
  color: var(--tafel-text) !important;
}
.tafel-menu-btn:hover {
  background: var(--tafel-text) !important;
  color: var(--tafel-bg) !important;
}

/* ----------------------------------------------------------------
   HERO
   ---------------------------------------------------------------- */
.tafel-hero {
  background-color: var(--tafel-bg);
  padding: 10rem 4rem 4rem;
}

.tafel-hero__title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 8rem);
  color: var(--tafel-text);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2rem;
}

.tafel-hero__text {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tafel-hero__text p {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: clamp(0.9rem, 2.2vw, 2.1rem);
  color: var(--tafel-text);
  line-height: 1.7;
}

.tafel-hero__text strong {
  font-family: var(--font-headline);
  font-weight: 700;
}

/* ----------------------------------------------------------------
   FOTO-GRID
   2 Spalten: links hoch (1 Spalte) + rechts quer (2 Spalten)
   Zeile 2: quer (2 Spalten) + hoch (1 Spalte)
   Grid hat 3 Spalten total
   ---------------------------------------------------------------- */
.tafel-galerie {
  background-color: var(--tafel-bg);
  padding: 3rem 4rem 5rem;
}

.tafel-galerie__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

/* Foto-Kachel */
.tafel-foto {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* Bild-Wrapper – fixe Größe unabhängig vom Caption-Text */
.tafel-foto__img-wrap {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
}

.tafel-foto img {
  transition: transform 0.4s ease;
}

.tafel-foto:hover img {
  transform: scale(1.02);
}

/* Hochformat – 1 Spalte */
.tafel-foto--hoch {
  grid-column: span 1;
}

/* Querformat – 2 Spalten */
.tafel-foto--quer {
  grid-column: span 2;
}

.tafel-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hochformat: fixe Proportion */
.tafel-foto--hoch .tafel-foto__img-wrap {
  aspect-ratio: 4 / 3;
}

.tafel-foto--quer .tafel-foto__img-wrap {
  aspect-ratio: 16 / 5;
}

/* Bildunterschrift – immer am unteren Ende */
.tafel-foto__caption {
  margin-top: auto;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.6rem, 1.1vw, 1.1rem);
  color: var(--tafel-text);
  line-height: 1.4;
  opacity: 0.7;
  border-bottom: 1px solid var(--tafel-text);
}

/* Bildunterschrift */

/* ----------------------------------------------------------------
   VIDEO-BEREICH
   ---------------------------------------------------------------- */
.tafel-video {
  background-color: var(--tafel-bg);
  padding: 2rem 4rem 6rem;
}

/* Header */
.tafel-video__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tafel-video__eyebrow {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--tafel-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.tafel-video__title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 4rem);
  color: var(--tafel-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

/* Video-Container */
.tafel-video__wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9; /* Feste 16:9 Proportion */
}

/* Vorschaubild */
.tafel-video__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play-Button – zentriert via absolute positioning */
.tafel-video__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: white;
  opacity: 0.9;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  z-index: 2;
  /* Sicherstellen dass der Button nicht durch andere Elemente verschoben wird */
  margin: 0;
  padding: 0;
}

.tafel-video__play-btn:hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Video-Player */
.tafel-video__player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tafel-video__player[hidden] {
  display: none;
}

/* Bildunterschrift unter Video */
.tafel-video__caption {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--tafel-text);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.tafel-video__caption-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--tafel-text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.tafel-video__caption-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.2vw, 1.5rem);
  color: var(--tafel-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -1rem;
}

/* ----------------------------------------------------------------
   ANIMATIONEN
   ---------------------------------------------------------------- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .tafel-galerie__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tafel-foto--hoch,
  .tafel-foto--quer {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .tafel-hero,
  .tafel-galerie,
  .tafel-video {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .tafel-galerie__grid {
    grid-template-columns: 1fr;
  }
  .tafel-foto--hoch,
  .tafel-foto--quer {
    grid-column: span 1;
  }
}

/* ----------------------------------------------------------------
   LIGHTBOX
   ---------------------------------------------------------------- */
.tafel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tafel-lightbox[hidden] {
  display: none;
}

.tafel-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.tafel-lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.tafel-lightbox__img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.tafel-lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: 1.5px solid white;
  color: white;
  font-size: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 2;
}
.tafel-lightbox__close:hover {
  background: white;
  color: black;
}

.tafel-lightbox__prev,
.tafel-lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: white;
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
  z-index: 2;
}
.tafel-lightbox__prev {
  left: 1.5rem;
}
.tafel-lightbox__next {
  right: 1.5rem;
}
.tafel-lightbox__prev:hover,
.tafel-lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
}

.tafel-lightbox__counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.15em;
}

@media (max-width: 500px) {
  .tafel-hero__title {
    font-size: 2.5em;
  }
  .tafel-foto__caption {
    font-size: 1.1rem;
  }
}

/* Nav Hintergrund */
.tafel-nav {
  background-color: var(--tafel-bg);
}
