/* ==========================================================
   Gallery
========================================================== */

.ua-gallery {
    margin-top: var(--space-xl);
}

.ua-gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

/* ==========================================================
   Main Image
========================================================== */

.ua-gallery-main {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #f3f4f6;
    aspect-ratio: 3 / 2;
}

.ua-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.ua-gallery-main:hover img {
    transform: scale(1.05);
}

/* ==========================================================
   Side Gallery
========================================================== */

.ua-gallery-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ua-gallery-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    flex: 1;
}

.ua-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #f3f4f6;
    min-height: 0;
}

.ua-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.ua-gallery-item:hover img {
    transform: scale(1.05);
}

.ua-gallery-main:focus-visible,
.ua-gallery-item:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ==========================================================
   View All
========================================================== */

.ua-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: background .3s ease;
}

.ua-gallery-more:hover .ua-gallery-overlay {
    background: rgba(0, 0, 0, .6);
}

.ua-gallery-overlay i {
    font-size: 1.75rem;
}

.ua-gallery-overlay strong {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.ua-gallery-overlay small {
    font-size: .9rem;
}

/* ==========================================================
   Mobile Button
========================================================== */

.ua-gallery-mobile {
    display: none;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    align-items: center;
    gap: .55rem;
    padding: .21rem .45rem;
    border-radius: 13px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.ua-gallery-mobile i {
    font-size: 1rem;
}

.ua-gallery-mobile span {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-size: .7rem;
}

.ua-gallery-mobile strong {
    font-size: .89rem;
    font-weight: 700;
}

/* ==========================================================
   Tablet
========================================================== */

@media (max-width: 991.98px) {

    .ua-gallery-grid {
        grid-template-columns: 1.7fr 1fr;
        gap: .75rem;
    }

    .ua-gallery-side,
    .ua-gallery-row {
        gap: .75rem;
    }

}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width: 767.98px) {

    .ua-gallery {
        margin-top: var(--space-lg);
    }

    .ua-gallery-grid {
        display: block;
    }

    .ua-gallery-side {
        display: none;
    }

    .ua-gallery-main {
        aspect-ratio: 16 / 10;
        border-radius: var(--radius);
    }

    .ua-gallery-mobile {
        display: flex;
    }

}

/* ==========================================================
   Gallery Lightbox
========================================================== */

.ua-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 9999;
}

.ua-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ua-lightbox-backdrop {
    position: absolute;
    inset: 0;
}

/* ==========================================================
   Container
========================================================== */

.ua-lightbox-container {
    position: relative;
    width: min(1200px, 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.ua-lightbox-figure {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ua-lightbox-image {
    display: block;
    width: 100%;
    max-width: 1100px;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius-xl);
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

/* ==========================================================
   Footer
========================================================== */

.ua-lightbox-info {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.ua-lightbox-counter {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .95rem;
    font-weight: 600;
}

.ua-lightbox-caption {
    margin: 0;
    font-size: .95rem;
    opacity: .9;
    text-align: right;
}

/* ==========================================================
   Controls
========================================================== */

.ua-lightbox-close,
.ua-lightbox-prev,
.ua-lightbox-next {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    transition: .25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ua-lightbox-close:hover,
.ua-lightbox-prev:hover,
.ua-lightbox-next:hover {
    background: rgba(255, 255, 255, .24);
    transform: scale(1.05);
}

.ua-lightbox-close {
    top: 24px;
    right: 24px;
}

.ua-lightbox-prev,
.ua-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.ua-lightbox-prev:hover,
.ua-lightbox-next:hover {
    transform: translateY(-50%) scale(1.05);
}

.ua-lightbox-prev {
    left: 24px;
}

.ua-lightbox-next {
    right: 24px;
}

.ua-lightbox-close i,
.ua-lightbox-prev i,
.ua-lightbox-next i {
    font-size: 1.15rem;
    line-height: 1;
}

/* ==========================================================
   Tablet
========================================================== */

@media (max-width:991.98px) {

    .ua-lightbox {
        padding: 1.5rem;
    }

    .ua-lightbox-image {
        max-height: 72vh;
    }

    .ua-lightbox-prev {
        left: 16px;
    }

    .ua-lightbox-next {
        right: 16px;
    }

}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width:767.98px) {

    .ua-lightbox {
        padding: 1rem;
    }

    .ua-lightbox-image {
        max-height: 62vh;
        border-radius: var(--radius-lg);
    }

    .ua-lightbox-info {
        margin-top: .75rem;
        flex-direction: column;
        gap: .35rem;
        text-align: center;
    }

    .ua-lightbox-caption {
        text-align: center;
        font-size: .9rem;
    }

    .ua-lightbox-counter {
        font-size: .9rem;
    }

    .ua-lightbox-close,
    .ua-lightbox-prev,
    .ua-lightbox-next {
        width: 40px;
        height: 40px;
    }

    .ua-lightbox-close {
        top: 16px;
        right: 16px;
    }

    .ua-lightbox-prev {
        left: 12px;
    }

    .ua-lightbox-next {
        right: 12px;
    }

    .ua-lightbox-close i,
    .ua-lightbox-prev i,
    .ua-lightbox-next i {
        font-size: 1rem;
    }

}