/* ============================================
   VIDEO INTRO
   ============================================ */

.banner__intro {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    border-radius: 0px;
    overflow: hidden;

}

.banner__intro--fadeout {
    opacity: 0;
}

.banner__intro-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    border-radius: 0px;
}

.banner__intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(26, 68, 109, 0.2) 100%
    );
    pointer-events: none;
}

/* ============================================
   BANNER BASE
   ============================================ */

.banner {
    width: 100%;
    min-height: 95vh;
    min-height: calc(95vh - var(--header-height));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.8s ease-out, min-height 0.8s ease-out, margin-top 0.8s ease-out;
    margin-top: 0;
    padding-top: calc(var(--header-height) + 1rem);

    @media (min-width: 768px) {
        min-height: 85vh;
    }

    @media (min-width: 1024px) {
        min-height: 90vh;
    }

    @media (min-width: 1280px) {
        min-height: 95vh;
    }
}

/* Fix específico para iOS */
@supports (-webkit-touch-callout: none) {
    .banner {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Modo video - margin-top empuja el banner completo */
.banner--video-mode {
    min-height: auto;
    align-items: stretch;
    margin-top: 0;
    padding: 0;
}

/* ============================================
   CAROUSEL
   ============================================ */

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

.banner__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.2);
    transition: opacity 1.5s ease-in-out, transform 10s ease-out;
    -webkit-transform: scale(1.2);
    -webkit-transition: opacity 1.5s ease-in-out, -webkit-transform 10s ease-out;
}

.banner__slide--active {
    opacity: 1;
    transform: scale(1);
    -webkit-transform: scale(1);
}

/* ============================================
   OVERLAY
   ============================================ */

.banner__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;

    /* Mobile: degradado vertical */
    background: linear-gradient(
        to bottom,
        rgba(26, 68, 109, 0.85) 0%,
        rgba(26, 68, 109, 0.7) 50%,
        rgba(26, 68, 109, 0.85) 100%
    );

    /* Tablet+: degradado horizontal */
    @media (min-width: 768px) {
        background: linear-gradient(
            to right,
            rgba(26, 68, 109, 0.9) 0%,
            rgba(26, 68, 109, 0.5) 100%
        );
    }
}

/* ============================================
   CONTENIDO
   ============================================ */

.banner__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;

    /* 🆕 Ajuste vertical en desktop */
    @media (min-width: 1024px) {
        padding-top: 5rem; /* Empuja el contenido hacia abajo */
    }
    
    @media (min-width: 1280px) {
        padding-top: 6rem; /* Más espacio en wide */
    }
}

.banner__container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 3;
    width: 100%;
}

.banner__content {
    text-align: center;
    color: white;

    img {
        margin: 0 auto;
        width: clamp(17rem, 25vw, 18rem);
        margin-top: 0rem;
        margin-bottom: 1.8rem;

        @media (min-width: 768px) {
            width: clamp(18rem, 20vw, 20rem);
            margin-top: 0rem;
            margin-bottom: 1.5rem;
        }

        @media (min-width: 1280px) {
            width: clamp(19rem, 18vw, 22rem);
            margin-top: 0rem;
            margin-bottom: 2rem;
        }
    }
}

.banner__subtitle {
    font-family: 'Encode Sans Expanded', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.6;
    letter-spacing: 1.2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpScale 1s ease-out forwards;
    animation-delay: 0.4s;
    margin: 0 auto;
    max-width: 800px;
    position: relative;
    
    padding-bottom: 1rem;
    display: inline-block;
    width: 90%;
    
    /* Gradient text (tu código actual) */
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #e0e7ff 25%,
        #ffffff 50%,
        #c7d2fe 75%,
        #ffffff 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUpScale 1s ease-out forwards, gradientFlow 4s ease infinite;
    animation-delay: 0.4s, 1.2s;
    text-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));

    /* 🆕 SUBRAYADO ANIMADO */
    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 10%,
            #ffffff 30%,
            #e0e7ff 50%,
            #ffffff 70%,
            rgba(255, 255, 255, 0.3) 90%,
            transparent 100%
        );
        box-shadow: 
            0 0 15px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(224, 231, 255, 0.4);
        border-radius: 2px;
        animation: drawUnderline 1.2s ease-out forwards;
        animation-delay: 1.5s; /* Aparece después del texto */
    }

    @media (min-width: 768px) {
        max-width: 400px;
        font-size: 1.2rem;
        padding-bottom: 1.2rem;
        
        &::after {
            height: 4px;
        }
    }

    @media (min-width: 1024px) {
        font-size: 1.3rem;
        padding-bottom: 1.3rem;
    }
}

/* 🆕 ANIMACIÓN DEL SUBRAYADO */
@keyframes drawUnderline {
    0% {
        width: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* Animaciones existentes (sin cambios) */
@keyframes fadeInUpScale {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.banner__scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.6s;

    /* 🆕 Bajar más el indicador en desktop */
    transform: translateY(0);

    @media (min-width: 768px) {
        margin-top: 4rem;
        gap: 1rem;
    }

    @media (min-width: 1024px) {
        transform: translateY(2rem); /* 🆕 Baja 32px */
    }

    @media (min-width: 1280px) {
        margin-top: 4.5rem;
        transform: translateY(2.5rem); /* 🆕 Baja 40px */
    }
    
    @media (min-width: 1536px) {
        transform: translateY(3rem); /* 🆕 Baja 48px */
    }
}

.scroll__text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    /* text-transform: uppercase; */
    letter-spacing: 0.3px;

    @media (min-width: 768px) {
        font-size: 0.85rem;
    }
}

.scroll__indicator {
    width: 24px;
    height: 40px;
    border: 2.1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.3s ease;

    @media (min-width: 768px) {
        width: 26px;
        height: 44px;
    }

    &:hover {
        border-color: white;
    }
}

.scroll__line {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    animation: scroll-down 2s ease-in-out infinite;

    @media (min-width: 768px) {
        height: 10px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll-down {
    0% {
        opacity: 0;
        top: 8px;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        top: 24px;
    }
}