/* =====================================================================
   BP-Mona Gallery – Frontend Styles
   Matching the BP-Mona design: navy #01244F, orange #EE6303, radius 16px
   ===================================================================== */

/* ─── Main Services Page Grid ─────────────────────────────────────── */
.bpmg-grid--main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.bpmg-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.bpmg-item--wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.bpmg-item__img {
    width: 100%;
    height: 100%;
}

.bpmg-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bpmg-item:hover .bpmg-item__img img {
    transform: scale(1.08);
}

.bpmg-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(1, 36, 79, 0.88) 0%, rgba(1, 36, 79, 0.2) 40%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.bpmg-item:hover .bpmg-item__overlay {
    opacity: 1;
}

.bpmg-item__tag {
    display: inline-block;
    background: #EE6303;
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    width: fit-content;
}

.bpmg-item__caption {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* ─── Service Detail Grid ─────────────────────────────────────────── */
.bpmg-grid--detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.bpmg-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.bpmg-card--large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.bpmg-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bpmg-card:hover img {
    transform: scale(1.06);
}

.bpmg-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(1, 36, 79, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.bpmg-card:hover .bpmg-card__overlay {
    opacity: 1;
}

.bpmg-card__expand {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(238, 99, 3, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    transition: transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(4px);
}

.bpmg-card:hover .bpmg-card__expand {
    transform: scale(1.1);
    background: rgba(238, 99, 3, 1);
}

.bpmg-card__tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(1, 36, 79, 0.85);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ─── Lightbox ────────────────────────────────────────────────────── */
.bpmg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bpmg-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 36, 79, 0.92);
    backdrop-filter: blur(12px);
    animation: bpmgFadeIn 0.3s ease;
}

@keyframes bpmgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.bpmg-lightbox__content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bpmgZoomIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    margin-top: 20px;
}

@keyframes bpmgZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.bpmg-lightbox__img {
    max-width: 90vw;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.bpmg-lightbox__info {
    text-align: center;
    margin-top: 1rem;
    max-width: 600px;
}

.bpmg-lightbox__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.bpmg-lightbox__desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.bpmg-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(238, 99, 3, 0.65);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.bpmg-lightbox__close:hover {
    background: rgba(238, 99, 3, 1);
    border-color: #EE6303;
    transform: scale(1.08);
}

.bpmg-lightbox__prev,
.bpmg-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.bpmg-lightbox__prev { left: 1.5rem; }
.bpmg-lightbox__next { right: 1.5rem; }

.bpmg-lightbox__prev:hover,
.bpmg-lightbox__next:hover {
    background: rgba(238, 99, 3, 0.8);
    border-color: #EE6303;
    transform: translateY(-50%) scale(1.08);
}

.bpmg-lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(1, 36, 79, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    backdrop-filter: blur(8px);
}

/* ─── Responsive – Main Grid ──────────────────────────────────────── */
@media (max-width: 900px) {
    .bpmg-grid--main {
        grid-template-columns: repeat(2, 1fr);
    }
    .bpmg-item--wide {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .bpmg-grid--main {
        grid-template-columns: 1fr;
    }
    .bpmg-item--wide {
        grid-column: span 1;
        aspect-ratio: 16 / 9;
    }
    .bpmg-item {
        aspect-ratio: 4 / 3;
    }
    .bpmg-item__overlay {
        opacity: 1;
    }
}

/* ─── Responsive – Detail Grid ────────────────────────────────────── */
@media (max-width: 768px) {
    .bpmg-grid--detail {
        grid-template-columns: repeat(2, 1fr);
    }
    .bpmg-card--large {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .bpmg-grid--detail {
        grid-template-columns: 1fr;
    }
    .bpmg-card--large {
        grid-column: span 1;
    }
    .bpmg-card__overlay {
        opacity: 1;
    }
}

/* ─── Responsive – Lightbox ───────────────────────────────────────── */
@media (max-width: 768px) {
    .bpmg-lightbox__prev { left: 0.75rem; width: 40px; height: 40px; }
    .bpmg-lightbox__next { right: 0.75rem; width: 40px; height: 40px; }
    .bpmg-lightbox__close { top: 0.75rem; right: 0.75rem; width: 42px; height: 42px; font-size: 1.4rem; }
    .bpmg-lightbox__img { border-radius: 8px; max-height: 65vh; }
    .bpmg-lightbox__content { margin-top: 10px; }
}
