/* ==========================================================================
   Eigene Styles (aus index.html ausgelagert)
   Malereibetrieb Struckmann
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Überschrift – animierte Unterstreichung ("seit 1887")
   -------------------------------------------------------------------------- */
.highlight-underline {
  position: relative;
  display: inline-block;
}

.highlight-underline::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #d4a574, #b8914a);
  animation: slideIn 1.2s ease-out;
}

@keyframes slideIn {
  from {
    width: 0;
    left: 0;
  }
  to {
    width: 100%;
    left: 0;
  }
}

/* --------------------------------------------------------------------------
   2. Fade-in-Animationen (Abschnitt "Malereibetrieb mit Erfahrung")
   -------------------------------------------------------------------------- */
.fade-in-animation {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-heading { animation-delay: 0.2s; }
.fade-in-text    { animation-delay: 0.4s; }
.fade-in-divider { animation-delay: 0.6s; }

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.8s; }
.fade-in-up:nth-child(2) { animation-delay: 0.9s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   3. Galerie & Lightbox
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.gallery-item {
  overflow: hidden;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

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

.gallery-trigger {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  width: 100%;
  background: transparent;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__image {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
}

.gallery-lightbox__counter {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.gallery-lightbox__close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__nav--prev {
  left: 16px;
}

.gallery-lightbox__nav--next {
  right: 16px;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* --------------------------------------------------------------------------
   3b. Video-Galerie (automatisch aus dem Ordner "videos/")
   -------------------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.video-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.video-item:hover {
  transform: scale(1.03);
}

.video-trigger {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  width: 100%;
  background: #000;
  cursor: pointer;
}

.video-item video {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-item__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: background 0.3s ease;
}

.video-item__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}

.video-item:hover .video-item__play {
  background: rgba(212, 165, 116, 0.9);
}

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

/* --------------------------------------------------------------------------
   4. Kontaktformular – Hinweis nach Absenden (mailto)
   -------------------------------------------------------------------------- */
#kontakt-hinweis {
  display: none;
  margin-top: 12px;
  color: #1a7a1a;
  font-size: 15px;
  line-height: 1.5;
}
