/* =============================================
   SURYA BANQUET HALL — PHOTO GALLERY SECTION
   Premium "Awwwards Level" styles
   ============================================= */

.sbh-gallery-section {
    background: #f4f8fa;
    padding: 120px 0 130px;
    font-family: 'DM Sans', sans-serif;
}

/* ── Header ── */
.sbh-gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.sbh-gallery-header .sbh-subtitle {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffb039;
    margin-bottom: 14px;
    position: relative;
}

.sbh-gallery-header .sbh-subtitle::before,
.sbh-gallery-header .sbh-subtitle::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: #ffb039;
    vertical-align: middle;
    margin: 0 10px;
}

.sbh-gallery-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 700;
    color: #131c26;
    line-height: 1.2;
    margin: 0;
}

.sbh-gallery-header p {
    font-size: 16px;
    color: #898a8e;
    margin: 16px auto 0;
    max-width: 560px;
    line-height: 1.7;
}

/* ── Masonry Grid ── */
.sbh-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 16px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Span overrides for visual variety */
.sbh-gallery-grid .sbh-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.sbh-gallery-grid .sbh-item:nth-child(4) {
    grid-row: span 1;
}

.sbh-gallery-grid .sbh-item:nth-child(7) {
    grid-column: span 2;
}

/* ── Individual Item ── */
.sbh-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    background: #131c26; /* Dark background so zoom out doesn't flash white */
}

.sbh-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(19, 28, 38, 0.9) 0%, rgba(19, 28, 38, 0.3) 50%, rgba(19, 28, 38, 0) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sbh-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sbh-item:hover::before {
    opacity: 1;
}

.sbh-item:hover img {
    transform: scale(1.1);
}

/* ── Overlay Content ── */
.sbh-item-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sbh-item:hover .sbh-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.sbh-item-overlay .sbh-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffb039;
    margin-bottom: 8px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.sbh-item-overlay .sbh-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.sbh-item:hover .sbh-cat,
.sbh-item:hover .sbh-title {
    transform: translateY(0);
    opacity: 1;
}

/* Instagram Hover Icon */
.sbh-item-ig {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) rotate(-10deg);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 3;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.sbh-item:hover .sbh-item-ig {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.sbh-item-ig svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hidden items (filtered out) */
.sbh-item.sbh-hidden {
    display: none;
}

/* ── Lightbox ── */
.sbh-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.98);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sbh-lightbox.sbh-open {
    display: flex;
    opacity: 1;
}

.sbh-lightbox-inner {
    position: relative;
    max-width: 1000px;
    width: 100%;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sbh-lightbox.sbh-open .sbh-lightbox-inner {
    transform: scale(1);
    opacity: 1;
}

.sbh-lightbox-inner img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.sbh-lightbox-close {
    position: absolute;
    top: -24px;
    right: -24px;
    width: 48px;
    height: 48px;
    background: #ffb039;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 176, 57, 0.3);
}

.sbh-lightbox-close:hover {
    background: #f89e18;
    transform: rotate(90deg) scale(1.1);
}

.sbh-lightbox-caption {
    text-align: center;
    margin-top: 20px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
}

.sbh-lightbox-caption span {
    color: #ffb039;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

/* ── CTA button ── */
.sbh-gallery-cta {
    text-align: center;
    margin-top: 60px;
}

.sbh-gallery-cta a {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: #131c26;
    border: 2px solid #131c26;
    padding: 16px 42px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.sbh-gallery-cta a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffb039;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.sbh-gallery-cta a:hover {
    border-color: #ffb039;
    box-shadow: 0 10px 20px rgba(255, 176, 57, 0.2);
}

.sbh-gallery-cta a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* ── Responsive ── */
@media (max-width: 1280px) {
    .sbh-gallery-grid {
        padding: 0 16px;
        gap: 14px;
    }

    .sbh-gallery-section {
        padding: 100px 0 110px;
    }
}

@media (max-width: 1024px) {
    .sbh-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
        gap: 12px;
    }

    .sbh-gallery-grid .sbh-item:nth-child(7) {
        grid-column: span 1;
    }

    .sbh-gallery-header .sbh-subtitle {
        font-size: 12px;
    }

    .sbh-gallery-header h2 {
        font-size: clamp(32px, 3.6vw, 42px);
    }

    .sbh-gallery-header {
        margin-bottom: 40px;
    }

    .sbh-item-overlay {
        padding: 20px;
    }

    .sbh-item-overlay .sbh-title {
        font-size: 18px;
    }

    .sbh-lightbox-inner {
        max-width: 92vw;
    }
}

@media (max-width: 900px) {
    .sbh-gallery-grid {
        grid-auto-rows: 180px;
    }
}

@media (max-width: 768px) {
    .sbh-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        gap: 10px;
        padding: 0 16px;
    }

    .sbh-gallery-grid .sbh-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .sbh-gallery-grid .sbh-item:nth-child(4),
    .sbh-gallery-grid .sbh-item:nth-child(7) {
        grid-row: span 1;
        grid-column: span 1;
    }

    .sbh-gallery-section {
        padding: 70px 0 80px;
    }

    .sbh-gallery-header h2 {
        font-size: clamp(28px, 5vw, 36px);
    }

    .sbh-lightbox-close {
        top: -16px;
        right: -16px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .sbh-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
        gap: 12px;
    }

    .sbh-gallery-grid .sbh-item:nth-child(1),
    .sbh-gallery-grid .sbh-item:nth-child(7),
    .sbh-gallery-grid .sbh-item:nth-child(4) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .sbh-gallery-section {
        padding: 50px 0 60px;
    }

    .sbh-gallery-header h2 {
        font-size: 26px;
    }
}
