/* Gallery Specific Styles - Optimized for Performance */

.gallery-section {
    background: rgba(168, 213, 186, 0.85);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.section-title {
    color: #1a3d1f;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    border: 1px solid rgba(168, 213, 186, 0.3);
    position: relative;
    will-change: transform;
    transform: translateZ(0);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #A8D5BA, #B3D4E0, #A8D5BA);
    border-radius: 20px 20px 0 0;
}

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

.gallery-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
}

.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
}

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

.gallery-item-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.gallery-item h3 {
    color: #1a3d1f;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
}

.media-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #A8D5BA, #B3D4E0);
    color: #1a3d1f;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Loading states */
.gallery-item.loading {
    opacity: 0.7;
}

.gallery-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #A8D5BA;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .gallery-item video,
    .gallery-item img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-section {
        padding: 15px 10px;
    }
    
    .gallery-item {
        border-radius: 10px;
    }
    
    .gallery-item-content {
        padding: 12px;
    }
    
    .gallery-item h3 {
        font-size: 1rem;
    }
    
    .gallery-item video,
    .gallery-item img {
        height: 160px;
    }
}