/*
 * Theme Name: Collaide Future (Reborn)
 * Version: 5.1 (Layout Refinement)
 * Description: Futuristic aesthetic with solid corporate structure.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@300;500;700&display=swap');

/* ==================================================
   CORE SLICKNAV STYLES (Injected for Stability)
   ================================================== */
.slicknav_btn { position: relative; display: block; vertical-align: middle; padding: 0.438em 0.625em; line-height: 1.125em; cursor: pointer; }
.slicknav_menu * { box-sizing: border-box; }
.slicknav_nav { clear: both; list-style: none; overflow: hidden; }
.slicknav_nav.slicknav_hidden { display: none; }
.slicknav_nav .slicknav_item { cursor: pointer; display: block; }
.slicknav_nav .slicknav_arrow { font-size: 0.8em; margin: 0 0 0 0.4em; }
.slicknav_nav .slicknav_item a { display: inline; }
.slicknav_nav .slicknav_row { display: block; }
.slicknav_nav a { display: block; }
.slicknav_nav .slicknav_parent-link a { display: inline; }
.slicknav_brand { float: left; }

/* ==================================================
   THEME STYLES
   ================================================== */

:root {
    /* Cyberpunk Palette */
    --bg-body: #050505;       /* Deep Void */
    --bg-card: #0a0a0a;       /* Dark Matter */
    --bg-header: rgba(5, 5, 5, 0.85);
    
    /* Neon Accents */
    --primary: #00f3ff;       /* Cyan Neon */
    --primary-dim: rgba(0, 243, 255, 0.1);
    --secondary: #bc13fe;     /* Purple Neon */
    --accent: #2d5af8;        /* Electric Blue */
    
    /* Text */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    
    /* Borders & Glows */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(0, 243, 255, 0.5);
    --shadow-neon: 0 0 15px rgba(0, 243, 255, 0.15);
    
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Radius */
    --radius-md: 4px;         /* Techy corners */
    --radius-lg: 12px;
}

/* RESET & BASE
================================================== */
* { box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from glows */
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-top: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a { 
    text-decoration: none; 
    color: var(--text-muted); 
    transition: 0.3s ease; 
}

a:hover { color: var(--primary); text-shadow: 0 0 8px var(--primary); }

p { margin-bottom: 1rem; color: var(--text-muted); }
ul { list-style: none; padding: 0; margin: 0; }

/* UTILITY GRID (Bootstrap Compatibility) */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; position: relative; z-index: 2; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class*="col-"] { padding: 0 15px; width: 100%; }
@media (min-width: 768px) {
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.666%; }
    .col-md-12 { width: 100%; }
}
.text-center { text-align: center; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* NAVIGATION
================================================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    overflow: visible; /* Ensure menu can popup */
}

.site-header .container {
    position: relative; /* Important for absolute positioning of mobile menu */
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo span { color: var(--primary); text-shadow: 0 0 10px var(--primary); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* Language Switcher (Flags) */
.lang-switch {
    display: flex;
    gap: 12px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    margin-left: 20px;
    align-items: center;
}

.lang-flag {
    width: 28px; /* Slightly larger */
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.4;
    filter: grayscale(100%);
    border: 2px solid transparent; /* Reserve space for border */
    border-radius: 4px;
    padding: 2px;
}

.lang-flag:hover {
    opacity: 0.8;
    filter: grayscale(50%);
}

.lang-flag.active {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 8px var(--primary)); /* Glow effect on the shape */
    border-color: transparent; /* No box border */
    transform: scale(1.15); /* Pop effect */
}

/* Mobile Lang Switch (Hidden by default on Desktop) */
.mobile-lang-item {
    display: none; /* Hidden on desktop */
}

/* DROPDOWN MENU
================================================== */
.dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
}

/* Invisible bridge to prevent menu closing when moving mouse from link to content */
.dropdown::after {
    content: '';
    position: absolute;
    bottom: -15px; /* Extends down to meet the menu */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown-content {
    display: block; /* Always block, but toggled via opacity/visibility */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-neon);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    z-index: 1001;
    padding: 10px 0;
    margin-top: 10px;
    transform: translateY(10px);
    transition: all 0.3s ease, visibility 0s linear 0.5s; /* 0.5s delay before hiding */
}

/* Arrow indicator */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px; left: 20px;
    width: 10px; height: 10px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s; /* Show immediately on hover */
}

.dropdown-content a {
    color: var(--text-muted);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-transform: none; /* Keep text normal inside dropdown */
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.85rem;
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background-color: rgba(0, 243, 255, 0.1);
    color: #fff;
    padding-left: 25px; /* Slide effect */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HERO SECTION
================================================== */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

/* The Glow Effect */
.hero-glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: pulse 6s infinite alternate;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 40px;
    /* Removed border-left and text-align:left */
    padding-left: 0;
    text-align: center; 
    background: linear-gradient(90deg, transparent, rgba(0,243,255,0.05), transparent); /* Centered gradient */
}

.hero-section .container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CLIENTS / TRUST SECTION
================================================== */
.clients-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.clients-label {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.7;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px 60px;
}

.client-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-logo i { font-size: 1.5rem; }

.client-logo:hover {
    color: var(--text-main);
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* NEW: PROJECTS CTA SECTION
================================================== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(20,20,20,0.9));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; width: 300px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.05));
    pointer-events: none;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* BUTTONS
================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-radius: 2px; /* Sharp corners */
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary) !important;
    box-shadow: 0 0 15px var(--primary-dim);
}
.btn-primary:hover {
    background: var(--primary);
    color: #000 !important;
    box-shadow: 0 0 30px var(--primary-dim);
}

.btn-outline {
    border-color: var(--text-muted);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.05);
}

/* CARDS (Glassmorphism)
================================================== */
.card-grid { margin-top: 60px; }

.feature-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid var(--border-color);
    padding: 40px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}
.feature-card:hover::before { transform: translateX(100%); }

.card-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 25px; text-shadow: 0 0 10px var(--primary-dim); }
.card-actions { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

/* FOOTER
================================================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px;
    margin-top: 0; /* Removed margin because CTA section is above it */
    background: #020204;
    text-align: center;
}
.social-links a { color: var(--text-muted); margin: 0 15px; font-size: 1.2rem; }
.social-links a:hover { color: var(--primary); }

/* Language Visibility (Keep Logic) */
[data-lang="es"], [data-lang="en"] { display: none; }
body.lang-en [data-lang="en"] { display: block; }
body.lang-en [data-lang="en-inline"] { display: inline; }
body.lang-en span[data-lang="en"] { display: inline; }
body.lang-es [data-lang="es"] { display: block; }
body.lang-es [data-lang="es-inline"] { display: inline; }
body.lang-es span[data-lang="es"] { display: inline; }

/* Wrapper Fixes */
#pocketmanager-app { padding-top: 100px; }
@keyframes pulse { 0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; } 100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; } }

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-lead { text-align: center; border: none; padding: 0; }
    
    /* Ensure header doesn't overflow */
    .site-header {
        padding: 15px 0;
    }
    
    /* Logo adjustment for mobile */
    .logo {
        font-size: 1.4rem;
    }
    
    .logo img {
        height: 35px !important;
    }
    
    /* Adjust nav-flex for mobile */
    .nav-flex > div {
        width: 100%;
    }
}

/* ==================================================
   MOBILE MENU (SlickNav Overrides)
   ================================================== */
.slicknav_menu {
    display: none;
    background: transparent;
    padding: 0;
}

@media (max-width: 991px) {
    /* Hide the Desktop Nav */
    .nav-links { display: none !important; }
    
    /* Hide the Desktop Language Switcher */
    .lang-switch.desktop-only { display: none !important; }

    /* Show the Mobile Language Switcher inside menu */
    .mobile-lang-item {
        display: block !important;
        text-align: center;
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.02);
    }
    .mobile-lang-item .lang-flag {
        margin: 0 10px;
        opacity: 0.6;
    }
    .mobile-lang-item .lang-flag.active {
        opacity: 1;
        transform: scale(1.2);
    }
    
    /* Show Mobile Menu Button */
    .slicknav_menu {
        display: block !important;
        position: absolute !important;
        top: 50%;
        right: 20px !important;
        left: auto !important;
        width: auto !important;
        transform: translateY(-50%);
        z-index: 10000;
        background: transparent;
        padding: 0 !important;
    }

    /* The Hamburger Button */
    .slicknav_btn {
        background-color: transparent;
        padding: 8px;
        margin: 0;
        cursor: pointer;
        display: block;
        float: none;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        position: relative;
        z-index: 9999;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .slicknav_menutxt { display: none; } /* Hide the word 'MENU' */
    
    .slicknav_icon {
        width: 30px;
        height: 25px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    
    .slicknav_icon-bar {
        background-color: var(--primary) !important;
        width: 100%;
        height: 3px;
        display: block;
        border-radius: 2px;
        box-shadow: 0 0 5px var(--primary); /* Neon effect */
        transition: all 0.3s ease;
    }
    
    /* Hover effect on hamburger */
    .slicknav_btn:hover .slicknav_icon-bar {
        background-color: #fff !important;
        box-shadow: 0 0 10px var(--primary);
    }
    
    /* Active state animation (X icon) */
    .slicknav_btn.act .slicknav_icon-bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    
    .slicknav_btn.act .slicknav_icon-bar:nth-child(2) {
        opacity: 0;
    }
    
    .slicknav_btn.act .slicknav_icon-bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
    
    /* The Dropdown List */
    .slicknav_nav {
        clear: both;
        background-color: rgba(10, 10, 10, 0.98); /* Deep Dark */
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-neon);
        border-radius: var(--radius-md);
        position: absolute;
        top: calc(100% + 10px); /* Below button */
        right: 0;
        left: auto;
        width: 280px;
        max-width: calc(100vw - 40px);
        margin: 0;
        padding: 10px 0;
        backdrop-filter: blur(15px);
        list-style: none;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    /* Mobile dropdowns push content down instead of overlay */
    .slicknav_menu .dropdown .dropdown-content {
        position: static;
        display: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border: 0;
        margin: 0;
        padding: 0;
        background: transparent;
    }
    .slicknav_menu .dropdown.open-mobile .dropdown-content {
        display: block;
    }
    
    .slicknav_nav li {
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .slicknav_nav li:last-child { border-bottom: none; }
    
    .slicknav_nav a {
        display: block;
        padding: 12px 20px;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 1px;
        font-weight: 500;
        transition: 0.3s;
    }
    
    .slicknav_nav a:hover, 
    .slicknav_nav .slicknav_row:hover {
        background-color: rgba(0, 243, 255, 0.1);
        color: #fff;
        padding-left: 25px; /* Slide effect */
    }
    
    /* Dropdown inside Mobile Menu */
    .slicknav_nav .slicknav_row {
        padding: 12px 20px;
        cursor: pointer;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 1px;
        display: flex;
        justify-content: space-between;
    }
    
    .slicknav_nav .slicknav_arrow {
        font-size: 0.8rem;
        color: var(--primary);
    }
    
    /* Indent Submenus */
    .slicknav_nav ul {
        margin: 0;
        padding: 0;
        background: rgba(0,0,0,0.3); /* Slightly darker */
    }
    
    .slicknav_nav ul li a {
        padding-left: 35px;
        font-size: 0.8rem;
        color: #aaa;
    }
}
