/* Galilea Gallery Styles */
.galilea-gallery-container {
    background: #525159;
    border-radius: 8px;
    padding: 20px;
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;*/
    max-width: 1200px;
    margin: 20px auto;
}

/* Header */
.galilea-gallery-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.galilea-logo svg {
    width: 32px;
    height: 32px;
}

.galilea-title h2 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.galilea-title span {
    color: #cccccc;
    font-size: 16px;
    font-weight: 300;
    margin-left: 20px;
    position: relative;
}

.galilea-title span::before {
    content: '|';
    position: absolute;
    left: -15px;
    color: #999;
}

/* Layout principal */
.galilea-gallery-content {
    display: flex;
    gap: 20px;
    height: 600px;
}

/* Thumbnails laterales */
.galilea-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.galilea-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.galilea-thumbnails::-webkit-scrollbar-track {
    background: #555;
    border-radius: 3px;
}

.galilea-thumbnails::-webkit-scrollbar-thumb {
    background: #F92333;
    border-radius: 3px;
}

.galilea-thumb {
    width: 100%;
    height: auto;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.galilea-thumb:hover {
    border-color: #F92333;
    transform: translateX(5px);
}

.galilea-thumb.active {
    border-color: #F92333;
    background: #F92333;
    transform: translateX(5px);
}

.galilea-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.galilea-thumb:hover img {
    transform: scale(1.05);
}

/* Imagen principal */
.galilea-main-image {
    flex: 1;
    background: white;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Controles */
.galilea-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.galilea-compass {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.galilea-zoom-btn,
.galilea-download-btn {
    width: 50px;
    height: 50px;
    background: #F92333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 35, 51, 0.3);
    margin: 5px;
}

.galilea-zoom-btn:hover,
.galilea-download-btn:hover {
    background: #e01e2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 35, 51, 0.4);
}

/* Contenedor de imagen */
.galilea-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

#galilea-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

/* Título de imagen */
.galilea-image-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Modal de zoom */
.galilea-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.galilea-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.galilea-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.galilea-close:hover {
    color: #F92333;
}

#galilea-zoom-img {
    max-width: none;
    max-height: none;
    cursor: grab;
    transition: transform 0.1s ease;
    transform-origin: center center;
}

#galilea-zoom-img:active {
    cursor: grabbing;
}

/* Controles de zoom */
.galilea-zoom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.galilea-zoom-controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #F92333;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.galilea-zoom-controls button:hover {
    background: #e01e2c;
    transform: scale(1.1);
}

#galilea-zoom-reset {
    font-size: 12px;
    font-weight: 500;
    width: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .galilea-gallery-container {
        padding: 15px;
        margin: 10px;
    }

    .galilea-gallery-content {
        flex-direction: column;
        height: auto;
    }

    .galilea-thumbnails {
        flex-direction: row;
        width: 100%;
        height: 100px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        margin-bottom: 15px;
    }

    .galilea-thumb {
        min-width: 120px;
        height: 80px;
    }

    .galilea-main-image {
        height: 400px;
    }

    .galilea-title h2 {
        font-size: 24px;
    }

    .galilea-title span {
        font-size: 14px;
        margin-left: 15px;
    }

    .galilea-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .galilea-zoom-btn,
    .galilea-download-btn {
        width: 40px;
        height: 40px;
    }

    .galilea-compass {
        padding: 6px;
    }

    .galilea-compass svg {
        width: 30px;
        height: 30px;
    }
}

/* Estados de carga */
.galilea-thumb.loading {
    opacity: 0.6;
}

.galilea-main-image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #F92333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animaciones */
.galilea-thumb {
    animation: slideInLeft 0.6s ease forwards;
}

.galilea-thumb:nth-child(1) { animation-delay: 0.1s; }
.galilea-thumb:nth-child(2) { animation-delay: 0.2s; }
.galilea-thumb:nth-child(3) { animation-delay: 0.3s; }
.galilea-thumb:nth-child(4) { animation-delay: 0.4s; }
.galilea-thumb:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.galilea-main-image img {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}