/* ===== FUENTE INTER ===== */
.header-personalizado-antal,
.header-personalizado-antal * {
    font-family: 'Inter', sans-serif !important;
}

/* ========================================
   HEADER PERSONALIZADO ANTAL - V10.1
   EFECTO: Fijo que desaparece al bajar y aparece al subir
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === HEADER PRINCIPAL - SIEMPRE FIJO === */
.header-personalizado-antal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(13, 26, 51, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

/* HEADER OCULTO - Cuando hace scroll hacia abajo */
.header-personalizado-antal.header-hidden {
    transform: translateY(-100%);
}

/* HEADER VISIBLE - Cuando hace scroll hacia arriba */
.header-personalizado-antal.header-visible {
    transform: translateY(0);
}

.header-personalizado-antal.scrolled {
    background: rgba(13, 26, 51, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-spacer {
    height: 140px; /* Mantener espaciador para contenido */
}

/* ========================================
   DESKTOP
   ======================================== */

.header-desktop {
    width: 100%;
    padding: 15px 0;
}

.header-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    width: 100%;
}

/* === MENÚ === */
.header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.menu-antal {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.menu-antal > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.menu-antal > li > a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.menu-antal > li > a:hover,
.menu-antal > li > a:focus {
    color: #EB9F16;
    background: rgba(235, 159, 22, 0.1);
}

/* ESTILOS PARA MENÚ ACTIVO */
.menu-antal > li.current-menu-item > a,
.menu-antal > li.current-page-ancestor > a,
.menu-antal > li.current-page-parent > a,
.menu-antal > li.menu-item-active > a {
    color: #EB9F16 !important;
    background: rgba(235, 159, 22, 0.15) !important;
    font-weight: 600;
    position: relative;
}

/* Indicador visual para elemento activo */
.menu-antal > li.current-menu-item > a::before,
.menu-antal > li.current-page-ancestor > a::before,
.menu-antal > li.current-page-parent > a::before,
.menu-antal > li.menu-item-active > a::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: #EB9F16;
    border-radius: 2px;
}

/* Indicador de submenú */
.menu-antal > li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 4px;
    transition: transform 0.3s;
}

.menu-antal > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Submenús */
.menu-antal .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 8px 0 0 0;
    z-index: 100;
}

.menu-antal li:hover > .sub-menu,
.menu-antal li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-antal .sub-menu li {
    margin: 0;
    padding: 0;
}

.menu-antal .sub-menu a {
    color: #0D1A33;
    padding: 10px 20px;
    display: block;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-antal .sub-menu a:hover,
.menu-antal .sub-menu a:focus {
    background: rgba(235, 159, 22, 0.1);
    color: #EB9F16;
    padding-left: 25px;
}

/* === LOGO === */
.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo a {
    display: inline-block;
    line-height: 0;
}

.logo-antal {
    height: 130px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.header-logo a:hover .logo-antal,
.header-logo a:focus .logo-antal {
    transform: scale(1.05);
}

/* === GRUPO DERECHO: REDES + BOTONES === */
.header-right-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

/* === ÁREA DE REDES SOCIALES === */
.header-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header-social a:hover,
.header-social a:focus {
    background: #EB9F16;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 159, 22, 0.4);
}

.header-social svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}

/* Separador entre redes y botones */
.header-social::after {
    content: "";
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 10px;
    flex-shrink: 0;
}

/* === BOTONES - TAMAÑOS IGUALADOS === */
.header-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

/* ESTILOS BASE PARA TODOS LOS BOTONES */
.btn-login,
.btn-join,
.account-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    min-height: 44px !important;
    height: 44px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    border: 2px solid !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    font-family: 'Inter', sans-serif !important;
}

/* Botón Iniciar Sesión */
.btn-login {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: transparent !important;
}

.btn-login:hover,
.btn-login:focus {
    color: #EB9F16 !important;
    border-color: #EB9F16 !important;
    background: rgba(235, 159, 22, 0.1) !important;
}

/* Botón Asociarse - CORREGIDO TAMAÑO */
.btn-join {
    background: #EB9F16 !important;
    color: #ffffff !important;
    border-color: #EB9F16 !important;
    font-family: 'Inter', sans-serif !important;
}

.btn-join:hover,
.btn-join:focus {
    background: transparent !important;
    color: #EB9F16 !important;
    border-color: #EB9F16 !important;
}

/* Botón Mi Cuenta */
.account-toggle {
    background: transparent !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    font-family: 'Inter', sans-serif !important;
}

.account-toggle:hover,
.account-toggle:focus {
    color: #EB9F16 !important;
    border-color: #EB9F16 !important;
    background: rgba(235, 159, 22, 0.1) !important;
}

.account-text {
    font-weight: 600;
    font-family: 'Inter', sans-serif !important;
}

.dropdown-arrow {
    color: currentColor;
    transition: transform 0.3s;
}

.account-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* === MENÚ DE CUENTA (MI CUENTA) === */
.header-account-antal {
    position: relative;
}

.account-dropdown-antal {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 12px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.account-dropdown-antal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8f8f8;
    margin-bottom: 8px;
}

.dropdown-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.dropdown-info {
    flex: 1;
}

.dropdown-header strong {
    display: block;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif !important;
}

.dropdown-header span {
    display: block;
    color: #999;
    font-size: 13px;
    font-family: 'Inter', sans-serif !important;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.account-dropdown-antal a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif !important;
}

.account-dropdown-antal a:hover,
.account-dropdown-antal a:focus {
    background: #f8f8f8;
    color: #EB9F16;
}

.account-dropdown-antal a svg {
    flex-shrink: 0;
}

.logout-link {
    color: #ff4757 !important;
}

.logout-link:hover,
.logout-link:focus {
    background: #fff5f5 !important;
}

/* ========================================
   MÓVIL
   ======================================== */

.header-mobile {
    display: none;
    background: rgba(13, 26, 51, 0.95) !important;
    padding: 10px 0;
    width: 100%;
}

.mobile-container {
    width: 100%;
    padding: 0 20px;
}

.mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    display: inline-block;
    line-height: 0;
}

.mobile-logo img {
    height: 90px;
    width: auto;
    display: block;
}

/* === CONTENEDOR DE BOTONES MÓVILES === */
.mobile-right-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botones móviles */
.mobile-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-account-btn:hover,
.mobile-account-btn:focus {
    background: #EB9F16;
    border-color: #EB9F16;
    transform: translateY(-2px);
}

.mobile-account-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    transition: all 0.3s ease;
}

.mobile-account-btn:hover svg,
.mobile-account-btn:focus svg {
    stroke: #ffffff;
}

/* Botón Menú Hamburguesa */
.mobile-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10001;
    position: relative;
}

.mobile-toggle:hover,
.mobile-toggle:focus {
    background: #EB9F16;
    border-color: #EB9F16;
}

.mobile-toggle .bar {
    display: block;
    width: 24px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-toggle:hover .bar,
.mobile-toggle:focus .bar {
    background: #ffffff;
}

.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Botón + (Asociarse) */
.mobile-plus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #EB9F16;
    border: 2px solid #EB9F16;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-plus-btn:hover,
.mobile-plus-btn:focus {
    background: transparent;
    border-color: #EB9F16;
    transform: translateY(-2px);
}

.mobile-plus-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    transition: all 0.3s ease;
}

.mobile-plus-btn:hover svg,
.mobile-plus-btn:focus svg {
    stroke: #EB9F16;
}

/* Menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: rgba(13, 26, 51, 0.98);
    backdrop-filter: blur(10px);
    transition: right 0.4s ease;
    z-index: 10000;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-inner {
    padding: 100px 20px 40px;
}

.menu-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-mobile li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-mobile li a {
    display: block;
    color: #ffffff;
    padding: 16px 10px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif !important;
}

.menu-mobile li a:hover,
.menu-mobile li a:focus {
    color: #EB9F16;
    padding-left: 20px;
    background: rgba(235, 159, 22, 0.1);
}

/* Versión móvil para menú activo */
.menu-mobile li.current-menu-item > a,
.menu-mobile li.current-page-ancestor > a,
.menu-mobile li.current-page-parent > a,
.menu-mobile li.menu-item-active > a {
    color: #EB9F16 !important;
    background: rgba(235, 159, 22, 0.1) !important;
    border-left: 3px solid #EB9F16;
    font-weight: 600;
}

/* Submenús móviles */
.menu-mobile .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.menu-mobile li.menu-item-has-children.open > .sub-menu {
    max-height: 500px;
}

.menu-mobile .sub-menu a {
    padding-left: 30px !important;
    font-size: 14px;
}

/* CORRECCIÓN PARA SUBMENÚS MÓVILES */
.menu-mobile li.menu-item-has-children > a {
    position: relative;
    padding-right: 40px;
}

.menu-mobile li.menu-item-has-children > a::after {
    content: "+";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 300;
    transition: transform 0.3s ease;
    color: #ffffff;
}

.menu-mobile li.menu-item-has-children.open > a::after {
    content: "−";
    transform: translateY(-50%) rotate(0deg);
}

/* Botones móviles */
.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.btn-mobile {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif !important;
}

.btn-login-mobile {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
}

.btn-login-mobile:hover,
.btn-login-mobile:focus {
    color: #EB9F16;
    border-color: #EB9F16;
    background: rgba(235, 159, 22, 0.1);
}

.btn-join-mobile {
    background: #EB9F16;
    color: #ffffff !important;
    border: 2px solid #EB9F16;
    font-family: 'Inter', sans-serif !important;
}

.btn-join-mobile:hover,
.btn-join-mobile:focus {
    background: transparent;
    color: #EB9F16 !important;
}

/* Redes sociales móviles */
.mobile-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 25px 10px;
}

.mobile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-social a:hover,
.mobile-social a:focus {
    background: #EB9F16;
    transform: scale(1.1);
}

.mobile-social svg {
    fill: #ffffff;
}

/* Overlay móvil */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1400px) {
    .header-grid {
        gap: 30px;
    }
    .menu-antal { gap: 3px; }
    .menu-antal > li > a {
        font-size: 13px;
        padding: 8px 12px;
    }
    .logo-antal { height: 120px; }
    .header-buttons { 
        margin-left: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 1200px) {
    .header-container { padding: 0 20px; }
    .header-grid {
        gap: 25px;
    }
    .menu-antal { gap: 2px; }
    .menu-antal > li > a {
        font-size: 12px;
        padding: 8px 10px;
    }
    .logo-antal { height: 110px; }
    .header-social { gap: 10px; }
    .header-social a {
        width: 40px;
        height: 40px;
    }
    .header-social svg {
        width: 20px;
        height: 20px;
    }
    .header-buttons { 
        margin-left: 15px;
        padding-left: 15px;
        gap: 10px;
    }
    .btn-login, .btn-join, .account-toggle {
        padding: 8px 18px !important;
        font-size: 13px !important;
        min-height: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 1024px) {
    .header-desktop { 
        display: none !important;
    }
    .header-mobile { 
        display: block !important;
    }
    .header-spacer { 
        height: 120px;
    }
    
    .menu-mobile li.current-menu-item > a,
    .menu-mobile li.current-page-ancestor > a,
    .menu-mobile li.current-page-parent > a,
    .menu-mobile li.menu-item-active > a {
        border-left: 4px solid #EB9F16;
        padding-left: 16px;
    }
}

@media (max-width: 768px) {
    .mobile-container { 
        padding: 0 10px;
    }
    .mobile-logo img { 
        height: 80px;
    }
    .header-spacer { 
        height: 110px;
    }
    .mobile-menu {
        width: 90%;
        max-width: 320px;
    }
    .mobile-right-buttons {
        gap: 6px;
    }
    .mobile-account-btn,
    .mobile-plus-btn,
    .mobile-toggle {
        width: 44px;
        height: 44px;
    }
    .mobile-account-btn svg,
    .mobile-plus-btn svg {
        width: 22px;
        height: 22px;
    }
    .mobile-toggle .bar {
        width: 22px;
    }
}

@media (max-width: 480px) {
    .mobile-container { padding: 0 12px; }
    .mobile-logo img { height: 70px; }
    .mobile-toggle {
        width: 42px;
        height: 42px;
    }
    .mobile-toggle .bar { width: 20px; }
    .header-spacer { height: 100px; }
    .menu-mobile li a {
        font-size: 15px;
        padding: 12px 10px;
    }
    .btn-mobile {
        padding: 12px 16px;
        font-size: 14px;
    }
    .mobile-social a {
        width: 40px;
        height: 40px;
    }
    .mobile-social svg {
        width: 20px;
        height: 20px;
    }
    .mobile-right-buttons {
        gap: 4px;
    }
    .mobile-account-btn,
    .mobile-plus-btn,
    .mobile-toggle {
        width: 40px;
        height: 40px;
    }
    .mobile-account-btn svg,
    .mobile-plus-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1025px) {
    .header-desktop { 
        display: block !important;
    }
    .header-mobile { 
        display: none !important;
    }
}