/**
 * ISPS Theme — components/header.css
 */
.isps-header {
    position: sticky; top: 0;
    width: 100%; z-index: 9999;
    background: var(--isps-navy);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 14px 0;
    font-family: var(--isps-font-primary);
}
.hd-container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.hd-logo img { height: 48px; width: auto; display: block; }
.mobile-toggle {
    display: none; font-size: 1.5rem; color: white;
    cursor: pointer; padding: 5px; background: none; border: none;
}

/* --- NAV ESCRITORIO --- */
@media (min-width: 992px) {
    .hd-nav {
        display: flex !important; align-items: center; gap: 30px;
        position: static !important; background: transparent !important;
        padding: 0 !important; box-shadow: none !important;
        opacity: 1 !important; visibility: visible !important;
    }
    .hd-menu {
        list-style: none; padding: 0; margin: 0;
        display: flex; gap: 25px; align-items: center;
    }
    .hd-menu a {
        text-decoration: none; color: rgba(255,255,255,0.85);
        font-weight: 500; font-size: 0.92rem; transition: 0.3s;
        padding: 5px 0; position: relative;
    }
    .hd-menu a::after {
        content: ''; position: absolute; left: 0; bottom: -2px;
        width: 0; height: 2px; background: var(--isps-yellow); transition: 0.3s;
    }
    .hd-menu a:hover { color: var(--isps-yellow); }
    .hd-menu a:hover::after { width: 100%; }

    .has-dropdown { position: relative; }
    .hd-dropdown {
        position: absolute; top: calc(100% + 12px); left: 50%;
        transform: translateX(-50%) translateY(8px);
        background: white; min-width: 230px;
        list-style: none; padding: 8px 0; border-radius: 10px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.2);
        opacity: 0; visibility: hidden;
        transition: 0.25s; z-index: 1000;
    }
    .hd-dropdown::before {
        content: ''; position: absolute; top: -6px; left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-bottom-color: white; border-top: none;
    }
    .hd-dropdown li a {
        color: #1E293B !important; padding: 10px 20px; display: block;
        font-size: 0.9rem; font-weight: 500;
    }
    .hd-dropdown li a:hover { background: #f8fafc; color: var(--isps-blue) !important; }
    .hd-dropdown li a::after { display: none; }
    .has-dropdown:hover .hd-dropdown {
        opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
    }
    .hd-actions { display: flex; align-items: center; gap: 12px; }
}

/* --- NAV MÓVIL --- */
@media (max-width: 991px) {
    .mobile-toggle { display: block; }
    .hd-nav {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--isps-navy); display: none;
        flex-direction: column; align-items: flex-start;
        padding: 25px; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
        z-index: 99999; border-top: 1px solid rgba(255,255,255,0.08);
    }
    .hd-nav.nav-open { display: flex; animation: navSlide 0.3s ease-out; }
    @keyframes navSlide {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .hd-menu {
        flex-direction: column; width: 100%;
        list-style: none; padding: 0; margin: 0 0 20px 0; gap: 0;
    }
    .hd-menu > li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .hd-menu a {
        color: white; text-decoration: none; padding: 14px 0;
        display: flex; justify-content: space-between; align-items: center;
        font-size: 1rem; font-weight: 500;
    }
    .hd-dropdown {
        display: none; background: rgba(255,255,255,0.04);
        list-style: none; padding: 0; width: 100%;
    }
    .has-dropdown.sub-open .hd-dropdown { display: block; }
    .has-dropdown.sub-open > a { color: var(--isps-yellow); }
    .has-dropdown.sub-open > a .chevron { transform: rotate(180deg); }
    .hd-dropdown li a {
        color: #94a3b8 !important; padding: 12px 20px !important;
        font-size: 0.9rem !important; border-bottom: none;
    }
    .hd-actions { flex-direction: column; width: 100%; gap: 12px; display: flex; }
    .btn-hd { width: 100%; justify-content: center; padding: 14px; border-radius: 10px; }
}
