
/* =========================================
   SNP GROUP - GALLERY SECTION
   Theme: Navy Blue, White, Bright Blue
========================================= */

.snp-gallery-section,
.snp-gallery-section * {
    box-sizing: border-box;
}

.snp-gallery-section {
    width: 100%;
    padding: 65px 0;
    background: #f5f8fc;
    overflow: hidden;
    font-family: 'Manrope', sans-serif;
}

/* Main Container */
.snp-gallery-container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
}

/* =========================================
   SECTION HEADING
========================================= */

.snp-gallery-heading {
    width: 100%;
    text-align: center;
    margin: 0 auto 32px;
}

.snp-gallery-subtitle {
    display: inline-block;
    margin-bottom: 10px;
    color: #1677e8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.snp-gallery-heading h2 {
    margin: 0 0 10px;
    color: #102a50;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
}

.snp-gallery-heading h2 span {
    color: #1677e8;
}

.snp-gallery-heading p {
    max-width: 600px;
    margin: 0 auto;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}

/* =========================================
   GALLERY SLIDER
========================================= */

.snp-gallery-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Gallery Track */
.snp-gallery-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================
   GALLERY CARDS - DESKTOP
   5 Cards Visible
========================================= */

.snp-gallery-card {
    position: relative;
    flex: 0 0 calc((100% - 72px) / 5);
    width: calc((100% - 72px) / 5);
    min-width: 0;
    max-width: calc((100% - 72px) / 5);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 13px;
}

/* Gallery Image */
.snp-gallery-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 13px;
    background: #dce6f2;
    box-shadow: 0 6px 20px rgba(16, 42, 80, 0.10);
}

.snp-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: 0;
    transition: transform 0.4s ease;
}

/* =========================================
   IMAGE OVERLAY
========================================= */

.snp-gallery-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 15px;
    color: #ffffff;
    background: linear-gradient(
        to top,
        rgba(5, 23, 49, 0.90) 0%,
        rgba(5, 23, 49, 0.30) 55%,
        transparent 100%
    );
    opacity: 1;
    transition: background 0.3s ease;
}

.snp-gallery-overlay h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.snp-gallery-view {
    display: inline-block;
    color: #dbeafe;
    font-size: 11px;
    font-weight: 500;
}

/* Hover Effect */
@media (hover: hover) {
    .snp-gallery-card:hover .snp-gallery-image img {
        transform: scale(1.07);
    }

    .snp-gallery-card:hover .snp-gallery-overlay {
        background: linear-gradient(
            to top,
            rgba(5, 23, 49, 0.95),
            rgba(5, 23, 49, 0.20) 65%,
            transparent
        );
    }
}

/* =========================================
   VIEW ALL BUTTON
========================================= */

.snp-gallery-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 28px;
}

.snp-gallery-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 22px;
    color: #ffffff;
    background: #102a50;
    border: 1px solid #102a50;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.snp-gallery-btn:hover {
    color: #ffffff;
    background: #1677e8;
    border-color: #1677e8;
}

.snp-gallery-btn span {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.snp-gallery-btn:hover span {
    transform: translateX(4px);
}

/* =========================================
   LAPTOP - 4 CARDS
========================================= */

@media (max-width: 1100px) {
    .snp-gallery-container {
        width: 94%;
    }

    .snp-gallery-track {
        gap: 14px;
    }

    .snp-gallery-card {
        flex: 0 0 calc((100% - 42px) / 4);
        width: calc((100% - 42px) / 4);
        max-width: calc((100% - 42px) / 4);
    }

    .snp-gallery-image {
        height: 200px;
    }

    .snp-gallery-overlay {
        padding: 12px;
    }

    .snp-gallery-overlay h3 {
        font-size: 14px;
    }
}

/* =========================================
   TABLET - 3 CARDS
========================================= */

@media (max-width: 768px) {
    .snp-gallery-section {
        padding: 50px 0;
    }

    .snp-gallery-heading h2 {
        font-size: 30px;
    }

    .snp-gallery-track {
        gap: 14px;
    }

    .snp-gallery-card {
        flex: 0 0 calc((100% - 28px) / 3);
        width: calc((100% - 28px) / 3);
        max-width: calc((100% - 28px) / 3);
    }

    .snp-gallery-image {
        height: 190px;
    }

    .snp-gallery-overlay {
        padding: 11px;
    }

    .snp-gallery-overlay h3 {
        font-size: 13px;
    }
}

/* =========================================
   MOBILE - ONLY 1 CARD
========================================= */

@media (max-width: 600px) {
    .snp-gallery-section {
        padding: 40px 0;
    }

    .snp-gallery-container {
        width: 100%;
    }

    .snp-gallery-heading {
        padding: 0 18px;
        margin-bottom: 23px;
    }

    .snp-gallery-subtitle {
        font-size: 11px;
        letter-spacing: 1.8px;
        margin-bottom: 8px;
    }

    .snp-gallery-heading h2 {
        font-size: 25px;
        line-height: 1.35;
        margin-bottom: 9px;
    }

    .snp-gallery-heading p {
        max-width: 340px;
        font-size: 13px;
        line-height: 1.6;
    }

    /* Swipeable wrapper */
    .snp-gallery-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .snp-gallery-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Horizontal cards */
    .snp-gallery-track {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: max-content;
        gap: 0;
        padding: 0;
        margin: 0;
    }

    /* Exactly one full-width card */
    .snp-gallery-card {
        flex: 0 0 100vw;
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        padding: 0 16px;
        margin: 0;
        overflow: hidden;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    /* Image */
    .snp-gallery-image {
        width: 100%;
        height: 230px;
        border-radius: 13px;
        box-shadow: 0 6px 20px rgba(16, 42, 80, 0.10);
    }

    .snp-gallery-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Mobile overlay */
    .snp-gallery-overlay {
        padding: 16px;
        opacity: 1;
    }

    .snp-gallery-overlay h3 {
        font-size: 16px;
    }

    .snp-gallery-view {
        font-size: 12px;
    }

    .snp-gallery-footer {
        margin-top: 20px;
    }

    .snp-gallery-btn {
        min-height: 43px;
        padding: 11px 20px;
        font-size: 13px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {
    .snp-gallery-section {
        padding: 35px 0;
    }

    .snp-gallery-heading h2 {
        font-size: 22px;
    }

    .snp-gallery-card {
        flex: 0 0 100vw;
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        padding: 0 12px;
    }

    .snp-gallery-image {
        height: 210px;
    }

    .snp-gallery-overlay {
        padding: 13px;
    }

    .snp-gallery-overlay h3 {
        font-size: 15px;
    }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    .snp-gallery-wrapper {
        scroll-behavior: auto;
    }

    .snp-gallery-image img,
    .snp-gallery-overlay,
    .snp-gallery-btn,
    .snp-gallery-btn span {
        transition: none;
    }
}


/* =====================================
   GALLERY SCROLL & MARGIN FIX
===================================== */

@media (max-width: 600px) {
    .snp-gallery-section {
        width: 100%;
        padding: 40px 0;
        overflow: hidden;
    }

    .snp-gallery-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .snp-gallery-heading {
        width: 100%;
        padding: 0 16px;
        margin: 0 auto 24px;
    }

    /* Scrollable viewport */
    .snp-gallery-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-snap-stop: always;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .snp-gallery-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Horizontal slider */
    .snp-gallery-track {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    /* One full slide per viewport */
    .snp-gallery-card {
        position: relative;
        display: block;
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 16px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        overflow: hidden;
        border-radius: 0;
    }

    /* Card image with equal side margins */
    .snp-gallery-image {
        position: relative;
        display: block;
        width: 100%;
        height: 230px;
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 13px;
        background: #dce6f2;
        box-shadow: 0 6px 20px rgba(16, 42, 80, 0.10);
    }

    .snp-gallery-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .snp-gallery-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        padding: 16px;
        opacity: 1;
        border-radius: 13px;
    }

    .snp-gallery-overlay h3 {
        font-size: 16px;
        margin: 0 0 5px;
    }

    .snp-gallery-view {
        font-size: 12px;
    }

    .snp-gallery-footer {
        margin-top: 20px;
        padding: 0 16px;
    }
}

/* Small phones */
@media (max-width: 360px) {
    .snp-gallery-card {
        padding: 0 12px;
    }

    .snp-gallery-image {
        height: 210px;
    }

    .snp-gallery-overlay {
        padding: 13px;
    }
}