/* ======================================================
   SLIDER — HACIENDA YANAY
   Archivo separado, limpio y optimizado
   ====================================================== */

/* Contenedor principal del slider */
.slider {
    width: 100%;
    height: 75vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 200px !important; /* espacio para el buscador */
}

/* Capas de fondo */
.slider::before,
.slider::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 2.5s ease-in-out, transform 15s ease-in-out;
    z-index: 1;
}

/* Imagen 1 */
.slider::before {
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
        url('../images/slider/1.jpg');
    opacity: 1;
    animation: sliderFade1 16s infinite ease-in-out;
}

/* Imagen 2 */
.slider::after {
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
        url('../images/slider/2.jpg');
    opacity: 0;
    animation: sliderFade2 16s infinite ease-in-out;
}

/* ======================================================
   TÍTULO DEL SLIDER — DOS LÍNEAS
   ====================================================== */
.slider h1 {
    position: absolute;
    z-index: 3;
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    width: 90%;
    max-width: 600px;
    text-align: center;

    /* CENTRADO */
    top: 35%;
    left: 50%;
    transform: translateX(-50%);

    /* SOMBRA */
    text-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        0 4px 8px rgba(0,0,0,0.4),
        0 8px 16px rgba(0,0,0,0.3);

    /* Permite que la frase se parta en dos líneas de forma elegante */
    line-height: 1.15;

    animation: fadeInTitle 1.5s ease-out;
}

/* ======================================================
   BUSCADOR — POSICIÓN BAJO EL SLIDER
   ====================================================== */
.buscador-wrapper {
    position: absolute;
    bottom: -200px !important;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 1200px;
    z-index: 100;
}

/* ======================================================
   RESPONSIVE — Mantener proporciones del buscador
   ====================================================== */

@media (max-width: 1024px) {
    .buscador-wrapper { bottom: -200px !important; }
}

@media (max-width: 768px) {
    .buscador-wrapper { bottom: -200px !important; }
}

@media (max-width: 480px) {
    .slider h1 { font-size: 36px; max-width: 90%; }
    .buscador-wrapper { bottom: -200px !important; }
}

@media (max-width: 360px) {
    .slider h1 { font-size: 32px; }
    .buscador-wrapper { bottom: -200px !important; }
}

/* Animaciones */
@keyframes fadeInTitle {
    from { opacity: 0; transform: translate(-50%, 30px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes sliderFade1 {
    0%   { opacity: 1; transform: scale(1); }
    45%  { opacity: 1; transform: scale(1.08); }
    50%  { opacity: 0; transform: scale(1.08); }
    95%  { opacity: 0; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes sliderFade2 {
    0%   { opacity: 0; transform: scale(1); }
    45%  { opacity: 0; transform: scale(1); }
    50%  { opacity: 1; transform: scale(1); }
    95%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.08); }
}
/* ===========================================================
   SLIDER GLOBAL REDUCIDO — TODAS LAS PÁGINAS EXCEPTO INICIO
   =========================================================== */
body:not(.home) .slider {
    height: 45vh !important;
    margin-bottom: 40px !important;
}

/* Ajustar título del slider en todas las páginas menos Home */
body:not(.home) .slider h1 {
    top: 50% !important;
    font-size: 38px !important;
}
