/* ===== HEADER BASE ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    padding-right: var(--espacio-2);
    padding-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.logo {
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
}

.logo img {
    height: clamp(64px, 8vw, 92px);
    width: auto;
    display: block;
}

/* ===== NAV DESKTOP ===== */
.navegacion {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* centra la nav en el header */
}

.navegacion ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.navegacion a {
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 600;
    position: relative;
    padding: 0.25rem 0;
}

.navegacion a.active {
    color: var(--color-principal, #2e6c54);
}

.navegacion a.active {
    color: var(--color-principal);
}

.navegacion a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--color-principal);
}

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
    margin-left: auto;
    /* empuja el botón a la derecha */
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    /* por encima del dropdown */
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    background: var(--color-texto);
    margin: 5px 0;
    transition: .3s ease;
    border-radius: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navegacion {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        transform: none;
        /* quitamos el centrado absoluto */
        background: #fff;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        text-align: center;
    }

    .navegacion.abierto {
        max-height: 60vh;
    }

    .navegacion ul {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
}