/* Relieve, movimiento y página independiente de Galería Multimedia */

@keyframes card-pulse {
  0%,
  100% {
    filter: brightness(0.98) drop-shadow(0 0 0 rgba(240, 213, 149, 0));
  }

  50% {
    filter: brightness(1.07) drop-shadow(0 0 9px rgba(240, 213, 149, 0.24));
  }
}

@keyframes header-pulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(0, 9, 19, 0.25), 0 1px 0 rgba(216, 170, 85, 0.16);
  }

  50% {
    box-shadow: 0 7px 27px rgba(0, 9, 19, 0.46), 0 2px 0 rgba(240, 213, 149, 0.5);
  }
}

@keyframes header-content-pulse {
  0%,
  100% {
    filter: brightness(0.94);
    text-shadow: 0 0 0 rgba(240, 213, 149, 0);
  }

  50% {
    filter: brightness(1.1);
    text-shadow: 0 0 13px rgba(240, 213, 149, 0.26);
  }
}

@keyframes logo-pulse {
  0%,
  100% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.34), 0 0 0 rgba(216, 170, 85, 0);
  }

  50% {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.46), 0 0 17px rgba(216, 170, 85, 0.48);
  }
}

.site-header {
  animation: header-pulse 5.4s ease-in-out infinite;
}

.brand,
nav a {
  animation: header-content-pulse 5.4s ease-in-out infinite;
}

.brand-logo {
  animation: logo-pulse 5.4s ease-in-out infinite;
}

nav a[aria-current="page"] {
  color: #ffffff;
}

nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.timeline-item,
.mission-card,
.ministry-card,
.prayer-highlight,
.day-card,
.contact-card,
.gallery-teaser,
.button {
  transform: translateZ(0);
  transform-origin: center;
  animation: card-pulse 4.8s ease-in-out infinite;
  box-shadow:
    0 3px 0 rgba(240, 213, 149, 0.34),
    0 9px 18px rgba(0, 9, 19, 0.3),
    0 18px 42px rgba(0, 9, 19, 0.2);
  transition:
    transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1),
    border-color 240ms ease,
    background-color 240ms ease,
    box-shadow 240ms ease;
  will-change: transform, filter, box-shadow;
}

.timeline-item:nth-child(2n),
.ministry-card:nth-child(2n),
.day-card:nth-child(2n),
.contact-card:nth-child(2n) {
  animation-delay: -1.2s;
}

.timeline-item:nth-child(3n),
.ministry-card:nth-child(3n),
.day-card:nth-child(3n) {
  animation-delay: -2.4s;
}

.timeline-item:hover,
.timeline-item:focus-within,
.mission-card:hover,
.mission-card:focus-within,
.ministry-card:hover,
.ministry-card:focus-within,
.prayer-highlight:hover,
.prayer-highlight:focus-within,
.day-card:hover,
.day-card:focus-within,
.contact-card:hover,
.contact-card:focus-within,
.gallery-teaser:hover,
.gallery-teaser:focus-visible {
  z-index: 3;
  transform: translateY(-10px) scale(1.012);
  border-color: rgba(240, 213, 149, 0.74);
  background-color: rgba(17, 65, 109, 0.96);
  box-shadow:
    0 5px 0 rgba(240, 213, 149, 0.72),
    0 18px 28px rgba(0, 9, 19, 0.48),
    0 30px 72px rgba(27, 114, 168, 0.34),
    0 0 0 1px rgba(240, 213, 149, 0.3);
}

.button {
  box-shadow:
    0 3px 0 rgba(240, 213, 149, 0.34),
    0 9px 18px rgba(0, 9, 19, 0.3);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 4px 0 rgba(240, 213, 149, 0.68),
    0 15px 28px rgba(0, 9, 19, 0.44),
    0 0 24px rgba(216, 170, 85, 0.2);
}

.gallery-invitation {
  background: transparent;
}

.gallery-teaser {
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  padding: clamp(26px, 4vw, 50px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(11, 49, 88, 0.9);
  color: #ffffff;
  text-decoration: none;
}

.gallery-teaser h2,
.gallery-teaser p {
  color: #ffffff;
}

.gallery-teaser-copy > p:not(.eyebrow) {
  max-width: 510px;
  color: rgba(255, 255, 255, 0.9);
}

.gallery-teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #f0d595;
  font-weight: 800;
}

.gallery-teaser-link span {
  display: inline-block;
  font-size: 1.35rem;
  transition: transform 220ms ease;
}

.gallery-teaser:hover .gallery-teaser-link span,
.gallery-teaser:focus-visible .gallery-teaser-link span {
  transform: translateX(6px);
}

.gallery-teaser-images {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 285px;
  transform: perspective(900px) rotateY(-3deg);
}

.gallery-teaser-images img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 9, 19, 0.34);
}

.gallery-teaser-images img:first-child {
  grid-row: 1 / 3;
}

.gallery-page-section {
  min-height: calc(100vh - 76px);
  padding-top: 64px;
}

.gallery-page-section > .container {
  padding: clamp(28px, 4vw, 54px);
}

.gallery-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 48px;
}

.gallery-page-heading h1 {
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 6vw, 5.7rem);
}

.gallery-page-heading p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.gallery-back {
  flex: 0 0 auto;
  color: #ffffff;
}

.gallery-page .gallery-item {
  transform: translateZ(0);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 3px 0 rgba(240, 213, 149, 0.25),
    0 15px 34px rgba(0, 9, 19, 0.32);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.gallery-page .gallery-item:hover {
  z-index: 2;
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(240, 213, 149, 0.68);
  box-shadow:
    0 5px 0 rgba(240, 213, 149, 0.62),
    0 21px 46px rgba(0, 9, 19, 0.5);
}

@media (max-width: 980px) {
  .gallery-page-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .gallery-teaser {
    grid-template-columns: 1fr;
  }

  .gallery-teaser-images {
    height: 235px;
    transform: none;
  }

  .gallery-page-section {
    padding-top: 34px;
  }

  .gallery-page-heading {
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .brand,
  .brand-logo,
  nav a,
  .timeline-item,
  .mission-card,
  .ministry-card,
  .prayer-highlight,
  .day-card,
  .contact-card,
  .gallery-teaser,
  .button {
    animation: none;
  }

  .timeline-item:hover,
  .mission-card:hover,
  .ministry-card:hover,
  .prayer-highlight:hover,
  .day-card:hover,
  .contact-card:hover,
  .gallery-teaser:hover,
  .gallery-page .gallery-item:hover {
    transform: none;
  }
}
