/* header/header.css */

:root {
    --xp-navy: #0B1021;
    --xp-orange: #FF6900;
    --xp-blue: #0066CC;
    --xp-text: #1D1D1F;
    --xp-text-gray: #86868B;
    --xp-border: rgba(0,0,0,0.06);
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-blur: saturate(180%) blur(20px);
    --shadow-float: 0 20px 40px -12px rgba(0,0,0,0.12);
    --shadow-subtle: 0 8px 30px rgba(0,0,0,0.08);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- GLOBAL NAV --- */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 68px;
    z-index: 2000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--xp-border);
}

.nav-content {
    height: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 28px;
    width: auto;
    display: block;
}

/* --- LINKS & SUBMENUS --- */
.nav-links { 
    display: flex;
    gap: 8px;
    list-style: none;
    height: 100%;
    align-items: center; 
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link { 
    font-size: 13.5px;
    font-weight: 500;
    color: var(--xp-text); 
    opacity: 0.85;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(0,0,0,0.04);
    color: var(--xp-orange);
}

/* Submenu Card Desktop */
.submenu-card {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--xp-border);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease);
    z-index: 2100;
}

.nav-item:hover .submenu-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    text-decoration: none;
    border-radius: 14px;
    transition: background 0.2s;
}

.submenu-item:hover {
    background: #F5F5F7;
}

.icon-sq { 
    width: 38px;
    height: 38px;
    border-radius: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-orange { background: rgba(255,105,0,0.1); color: var(--xp-orange); }
.bg-blue { background: rgba(0,102,204,0.1); color: var(--xp-blue); }
.bg-navy { background: rgba(11,16,33,0.08); color: var(--xp-navy); }

.item-text h4 { font-size: 14px; font-weight: 600; color: var(--xp-navy); line-height: 1.2; }
.item-text p { font-size: 11px; color: var(--xp-text-gray); margin-top: 2px; }

/* --- ACTIONS --- */
.nav-actions { display: flex; gap: 14px; align-items: center; }

.btn-track { 
    font-size: 13.5px;
    font-weight: 600;
    color: var(--xp-text); 
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
    white-space: nowrap;
}

.btn-track:hover { color: var(--xp-orange); }

.btn-casillero { 
    padding: 10px 20px;
    border: 1.5px solid var(--xp-navy);
    border-radius: 50px; 
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--xp-navy); 
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-casillero:hover { background: var(--xp-navy); color: white; }

.btn-quote { 
    background: var(--xp-orange);
    color: white !important;
    border: none; 
    box-shadow: 0 10px 20px -5px rgba(255,105,0,0.3); 
}

.btn-quote:hover { background: #E65C00; }

/* --- MOBILE TOGGLE --- */
.mobile-toggle { 
    display: none;
    border: none;
    background: none;
    cursor: pointer; 
    color: var(--xp-navy);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.mobile-toggle:hover { background: rgba(0,0,0,0.04); }

/* --- MOBILE DROPDOWN --- */
.mobile-dropdown {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background: white;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    z-index: 1999;
    box-shadow: 0 20px 30px rgba(0,0,0,0.05);
}

.mobile-dropdown.active {
    display: flex;
    animation: slideDown 0.4s var(--ease);
}

.mobile-submenu {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
    margin-top: 8px;
    border-left: 2px solid #f0f0f0;
}

.mobile-submenu.active { display: flex; }

.mobile-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--xp-navy); 
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.mobile-link:hover { background: #F5F5F7; }

.mobile-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--xp-border);
}

@keyframes slideDown { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ========== RESPONSIVE ========== */

/* TABLET/MOBILE (Corte en 991px para ocultar menú de escritorio) */
@media (max-width: 991px) {
    .nav-links, .nav-actions { display: none; }
    .mobile-toggle { display: flex; }
    .nav-content { padding: 0 16px; }
}

@media (max-width: 575px) {
    .global-nav { height: 60px; }
    .nav-logo img { height: 24px; }
    .mobile-dropdown { top: 60px; height: calc(100vh - 60px); padding: 16px; }
}