/* Gallery Page Styles */

.gallery-hero-section {
    position: relative;
    background: linear-gradient(135deg, #2c5530 0%, #4a7c4e 100%);
    padding: 180px 20px 80px;
    text-align: center;
    overflow: hidden;
}

.gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><path d="M0,100 Q300,150 600,100 T1200,100 L1200,400 L0,400 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-hero-title i {
    margin-right: 15px;
    color: #ffd700;
}

.gallery-hero-subtitle {
    font-size: 1.3rem;
    color: #e8f5e9;
    font-weight: 300;
}

.gallery-main-section {
    padding: 60px 20px;
    background: #f5f5f5;
    min-height: 60vh;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-loading,
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.gallery-loading i,
.gallery-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #4a7c4e;
}

.gallery-loading p,
.gallery-empty p {
    font-size: 1.2rem;
    color: #888;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #e0e0e0;
}

.gallery-item-video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.gallery-item-content {
    padding: 20px;
}

.gallery-item-type {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.gallery-item-type.video {
    background: #e3f2fd;
    color: #1976d2;
}

.gallery-item-type.photo {
    background: #fce4ec;
    color: #c2185b;
}

.gallery-item-caption {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
    margin-top: 10px;
}

/* Media Modal */
.media-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.media-modal.active {
    display: flex;
}

.media-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.media-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.media-modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10002;
}

.media-modal-close-btn:hover {
    background: white;
}

.media-modal-body {
    max-width: 1200px;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.media-modal-body iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.media-modal-caption {
    padding: 20px;
    background: #f5f5f5;
    font-size: 1rem;
    color: #333;
    text-align: center;
}

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

    .gallery-hero-subtitle {
        font-size: 1.1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

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

    .media-modal-body iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .gallery-hero-title {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .media-modal-body iframe {
        height: 250px;
    }
}