.gallery-section {
    padding: 5rem 1rem 2rem;
    background: transparent;
    min-height: calc(100vh - 140px);
}

@media (max-width: 767px) {
    .gallery-section {
        padding: 5rem 0 2rem;
    }
}

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

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-family: 'Nunito', sans-serif;
}

.highlight-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.gallery-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 3rem;
    z-index: 1;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.gallery-info {
    padding: 1.25rem;
    background: white;
    color: var(--text);
}

.gallery-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-family: 'Nunito', sans-serif;
}

.gallery-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Quicksand', sans-serif;
}

.gallery-info p i {
    color: var(--primary);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1.2) rotate(5deg);
}

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

.lightbox-download {
    position: fixed;
    top: 1rem;
    right: 4.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.lightbox-download i {
    font-size: 1.1rem;
    color: #333;
}

.lightbox-download:hover {
    background: white;
    transform: scale(1.1);
}

.lightbox-download:active {
    transform: scale(0.95);
}

/* Loading skeleton */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease backwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Focus styles for accessibility */
.gallery-item:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

/* Active/touch state */
.gallery-item:active {
    transform: scale(0.98);
}

/* Badge for photo count */
.photo-badge {
    display: none;
}

.gallery-info .photo-count {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .lightbox-download {
        width: 50px;
        height: 50px;
        right: 6rem;
        top: 1.5rem;
    }
    
    .lightbox-download i {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0;
    }
    
    .gallery-item {
        border-radius: 8px;
    }
    
    .gallery-info {
        padding: 1rem;
    }
    
    .gallery-info h3 {
        font-size: 1rem;
    }
    
    .gallery-info p {
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .gallery-section {
        padding: 7rem 2rem 4rem;
        min-height: auto;
    }

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

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
