/**
 * slider.css — CAINCO El Alto
 * Ruta: assets/css/slider.css
 * Hero slider full screen + responsive completo
 */

/* ════════════════════════════════════════
   CONTENEDOR
════════════════════════════════════════ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 860px;
    overflow: hidden;
    background-color: #000020;
}

/* ════════════════════════════════════════
   SLIDES
════════════════════════════════════════ */
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    animation: kenBurns 20s ease-out both;
}

/* Overlay degradado lateral — texto legible izquierda, imagen visible derecha */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0; z-index: 1;
    background: linear-gradient(
        to right,
        rgba(0, 0, 32, 0.88) 0%,
        rgba(0, 0, 32, 0.65) 32%,
        rgba(0, 0, 32, 0.22) 58%,
        transparent 78%
    );
}

/* Fallback sin imagen */
.hero-slide-fallback {
    background: linear-gradient(135deg, #000020 0%, #000d45 50%, #000020 100%);
}
.hero-slide-fallback::before { display: none; }

/* ════════════════════════════════════════
   VIDEO BACKGROUND
════════════════════════════════════════ */
.video-background {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.video-background iframe,
.video-background video {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw; height: 56.25vw;
    min-height: 100vh; min-width: 177.78vh;
    border: none; pointer-events: none;
}

/* ════════════════════════════════════════
   CONTENIDO
════════════════════════════════════════ */
.hero-slide-content {
    position: relative; z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 0 14%;
    box-sizing: border-box;
}

.hero-slide-inner {
    max-width: 480px;
    width: 100%;
    color: #fff;
    margin-left: 0 !important;   /* anula el margin:auto del .container */
    margin-right: auto;
}

/* ════════════════════════════════════════
   ANIMACIONES DE ENTRADA
   h1 → typewriter JS · p y botones → fadeInUp CSS
════════════════════════════════════════ */
.hero-slide.active .hero-slide-inner p  { animation: fadeInUp 0.85s ease-out 0.55s both; }
.hero-slide.active .hero-slide-buttons  { animation: fadeInUp 0.85s ease-out 0.85s both; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes kenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

/* ════════════════════════════════════════
   CURSOR DE ESCRITURA (typewriter)
════════════════════════════════════════ */
.hs-cursor {
    display: inline-block;
    width: 3px;
    height: .88em;
    background: #eba436;
    border-radius: 2px;
    margin-left: 3px;
    vertical-align: middle;
    animation: hsBlink .65s step-end infinite;
}
@keyframes hsBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ════════════════════════════════════════
   TEXTOS
════════════════════════════════════════ */
.hero-slide h1 {
    font-size: clamp(1.9rem, 4vw, 3.6rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
    text-shadow:
        0 2px 12px rgba(0,0,0,.95),
        0 4px 24px rgba(0,0,0,.7);
}

.hero-slide p {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: rgba(255,255,255,.92);
    line-height: 1.8;
    margin-bottom: 2.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.9);
}

/* ════════════════════════════════════════
   BOTONES
════════════════════════════════════════ */
.hero-slide-buttons {
    display: flex;
    gap: .85rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.hero-slide-buttons .btn {
    padding: .82rem 1.8rem;
    font-size: .95rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform .3s, box-shadow .3s;
    box-shadow: 0 5px 20px rgba(0,0,0,.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.hero-slide-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

/* ════════════════════════════════════════
   DOTS
════════════════════════════════════════ */
.slider-controls {
    position: absolute;
    bottom: 36px; left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex; gap: 12px; align-items: center;
}

.slider-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    border: 2px solid rgba(255,255,255,.6);
    cursor: pointer;
    transition: all .35s ease;
    flex-shrink: 0;
}
.slider-dot:hover { background: rgba(255,255,255,.75); transform: scale(1.25); }
.slider-dot.active {
    background: #eba436;
    border-color: #eba436;
    width: 30px; border-radius: 6px;
    box-shadow: 0 3px 12px rgba(255,122,61,.65);
}

/* ════════════════════════════════════════
   FLECHAS DE NAVEGACIÓN
════════════════════════════════════════ */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:
        opacity    .35s ease,
        background .25s ease,
        border-color .25s ease,
        transform  .25s cubic-bezier(.34,1.36,.64,1);
}
.hero-slider:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover {
    background: rgba(255, 255, 255, .25);
    border-color: rgba(255, 255, 255, .55);
    transform: translateY(-50%) scale(1.1);
}
.slider-prev { left: 28px; }
.slider-next { right: 28px; }

/* ════════════════════════════════════════
   INDICADOR SCROLL
════════════════════════════════════════ */
.slider-scroll-hint {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: .55;
    animation: hsSway 2.2s ease-in-out infinite;
}
.slider-scroll-hint span {
    display: block;
    width: 20px; height: 32px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 12px;
    position: relative;
}
.slider-scroll-hint span::before {
    content: '';
    position: absolute;
    top: 5px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 6px;
    background: #fff;
    border-radius: 2px;
    animation: hsDot 2.2s ease-in-out infinite;
}
@keyframes hsDot {
    0%,100% { opacity:1; top:5px; }
    50%      { opacity:.3; top:14px; }
}
@keyframes hsSway {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(4px); }
}

/* ════════════════════════════════════════
   DECORACIONES
════════════════════════════════════════ */
.hero-decoration { position:absolute; z-index:1; opacity:.04; pointer-events:none; }
.hero-decoration.top-left     { top:0; left:0; width:280px; height:280px; background:radial-gradient(circle,#eba436,transparent 70%); }
.hero-decoration.bottom-right { bottom:0; right:0; width:380px; height:380px; background:radial-gradient(circle,#eba436,transparent 70%); }


/* ════════════════════════════════════════
   TABLET ≤ 992px
════════════════════════════════════════ */
@media (max-width: 992px) {
    .slider-arrow { width: 44px; height: 44px; font-size: .9rem; }
    .slider-prev { left: 14px; }
    .slider-next { right: 14px; }

    .hero-slider { height: 72vh; min-height: 480px; max-height: 700px; }

    /* Overlay centrado en tablet */
    .hero-slide::before {
        background: linear-gradient(
            to bottom,
            rgba(0,0,32,.55) 0%,
            rgba(0,0,32,.50) 45%,
            rgba(0,0,0,.75) 100%
        );
    }

    .hero-slide-content { justify-content: center; text-align: center; padding: 0 2.5rem; }
    .hero-slide-inner   { max-width: 540px; }
    .hero-slide-buttons { justify-content: center; flex-wrap: wrap; }

    .hero-slide.active { animation: kenBurnsMd 20s ease-out both; }
    @keyframes kenBurnsMd { from{transform:scale(1)} to{transform:scale(1.04)} }
}


/* ════════════════════════════════════════
   MÓVIL ≤ 768px  —  IMAGEN LLENA TODA LA PANTALLA
════════════════════════════════════════ */
/* Ocultar flechas y scroll-hint en móvil (touch swipe funciona) */
@media (max-width: 768px) {

    .slider-arrow,
    .slider-scroll-hint { display: none; }

    /* dvh = quita la barra del navegador móvil → imagen realmente full screen */
    .hero-slider {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        max-height: none;
    }

    /* Overlay: transparente arriba (se ve la imagen) — oscuro abajo (texto legible) */
    .hero-slide::before {
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,.08)  0%,
            rgba(0,0,0,.18)  35%,
            rgba(0,0,32,.65) 65%,
            rgba(0,0,32,.88) 100%
        );
    }

    /* Texto anclado al fondo */
    .hero-slide-content {
        align-items: flex-end;
        justify-content: center;
        text-align: center;
        padding: 1.5rem 1.8rem 6rem;
    }

    .hero-slide-inner   { max-width: 100%; }
    .hero-slide-buttons { justify-content: center; }

    .hero-slide h1 { margin-bottom: .7rem; }
    .hero-slide p  { margin-bottom: 1.4rem; font-size: clamp(.95rem, 3.2vw, 1.15rem); }

    .hero-slide-buttons .btn { padding: .8rem 1.8rem; font-size: .95rem; }

    /* Sin Ken Burns en móvil — ahorra batería */
    .hero-slide.active { animation: none; }

    .slider-controls { bottom: 1.8rem; gap: 10px; }
    .slider-dot      { width:10px; height:10px; }
    .slider-dot.active { width:24px; }
}


/* ════════════════════════════════════════
   MÓVIL PEQUEÑO ≤ 480px
════════════════════════════════════════ */
@media (max-width: 480px) {

    .hero-slider { height: 100vh; height: 100dvh; min-height: 0; max-height: none; }

    .hero-slide-content { padding: 1rem 1.2rem 5.5rem; }

    /* Encuadra la imagen desde arriba para que se vea el sujeto */
    .hero-slide { background-position: center 15%; }

    /* Botones apilados en pantalla muy pequeña */
    .hero-slide-buttons {
        flex-direction: column;
        align-items: flex-start; gap: .6rem;
    }
    .hero-slide-buttons .btn {
        width: auto;
        justify-content: center;
        padding: .8rem 1.6rem; font-size: .9rem;
    }

    .slider-controls { bottom: 1.2rem; gap: 8px; }
    .slider-dot      { width:9px; height:9px; }
    .slider-dot.active { width:22px; }
}


/* ════════════════════════════════════════
   MÓVIL MUY PEQUEÑO ≤ 360px
════════════════════════════════════════ */
@media (max-width: 360px) {
    .hero-slide h1 { font-size: 1.55rem; }
    .hero-slide p  { font-size: .92rem; margin-bottom: 1.1rem; }
}
