/* ============ 01 · Barra superior y header ============ */

.barra-promo {
    position: relative;
    z-index: 60;
    background: var(--grad-soft);
    font-size: .85rem;
}

.barra-promo[hidden] { display: none; }

.barra-promo__fila {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 40px;
    padding-block: 6px;
}

.barra-promo__texto { margin: 0; text-align: center; }
.barra-promo__texto a { text-decoration: underline; font-weight: 700; }

.barra-promo__cerrar {
    position: absolute;
    right: var(--gutter);
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .28);
    color: var(--sobre-acento);
    cursor: pointer;
}
.barra-promo__cerrar:hover { background: rgba(0, 0, 0, .5); }

/* El circulo mide 26px porque mas grande recarga la barra, pero con el dedo
   eso no se acierta. Se agranda solo el area sensible hasta 44px, sin tocar
   lo que se ve. Mismo recurso en .redes a del pie. */
.barra-promo__cerrar::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
}

/* --- Cabecera --- */

.cabecera {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-velo);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background-color .25s ease, border-color .25s ease;
}

.cabecera.compacta {
    background: var(--bg-velo-fuerte);
    border-bottom-color: var(--border);
}

.cabecera__fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 84px;   /* acompaña al logo más grande */
}

/* --- Logo ---
   Es un PNG blanco sobre transparente entregado por el cliente. Se
   sirve al doble del tamaño en que se muestra para que se vea nítido
   en pantallas de alta densidad; el alto lo fija el CSS y el ancho
   sale solo. */

.logo { display: inline-flex; align-items: center; }

.logo img {
    height: 44px;   /* el cliente lo pidió más grande */
    width: auto;
}

/* --- Menu principal --- */

.navegacion { display: flex; align-items: center; gap: 28px; }

.navegacion__lista { display: flex; align-items: center; gap: 4px; }

.navegacion__enlace {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-soft);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.navegacion__enlace:hover,
.navegacion__enlace[aria-expanded="true"] {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}

.navegacion__enlace.activo { color: var(--accent); }

/* --- Desplegable de servicios --- */

.navegacion__item-desplegable { position: relative; }

.desplegable {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 264px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.navegacion__item-desplegable.abierto .desplegable {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.desplegable a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-soft);
    font-size: .88rem;
}

.desplegable a:hover { background: rgba(255, 255, 255, .07); color: var(--text); }

.navegacion__cta { padding-inline: 22px; }

/* --- Boton hamburguesa --- */

.hamburguesa {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;   /* minimo tocable */
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: none;
    cursor: pointer;
}

.hamburguesa span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .22s ease, opacity .18s ease;
}

.hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Telefono --- */

/* Con siete enlaces más el botón, el menú no entra en una línea por
   debajo de ~1180px: ahí pasa al menú de hamburguesa. Si se cambia,
   ajustar también "min-width: 1181px" en main.js. */
@media (max-width: 1180px) {
    .hamburguesa { display: flex; }

    .navegacion {
        position: fixed;
        inset: 0;
        z-index: 55;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 18px;
        padding: 80px 24px 40px;
        background: var(--bg);
        transform: translateX(100%);
        transition: transform .28s ease;
        overflow-y: auto;
    }

    .navegacion.abierta { transform: none; }

    .navegacion__lista { flex-direction: column; align-items: stretch; gap: 2px; }

    .navegacion__enlace {
        justify-content: space-between;
        width: 100%;
        padding: 15px 16px;
        font-size: .95rem;
    }

    .desplegable {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin: 4px 0 8px;
        box-shadow: none;
        background: rgba(255, 255, 255, .04);
    }

    .navegacion__item-desplegable.abierto .desplegable { display: block; }

    .navegacion__cta { margin-top: 10px; }
}
