﻿/* =========================
   GALLERY - MOBILE FIRST
========================= */

.gallery-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 14px 50px;
}

.gallery-header {
    max-width: 700px;
    margin: 0 auto 28px;
    text-align: center;
}

.gallery-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #198754;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.gallery-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    color: #202020;
}

.gallery-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================
   GRID
========================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


/* =========================
   CARD
========================= */

.gallery-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.gallery-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #f3f5f3;
}

    .gallery-media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .3s ease;
    }

.gallery-image-button {
    cursor: pointer;
}

.gallery-card:hover .gallery-media img {
    transform: scale(1.035);
}


/* =========================
   VIDEO
========================= */

.gallery-video {
    text-decoration: none;
}

.gallery-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .7);
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .25);
}


/* =========================
   PLACEHOLDER
========================= */

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    background: #eef5ef;
}


/* =========================
   TITLE
========================= */

.gallery-card-body {
    padding: 10px;
}

    .gallery-card-body h2 {
        margin: 0;
        color: #222;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


/* =========================
   EMPTY
========================= */

.gallery-empty {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
}

.gallery-empty-icon {
    margin-bottom: 10px;
    font-size: 45px;
}

.gallery-empty h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.gallery-empty p {
    margin: 0;
    color: #666;
}


/* =========================
   PAGINATION
========================= */

.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.gallery-page-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 1px solid #198754;
    border-radius: 8px;
    color: #198754;
    background: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

    .gallery-page-btn:hover {
        color: #fff;
        background: #198754;
    }

    .gallery-page-btn.disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.gallery-current-page {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}


/* =========================
   LIGHTBOX
========================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .9);
    z-index: 99999;
}

    .gallery-lightbox.active {
        display: flex;
    }

.gallery-lightbox-content {
    width: 100%;
    max-width: 950px;
    text-align: center;
}

    .gallery-lightbox-content img {
        display: block;
        max-width: 100%;
        max-height: 82vh;
        margin: auto;
        object-fit: contain;
        border-radius: 8px;
    }

.gallery-lightbox-title {
    margin-top: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.gallery-no-scroll {
    overflow: hidden;
}


.gallery-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    overflow: hidden;
}

    .gallery-placeholder img {
        width: 100%;
        height: 100%;
        min-height: 220px;
        object-fit: cover;
        display: block;
    }

/* =========================
   TABLET
========================= */

@media (min-width: 768px) {

    .gallery-page {
        padding: 35px 24px 60px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .gallery-header h1 {
        font-size: 36px;
    }

    .gallery-card-body {
        padding: 13px;
    }

        .gallery-card-body h2 {
            font-size: 15px;
        }
}


/* =========================
   DESKTOP
========================= */

@media (min-width: 1200px) {

    .gallery-page {
        padding-top: 45px;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}
