/* ── HEADER · MEGA MENÚ (Opción 1 de rediseño) ──
   Fix del bug anterior: el panel ya NO usa margin-top (el hueco que
   cerraba el menú al bajar el cursor). Pega al trigger con top:100% y
   un puente ::after invisible que mantiene el hover durante la animación. */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0D0D0D;
    border-bottom: 1px solid #2A2A2A;
}

.header__contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 48px;
    position: relative;
}

/* ── LOGO ── */
.header__logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo-img {
    width: 66px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
}

.header__logo-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header__logo-principal {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.9rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #FFFFFF;
    line-height: 1;
}

.header__logo-acento {
    color: #F5A623;
}

.header__logo-secundario {
    font-size: 0.65rem;
    color: #AAAAAA;
}

/* ── NAV ── */
.header__nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.header__nav-lista {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    height: 100%;
}

.header__nav-item {
    position: relative;
}

.header__nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.header__nav-link:hover,
.header__nav-item:hover .header__nav-link {
    color: #F5A623;
    background-color: #141414;
}

.header__chev {
    font-size: 0.68rem;
    transition: transform 0.2s ease;
}

.header__nav-item:hover .header__chev {
    transform: rotate(180deg);
}

/* Puente invisible: mantiene el cursor sobre el item mientras el panel
   se anima (translateY), evitando que se cierre al bajar. */
.header__nav-item::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
}

/* ── MEGA MENÚ (Productos) ── */
.header__mega {
    position: absolute;
    top: 100%;
    left: 0;
    width: 460px;
    background-color: #141414;
    border: 1px solid #2A2A2A;
    border-top: 3px solid #F5A623;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.header__nav-item:hover .header__mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.header__mega-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.header__mega-card:hover {
    border-color: #F5A623;
    background-color: rgba(245, 166, 35, 0.06);
}

.header__mega-card-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.header__mega-card-titulo {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    line-height: 1.1;
}

.header__mega-card-desc {
    display: block;
    font-size: 0.72rem;
    color: #AAAAAA;
    margin-top: 2px;
    line-height: 1.3;
}

.header__mega-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #2A2A2A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header__mega-footer-link {
    color: #AAAAAA;
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.2s ease;
}

.header__mega-footer-link:hover {
    color: #F5A623;
}

.header__mega-cta {
    padding: 9px 18px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ── DROPDOWN simple (Proyectos / Recursos) ── */
.header__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background-color: #141414;
    border: 1px solid #2A2A2A;
    border-top: 3px solid #F5A623;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.header__nav-item:hover .header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__submenu a {
    display: block;
    padding: 11px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.18s ease, color 0.18s ease;
}

.header__submenu a:hover {
    background-color: rgba(245, 166, 35, 0.1);
    color: #F5A623;
}

/* ── ACCIONES (WhatsApp + CTA) ── */
.header__acciones {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header__whatsapp {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #25D366;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.header__whatsapp:hover {
    color: #FFFFFF;
}

.header__cta {
    padding: 12px 24px;
    font-size: 0.8rem;
    flex-shrink: 0;
}
