﻿/* Media Page Styles - Based on bulletin.css but adapted for videos */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    color: white;
    padding: 4rem 0 3rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-title i {
    margin-right: 1rem;
    color: #a8d5a8;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Media Section */
.media-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Filter Section */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.filter-btn:hover {
    border-color: #2c5530;
    color: #2c5530;
}

.filter-btn.active {
    background: #2c5530;
    border-color: #2c5530;
    color: white;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2c5530;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.media-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.media-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.media-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card:hover .media-thumbnail img {
    transform: scale(1.05);
}

.media-info {
    padding: 1.5rem;
}

.media-date {
    color: #2c5530;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.media-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.media-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Loading, No Results */
.loading, .no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results {
    display: none;
}

.loading i, .no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c5530;
}

.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    max-height: 90%;
    background: #222;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-container {
    position: relative;
    background: #000;
    width: 100%;
    min-height: 400px;
}

.video-container video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    background: #000;
}

.modal-info {
    padding: 2rem;
    background: white;
}

.modal-info h3 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download {
    background: #2c5530;
    color: white;
}

.btn-download:hover {
    background: #1e3b21;
    color: white;
    text-decoration: none;
}

.btn-fullscreen {
    background: #6c757d;
    color: white;
}

.btn-fullscreen:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-box {
        width: 100%;
    }

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

    .media-card {
        margin: 0 1rem;
    }

    .video-modal-content {
        width: 95%;
        max-height: 95%;
    }

    .modal-info {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .media-thumbnail {
        height: 200px;
    }

    .media-info {
        padding: 1rem;
    }

    .media-title {
        font-size: 1.1rem;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.media-card {
    animation: fadeInUp 0.6s ease forwards;
}
