/* Reset */
body {
    margin: 0;
    overflow-x: hidden;
    font-family: sans-serif;
}

/* NUEVA CLASE PARA BLOQUEAR SCROLL DURANTE TRANSICIÓN HORIZONTAL */
body.horizontal-mode {
    overflow-y: hidden;
}

/* ===================================================== */
/* HEADER */
/* ===================================================== */
#mainHeader {
    position: fixed;
    top: -90px;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    box-sizing: border-box;
    z-index: 999;
    /* Transición corregida y completa */
    transition: top .4s ease, background .3s ease, color .3s ease;
}

#mainHeader.visible {
    top: 0;
}

#mainHeader nav {
    display: flex;
    gap: 2rem;
}

#mainHeader nav a {
    text-decoration: none;
    font-weight: bold;
}

/* ===================================================== */
/* SCROLL VERTICAL (Contenedor de Home y Nosotros) */
/* ===================================================== */
#vertical-scroll {
    position: relative;
    width: 100%;
    /* Transición suave para el desplazamiento lateral */
    transition: transform 0.7s cubic-bezier(.45,.05,.1,1);
}

.panel-v {
    height: 100vh;
    padding: 6rem 4rem;
    box-sizing: border-box;
}

/* HOME = fondo oscuro */
.section-home {
    background: black;
    color: white;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ABOUT = fondo blanco */
.section-about {
    background: white;
    color: #222;
}

/* ===================================================== */
/* NAVEGACIÓN HORIZONTAL */
/* ===================================================== */
#h-wrapper {
    position: fixed;
    top: 0;
    left: 100vw;
    width: 200%;
    height: 100vh;
    display: flex;
    overflow-y: auto;
    transition: left .7s cubic-bezier(.45,.05,.1,1);
    background: white;
    z-index: 100;
}

/* Secciones horizontales */
.panel-h {
    width: 100vw;
    padding: 6rem 4rem;
    box-sizing: border-box;
    overflow-y: auto;
    border-left: 1px solid #ddd;
}

/* CONTACTO = verde */
.section-contacto {
    background: #A1A569;
}

/* Logo dentro de secciones */
.section-logo {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    cursor: pointer;
    display: block;
    font-weight: 700;
    color: inherit;
}

/* small helpers for body-lock */
body.locked {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ===================================================== */
/* CORRECCIÓN DE COLORES PARA NAVEGACIÓN HORIZONTAL */
/* ===================================================== */

/* 1. Header cuando está en CARTA (horizontal-active) */
#mainHeader.horizontal-active {
    background: white !important;
    color: black !important;
    border-bottom: 1px solid black !important;
}

/* 2. Header cuando está en CONTACTO (header-contacto) */
#mainHeader.header-contacto {
    background: #A1A569 !important;
    color: white !important;
    border-bottom: none !important;
}

/* Enlaces blancos solo cuando el header está en modo CONTACTO */
#mainHeader.header-contacto nav a {
    color: white;
}

/* Asegurar que el texto sea blanco en la sección HOME (transparent) */
#mainHeader[style*="background: transparent"] {
    color: white;
}

/* ===================================================== */
/* RESPONSIVE */
/* ===================================================== */
@media (max-width: 768px) {
    #mainHeader {
        padding: 1rem;
    }

    .panel-v,
    .panel-h {
        padding: 4rem 1.5rem;
    }
}