/* =========================================
   SNP GALLERY SECTION
========================================= */

.snp-gallery-section {
    width: 100%;
    padding: 90px 0;
    background: #ffffff;
}

.snp-gallery-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================
   HEADING
========================================= */

.snp-gallery-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.snp-gallery-label {
    display: inline-block;
    margin-bottom: 12px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #1769ff;
}

.snp-gallery-heading h2 {
    margin: 0;

    font-family: "Manrope", sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    font-weight: 800;
    color: #071a35;
}

.snp-gallery-heading h2 span {
    color: #1769ff;
}

.snp-gallery-heading p {
    margin: 16px auto 0;

    max-width: 600px;

    font-family: "Manrope", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #667085;
}


/* =========================================
   GALLERY GRID
========================================= */

.snp-gallery-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================
   IMAGE ITEM
========================================= */

.snp-gallery-item {
    position: relative;

    width: 100%;
    height: 280px;

    overflow: hidden;

    border-radius: 16px;

    background: #eef3f9;

    box-shadow:
        0 8px 30px rgba(7, 26, 53, 0.07);

    isolation: isolate;
}


/* Image */

.snp-gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.55s ease,
        filter 0.55s ease;
}


/* Hover */

.snp-gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(0.96);
}


/* =========================================
   DIFFERENT IMAGE HEIGHTS
   Gives premium editorial look
========================================= */

.snp-gallery-item:nth-child(2),
.snp-gallery-item:nth-child(5),
.snp-gallery-item:nth-child(8),
.snp-gallery-item:nth-child(11) {
    height: 340px;
}

.snp-gallery-item:nth-child(3),
.snp-gallery-item:nth-child(6),
.snp-gallery-item:nth-child(9),
.snp-gallery-item:nth-child(12) {
    height: 250px;
}


/* =========================================
   IMAGE FALLBACK
========================================= */

.snp-gallery-item img[src=""] {
    display: none;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {

    .snp-gallery-section {
        padding: 75px 0;
    }

    .snp-gallery-container {
        width: min(100% - 32px, 760px);
    }

    .snp-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .snp-gallery-item,
    .snp-gallery-item:nth-child(2),
    .snp-gallery-item:nth-child(3),
    .snp-gallery-item:nth-child(5),
    .snp-gallery-item:nth-child(6),
    .snp-gallery-item:nth-child(8),
    .snp-gallery-item:nth-child(9),
    .snp-gallery-item:nth-child(11),
    .snp-gallery-item:nth-child(12) {
        height: 280px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .snp-gallery-section {
        padding: 55px 0;
    }

    .snp-gallery-container {
        width: calc(100% - 24px);
    }

    .snp-gallery-heading {
        margin-bottom: 30px;
    }

    .snp-gallery-label {
        font-size: 11px;
        letter-spacing: 1.7px;
    }

    .snp-gallery-heading h2 {
        font-size: 30px;
    }

    .snp-gallery-heading p {
        font-size: 14px;
        line-height: 1.6;
    }

    .snp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .snp-gallery-item,
    .snp-gallery-item:nth-child(2),
    .snp-gallery-item:nth-child(3),
    .snp-gallery-item:nth-child(5),
    .snp-gallery-item:nth-child(6),
    .snp-gallery-item:nth-child(8),
    .snp-gallery-item:nth-child(9),
    .snp-gallery-item:nth-child(11),
    .snp-gallery-item:nth-child(12) {
        height: 250px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 380px) {

    .snp-gallery-heading h2 {
        font-size: 27px;
    }

    .snp-gallery-item {
        height: 220px !important;
        border-radius: 13px;
    }

}







/* ==========================================
   GALLERY IMAGE POPUP / LIGHTBOX
========================================== */

.snp-lightbox[aria-hidden="true"] {
    display: none !important;
}

.snp-lightbox[aria-hidden="false"] {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.94);
}

/* Background overlay */
.snp-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

/* Main popup */
.snp-lightbox-panel {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    animation: galleryPopupIn 0.3s ease;
}

@keyframes galleryPopupIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Popup header */
.snp-lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 5px 18px;
}

.snp-lightbox-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.snp-lightbox-brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c5a059;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.6);
}

.snp-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Play, pause and close buttons */
.snp-lightbox-control {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.25s ease,
                color 0.25s ease,
                transform 0.25s ease;
}

.snp-lightbox-control:hover {
    color: #111111;
    background: #c5a059;
    transform: translateY(-2px);
}

.snp-lightbox-control svg {
    width: 22px;
    height: 22px;
}

/* Play/pause icon switching */
.snp-icon-play {
    display: none;
}

.snp-lightbox.is-paused .snp-icon-play {
    display: block;
}

.snp-lightbox.is-paused .snp-icon-pause {
    display: none;
}

/* Image stage */
.snp-lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 0;
}

/* Image wrapper */
.snp-lightbox-image-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    height: min(70vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Popup image */
#snpLightboxImage {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 15px 55px rgba(0, 0, 0, 0.4);
    transition: opacity 0.25s ease;
}

#snpLightboxImage.is-loading {
    opacity: 0.35;
}

/* Previous and next arrows */
.snp-lightbox-arrow {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.25s ease,
                color 0.25s ease,
                transform 0.25s ease;
}

.snp-lightbox-arrow:hover {
    color: #111111;
    background: #c5a059;
    transform: scale(1.08);
}

.snp-lightbox-arrow svg {
    width: 25px;
    height: 25px;
}

/* Loading indicator */
.snp-lightbox-loading {
    display: none;
    position: absolute;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.snp-lightbox-loading.is-visible {
    display: block;
}

/* Popup footer */
.snp-lightbox-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 5px 5px;
}

.snp-lightbox-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.snp-lightbox-image-number {
    color: #c5a059;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.snp-lightbox-caption-title {
    color: #eeeeee;
    font-size: 14px;
    text-align: right;
}

/* Automatic slideshow progress bar */
.snp-lightbox-progress {
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.snp-lightbox-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #c5a059;
    border-radius: inherit;
    transition: width 0.1s linear;
}

/* Keyboard hints */
.snp-lightbox-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.snp-lightbox-hint span:not(.snp-lightbox-hint-divider) {
    color: #c5a059;
    font-weight: 600;
}

.snp-lightbox-hint-divider {
    margin: 0 5px;
    color: rgba(255, 255, 255, 0.25);
}

/* Keyboard focus */
.snp-lightbox button:focus-visible {
    outline: 2px solid #c5a059;
    outline-offset: 4px;
}

/* Prevent background scrolling while popup is open */
body.gallery-lightbox-open {
    overflow: hidden;
}

/* ==========================================
   RESPONSIVE MOBILE DESIGN
========================================== */

@media (max-width: 768px) {
    .snp-lightbox[aria-hidden="false"] {
        padding: 10px;
    }

    .snp-lightbox-panel {
        width: 100%;
        max-height: 96vh;
    }

    .snp-lightbox-topbar {
        padding: 8px 2px 14px;
    }

    .snp-lightbox-brand {
        font-size: 14px;
    }

    .snp-lightbox-control {
        width: 40px;
        height: 40px;
    }

    .snp-lightbox-stage {
        gap: 7px;
    }

    .snp-lightbox-image-wrap {
        height: 65vh;
    }

    .snp-lightbox-arrow {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .snp-lightbox-arrow svg {
        width: 21px;
        height: 21px;
    }

    .snp-lightbox-footer {
        padding-top: 14px;
    }

    .snp-lightbox-caption-title {
        font-size: 12px;
    }

    .snp-lightbox-hint {
        display: none;
    }
}

@media (max-width: 400px) {
    .snp-lightbox-brand {
        font-size: 12px;
    }

    .snp-lightbox-actions {
        gap: 7px;
    }

    .snp-lightbox-control {
        width: 36px;
        height: 36px;
    }

    .snp-lightbox-image-wrap {
        height: 58vh;
    }

    .snp-lightbox-arrow {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }
}

/* ==========================================
   SNP GALLERY - CARD & TEXT LAYOUT FIX
   Add this at the END of gallery_main_page.css
========================================== */

.snp-gallery-page,
.snp-gallery-page * {
    box-sizing: border-box;
}

.snp-gallery-page {
    width: 100%;
    padding: 36px 0 70px;
    background: #ffffff;
    overflow: hidden;
}

.snp-gallery-section {
    width: 100%;
    padding: 0 24px;
}

.snp-gallery-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

/* ---------- MAIN HEADING ---------- */

.snp-gallery-heading {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.snp-gallery-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #b18a43;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.snp-label-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #c5a059;
}

.snp-gallery-heading h1 {
    margin: 0 0 14px;
    color: #16263c;
    font-family: "Manrope", sans-serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.2px;
    overflow-wrap: anywhere;
}

.snp-gallery-heading h1 span {
    color: #c5a059;
}

.snp-gallery-description {
    max-width: 620px;
    margin: 0 auto;
    color: #697586;
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.snp-gallery-heading-line {
    width: 60px;
    height: 3px;
    margin: 22px auto 0;
    border: 0;
    border-radius: 10px;
    background: #c5a059;
}

/* ---------- GALLERY TOOLBAR ---------- */

.snp-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 22px;
}

.snp-gallery-current-title {
    min-width: 0;
    margin: 0;
    color: #172b45;
    font-family: "Manrope", sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.snp-gallery-subtitle {
    margin: 5px 0 0;
    color: #7b8796;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.snp-gallery-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 36px;
    padding: 8px 15px;
    border: 1px solid #eadfc9;
    border-radius: 30px;
    background: #fbf8f1;
    color: #8c692d;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

/* ---------- RESPONSIVE CARD GRID ---------- */

.snp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 26px;
    width: 100%;
}

/* ---------- INDIVIDUAL CARD ---------- */

.snp-gallery-item {
    position: relative;
    display: block;
    width: 100%;
    height: 310px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    background: #f3f4f6;
    box-shadow: 0 5px 18px rgba(20, 35, 55, 0.07);
    cursor: pointer;
    text-align: left;
    transform: translateY(0);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.snp-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: inherit;
    transition: transform 0.45s ease;
}

.snp-gallery-item:hover {
    transform: translateY(-5px);
    border-color: #c5a059;
    box-shadow: 0 14px 32px rgba(20, 35, 55, 0.14);
}

.snp-gallery-item:hover img {
    transform: scale(1.045);
}

.snp-gallery-item:focus-visible {
    outline: 3px solid #c5a059;
    outline-offset: 4px;
}

/* ---------- IMAGE OVERLAY ---------- */

.snp-gallery-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    background: linear-gradient(
        to top,
        rgba(10, 18, 30, 0.82) 0%,
        rgba(10, 18, 30, 0.25) 38%,
        rgba(10, 18, 30, 0) 70%
    );
    pointer-events: none;
}

.snp-gallery-image-caption {
    display: block;
    width: 100%;
    margin: 0;
    color: #ffffff;
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: normal;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}

.snp-gallery-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(18, 25, 36, 0.55);
    color: #ffffff;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.snp-gallery-item:hover .snp-gallery-zoom {
    background: #c5a059;
    transform: scale(1.06);
}

/* ---------- EMPTY / MESSAGE STATE ---------- */

.snp-gallery-message {
    width: 100%;
    padding: 38px 20px;
    border: 1px dashed #d9dee6;
    border-radius: 14px;
    background: #fafbfc;
    color: #687588;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    overflow-wrap: anywhere;
}

.snp-message-icon {
    margin-bottom: 12px;
    color: #c5a059;
    font-size: 32px;
}

/* ---------- TABLET ---------- */

@media (max-width: 1024px) {
    .snp-gallery-section {
        padding-right: 22px;
        padding-left: 22px;
    }

    .snp-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .snp-gallery-item {
        height: 290px;
    }

    .snp-gallery-heading {
        margin-bottom: 34px;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
    .snp-gallery-page {
        padding: 26px 0 48px;
    }

    .snp-gallery-section {
        padding-right: 16px;
        padding-left: 16px;
    }

    .snp-gallery-heading {
        margin-bottom: 28px;
    }

    .snp-gallery-heading h1 {
        margin-bottom: 10px;
        font-size: 30px;
        line-height: 1.25;
        letter-spacing: -0.6px;
    }

    .snp-gallery-description {
        font-size: 13px;
        line-height: 1.75;
    }

    .snp-gallery-toolbar {
        align-items: flex-start;
        margin-bottom: 17px;
        gap: 10px;
    }

    .snp-gallery-current-title {
        font-size: 19px;
    }

    .snp-gallery-subtitle {
        font-size: 12px;
    }

    .snp-gallery-total {
        min-height: 32px;
        padding: 7px 11px;
        font-size: 11px;
    }

    .snp-gallery-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .snp-gallery-item {
        height: clamp(230px, 68vw, 340px);
        border-radius: 12px;
    }

    .snp-gallery-image-overlay {
        padding: 17px;
    }

    .snp-gallery-image-caption {
        font-size: 15px;
        line-height: 1.5;
    }

    .snp-gallery-zoom {
        top: 11px;
        right: 11px;
        width: 36px;
        height: 36px;
    }
}

/* ---------- SMALL MOBILE ---------- */

@media (max-width: 360px) {
    .snp-gallery-section {
        padding-right: 12px;
        padding-left: 12px;
    }

    .snp-gallery-heading h1 {
        font-size: 26px;
    }

    .snp-gallery-current-title {
        font-size: 17px;
    }

    .snp-gallery-item {
        height: 230px;
    }
}