/* ═══════════════════════════════════════════
   OSA Gallery — Dr. Osama Abbas
   Maroon / Gold / White — RTL
   ═══════════════════════════════════════════ */

.osa-gallery-section {
    --gal-maroon: #461414;
    --gal-gold: #B8986B;
    --gal-gold-light: #D4BC8E;
    --gal-bg: #FFFEFD;
    --gal-bg-alt: #F7F3F1;
    --gal-text: #1a1a2e;
    --gal-muted: #555;
    --gal-border: rgba(184,152,107,0.18);
    --gal-radius: 14px;
    font-family: "GE SS Two", Cairo, sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--gal-bg);
    padding: 60px 20px 80px;
}

.osa-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ═══════ Breadcrumb Bar (Gallery) ═══════ */
.osa-breadcrumb-bar--gallery {
    padding: 130px 20px 0;
}

.osa-breadcrumb-bar__inner--gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 0 36px;
}

.osa-breadcrumb-bar__title {
    font-family: "GE SS Two", Cairo, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 18px;
    line-height: 1.4;
}

.osa-breadcrumb-bar--gallery .osa-breadcrumb ol {
    justify-content: center;
    background: rgba(255,255,255,0.08);
    padding: 8px 24px;
    border-radius: 50px;
}

/* ═══════ Image Count ═══════ */
.osa-gallery-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 14px 22px;
    background: var(--gal-bg-alt);
    border-radius: 10px;
    border-right: 4px solid var(--gal-gold);
}

.osa-gallery-count-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gal-maroon);
    line-height: 1;
}

.osa-gallery-count-label {
    font-size: 0.92rem;
    color: var(--gal-muted);
    font-weight: 600;
}

/* ═══════ Grid ═══════ */
.osa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ═══════ Gallery Item ═══════ */
.osa-gallery-item {
    border-radius: var(--gal-radius);
    overflow: hidden;
    position: relative;
    background: var(--gal-bg-alt);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

.osa-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(70,20,20,0.12);
}

.osa-gallery-link {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    text-decoration: none;
}

.osa-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.osa-gallery-item:hover .osa-gallery-img {
    transform: scale(1.06);
}

/* ═══════ Overlay ═══════ */
.osa-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(70,20,20,0.85) 0%, rgba(70,20,20,0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.osa-gallery-item:hover .osa-gallery-overlay {
    opacity: 1;
}

.osa-gallery-zoom-icon {
    width: 36px;
    height: 36px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.osa-gallery-item:hover .osa-gallery-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* ═══════ Lightbox ═══════ */
.osa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.osa-lightbox.active {
    display: flex;
    opacity: 1;
}

.osa-lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.osa-lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    transition: opacity 0.3s ease;
}

.osa-lightbox-caption {
    color: #fff;
    font-family: "GE SS Two", Cairo, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 16px;
    direction: rtl;
}

.osa-lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 10;
}

.osa-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.osa-lightbox-prev,
.osa-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
    z-index: 10;
}

.osa-lightbox-prev:hover,
.osa-lightbox-next:hover {
    background: var(--gal-gold);
    border-color: var(--gal-gold);
}

.osa-lightbox-prev svg,
.osa-lightbox-next svg {
    width: 22px;
    height: 22px;
}

/* RTL: prev on right, next on left */
.osa-lightbox-prev {
    right: 24px;
}

.osa-lightbox-next {
    left: 24px;
}

.osa-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-family: "GE SS Two", Cairo, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    direction: ltr;
}

/* ═══════ Empty State ═══════ */
.osa-gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gal-muted);
    border: 2px dashed var(--gal-border);
    border-radius: var(--gal-radius);
}

.osa-gallery-empty svg {
    color: var(--gal-gold);
    margin-bottom: 16px;
    opacity: 0.6;
}

.osa-gallery-empty p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* ═══════ Responsive ═══════ */
@media (max-width: 991px) {
    .osa-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .osa-breadcrumb-bar__title {
        font-size: 1.8rem;
    }
    .osa-gallery-section {
        padding: 40px 16px 60px;
    }
}

@media (max-width: 600px) {
    .osa-gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .osa-breadcrumb-bar__title {
        font-size: 1.4rem;
    }
    .osa-breadcrumb-bar--gallery {
        padding-top: 100px;
    }
    .osa-lightbox-prev,
    .osa-lightbox-next {
        width: 40px;
        height: 40px;
    }
    .osa-lightbox-prev { right: 10px; }
    .osa-lightbox-next { left: 10px; }
}
