/* ESTILOS PRINCIPALES DEL PROYECTO */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 130px;
}

@media (min-width: 768px) {
    html {
        scroll-padding-top: 150px;
    }
}

/* --- SECCIÓN SLIDESHOW (BLINDADA) --- */
#slideshow {
    height: 60vh !important;
    min-height: 400px !important;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #E5E5E5;
    z-index: 0;
    /* Bajamos a 0 para que no tape el header ni botones */
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#slideshow img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
}

/* --- SEGURO DE VIDA PARA LA PRIMERA FOTO --- */
/* Esto obliga a que la primera foto se vea siempre, 
   incluso si el JS falla o tarda en cargar */
#slideshow .slide:first-child {
    opacity: 1 !important;
}

/* Clases de utilidad */
.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

.slide {
    transition: opacity 1.5s ease-in-out;
    will-change: opacity;
}


/* --- TABLET Y ESCRITORIO --- */
@media (min-width: 768px) {
    #slideshow {
        height: 100vh !important;
    }

    #slideshow .slideshow-container {
        top: 150px;
        height: calc(100% - 150px);
    }

    #slideshow img {
        object-position: center center !important;
    }
}

/* --- HEADER --- */
header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(229, 229, 229, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* --- BOTÓN WHATSAPP (Visible y accesible) --- */
#whatsapp-btn {
    position: fixed;
    /* Subimos un poco más por seguridad en móviles con barra inferior */
    bottom: 40px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;

    /* Z-index máximo */
    z-index: 99999 !important;

    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

#whatsapp-btn:hover {
    transform: scale(1.1);
}

/* --- ACCESIBILIDAD: MODO TEXTO GRANDE --- */
html.text-lg-mode {
    /* Aumentamos el tamaño base del 100% (16px) al 125% (20px) */
    font-size: 125% !important;
}

/* Opcional: Ajustes para que no se rompa el layout en pantallas pequeñas */
@media (max-width: 768px) {
    html.text-lg-mode {
        font-size: 115% !important;
        /* En móvil subimos menos para no descolocar todo */
    }
}

/* TOOLTIP PERSONALIZADO ACIDALIA */
.tooltip-wrapper {
    position: relative;
    cursor: help;
    /* Cambia el cursor para indicar ayuda */
}

/* El globo de texto (oculto por defecto) */
.tooltip-box {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    /* Lo empujamos hacia arriba */
    bottom: 120%;
    left: 0;
    width: 100%;
    /* Que ocupe el ancho de la línea */
    min-width: 250px;
    /* Ancho mínimo para que se lea bien */
    background-color: #3D3D3D;
    /* Charcoal */
    color: white;
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    /* Letra grande y legible */
    line-height: 1.5;
    z-index: 9999;
    /* Encima de todo */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(239, 186, 37, 0.5);
    /* Borde dorado */

    /* Animación suave */
    transition: all 0.3s ease;
    transform: translateY(10px);
    pointer-events: none;
    /* Para que no parpadee si el ratón toca el borde */
}

/* El triangulito de abajo */
.tooltip-box::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background-color: #3D3D3D;
    transform: rotate(45deg);
    border-right: 1px solid rgba(239, 186, 37, 0.5);
    border-bottom: 1px solid rgba(239, 186, 37, 0.5);
}

/* LA MAGIA: Al pasar el ratón por el wrapper, muestra la caja */
.tooltip-wrapper:hover .tooltip-box {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}