.gallery-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: calc(100vh - 200px);
}

.gallery-header {
    position: relative;
    padding: 2.5rem 2rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.gallery-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #16BFB2 0%, #14ADDD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.gallery-visor-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-visor {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
}

.gallery-visor-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #16BFB2 0%, #14ADDD 100%);
}

.gallery-visor-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

#visor {
    width: 70%; /* Cambiar a auto para que mantenga el ancho original */
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    animation: fadeIn 0.5s ease;
    display: block;
    margin: 0 auto;
}

#visor:hover {
    transform: scale(1.02);
}

#visor-description {
    font-size: 1.1rem;
    color: #495057;
    font-weight: 500;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #16BFB2;
    border-right: 4px solid #16BFB2;
}

.gallery-selector-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.gallery-selector {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.gallery-selector-container::-webkit-scrollbar {
    width: 8px;
}

.gallery-selector-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-selector-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #16BFB2 0%, #14ADDD 100%);
    border-radius: 10px;
}

.gallery-thumbnail {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.gallery-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(22, 191, 178, 0) 0%, rgba(20, 173, 221, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #16BFB2;
    box-shadow: 0 8px 25px rgba(22, 191, 178, 0.3);
}

.gallery-thumbnail:hover::after {
    opacity: 0.2;
}

.gallery-thumbnail.active {
    border-color: #16BFB2;
    box-shadow: 0 8px 25px rgba(22, 191, 178, 0.4);
    transform: scale(1.02);
}

.gallery-thumbnail img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
    box-sizing: border-box;
}

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

@media (max-width: 991px) {
    .gallery-header h2 {
        font-size: 2rem;
    }
    
    .gallery-selector-container {
        max-height: 300px;
        margin-top: 2rem;
    }
    
    .gallery-thumbnail {
        display: inline-block;
        width: 120px;
        margin-right: 1rem;
        margin-bottom: 1rem;
    }
    
    .gallery-visor {
        height: 50vh;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

