/* =========================================
   assets/css/gallery.css
========================================= */

/* --- PAGE HEADER & BREADCRUMBS --- */
.page-header {
    background-color: #f4f7f6;
    background-image: radial-gradient(circle at 50% 50%, rgba(23, 111, 145, 0.05) 0%, rgba(244, 247, 246, 1) 100%);
    padding: 120px 0 60px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.page-header__title {
    font-size: 2.8rem;
    color: #176f91; /* iHerd Theme Primary */
    margin-bottom: 15px;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    font-size: 0.95rem;
}

.breadcrumb__list {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    align-items: center;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    color: #666;
}

.breadcrumb__item a {
    color: #176f91;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb__item a:hover {
    color: #0f4c64;
    text-decoration: underline;
}

.breadcrumb__item + .breadcrumb__item::before {
    content: "/";
    margin: 0 12px;
    color: #aaa;
    font-size: 0.9rem;
}

.breadcrumb__item--active {
    color: #333;
    font-weight: 600;
}

/* --- GALLERY SECTION LAYOUT --- */
.gallery-section {
    padding: 90px 0 110px;
    background-color: #ffffff;
}

.gallery-header {
    margin-bottom: 50px;
}

.text-center {
    text-align: center;
}

.section-subtitle {
    color: #176f91;
    font-size: 0.875rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.25rem;
    color: #333;
    font-weight: 700;
}

/* --- GALLERY GRID --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    background-color: #f8f9fa;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(23, 111, 145, 0.15);
}

.gallery-item__image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-item__img {
    transform: scale(1.08);
}

/* HOVER OVERLAY */
.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 76, 100, 0.9) 0%, rgba(23, 111, 145, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 25px 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__icon {
    width: 45px;
    height: 45px;
    background-color: #ffffff;
    color: #176f91;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item__icon {
    transform: translateY(0);
}

.gallery-item__icon svg {
    width: 22px;
    height: 22px;
}

.gallery-item__caption {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.05s;
}

.gallery-item:hover .gallery-item__caption {
    transform: translateY(0);
}

/* --- LIGHTBOX MODAL --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.is-active {
    display: flex;
    opacity: 1;
}

.lightbox__content {
    max-width: 85%;
    max-height: 85%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox__caption {
    color: #ffffff;
    font-size: 1.1rem;
    margin-top: 20px;
    font-weight: 500;
}

.lightbox__close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease, transform 0.2s ease;
}

.lightbox__close:hover {
    color: #176f91;
    transform: scale(1.1);
}

/* --- ANIMATIONS --- */
.fade-up {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .page-header {
        padding: 100px 0 50px;
    }

    .page-header__title {
        font-size: 2.25rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lightbox__close {
        top: 15px;
        right: 20px;
    }
}