/* ==============================================
   Bozar Grid Gallery - Public Frontend Styles
   ==============================================
   
   IMAGE SIZE GUIDE FOR DESIGNERS/DEVELOPERS:
   ==========================================
   
   Mosaic Featured (1 Large + 4 Small):
     - Large image (left):     800 × 800px  (1:1)
     - Small images (right):   400 × 400px  (1:1)
   
   Hero + Sidebar:
     - Hero image:            1200 × 600px  (2:1)
   
   Masonry 3-Column:
     - Portrait images:        400 × 600px  (2:3)
     - Landscape images:       400 × 300px  (4:3)
     - Square images:          400 × 400px  (1:1)
   
   Equal Grid (3×3):
     - All images:             400 × 400px  (1:1)
   
   Asymmetric (2 Large + 3 Small):
     - Large images:           600 × 600px  (1:1)
     - Small images:           400 × 300px  (4:3)
   
   ============================================== */


/* ---- Base Container ---- */
.bgg-grid-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.bgg-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.bgg-grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bgg-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.35s ease;
    pointer-events: none;
}

.bgg-grid-item:hover img {
    transform: scale(1.05);
}

.bgg-grid-item:hover .bgg-grid-overlay {
    background: rgba(0, 0, 0, 0.08);
}


/* ---- Hotspot Cell Override ---- */
.bgg-hotspot-cell {
    overflow: visible;
}

.bgg-hotspot-cell .bih-hotspot-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.bgg-hotspot-cell .bih-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Don't apply grid hover effects to hotspot cells (they have their own interactions) */
.bgg-hotspot-cell:hover img {
    transform: none;
}

.bgg-hotspot-cell .bgg-grid-overlay {
    display: none;
}


/* ========================================
   1. MOSAIC FEATURED (1 Large + 4 Small)
   ======================================== */
.bgg-style-mosaic_featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.bgg-style-mosaic_featured .bgg-mosaic-item-1 {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
}

.bgg-style-mosaic_featured .bgg-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ========================================
   2. HERO + SIDEBAR
   ======================================== */
.bgg-style-hero_sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 400px;
}

.bgg-hero-image {
    position: relative;
}

.bgg-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bgg-hero-text-panel {
    background: #f0ebe3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
}

.bgg-hero-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.bgg-hero-desc {
    font-size: clamp(13px, 1.2vw, 15px);
    color: #555;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

/* Multiple Buttons Container */
.bgg-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.bgg-hero-btn {
    display: inline-block;
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.bgg-hero-btn:hover {
    background: #1a1a1a;
    color: #fff;
}


/* ========================================
   3. MASONRY 3-COLUMN (Pinterest-style)
   ======================================== */
.bgg-style-masonry_3col {
    columns: 3;
    column-gap: 8px;
}

.bgg-style-masonry_3col .bgg-masonry-item {
    break-inside: avoid;
    margin-bottom: 8px;
    display: inline-block;
    width: 100%;
}

.bgg-style-masonry_3col .bgg-masonry-item img {
    width: 100%;
    height: auto;
    display: block;
}


/* ========================================
   4. EQUAL GRID (Uniform 3×3)
   ======================================== */
.bgg-style-equal_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.bgg-style-equal_grid .bgg-equal-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}


/* ========================================
   5. ASYMMETRIC (2 Large + 3 Small)
   ======================================== */
.bgg-style-asymmetric {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
}

.bgg-style-asymmetric .bgg-asymmetric-item-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.bgg-style-asymmetric .bgg-asymmetric-item-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.bgg-style-asymmetric .bgg-asymmetric-item-3 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.bgg-style-asymmetric .bgg-asymmetric-item-4 {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
}

.bgg-style-asymmetric .bgg-asymmetric-item-5 {
    grid-column: 1 / 4;
    grid-row: 3 / 4;
}

.bgg-style-asymmetric .bgg-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ========================================
   LIGHTBOX MODAL
   ======================================== */
.bgg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.bgg-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.bgg-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bgg-lightbox.active img {
    transform: scale(1);
}

.bgg-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.bgg-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bgg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.bgg-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bgg-lightbox-prev {
    left: 20px;
}

.bgg-lightbox-next {
    right: 20px;
}


/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet (768 - 1024px) */
@media (max-width: 1024px) {
    .bgg-grid-container {
        border-radius: 6px;
    }

    .bgg-style-mosaic_featured {
        gap: 6px !important;
    }

    .bgg-style-hero_sidebar {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .bgg-hero-text-panel {
        padding: 30px 24px;
    }

    .bgg-style-masonry_3col {
        columns: 2;
    }

    .bgg-style-equal_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bgg-style-asymmetric {
        grid-template-columns: repeat(2, 1fr);
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-1 {
        grid-column: 1 / 3;
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-2 {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-3 {
        grid-column: 2 / 3;
        grid-row: auto;
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-4 {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-5 {
        grid-column: 1 / 3;
        grid-row: auto;
    }
}

/* Mobile ( < 768px) */
@media (max-width: 767px) {
    .bgg-grid-container {
        border-radius: 4px;
    }

    .bgg-style-mosaic_featured {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bgg-style-mosaic_featured .bgg-mosaic-item-1 {
        grid-row: auto;
        grid-column: auto;
    }

    .bgg-style-hero_sidebar {
        grid-template-columns: 1fr;
    }

    .bgg-hero-text-panel {
        padding: 24px 20px;
    }

    .bgg-hero-title {
        font-size: 22px;
    }

    .bgg-hero-buttons {
        flex-direction: column;
    }

    .bgg-style-masonry_3col {
        columns: 1;
    }

    .bgg-style-equal_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bgg-style-asymmetric {
        grid-template-columns: 1fr;
    }

    .bgg-style-asymmetric .bgg-asymmetric-item-1,
    .bgg-style-asymmetric .bgg-asymmetric-item-2,
    .bgg-style-asymmetric .bgg-asymmetric-item-3,
    .bgg-style-asymmetric .bgg-asymmetric-item-4,
    .bgg-style-asymmetric .bgg-asymmetric-item-5 {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Small Mobile ( < 480px) */
@media (max-width: 479px) {
    .bgg-style-equal_grid {
        grid-template-columns: 1fr;
    }

    .bgg-hero-text-panel {
        padding: 20px 16px;
    }

    .bgg-lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .bgg-lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}