/**
 * CheckToBuild - Header & Menu System Final
 * Version: 5.0 PRODUCTION READY
 * Todas las correcciones incluidas
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --ctb-z-fixed: 9999;
    --ctb-transition-base: 0.3s ease;
    --ctb-transition-fast: 0.2s ease;
    --ctb-primary: #00BCD4;
    --ctb-accent: #FF6B35;
    --ctb-space-1: 0.25rem;
    --ctb-space-2: 0.5rem;
    --ctb-space-3: 0.75rem;
    --ctb-space-4: 1rem;
    --ctb-space-6: 1.5rem;
    --ctb-space-8: 2rem;
    --ctb-radius-md: 8px;
    --ctb-radius-lg: 12px;
    --ctb-font-heading: 'Montserrat', sans-serif;
    
    /* TamaÃ±os optimizados */
    --ctb-text-base: 14px;
    --ctb-text-sm: 13px;
    --ctb-text-xs: 11px;
    --ctb-text-lg: 16px;
    
    --ctb-gray-100: #F7F7F7;
    --ctb-gray-200: #E5E5E5;
    --ctb-gray-500: #757575;
    --ctb-gray-600: #616161;
    --ctb-gray-900: #212121;
}

/* ========================================
   1. HEADER BASE
   ======================================== */
.ctb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all var(--ctb-transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ctb-header-wrapper {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    isolation: isolate; /* Create stacking context for blend modes */
}

.ctb-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #086cccc2;
    
}

/* ========================================
   1.1. HEADER CUSTOM COLORS (Per-page)
   ======================================== */
/* Blue header for specific pages (Home, etc.) */
body.custom-header-blue .ctb-header {
    background: #1461b2;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.custom-header-blue .ctb-header-wrapper {
    isolation: auto; /* Remove isolation for normal rendering */
}

body.custom-header-blue .ctb-header.scrolled {
    background: rgba(20, 97, 178, 0.95); /* #1461b2 with 95% opacity */
}

/* ========================================
   1.2. TEXT COLORS (Headers glassmorphism)
   ======================================== */
/* 
 * Headers con glassmorphism (blur) con contraste automático
 * Usa mix-blend-mode: difference para invertir según el fondo
 */

/* Logo - Con blend mode */
body:not(.custom-header-blue) .ctb-logo svg,
body:not(.custom-header-blue) .ctb-logo img {
    filter: brightness(0) invert(1);
    mix-blend-mode: difference;
}

/* Navigation links - Con blend mode */
body:not(.custom-header-blue) .ctb-nav-link {
    color: #FFFFFF !important;
    mix-blend-mode: difference;
}

body:not(.custom-header-blue) .ctb-nav-link:hover {
    color: var(--ctb-primary) !important;
    background: rgba(0, 188, 212, 0.15);
    mix-blend-mode: normal; /* Disable blend on hover */
}

/* CTA button - Con blend mode */
body:not(.custom-header-blue) .ctb-nav-cta .btn-primary {
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
    mix-blend-mode: difference;
}

body:not(.custom-header-blue) .ctb-nav-cta .btn-primary:hover {
    background: var(--ctb-accent);
    border-color: var(--ctb-accent);
    color: #FFFFFF !important;
    mix-blend-mode: normal;
}

/* Mobile hamburger - Con blend mode */
body:not(.custom-header-blue) .hamburger-line {
    background: #FFFFFF !important;
    mix-blend-mode: difference;
}

/* ========================================
   2. NAVIGATION CONTAINER
   ======================================== */
.ctb-nav {
    display: flex;
    align-items: center;
    gap:1rem;
    justify-content: space-between;
    height: 70px;
    padding: 0px;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: var(--ctb-space-6);
    padding-right: var(--ctb-space-6);
}

/* Logo */
.ctb-logo {
    display: flex;
    align-items: center;
    z-index: 1002;
}

.ctb-logo a {
    display: flex;
    align-items: center;
    transition: transform var(--ctb-transition-base);
}

.ctb-logo a:hover {
    transform: scale(1.05);
}

.ctb-logo svg {
    height: 40px;
    width: auto;
}

/* ========================================
   3. DESKTOP NAVIGATION
   ======================================== */
.ctb-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
    margin: 0 1.5rem;
}

.ctb-nav-item {
    position: relative;
}

.ctb-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    color: #FFFFFF;
    font-family: var(--ctb-font-heading);
font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--ctb-transition-fast);
    border-radius: var(--ctb-radius-md);
}

.ctb-nav-link:hover {
    color: var(--ctb-primary);
    background: rgba(0, 188, 212, 0.1);
}

.ctb-nav-link[aria-expanded="true"] {
    color: var(--ctb-primary);
    background: rgba(0, 188, 212, 0.15);
}

/* Dropdown Icon */
.dropdown-icon {
    width: 10px;
    height: 10px;
    transition: transform var(--ctb-transition-fast);
}

.ctb-nav-link[aria-expanded="true"] .dropdown-icon,
.ctb-nav-item.dropdown-open .dropdown-icon {
    transform: rotate(180deg);
}

/* ========================================
   4. MEGA MENU DESKTOP - OPTIMIZADO
   ======================================== */
.ctb-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    border-radius: var(--ctb-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all var(--ctb-transition-base);
    margin-top: 0.8rem;
    min-width: 550px;
    max-width: 850px;
    border: 1px solid var(--ctb-gray-200);
    max-height: 75vh;
    overflow: hidden;
}

/* Variaciones */
.mega-menu-compact {
    min-width: 400px;
    max-width: 500px;
}

.mega-menu-resources {
    min-width: 850px;
    max-width: 1000px;
}

.ctb-nav-item:hover .ctb-mega-menu,
.ctb-nav-item.dropdown-open .ctb-mega-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 0.5rem;
}

.mega-menu-container {
    padding: 1.25rem;
    max-height: calc(75vh - 2.5rem);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar personalizada */
.mega-menu-container::-webkit-scrollbar {
    width: 5px;
}

.mega-menu-container::-webkit-scrollbar-track {
    background: var(--ctb-gray-100);
    border-radius: 2.5px;
}

.mega-menu-container::-webkit-scrollbar-thumb {
    background: var(--ctb-gray-500);
    border-radius: 2.5px;
}

/* Grid compacto */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 1rem;
}

.mega-menu-grid-2col {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
}

.mega-menu-grid-3col {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.mega-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* TÃ­tulos de columna */
.mega-menu-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ctb-gray-500);
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--ctb-gray-200);
}

/* ========================================
   5. MEGA MENU ITEMS
   ======================================== */
.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--ctb-radius-md);
    text-decoration: none;
    color: inherit;
    transition: all var(--ctb-transition-fast);
}

.mega-menu-item:hover {
    background: var(--ctb-gray-100);
    transform: translateX(2px);
}

/* Iconos */
.mega-menu-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ctb-primary) 0%, #00ACC1 100%);
    color: #FFFFFF;
    border-radius: 6px;
}

.mega-menu-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.mega-menu-content {
    flex: 1;
    min-width: 0;
}

.mega-menu-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ctb-gray-900);
    margin: 0 0 2px 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.mega-menu-content p {
    font-size: 11px;
    color: var(--ctb-gray-600);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   6. MEGA MENU FOOTER & CTA
   ======================================== */
.mega-menu-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ctb-gray-200);
}

.mega-menu-cta {
    background: linear-gradient(135deg, #E6FBFF 0%, #F0F9FF 100%);
    padding: 1rem;
    border-radius: var(--ctb-radius-md);
    text-align: center;
}

.mega-menu-cta h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ctb-gray-900);
    margin: 0 0 0.25rem 0;
}

.mega-menu-cta p {
    font-size: 12px;
    color: var(--ctb-gray-600);
    margin: 0 0 0.75rem 0;
}

/* Featured */
.mega-menu-featured {
    background: var(--ctb-gray-100);
    padding: 0.75rem;
    border-radius: var(--ctb-radius-md);
}

.featured-resource-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--ctb-radius-md);
    margin-bottom: 0.75rem;
}

.featured-resource-card h4 {
    font-size: 13px;
    margin-bottom: 0.5rem;
}

.featured-resource-card p {
    font-size: 11px;
    margin-bottom: 0.75rem;
}

/* ========================================
   7. BUTTONS
   ======================================== */
.ctb-nav-cta {
    display: flex;
    align-items: center;
}

.ctb-nav-cta.mobile-only {
    display: none;
}

.btn-header {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: var(--ctb-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ctb-transition-base);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-accent {
    background: var(--ctb-accent);
    color: #FFFFFF;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(255, 107, 53, 0.35);
}

.btn-primary-header {
    background: var(--ctb-primary);
    color: #FFFFFF;
}

.btn-primary-header:hover {
    background-color: var(--ctb-primary-dark);
    border-color: var(--ctb-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ctb-shadow-lg);
    color: #fff;
}

/* Unique class for mega-menu CTA to avoid conflicts */
#site-header .ctb-mega-menu .mega-menu-cta .ctb-mega-cta-request-demo,
#site-header .ctb-mega-menu .mega-menu-cta .ctb-mega-cta-request-demo:link,
#site-header .ctb-mega-menu .mega-menu-cta .ctb-mega-cta-request-demo:visited {
    background: var(--ctb-primary);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 3px 12px rgba(0, 188, 212, 0.25);
}

#site-header .ctb-mega-menu .mega-menu-cta .ctb-mega-cta-request-demo:hover,
#site-header .ctb-mega-menu .mega-menu-cta .ctb-mega-cta-request-demo:focus {
    background-color: var(--ctb-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--ctb-shadow-lg);
}

.btn-secondary-header {
    background: var(--ctb-gray-200);
    color: var(--ctb-gray-900);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 12px;
}

/* ========================================
   8. MOBILE TOGGLE
   ======================================== */
.ctb-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001; /* Above everything */
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background: #FFFFFF;
    margin: 3px 0;
    transition: all var(--ctb-transition-base);
    border-radius: 2px;
}

.ctb-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(4px);
}

.ctb-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
    display: none;
}

.ctb-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* ========================================
   9. MOBILE BACKDROP (Compatible con mega-menu-v2.js)
   ======================================== */
.ctb-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998; /* Below menu (10000) but above header (9999) */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only show in mobile viewports */
@media (max-width: 1024px) {
    .ctb-menu-backdrop {
        display: block;
    }
    
    .ctb-menu-backdrop.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
}



/* ========================================
   11. DESKTOP SPECIFIC FIXES
   ======================================== */
@media (min-width: 1025px) {
    /* Force normal desktop behavior */
    .ctb-nav-menu {
        display: flex !important;
        position: static !important;
        transform: none !important;
        width: auto !important;
        background: transparent !important;
    }
    
    /* Hide mobile elements in desktop */
    .ctb-menu-backdrop {
        display: none !important;
    }
    
    .ctb-mobile-toggle {
        display: none !important;
    }
    
    /* Mega menu positioning fixes */
    .ctb-nav-item:last-child .ctb-mega-menu {
        left: auto;
        right: 0;
        transform: none;
    }
    
    .ctb-nav-item:first-child .ctb-mega-menu {
        left: 0;
        transform: none;
    }

    .mega-menu-resources {
        left: 50%;
        transform: translateX(-50%);
        max-width: min(1000px, 90vw);
    }

    .mega-menu-item {
        min-width: 0;
    }

    .mega-menu-content {
        min-width: 0;
        word-break: break-word;
    }
}

/* ========================================
   10. RESPONSIVE - MOBILE MEJORADO
   ======================================== */
@media (max-width: 1024px) {
    /* Header mobile */
    .ctb-header {
        height: 60px;
    }
    
    .ctb-nav {
        height: 60px;
        padding: 0 15px;
    }
    
    /* Mobile toggle visible */
    .ctb-mobile-toggle {
        display: flex !important;
    }
    
    /* Hide desktop elements */
    .ctb-dropdown-toggle,
    .ctb-nav-cta.desktop-only {
        display: none !important;
    }
    
    /* Mobile Navigation Menu - ANCHO COMPLETO */
    .ctb-nav-menu {
        position: fixed !important;
        top: 60px;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 60px) !important;
        background: #141414e0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: block !important;
        padding: 15px 0 60px 0 !important;
        margin: 0 !important;
        /* Hacer que todo el menÃº sea scrolleable */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Menu activo */
    .ctb-nav-menu.active {
        transform: translateX(0);
    }
    
    /* Nav Items - ANCHO COMPLETO */
    .ctb-nav-item {
        width: 100%;
        margin: 0;
        padding: 0;
        display: block;
    }
    
    /* Enlaces principales - ANCHO COMPLETO CON PADDING */
    .ctb-nav-item.has-mega-menu > .ctb-nav-link {
        width: 100%;
        padding: 18px 20px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        margin-top:10px;
        font-size: 16px;
        font-weight: 500;
        color: #FFFFFF;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-decoration: none;
        transition: all 0.2s ease;
        cursor: pointer;
        min-height: 56px;
    }
    
    /* Indicador de flecha */
    .ctb-nav-item.has-mega-menu > .ctb-nav-link::after {
        content: '';
        position: absolute;
        right: 20px;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid rgba(255, 255, 255, 0.5);
        transition: transform 0.3s ease;
        flex-shrink: 0;

    }
    
    /* Estado hover/active */
    .ctb-nav-item.has-mega-menu > .ctb-nav-link:active {
        background: rgba(0, 188, 212, 0.1);
    }
    
    /* Estado expandido */
    .ctb-nav-item.dropdown-open > .ctb-nav-link {
        background: rgba(0, 188, 212, 0.08);
        border-color: rgba(0, 188, 212, 0.2);
        color: #00BCD4;
        margin-bottom: 0;
        border-bottom: none;
        border-radius: 0;
    }
    
    .ctb-nav-item.dropdown-open > .ctb-nav-link::after {
        transform: rotate(180deg);
    }
    
    /* MEGA MENU - Oculto por defecto */
    .ctb-mega-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        /* Quitar scroll individual */
        overflow: visible !important;
        max-height: none !important;
    }
    
    /* Mostrar cuando estÃ¡ abierto */
    .ctb-nav-item.dropdown-open .ctb-mega-menu {
        display: block !important;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Container del mega menu - ANCHO COMPLETO */
    .mega-menu-container {
        padding: 20px 15px 25px 15px !important;
        background: rgba(0, 0, 0, 0.2);
                margin-top: 10px;
        border: 1px solid rgba(0, 188, 212, 0.1);
        border-top: none;
        /* Quitar scroll individual */
        overflow: visible !important;
        max-height: none !important;
    }
    
    /* Grid mÃ³vil */
    .mega-menu-grid,
    .mega-menu-grid-2col,
    .mega-menu-grid-3col,
    .mega-menu-list {
        display: block !important;
    }
    
    .mega-menu-column {
        margin-bottom: 20px;
    }
    
    .mega-menu-column:last-child {
        margin-bottom: 0;
    }
    
    /* TÃ­tulos de categorÃ­a */
    .mega-menu-title {
        color: rgba(0, 188, 212, 0.6) !important;
        font-size: 11px !important;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        font-weight: 600;
        margin: 0 0 12px 5px !important;
        padding: 0 !important;
        border: none !important;
    }
    
    /* Items del submenu - ANCHO COMPLETO */
    .mega-menu-item {
        display: block !important;
        width: 100% !important;
        padding: 14px 16px !important;
        margin: 0 0 3px 0 !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-left: 3px solid transparent !important;
        border-radius: 0 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        color: rgba(255, 255, 255, 0.85) !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .mega-menu-item:active {
        background: rgba(255, 255, 255, 0.08) !important;
        border-left-color: #00BCD4 !important;
        transform: translateX(3px);
    }
    
    /* Ocultar elementos innecesarios en mÃ³vil */
    .mega-menu-icon {
        display: none !important;
    }
    
    .mega-menu-content p {
        display: none !important;
    }
    
    .mega-menu-content h4 {
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }
    
    /* Footer y CTA ocultos */
    .mega-menu-footer,
    .mega-menu-cta,
    .mega-menu-featured,
    .featured-resource-card,
    .ctb-nav-cta.mobile-only {
        display: none !important;
    }
    
    /* Scrollbar personalizado mÃ¡s visible */
    .ctb-nav-menu::-webkit-scrollbar {
        width: 6px;
    }
    
    .ctb-nav-menu::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .ctb-nav-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .ctb-nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.4);
    }
    
    /* Body state */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        touch-action: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .ctb-header,
    .ctb-nav {
        height: 56px;
    }
    
    .ctb-nav-menu {
        top: 56px !important;
        height: calc(100vh - 56px) !important;
    }
    
    .ctb-logo svg {
        height: 32px;
    }
    
    .ctb-nav-item.has-mega-menu > .ctb-nav-link {
        font-size: 15px;
        padding: 16px 18px;
    }
    
    .mega-menu-item {
        padding: 12px 14px !important;
    }
}

/* ========================================
   CTA BUTTONS - DESKTOP VS MOBILE
   ======================================== */
@media (min-width: 1025px) {
    /* Desktop: mostrar solo CTA desktop */
    .ctb-nav-cta.desktop-only {
        display: flex !important;
        align-items: center;
    }
    
    .ctb-nav-cta.mobile-only {
        display: none !important;
    }
    
    .ctb-mobile-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    /* Mobile: orden correcto del header */
    .ctb-nav {
        display: flex;
        align-items: center;
                padding: 0px;
        justify-content: space-between;
    }
    
    .ctb-logo {
        flex: 0 0 auto;
        order: 1;
        padding-left: 10px;
    }
    
    .ctb-mobile-toggle {
        flex: 0 0 auto;
        order: 2;
        margin-right: 4px;
        background: none !important;
        padding-right: 0px;
        display: flex !important;
    }
    
    /* Ocultar CTA desktop */
    .ctb-nav-cta.desktop-only {
        display: none !important;
    }
    
    /* CTA mÃ³vil dentro del menÃº */
    .ctb-nav-cta.mobile-only {
        display: block !important;
        width: 100%;
        margin-top: auto;
        padding: 20px 0 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Estilo del botÃ³n mÃ³vil */
    .ctb-nav-cta.mobile-only .btn-accent {
        display: block;
        width: 100%;
        padding: 14px 20px;
        background: linear-gradient(135deg, #FF6B35 0%, #FF5722 100%);
        color: #FFFFFF;
        font-weight: 600;
        font-size: 15px;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    .ctb-nav-cta.mobile-only .btn-accent:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
    }
}
/* ========================================
   12. SMALL MOBILE
   ======================================== */
@media (max-width: 480px) {
    .ctb-header,
    .ctb-nav {
        height: 60px;
    }

    .ctb-nav-menu {
        top: 60px !important;
        height: calc(100vh - 60px) !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }

    .ctb-mega-menu {
        min-width: auto;
        min-height: auto;
        top: 0;
    }

    .mega-menu-container {
        padding: 10px 12px;
    }

    .ctb-nav-link {
        padding: 10px;
        font-size: 13px;
    }

    .mega-menu-content h4 {
        font-size: 11px;
    }

    .mega-menu-content p {
        font-size: 9px;
    }

    .ctb-logo svg {
        height: 32px;
    }
}

/* ========================================
   13. ACCESSIBILITY
   ======================================== */
.ctb-mobile-toggle:focus,
.ctb-nav-link:focus-visible {
    outline: 2px solid var(--ctb-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   14. ANIMATIONS
   ======================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Nav Item with Mega Menu - Split Link/Button */
.ctb-nav-item.has-mega-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.ctb-nav-item.has-mega-menu .ctb-nav-link {
    display: inline-block;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.2s 
ease;
}

.ctb-nav-item.has-mega-menu .ctb-nav-link:hover {
    color: #00BCD4;
}

/* Dropdown Toggle Button */
.ctb-dropdown-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    border-radius: 4px;
}

.ctb-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00BCD4;
}

.ctb-dropdown-toggle:focus {
    outline: 2px solid #00BCD4;
    outline-offset: 2px;
}

.ctb-dropdown-toggle .dropdown-icon {
    transition: transform 0.2s ease;
}

.ctb-dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .ctb-nav-item.has-mega-menu {
        display: block;
        width: 100%;
    }
    
    .ctb-nav-item.has-mega-menu .ctb-nav-link {
        display: inline-block;
    }
    
    .ctb-dropdown-toggle {
        position: absolute;
        right: 0;
        top: 0;
        width: 50px;
        height: 100%;
    }
}