:root {
    --verde: #155e40;
    --verde-osc: #0f4a32;
    --text: #1f1f1f;
    --white: #fff;
    --shadow: 0 6px 16px rgba(0, 0, 0, .18);
    --header-maxw: 1200px;

    /* Tamaño del logo  */
    --logo-h: 64px;
    /* altura visible del logo en el header */
}

/* Contenedor principal */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--verde);
    color: var(--white);
    box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 5px;
}

.site-header.is-sticky {
    box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
}

.header-inner {
    max-width: var(--header-maxw);
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    /* marca izq, nav centrado */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: calc(var(--logo-h) + 20px);
}

/* Marca */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    margin-right: auto;
    
}

.brand-logo {
    height: var(--logo-h);
    width: auto;
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 6px;
    background-color: beige;
    object-fit: contain;
    image-rendering: auto;
    margin-top: 0.5em;
}

.brand-text {
    line-height: 1.05;
    display: grid;
    gap: .5em;
}

.brand-text strong {
    font-size: 18px;
    letter-spacing: .2px;
}

.brand-text small {
    font-size: 12px;
    opacity: .9;
}

/* Botón hamburguesa (móvil) */
.hamburger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    outline-offset: 3px;
}

.hamburger-box {
    display: grid;
    gap: 4px;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: opacity .25s ease;
}

/* Menú móvil desplegable */
.nav {
    position: fixed;
    z-index: 60;
    /* por encima del backdrop */
    top: var(--header-h, 56px);
    /* altura real del header (la setea el JS) */
    left: 0;
    right: 0;
    background: var(--white);
    color: var(--text);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    /* fade */
    transition: max-height .35s ease, opacity .25s ease;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.nav .nav-close {
    position: sticky;
    top: 0;
    width: 100%;
    text-align: right;
    padding: 12px 16px;
    font-size: 28px;
    line-height: 1;
    background: var(--white);
    border: 0;
    cursor: pointer;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 4px 16px 16px;
    display: grid;
    gap: 8px;
}

.nav-list a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    text-align: center;
    /* centrado también en móvil */
}

.nav-list a:hover {
    background: rgba(21, 94, 64, .08);
}

.nav-list a:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 2px;
}

.nav-cta a {
    background: var(--verde);
    color: var(--white);
    text-align: center;
}

.nav-cta a:hover {
    background: var(--verde-osc);
}

/* Backdrop: SIN blur para evitar borrosidad general */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, .35);
}

.nav-backdrop[hidden] {
    display: none;
}

/* Estado abierto (se aplica en <html>) */
.nav-open .nav {
    max-height: 80vh;
    /* despliegue */
    opacity: 1;
    /* fade in */
}

/* Desktop */
@media (min-width: 900px) {
    .hamburger {
        display: none;
    }

    .nav {
        position: static;
        z-index: auto;
        top: auto;
        left: auto;
        right: auto;
        max-height: none;
        opacity: 1;
        box-shadow: none;
        background: transparent;
        color: var(--white);
        border: 0;
        overflow: visible;
    }

    .nav .nav-close {
        display: none;
    }

    /* Enlaces centrados en el header */
    .nav-list {
        display: flex;
        justify-content: center;
        /* centra el grupo de enlaces */
        flex: 1;
        gap: 12px;
        padding: 0;
    }

    .nav-list a {
        color: var(--white);
        padding: 10px 12px;
    }

    .nav-list a:hover {
        background: rgba(255, 255, 255, .1);
    }

    .nav-cta a {
        background: #0e402c;
    }
}

/* Preferencia de reducir animaciones */
@media (prefers-reduced-motion: reduce) {

    .nav,
    .hamburger-line {
        transition: none !important;
    }
}