/* --- MBA NZANG FUTURISTIC STYLES --- */

/* 1. HUD Navigation (Desktop) */
header {
    background: transparent !important;
    border: none !important;
    padding: 20px 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999 !important; /* Ensure overrides everything */
}

/* Override Page Banners for consistency */
.page-banner {
    position: relative; /* Anchor for canvas */
    overflow: hidden;   /* Crop falling text */
    background-image: none !important;
    background: linear-gradient(135deg, #050a14 0%, #0a1525 100%) !important;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

#bot-matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind content */
    opacity: 0.15; /* Subtle background */
    pointer-events: none;
}

/* Hide legacy logo */
header .logo {
    display: none;
}

/* Dock Menu */
.nav-menu {
    pointer-events: auto;
    background: rgba(5, 10, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 40px;
    border-radius: 50px;
    display: flex;
    gap: 30px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
    transition: all 0.3s;
    margin: 0 auto;
    width: fit-content;
}

.nav-menu:hover {
    background: rgba(5, 10, 20, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
}

.nav-menu li a {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
}

/* 2. Immersive Hero - NO VIDEO */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    /* Clean Dark Background instead of Video */
    background: radial-gradient(circle at center, #0a1525 0%, #000000 100%);
}

.video-container {
    /* Optional: Keep container for potential future effects or overlays */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Abstract tech grid background */
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.video-container::after {
    /* Vignette effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, #000 100%);
    z-index: 1;
}

#hero-video {
    display: none; /* Ensure video is hidden if present */
}

#matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind content */
    opacity: 0.3; /* Subtle effect */
}

.hero-content {
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

/* Glitch Text */
.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px var(--secondary-color), -2px -2px var(--primary-color);
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #ddd;
    margin-bottom: 40px;
    display: block;
}

/* Cyber Button */
.btn-cyber {
    background: rgba(0, 243, 255, 0.1);
    color:var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-cyber:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 30px var(--primary-color);
}

/* 3. Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 25px;
    padding: 60px 0;
}

.bento-item {
    background: rgba(10, 20, 35, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.bento-item.span-2 { grid-column: span 2; }
.bento-item.span-3 { grid-column: span 3; }
.bento-item.row-2 { grid-row: span 2; }
.bento-item.accent-cyan { border-top: 3px solid var(--primary-color); }
.bento-item.accent-purple { border-top: 3px solid var(--secondary-color); }

.bento-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.bento-item h3 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    margin-bottom: 10px;
}

.bento-item p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Tablet & Smaller Laptops */
@media (max-width: 1024px) {
    .nav-menu {
        padding: 12px 25px;
        gap: 15px;
    }
    .nav-menu li a {
        font-size: 0.8rem;
    }
    .glitch-text {
        font-size: 3.5rem;
    }
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-item.span-3 {
        grid-column: span 2;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Fixed Bottom Dock for better reachability */
    /* Reset Header for Vertical Nav */
    /* Header - Top Fixed */
    header {
        top: 0 !important;
        bottom: auto !important;
        padding: 20px;
        pointer-events: none;
        display: flex;
        justify-content: flex-end; /* Align Burger to Right */
        align-items: flex-start;
        height: auto;
    }

    /* BURGER ICON - VISIBLE & FUTURISTIC */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: rgba(0, 20, 40, 0.6);
        border: 1px solid var(--primary-color);
        border-radius: 8px; /* Cyber shape */
        color: var(--primary-color);
        font-size: 1.2rem;
        cursor: pointer;
        pointer-events: auto; /* Clickable */
        backdrop-filter: blur(10px);
        box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
        transition: all 0.3s ease;
        z-index: 100001; /* Always above menu */
        margin-right: 0;
    }

    .menu-toggle:hover {
        background: var(--primary-color);
        color: #000;
        box-shadow: 0 0 25px var(--primary-color);
    }
    
    .menu-toggle i {
        transition: transform 0.3s;
    }

    /* FULL SCREEN OVERLAY MENU */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        
        background: rgba(5, 10, 20, 0.98); /* Deep dark background */
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 40px;
        
        /* HIDDEN STATE (Default) */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(1.1); /* Zoom out effect */
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 100000;
        
        overflow-y: hidden;
    }

    /* ACTIVE STATE (Toggled via JS) */
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: scale(1);
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 0 !important;
        display: block;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    /* Staggered Animation for Items when Active */
    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.6s; }

    .nav-menu li a {
        font-family: 'Orbitron', sans-serif;
        font-size: 1.5rem; /* Big text */
        text-transform: uppercase;
        letter-spacing: 4px;
        color: #fff;
        padding: 10px;
        display: inline-block;
        background: transparent;
        border-radius: 0;
        
        /* Reset Rotation */
        writing-mode: horizontal-tb !important;
        text-orientation: mixed;
        transform: none !important;
    }
    
    .nav-menu li a:hover {
        color: var(--primary-color);
        text-shadow: 0 0 20px var(--primary-color);
        transform: scale(1.1) !important;
    }
    
    /* Hero Adjustments */
    /* Hero Adjustments */
    .hero-content {
        padding: 0 15px;
        margin-top: 0;
        z-index: 50; /* Ensure above Matrix BG */
        position: relative;
    }

    .glitch-text {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .btn-cyber {
        position: relative;
        z-index: 100;
        padding: 15px 30px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
        background: rgba(0, 5, 10, 0.6); /* Darker semi-transparent bg */
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
        backdrop-filter: blur(4px);
    }

    /* Bento Stack */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 0 100px 0; /* Extra padding at bottom for nav dock */
    }

    .bento-item.span-2, 
    .bento-item.span-3,
    .bento-item.row-2 {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .bento-item {
        min-height: auto;
    }
    
    /* Move Chatbot up to avoid dock overlap */
    .chatbot {
        bottom: 100px !important; 
        right: 20px !important;
    }
}
/* 7. Global Consistency Overrides (Fixing Light Backgrounds) */
.contact-section,
.products-intro,
.services-intro,
.timeline-section,
.map-container,
.map-content,
.timeline-content {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--text-color) !important;
}

/* Glassmorphism for Cards in these sections */
.contact-info-card,
.contact-form-card,
.timeline-content {
    background: rgba(20, 30, 50, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 243, 255, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Fix text colors inside legacy light containers */
.contact-item .icon {
    background-color: rgba(0, 243, 255, 0.1) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
}

.timeline-content h3,
.contact-info-card h2, 
.contact-form-card h2 {
    color: var(--primary-color) !important;
}

/* Fix for Contact CTA brightness (Servicios Page & Home) */
.contact-cta,
.atencion-clientes,
.about-preview,
.project-cta {
    background-color: transparent !important;
    background: transparent !important;
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    position: relative;
    padding: 80px 0 !important;
}

.contact-cta .btn,
.atencion-clientes .btn-destacada,
.about-preview .btn,
.project-cta .btn {
    background: rgba(0, 243, 255, 0.1) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    backdrop-filter: blur(5px);
    text-shadow: none !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-cta .btn:hover,
.atencion-clientes .btn-destacada:hover,
.about-preview .btn:hover,
.project-cta .btn:hover {
    background: var(--primary-color) !important;
    color: #000 !important;
    box-shadow: 0 0 30px var(--primary-color);
    transform: translateY(-3px);
}

.timeline-content p,
.contact-details p {
    color: var(--text-color) !important;
}

/* Map area fix */
.map-static .map-placeholder,
.simple-map .map-placeholder {
    background-color: rgba(20, 30, 50, 0.6) !important;
    border: 1px solid rgba(0, 243, 255, 0.1) !important;
}

.map-placeholder h4 {
    color: var(--text-color) !important;
}

/* --- COMPANY CARDS UPGRADE --- */
.masonry-grid .card {
    background: rgba(10, 15, 30, 0.6) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 243, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.masonry-grid .card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
}

.masonry-grid .card-img {
    background: transparent !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
}

.masonry-grid .card-img i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    transition: all 0.4s ease;
}

.masonry-grid .card:hover .card-img i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 20px var(--primary-color));
    color: #fff;
}

.masonry-grid .card h3 {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.masonry-grid .card p, 
.masonry-grid .values-list li {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}


/* --- GLOBAL TICKER STYLES --- */
.cyber-ticker {
    position: fixed;
    left: 0;
    width: 100%;
    height: 30px; /* Slightly taller for readability */
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    z-index: 100000; /* Extremely high z-index to be visible everywhere */
    overflow: hidden;
    display: flex;
    align-items: center;
    pointer-events: none; /* Let clicks pass through */
    backdrop-filter: blur(5px);
}
.cyber-ticker.top { top: 0; border-top: none; }
.cyber-ticker.bottom { bottom: 0; border-bottom: none; }

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* Start off-screen */
    color: var(--primary-color); /* Same as bottom */
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Very slow animation speed (200s) */
.cyber-ticker.top .ticker-content {
    animation: ticker-left 200s linear infinite;
}
.cyber-ticker.bottom .ticker-content {
    animation: ticker-right 200s linear infinite;
    color: var(--primary-color); /* Different color for contrast */
}

@keyframes ticker-left {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}
@keyframes ticker-right {
    0% { transform: translate3d(-100%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}


/* --- JUSTIFY TEXT IN CARDS --- */
.card,
.demo-card,
.bento-item,
.contact-info-card,
.contact-form-card,
.timeline-content,
.service-card,
.project-card,
.product-card {
    text-align: justify !important;
}

.card p,
.demo-card p,
.bento-item p,
.timeline-content p,
.about-preview p,
.atencion-content p,
.about-content p {
    text-align: justify !important;
}
