.gallery-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    background: linear-gradient(135deg, #f6f9fc 0%, #f1f4f9 100%);
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -200px;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.1;
    z-index: 0;
    animation: morph 8s ease-in-out infinite;
}

.gallery-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #10B981, #34D399);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    opacity: 0.1;
    z-index: 0;
    animation: morph 10s ease-in-out infinite;
}

.gallery-container {
    position: relative;
    z-index: 1;
}

.gallery-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 1rem;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    border-radius: 2px;
}

.gallery-item {
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-item a {
    position: relative;
    display: block;
    z-index: 2;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 3;
    border-radius: 12px;
}

.gallery-item .overlay-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.2s ease;
}

.gallery-item .overlay-description {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.2s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(59, 131, 246, 0.297), rgba(16, 185, 129, 0.341));
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    border-radius: 12px;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-item:hover::before {
    opacity: 0.3;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.9) contrast(1.1);
}

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

.gallery-item:hover .overlay-title,
.gallery-item:hover .overlay-description {
    transform: translateY(0);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estilos personalizados para Lightbox */
.lb-data .lb-caption {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.lb-data .lb-number {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
    transition: all 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lb-closeContainer {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lb-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: absolute;
    color: red;
    top: 0;
    right: 0;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lb-outerContainer {
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.lb-dataContainer {
    border-radius: 0 0 12px 12px;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

/* Animaciones */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lb-outerContainer, .lb-dataContainer {
    animation: lightboxFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
}

/* Fade-in up animation for gallery section */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
} 
