/**
 * Gallery Block — Static Styles v3.6.
 *
 * BEM root: .boost-gallery
 * Modifiers: --style-{minimal|rounded|overlay}
 *            --layout-{grid|masonry}
 *            --lightbox
 * Dynamic (in render.php <style>): color scheme, preset, columns, gap, bg-effect.
 *
 * @package Boost Theme Framework
 * @since 3.6.0
 */

/* /blocks/gallery/style.css */

/* =============================================================================
   BASE
   ============================================================================= */

.boost-gallery {
    position: relative;
    padding: 4rem 2rem;
    background: var(--boost-bg);
    color: var(--boost-text, inherit);
}

.boost-gallery__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* =============================================================================
   GRID LAYOUT (default)
   ============================================================================= */

.boost-gallery--layout-grid .boost-gallery__grid {
    display: grid;
}

.boost-gallery--layout-grid .boost-gallery__item {
    aspect-ratio: 1 / 1;
}

.boost-gallery--layout-grid .boost-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================================================
   MASONRY LAYOUT
   ============================================================================= */

.boost-gallery--layout-masonry .boost-gallery__item {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

.boost-gallery--layout-masonry .boost-gallery__item img {
    width: 100%;
    height: auto;
}

/* =============================================================================
   ITEM BASE
   ============================================================================= */

.boost-gallery__item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.boost-gallery__item img {
    display: block;
    transition: transform 0.5s ease;
}

.boost-gallery--lightbox .boost-gallery__item {
    cursor: pointer;
}

/* =============================================================================
   STYLE: MINIMAL
   ============================================================================= */

.boost-gallery--style-minimal .boost-gallery__item {
    border-radius: 0;
    background: transparent;
}

.boost-gallery--style-minimal .boost-gallery__item:hover {
    opacity: 0.85;
}

.boost-gallery--style-minimal .boost-gallery__item img {
    border-radius: 0;
    transition: none;
}

/* =============================================================================
   STYLE: ROUNDED (default)
   ============================================================================= */

.boost-gallery--style-rounded .boost-gallery__item {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.boost-gallery--style-rounded .boost-gallery__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.boost-gallery--style-rounded .boost-gallery__item img {
    border-radius: 16px;
}

.boost-gallery--style-rounded .boost-gallery__item:hover img {
    transform: scale(1.08);
}

/* =============================================================================
   STYLE: OVERLAY
   ============================================================================= */

.boost-gallery--style-overlay .boost-gallery__item {
    border-radius: 12px;
}

.boost-gallery--style-overlay .boost-gallery__item:hover {
    transform: scale(1.02);
}

.boost-gallery--style-overlay .boost-gallery__item img {
    border-radius: 12px;
}

.boost-gallery--style-overlay .boost-gallery__item:hover img {
    transform: scale(1.08);
}

.boost-gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    border-radius: 12px;
}

.boost-gallery__item:hover .boost-gallery__overlay {
    opacity: 1;
}

.boost-gallery__overlay-caption {
    color: #ffffff;
    font-size: 0.95rem;
    margin: 0;
}

/* =============================================================================
   ZOOM ICON
   ============================================================================= */

.boost-gallery__zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.boost-gallery__item:hover .boost-gallery__zoom {
    transform: translate(-50%, -50%) scale(1);
}

/* =============================================================================
   LIGHTBOX
   ============================================================================= */

.boost-lb {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.boost-lb.active {
    display: flex;
}

.boost-lb img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.boost-lb button {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}

.boost-lb button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.boost-lb .boost-lb__close {
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
}

.boost-lb .boost-lb__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
}

.boost-lb .boost-lb__nav--prev {
    left: 1.5rem;
}

.boost-lb .boost-lb__nav--next {
    right: 1.5rem;
}

.boost-lb .boost-lb__caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    max-width: 80%;
    padding: 0 1rem;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .boost-gallery {
        padding: 3rem 1rem;
    }

    .boost-lb {
        padding: 1rem;
    }

    .boost-lb img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .boost-lb .boost-lb__close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .boost-lb .boost-lb__nav {
        width: 44px;
        height: 44px;
    }

    .boost-lb .boost-lb__nav--prev {
        left: 0.5rem;
    }

    .boost-lb .boost-lb__nav--next {
        right: 0.5rem;
    }

    .boost-lb .boost-lb__caption {
        bottom: 1rem;
        font-size: 0.9rem;
    }
}