/* ========================================
   HEADER COMPONENT - Ubuntu Seguros (OPTIMIZED SIZING)
   ======================================== */

    /* Header */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--header-height);
        background: rgba(15, 20, 25, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        border-bottom: 1px solid var(--border-white);
    }

    .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        max-width: var(--container-max-width);
        margin: 0 auto;
        padding: 0 var(--container-padding);
    }

    .logo {
        font-size: var(--font-size-xl);
        font-weight: var(--font-weight-bold);
        color: var(--text-white);
    }

    .nav-links {
        display: flex;
        list-style: none;
        gap: var(--spacing-xl);
    }

    .nav-links a {
        color: var(--text-white);
        text-decoration: none;
        font-weight: var(--font-weight-medium);
        transition: var(--transition-all);
    }

    .nav-links a:hover {
        color: var(--text-white);
    }

/* MOBILE MENU TOGGLE - MEJORADO */
.mobile-menu-toggle {
    display: none;
    width: 52px;
    height: 52px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 1001;
}

/* .mobile-menu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
} */

.hamburger {
    position: relative;
    width: 28px;
    height: 20px;
}

.line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--text-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.line1 { top: 0; }
.line2 { top: 50%; transform: translateY(-50%); }
.line3 { bottom: 0; }

/* ANIMATED X STATE */
.mobile-menu-toggle.active .line1 {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background: var(--primary-color);
}

.mobile-menu-toggle.active .line2 {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.mobile-menu-toggle.active .line3 {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    background: var(--primary-color);
}

/* MOBILE MENU - MEJORADO */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.mobile-menu-content {
    padding: 2rem var(--container-padding);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li {
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 1.5rem 0;
    text-decoration: none;
    color: var(--text-white-80);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.mobile-menu.active .mobile-nav-link {
    transform: translateY(0);
    opacity: 1;
    transition-delay: calc(0.1s * var(--index, 0));
}

.mobile-nav-link:hover {
    color: var(--primary-color);
}

.mobile-nav-links li:last-child .mobile-nav-link {
    border-bottom: none;
}

.mobile-nav-icon {
    display: none;
}

.mobile-nav-text {
    font-weight: var(--font-weight-medium);
}

/* MOBILE CTA - MEJORADO */
.mobile-cta-container {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(30px);
    opacity: 0;
}

.mobile-menu.active .mobile-cta-container {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.4s ease 0.3s;
}

.mobile-cta-button {
    display: block;
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 1rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
}

.mobile-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.mobile-cta-icon {
    display: none;
}

/* ANIMATIONS */
@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* RESPONSIVE DESIGN - MEJORADO */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .header {
        min-height: 100px;
    }
    
    .header {
        min-height: 85px;
    }
    
    .nav {
        padding: 1.5rem 2.5rem;
    }
    
    .logo-image {
        height: 80px; /* Mucho mÃ¡s grande para pantallas XL */
    }
    
    .nav-links {
        gap: 3.5rem;
    }
    
    .nav-links a {
        font-size: 1.15rem;
        padding: 1.25rem 0.75rem;
    }
    
    .cta-button {
        padding: 1.125rem 2.5rem;
        font-size: 1.05rem;
    }
}

/* Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .header {
        min-height: 95px;
    }
    
    .header {
        min-height: 80px;
    }
    
    .nav {
        padding: 1.25rem 2rem;
    }
    
    .logo-image {
        height: 75px; /* MÃ¡s grande para desktop estÃ¡ndar */
    }
    
    .nav-links {
        gap: 3rem;
    }
}

/* Laptop/Tablet Landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .header {
        min-height: 85px;
    }
    
    .header{
        min-height: 75px;
    }
    
    .nav {
        padding: 1.125rem 1.75rem;
    }
    
    .logo-image {
        height: 65px; /* Buen tamaÃ±o para laptop */
    }
    
    .nav-links {
        gap: 2.5rem;
    }
    
    .nav-links a {
        font-size: 1.05rem;
        padding: 0.875rem 0.5rem;
    }
    
    .cta-button {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .header {
        min-height: 80px;
    }
    
    .header {
        min-height: 70px;
    }
    
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .logo-image {
        height: 58px; /* TamaÃ±o adecuado para tablet */
    }
    
    .nav-links {
        gap: 2rem;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 0.75rem 0.5rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    .header {
        min-height: 70px;
    }
    
    .header {
        min-height: 65px;
    }
    
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .cta-button {
        display: none;
    }
    
    .logo-image {
        height: 50px; /* Mantenemos un buen tamaÃ±o en mobile */
    }
    
    .mobile-nav-link {
        padding: 1.25rem 0;
        font-size: 1.125rem;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .header {
        min-height: 65px;
    }
    
    .header {
        min-height: 60px;
    }
    
    .nav {
        padding: 0.875rem 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 45px;
    }
    
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
        padding: 12px;
    }
    
    .hamburger {
        width: 24px;
        height: 18px;
    }
    
    .line {
        height: 2.5px;
    }
    
    .mobile-nav-link {
        padding: 1.125rem 0;
        font-size: 1.05rem;
    }
    
    .mobile-cta-button {
        padding: 1.125rem 2.25rem;
        font-size: 1.05rem;
    }
} 

/* Extra Small Mobile (up to 360px) */
@media (max-width: 360px) {
    .header {
        min-height: 60px;
    }
    
    .nav {
        padding: 0.75rem 0.875rem;
    }
    
    .logo {
        font-size: 1.375rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    
    .hamburger {
        width: 22px;
        height: 16px;
    }
    
    .mobile-nav-link {
        padding: 1rem 0;
        font-size: 1rem;
    }
    
    .mobile-cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .mobile-menu-content {
        padding: 65px 0.75rem 1rem 0.75rem;
    }
}

/* Estados adicionales para mejor UX */
/* .mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mobile-nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.mobile-cta-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} */

/* ACCESSIBILITY - MEJORADO */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mejorar contraste para usuarios con necesidades especiales */
@media (prefers-contrast: high) {
    .nav-links a {
        color: #000000;
    }
    
    .nav-links a:hover {
        color: #cc4400;
    }
    
    .line {
        background: #000000;
    }
    
    .mobile-nav-link {
        color: #000000;
    }
}

/* DARK MODE SUPPORT - MEJORADO */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(31, 41, 55, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .header {
        background: rgba(31, 41, 55, 0.98);
    }
    
    .nav-links a,
    .line {
        color: #f9fafb;
    }
    
    .logo {
        color: #f9fafb;
    }
    
    .logo:hover {
        color: #f97316;
    }
    
    .mobile-menu {
        background: rgba(31, 41, 55, 0.98);
        backdrop-filter: blur(20px);
    }
    
    .mobile-nav-link {
        color: #e5e7eb;
    }
    
    .mobile-nav-link:hover {
        color: #f9fafb;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(249, 115, 22, 0.1);
    }
}

/* PRINT STYLES */
@media print {
    .header {
        position: static;
        background: white;
        box-shadow: none;
        border-bottom: 2px solid #000;
        min-height: auto;
    }
    
    .mobile-menu-toggle,
    .cta-button,
    .mobile-cta-button {
        display: none;
    }
    
    .nav-links {
        display: flex !important;
    }
    
    .nav-links a {
        color: #000;
        text-decoration: underline;
    }
}