/* =========================================================
   ECOS HOME - HERO + NAVBAR OVER HERO
========================================================= */

/* ---------------------------------------------------------
   NAVBAR
   Transparente al cargar. Blanco solamente al hacer scroll.
--------------------------------------------------------- */

.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;

    background: transparent;
    box-shadow: none;

    transition:
        background-color .3s ease,
        box-shadow .3s ease,
        backdrop-filter .3s ease;
}

.navbar.at-top {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.navbar.at-top .nav-link {
    color: #fff;
}

.navbar.at-top .nav-link.active {
    color: #fff;
}

.navbar.at-top .nav-link.active::after {
    background: #febc00;
}

.navbar.at-top .lang-btn {
    color: #fff;
    border-color: rgba(255,255,255,.45);
    background: rgba(0,0,0,.08);
}

.navbar.at-top .nav-login {
    color: #fff;
    border-color: rgba(255,255,255,.45);
    background: transparent;
}

.navbar.at-top .nav-calc {
    color: #febc00;
    border-color: #febc00;
    background: transparent;
}

.navbar.at-top .nav-cta {
    background: #febc00;
    color: #071b39;
}

.navbar.at-top .logo-top {
    display: block;
}

.navbar.at-top .logo-scrolled {
    display: none;
}

.navbar.scrolled {
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 8px 30px rgba(15,23,42,.08);
    backdrop-filter: blur(12px);
}

.navbar.scrolled .nav-link {
    color: #171717;
}

.navbar.scrolled .nav-link.active {
    color: #1428a0;
}

.navbar.scrolled .lang-btn {
    color: #202020;
    border-color: #d9d9d9;
    background: #f7f7f7;
}

.navbar.scrolled .nav-login {
    color: #1428a0;
    border-color: #1428a0;
    background: #fff;
}

.navbar.scrolled .logo-top {
    display: none;
}

.navbar.scrolled .logo-scrolled {
    display: block;
}


/* ══════════════════════════════
   HERO SLIDER
══════════════════════════════ */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 650px;
    overflow: hidden;
    color: #fff;
    margin: 0;
    padding: 0;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.9s ease;
    display: flex;
    align-items: flex-end;
}

.hero-slide.active {
    opacity: 1;
}

/*
 * Overlay pensado para parecerse al mockup:
 * oscuro a la izquierda y abajo, manteniendo más viva la foto
 * en el costado derecho.
 */
.hero-overlay,
.hdi-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(1,20,48,.92) 0%,
            rgba(1,20,48,.74) 23%,
            rgba(1,20,48,.38) 47%,
            rgba(1,20,48,.08) 72%,
            rgba(1,20,48,.05) 100%
        ),
        linear-gradient(
            0deg,
            rgba(0,16,38,.70) 0%,
            rgba(0,16,38,.10) 40%,
            rgba(0,16,38,.08) 100%
        );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 660px;
    padding: 0 64px 130px 140px;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.7s ease 0.3s, opacity 0.7s ease 0.3s;
}

.hero-slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.30);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-badge img {
    height: 18px;
    width: auto;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 18px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    letter-spacing: -0.01em;
}

.hero-title em {
    font-style: normal;
    color: #febc00;
}

.hero-desc {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.90);
    margin: 0 0 32px;
    max-width: 520px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 13px 28px;
    background: #febc00;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(254,188,0,0.45);
    letter-spacing: 0.02em;
}

.hero-btn-primary:hover {
    background: #e6a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(254,188,0,0.55);
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 13px 28px;
    background: transparent;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.70);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    transform: translateY(-2px);
}


/* Flechas alineadas con la zona inferior/cards */
.hero-arrow {
    position: absolute;
    top: auto;
    bottom: 82px;
    z-index: 10;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.30);
    color: #fff;
    font-size: 2.2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(254,188,0,0.75);
    transform: scale(1.08);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}


/* Dots */
.hero-dots {
    position: absolute;
    bottom: 72px;
    right: 80px;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, width 0.3s, border-radius 0.3s;
}

.hero-dot.active {
    background: #febc00;
    width: 28px;
    border-radius: 5px;
}


/* Barra de progreso */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 10;
}

.hero-progress-bar {
    height: 100%;
    background: #febc00;
    width: 0%;
    transition: width linear;
}


/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.75;
    pointer-events: none;
}

.hero-scroll span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
}

.hero-scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    animation: scrollBounce 1.4s ease infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translateY(5px);
        opacity: 0.4;
    }
}


/* ---------------------------------------------------------
   Altura limitada
--------------------------------------------------------- */

@media (max-height: 800px) {
    .nav-container {
        height: 90px !important;
    }

    .nav-logo img {
        height: 80px !important;
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3.2rem);
        margin-bottom: 12px;
    }

    .hero-desc {
        font-size: 0.92rem;
        margin-bottom: 20px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 14px;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 10px 22px;
        font-size: 0.85rem;
    }
}


/* ---------------------------------------------------------
   Anchos de laptop / desktop mediano
--------------------------------------------------------- */

@media (max-width: 1400px) {
    .hero-content {
        padding: 0 50px 100px 90px;
    }
}


/* Pantallas con altura muy limitada */
@media (max-height: 700px) {
    .nav-container {
        height: 70px !important;
    }

    .nav-logo img {
        height: 60px !important;
    }

    .hero-title {
        font-size: clamp(1.6rem, 3.5vw, 2.4rem);
        margin-bottom: 10px;
    }

    .hero-desc {
        font-size: 0.85rem;
        margin-bottom: 16px;
        line-height: 1.5;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
        margin-bottom: 12px;
    }

    .hero-content {
        padding: 0 40px 80px 80px;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 9px 18px;
        font-size: 0.82rem;
    }

    .hero-dots {
        bottom: 50px;
    }

    .hero-arrow {
        bottom: 60px;
    }
}


/* Responsive hero - móviles */
@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }

    .hero-slide {
        justify-content: flex-start !important;
    }

    .hero-content {
        padding: 0 20px 100px 20px !important;
        max-width: 100% !important;
        text-align: left !important;
    }

    .hero-title {
        font-size: 2rem !important;
        text-align: left !important;
    }

    .hero-desc {
        text-align: left !important;
    }

    .hero-badge {
        align-self: flex-start !important;
    }

    .hero-btns {
        justify-content: flex-start !important;
    }

    .hero-arrow {
        display: none !important;
    }

    .hero-dots {
        right: 50%;
        transform: translateX(50%);
        bottom: 60px;
    }

    .hero-scroll {
        display: none !important;
    }
}

