/* =========================================
   MEDIA PAGE STYLES (media.css)
   ========================================= */

/* --- Page Header --- */
.page-header {
    background-color: var(--bg-soft-gray);
    padding: 4rem 0;
    text-align: center;
}
.page-header h1 { font-size: 2.8rem; margin-bottom: 0.5rem; }
.page-header p { font-size: 1.1rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* --- Gallery Section --- */
.gallery-section { padding-top: 4rem; }

/* Filter Buttons */
.filter-buttons {
    text-align: center;
    margin-bottom: 4rem;
}
.filter-buttons .btn {
    margin: 0 0.5rem;
}
.filter-buttons .btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

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

.gallery-item {
    display: block; /* Default for filtering */
}

/* Photo & Video Card Styles */
.photo-card, .video-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.photo-card img, .video-card .video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-card:hover img, .video-card:hover .video-poster {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.5); /* --secondary-color */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--text-light);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.photo-card:hover .card-overlay, .video-card:hover .card-overlay {
    opacity: 1;
}

/* Video Modal Styles */
.video-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
}
.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
}
#modalVideo {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.close-modal:hover, .close-modal:focus {
    color: #bbb;
    text-decoration: none;
}