/* --- Gallery Section Styles --- */

/* --- Hero Banner --- */
.gallery-hero {
    position: relative;
    height: 380px;
    background-image: url('image/Gallery/Group Photo at IME Symposium on Building Partnerships & Developing Successful Health Programs in Africa, held in Nairobi Kenya.JPG');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 84, 172, 0.88) 0%, rgba(20, 190, 217, 0.7) 100%);
    z-index: 1;
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-hero h1 {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

/* --- Breadcrumbs --- */
.gallery-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s;
}

.gallery-breadcrumb a:hover {
    color: var(--white);
}

.gallery-breadcrumb span {
    display: flex;
    align-items: center;
}

.gallery-breadcrumb i,
.gallery-breadcrumb svg {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Folders Section --- */
.folders-section {
    padding: 5rem 0 3rem 0;
    background-color: var(--bg-light);
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.folder-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-cyan);
}

.folder-icon-wrap {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 190, 217, 0.08);
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: background-color 0.3s ease;
}

.folder-card:hover .folder-icon-wrap {
    background: rgba(20, 190, 217, 0.15);
}

.folder-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.folder-title {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 4rem 0 6rem 0;
    background-color: var(--bg-light);
}

.gallery-section-title {
    font-size: 30px;
    color: var(--primary-navy);
    margin-bottom: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.75rem;
}

.gallery-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-cyan);
    border-radius: 2px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.gallery-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.gallery-img-wrap {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.06);
}

.gallery-img-wrap::after {
    content: '\f00e';
    /* FontAwesome search-plus icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.4);
    /* Navy tint overlay */
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;

}

.gallery-card:hover .gallery-img-wrap::after {
    opacity: 1;
}

.gallery-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-top: 1px solid var(--border);
}

.gallery-caption {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
}

/* --- Lightbox Modal --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.96);
    /* Deep slate-900 transparent background */
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content-wrap {
    max-width: 85%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2001;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
    border: 4px solid rgba(255, 255, 255, 0.05);
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.show .lightbox-image {
    transform: scale(1);
}

.lightbox-caption {
    color: var(--white);
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    max-width: 800px;
    line-height: 1.6;
    padding: 0.75rem 2rem;
    background-color: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.lightbox-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2005;
    line-height: 1;
}

.lightbox-close-btn:hover {
    background: var(--primary-cyan);
    border-color: var(--primary-cyan);
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2003;
}

.lightbox-nav-btn:hover {
    background: var(--primary-cyan);
    border-color: var(--primary-cyan);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev {
    left: 3rem;
}

.lightbox-nav-btn.next {
    right: 3rem;
}

.lightbox-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .lightbox-nav-btn.prev {
        left: 1rem;
    }

    .lightbox-nav-btn.next {
        right: 1rem;
    }

    .lightbox-nav-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        height: 300px;
        padding-top: 100px;
    }

    .gallery-hero h1 {
        font-size: 2.2rem !important;
    }

    .folders-section {
        padding: 3rem 0 1.5rem 0;
    }

    .folders-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-section {
        padding: 3rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .lightbox-content-wrap {
        max-width: 95%;
    }

    .lightbox-image {
        max-height: 60vh;
    }

    .lightbox-caption {
        font-size: 0.85rem;
        padding: 0.5rem 1.25rem;
        margin-top: 1rem;
        border-radius: 1rem;
    }

    .lightbox-close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}