/* Gallery */

.gallery-section {
    padding: 8rem 1rem 4rem 1rem;
    background: #121212;
    position: relative;
    color: #ffffff;
    scroll-margin-top: 4rem; 
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="%23ff8c42" stroke-width="0.5" opacity="0.03"/><circle cx="50" cy="50" r="30" fill="none" stroke="%238b5cf6" stroke-width="0.5" opacity="0.02"/></svg>');
    pointer-events: none;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.gallery-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #f8fafc;
}

.gallery-section .section-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 3rem;
    font-size: 1rem;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: #ff8c42;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    opacity: 0.85;
}

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

.gallery-item figcaption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    color: #f1f5f9;
    padding: 1.5rem 1rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 1;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Large Screens */

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    .gallery-item.large {
        grid-column: span 2;
    }
}

@media (min-width: 768px) {
    .gallery-section {
        padding: 11rem 2rem 6rem 2rem;
    }

    .gallery-section h2 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}