/* =================================================================================
 * PÁGINA DE INICIO
 * Estilos solo de la home. home.css lo comparten ~60 páginas: no poner aquí nada global.
 * ================================================================================= */

/* --- Enlace para saltar al contenido (visible solo con teclado) --- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: .5rem 1rem;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 0 0 .5rem .5rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    color: var(--white-color);
}

/* --- Carrusel principal --- */
.home-hero .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
    /* Todas las diapositivas con la misma proporción: el carrusel no cambia de alto entre ellas
       y el espacio queda reservado antes de que cargue la imagen (sin saltos de diseño). */
    aspect-ratio: 4541 / 1409;
    object-fit: cover;
}

/* Indicadores DEBAJO de la imagen (como estaban con Owl Carousel): encima tapaban el texto
   de los banners, que en móvil miden ~115 px de alto. Área de toque de 24 px (WCAG 2.5.8). */
.home-hero .carousel {
    padding-bottom: 2.25rem;
}

.home-hero .carousel-indicators {
    position: absolute;
    bottom: 0;
    margin: 0 3rem;
    gap: .25rem;
}

.home-hero .carousel-indicators [data-bs-target] {
    width: 24px;
    height: 24px;
    margin: 0;
    border: 0;
    opacity: 1;
    background: radial-gradient(circle, #c8cdd8 5px, transparent 6px);
}

.home-hero .carousel-indicators .active {
    background: radial-gradient(circle, var(--primary-color) 5px, transparent 6px);
}

.home-hero .carousel-indicators [data-bs-target]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 0;
    border-radius: 50%;
}

/* Las flechas centradas sobre la imagen, no sobre la franja de los indicadores. */
.home-hero .carousel-control-prev,
.home-hero .carousel-control-next {
    bottom: 2.25rem;
}

.home-hero .carousel-control-prev-icon,
.home-hero .carousel-control-next-icon {
    background-color: rgba(0, 28, 112, .55);
    border-radius: 50%;
    background-size: 55%;
    width: 2.5rem;
    height: 2.5rem;
}

/* Botón para pausar/reanudar el avance automático (WCAG 2.2.2). */
.home-hero .carousel-pause {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 28, 112, .7);
    color: var(--white-color);
}

.home-hero .carousel-pause:focus-visible,
.home-hero .carousel-item a:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    /* En móvil las flechas tapan el banner: se navega deslizando o con los indicadores. */
    .home-hero .carousel-control-prev,
    .home-hero .carousel-control-next {
        display: none;
    }
}

/* --- ¡Conoce tu piel! --- */
.option-img-wrapper {
    width: min(200px, 100%);
    aspect-ratio: 1;
    border: 4px solid #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.option-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-link:hover .option-img-wrapper,
.option-link:focus-visible .option-img-wrapper {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.option-link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: .5rem;
}

/* --- Bienvenida / llamado a registrarse --- */
.home-cta-title {
    font-size: clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
    text-transform: uppercase;
}

/* Quien prefiere menos movimiento no ve animaciones de escala ni transiciones del carrusel. */
@media (prefers-reduced-motion: reduce) {
    .option-img-wrapper,
    .home-hero .carousel-item {
        transition: none;
    }

    .option-link:hover .option-img-wrapper,
    .option-link:focus-visible .option-img-wrapper {
        transform: none;
    }
}
