/* =========================================
   ANIMACIONES
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

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

.float-animation {
    animation: float 4s ease-in-out infinite;
}

.slider-transition {
    transition: opacity 0.5s ease-in-out;
}

/* =========================================
   ESTILOS BASE
   ========================================= */
body {
    background-color: #111827;
    color: #e5e5e5;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

.text-shadow-lg {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.6);
}

/* =========================================
   MODAL - ESTRUCTURA GENERAL
   ========================================= */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.92); 
    animation: fadeIn 0.3s;
    backdrop-filter: blur(5px); 
}

.modal-image-container {
    display: flex;
    justify-content: center; 
    align-items: center;     
    margin: 20px auto 10px auto;
    width: 100%;
    height: 70vh;            
    max-width: 1400px;       
    position: relative;
}

.modal-content {
    display: block;
    width: auto;
    height: auto;
    max-width: 95%;          
    max-height: 100%;        
    object-fit: contain;     
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.modal-caption {
    margin: 0 auto;
    display: block;
    width: 90%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    min-height: 40px; 
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #22c55e; 
    text-decoration: none;
}

/* =========================================
   NAVEGACIÓN DEL MODAL (FLECHAS)
   ========================================= */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    font-size: 24px;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 1002;
}

.modal-nav:hover {
    background-color: #22c55e; 
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

/* =========================================
   MINIATURAS (THUMBNAILS)
   ========================================= */
.modal-thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px auto 30px auto; 
    max-width: 90%;
    padding: 0 20px;
}

.modal-thumbnail {
    width: 70px;            
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: #2dd4bf;
}

.modal-thumbnail.active {
    opacity: 1;
    border-color: #22c55e; 
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* =========================================
   LOADING & DEBUG
   ========================================= */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

.debug-info {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 12px;
}

/* =========================================
   UTILIDADES DE COLOR
   ========================================= */
.bg-light { background-color: #2d2d2d; }
.bg-dark { background-color: #1a1a1a; }
.text-primary { color: #22c55e; }
.text-secondary { color: #2dd4bf; }
.hover\:text-primary:hover { color: #22c55e; }
.hover\:text-secondary:hover { color: #2dd4bf; }
.bg-primary { background-color: #22c55e; }
.bg-secondary { background-color: #2dd4bf; }
.border-primary { border-color: #22c55e; }
.border-secondary { border-color: #2dd4bf; }
.from-primary { --tw-gradient-from: #22c55e; }
.to-secondary { --tw-gradient-to: #2dd4bf; }

/* =========================================
   RESPONSIVE (MOVIL)
   ========================================= */
@media (max-width: 768px) {
    .modal-image-container {
        height: 50vh; 
        margin-top: 60px; 
    }
    .modal-thumbnail { width: 50px; height: 50px; }
    .modal-thumbnails { gap: 6px; }
    .close-modal { top: 10px; right: 20px; font-size: 35px; }
    .modal-nav { width: 40px; height: 40px; font-size: 18px; }
    .modal-prev { left: 5px; }
    .modal-next { right: 5px; }
}

@media (min-width: 1024px) {
    .modal-image-container { height: 75vh; }
}

/* =========================================
   BOTÓN COMPARTIR - LADO IZQUIERDO (DISCRETO)
   ========================================= */
.vertical-share-btn {
    position: fixed;
    left: 0; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background-color: #25d366; 
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Reducción del 30% en rellenos y fuentes */
    padding: 10px 5px; 
    border-radius: 0 8px 8px 0; 
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 7px; 
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.vertical-share-btn i {
    font-size: 15px; /* Reducido */
    margin-bottom: 6px; /* Reducido */
}

.vertical-share-btn span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.vertical-share-btn:hover {
    background-color: #128c7e;
    padding-left: 10px;
    color: white;
}