/* ==== GALLERY PAGE CSS ==== */

.gallery-hero {
    padding: 8rem 1rem 4rem;
    background-color: var(--surface-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: var(--header-height);
}

.gallery-hero h1 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.gallery-hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Section Header */
.section-header {
    margin-bottom: 3rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    margin: 1rem auto 0;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 1.25rem auto 0;
}

/* ==== PHOTO GALLERY GRID ==== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    height: 260px;
    transition: all var(--transition-normal);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 68, 118, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

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

.gallery-overlay i {
    font-size: 2.2rem;
    color: var(--text-white);
    transform: scale(0.5);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ==== TEAM SECTION ==== */
.team-section {
    background-color: var(--surface-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-align: center;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-img-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.08);
}

.team-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 68, 118, 0.85) 0%, rgba(15, 68, 118, 0.2) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1.25rem;
    opacity: 0;
    transition: all var(--transition-normal);
}

.team-card:hover .team-img-overlay {
    opacity: 1;
}

.team-social {
    display: flex;
    gap: 0.75rem;
    transform: translateY(15px);
    transition: transform var(--transition-normal);
}

.team-card:hover .team-social {
    transform: translateY(0);
}

.team-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.team-social a:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: scale(1.1);
}

.team-info {
    padding: 1.25rem 1rem 1.5rem;
}

.team-info h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.team-specialty {
    display: inline-block;
    font-size: 0.88rem;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ==== VIDEO SECTION ==== */
.video-section {
    background-color: var(--bg-color);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.video-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--text-dark);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==== LIGHTBOX ==== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: transform var(--transition-fast);
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }

    .team-img-wrapper {
        height: 240px;
    }

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

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

    .team-img-wrapper {
        height: 320px;
    }
}