/* =================================
SECTION BACKGROUND
==================================== */
.gallery-section {
    position:relative;
    overflow:hidden;
    isolation:isolate;
    text-align:center;
    background:
        linear-gradient(
            rgba(250,245,243,.90),
            rgba(245,237,234,.92)
        ),
        url("eventbg.webp");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}

.gallery-section::before {
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            rgba(255,255,255,.18),
            rgba(255,255,255,.08)
        );
    z-index:0;
}

.gallery-section .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

/* =================================
SECTION HEADING
==================================== */
.gallery-section .section-subtitle {
    margin-top:35px;
    display:block;
    margin-bottom:10px;
    font-family:"Pinyon Script", cursive;
    font-size:3rem;
    font-weight:400;
    line-height:1;
    color:var(--gold);
}

.gallery-section .section-title {
    margin:0;
    font-family:"Cinzel", serif;
    font-size:2.2rem;
    font-weight:600;
    line-height:1.2;
    color:var(--primary);
}

.gallery-section .section-description {
    max-width:560px;
    margin:
        18px auto
        0;
    font-family:"Montserrat", sans-serif;
    font-size:.95rem;
    line-height:1.9;
    color:var(--text-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 50px;
  padding-bottom: 70px;
}

/* =================================
GALLERY CARD
==================================== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px) scale(.98);
  transition:
    opacity .55s ease,
    transform .55s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

.gallery-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Short, stable stagger: the whole gallery finishes quickly. */
.gallery-item:nth-child(1)  { transition-delay: 0ms; }
.gallery-item:nth-child(2)  { transition-delay: 45ms; }
.gallery-item:nth-child(3)  { transition-delay: 90ms; }
.gallery-item:nth-child(4)  { transition-delay: 135ms; }
.gallery-item:nth-child(5)  { transition-delay: 180ms; }
.gallery-item:nth-child(6)  { transition-delay: 225ms; }
.gallery-item:nth-child(7)  { transition-delay: 270ms; }
.gallery-item:nth-child(8)  { transition-delay: 315ms; }
.gallery-item:nth-child(9)  { transition-delay: 360ms; }
.gallery-item:nth-child(10) { transition-delay: 405ms; }
.gallery-item:nth-child(11) { transition-delay: 450ms; }
.gallery-item:nth-child(12) { transition-delay: 495ms; }
.gallery-item:nth-child(13) { transition-delay: 540ms; }
.gallery-item:nth-child(14) { transition-delay: 585ms; }
.gallery-item:nth-child(15) { transition-delay: 630ms; }
.gallery-item:nth-child(16) { transition-delay: 675ms; }
.gallery-item:nth-child(17) { transition-delay: 720ms; }
.gallery-item:nth-child(18) { transition-delay: 765ms; }

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s ease;
  z-index: 1;
}

/* Lightweight static overlay instead of the animated shimmer layer. */
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, .14),
    transparent 48%
  );
  pointer-events: none;
  z-index: 2;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .12);
  pointer-events: none;
  z-index: 3;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .11);
}

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

/* =================================
PHOTO LAYOUT
==================================== */
.gallery-item.square {
  aspect-ratio: 1 / 1;
}

.gallery-item.portrait {
  aspect-ratio: 3 / 4;
}

.gallery-item.landscape {
  aspect-ratio: 16 / 10;
  grid-column: span 2;
}

/* =================================
LIGHTBOX
==================================== */
.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background:
        linear-gradient(
        rgba(74, 52, 52, 0.28),
        rgba(74, 52, 52, 0.40)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
    z-index: 9999;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* ===========================================
LIGHTBOX CONTENT
============================================== */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    display: block;
    opacity: 1;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45);
    transform: scale(0.92);
    transition:
        opacity 0.28s ease,
        transform 0.35s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 20;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 20;
}

.lightbox-prev {
    left: 28px;
}

.lightbox-next {
    right: 28px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.22);
    transform:
        translateY(-50%)
        scale(1.08);
}

/* =================================
GALLERY EXTRA SECTION
==================================== */
.gallery-extra-section {
    position: relative;
    overflow: hidden;
    padding-top: 50px;
    isolation: isolate;
}

/* =================================
GALLERY EXTRA GRID
==================================== */
.gallery-extra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-bottom: 70px;
}

/* =================================
GALLERY EXTRA CARD
==================================== */
.gallery-extra-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    cursor: pointer;
    opacity: 0;
    transform: translateY(24px) scale(.98);
    transition:
        opacity .55s ease,
        transform .55s cubic-bezier(.22, 1, .36, 1);
}

.gallery-extra-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Short, stable stagger for the second gallery. */
.gallery-extra-item:nth-child(1)  { transition-delay: 0ms; }
.gallery-extra-item:nth-child(2)  { transition-delay: 45ms; }
.gallery-extra-item:nth-child(3)  { transition-delay: 90ms; }
.gallery-extra-item:nth-child(4)  { transition-delay: 135ms; }
.gallery-extra-item:nth-child(5)  { transition-delay: 180ms; }
.gallery-extra-item:nth-child(6)  { transition-delay: 225ms; }
.gallery-extra-item:nth-child(7)  { transition-delay: 270ms; }
.gallery-extra-item:nth-child(8)  { transition-delay: 315ms; }
.gallery-extra-item:nth-child(9)  { transition-delay: 360ms; }
.gallery-extra-item:nth-child(10) { transition-delay: 405ms; }
.gallery-extra-item:nth-child(11) { transition-delay: 450ms; }
.gallery-extra-item:nth-child(12) { transition-delay: 495ms; }
.gallery-extra-item:nth-child(13) { transition-delay: 540ms; }

.gallery-extra-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .55s ease;
    z-index: 1;
}

.gallery-extra-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, .14),
        transparent 48%
    );
    pointer-events: none;
    z-index: 2;
}

.gallery-extra-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, .12);
    pointer-events: none;
    z-index: 3;
}

.gallery-extra-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .11);
}

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

/* =================================
GALLERY EXTRA PHOTO LAYOUT
==================================== */
.gallery-extra-item.square {
    aspect-ratio: 1 / 1;
}

.gallery-extra-item.portrait {
    aspect-ratio: 3 / 4;
}

.gallery-extra-item.landscape {
    aspect-ratio: 16 / 10;
    grid-column: span 2;
}

/* =================================
LIGHTBOX ACTIVE
==================================== */
.gallery-extra-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* =================================
LIGHTBOX CONTENT
==================================== */
.gallery-extra-lightbox-content {
    position: relative;

    max-width: 90vw;
    max-height: 90vh;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* =================================
LIGHTBOX IMAGE
==================================== */
.gallery-extra-lightbox-content img {
    display: block;

    max-width: 100%;
    max-height: 90vh;

    border-radius: 20px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .45);

    opacity: 1;

    transform: scale(.92);

    transition:
        opacity .28s ease,
        transform .35s ease;
}

/* =================================
IMAGE ACTIVE
==================================== */
.gallery-extra-lightbox.active
.gallery-extra-lightbox-content img {
    transform: scale(1);
}

/* =================================
LIGHTBOX CLOSE
==================================== */
.gallery-extra-lightbox-close {
    position: absolute;

    top: 30px;
    right: 30px;

    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .12);

    color: #fff;

    font-size: 1.3rem;

    cursor: pointer;

    transition: .3s;

    z-index: 20;
}

.gallery-extra-lightbox-close:hover {
    background: rgba(255, 255, 255, .22);

    transform: rotate(90deg);
}

/* =================================
LIGHTBOX NAVIGATION
==================================== */
.gallery-extra-lightbox-prev,
.gallery-extra-lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .12);

    color: #fff;

    font-size: 1.6rem;

    cursor: pointer;

    transition: .3s;

    z-index: 20;
}

/* =================================
PREVIOUS
==================================== */
.gallery-extra-lightbox-prev {
    left: 28px;
}

/* =================================
NEXT
==================================== */
.gallery-extra-lightbox-next {
    right: 28px;
}

/* =================================
NAVIGATION HOVER
==================================== */
.gallery-extra-lightbox-prev:hover,
.gallery-extra-lightbox-next:hover {
    background: rgba(255, 255, 255, .22);

    transform:
        translateY(-50%)
        scale(1.08);
}