/* UrbanITsa Solution 2026 Framework
   Professional Layered Architecture with Mobile Spacing Fixes
*/
@layer base, theme, components, page;

@layer base {
    :root {
        --bg-deep: #0a0f1c;
        --accent-green: #00d166;
        --accent-blue: #3b82f6;
        --text-main: #f8fafc;
        --text-dim: #94a3b8;
        --glass-bg: rgba(15, 23, 42, 0.7);
        --nav-radius: 100px;
        --card-radius: 24px;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        background-color: var(--bg-deep);
        color: var(--text-main);
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1.5rem; /* Slightly tighter on mobile */
    }

    img { max-width: 100%; height: auto; display: block; }
}

@layer theme {
    /* --- NAVIGATION --- */
    .main-nav {
        position: fixed;
        top: 20px;
        width: 100%;
        z-index: 1000;
    }

    .nav-flex {
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.75rem 1.5rem;
        border-radius: var(--nav-radius);
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .logo-group {
        display: flex !important;
        align-items: center !important;
        gap: 10px;
        text-decoration: none !important;
        color: #ffffff !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .logo-text {
        font-weight: 800;
        font-size: 1.15rem;
        text-transform: uppercase;
    }

    .green-glow {
        color: var(--accent-green) !important;
        text-shadow: 0 0 15px rgba(0, 209, 102, 0.4);
    }

    .nav-links {
        display: flex;
        list-style: none;
        gap: 1.5rem;
        align-items: center;
    }

    .nav-links a {
        text-decoration: none;
        color: var(--text-dim);
        font-size: 0.85rem;
        transition: 0.3s ease;
    }

    .nav-links a:hover, .nav-links a.active { color: var(--accent-green); }

    .btn-nav {
        background: var(--accent-green);
        color: #020617 !important;
        padding: 0.5rem 1.2rem;
        border-radius: 50px;
        font-weight: 700 !important;
    }

    /* --- MOBILE MENU --- */
    .hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1002; }
    .hamburger span { display: block; width: 26px; height: 3px; background: white; border-radius: 10px; }

    @media (max-width: 850px) {
        .main-nav { top: 10px; }
        .hamburger { display: flex; }
        .nav-container {
            position: fixed;
            top: 0; right: -100%;
            width: 80%; height: 100vh;
            background: rgba(10, 15, 28, 0.98);
            backdrop-filter: blur(25px);
            padding: 100px 30px;
            transition: 0.4s ease;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }
        .menu-toggle:checked ~ .nav-container { right: 0; }
        .nav-links { flex-direction: column; align-items: flex-start; gap: 1rem; }
        .nav-links a { font-size: 1.2rem; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; }
        .logo-text { font-size: 1rem; }
    }
}

@layer components {
    /* --- FOOTER --- */
    .main-footer {
        background: #05070a; 
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding: 60px 0 0 0;
        margin-top: 60px;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr;
        gap: 30px;
        padding-bottom: 40px;
    }

    .footer-links h4 { color: white; margin-bottom: 1.2rem; font-weight: 700; font-size: 1rem; }
    .footer-links ul { list-style: none; }
    .footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
    .footer-links a:hover { color: var(--accent-green); }

    .footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 1.5rem 0; background: rgba(0, 0, 0, 0.2); }
    .bottom-flex { display: flex; justify-content: space-between; align-items: center; color: #475569; font-size: 0.8rem; }
    .bottom-flex a { color: inherit; text-decoration: none; margin-left: 15px; }

    /* --- COOKIE BANNER --- */
    .cookie-banner {
        position: fixed;
        bottom: -150px; left: 50%; transform: translateX(-50%);
        width: 92%; max-width: 800px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 1.5rem;
        z-index: 10000;
        transition: 0.5s ease;
    }
    .cookie-banner.show { bottom: 20px; }
}

/* --- MOBILE SPACING OPTIMIZER (THIS FIXES YOUR SCREENSHOT) --- */
@media (max-width: 768px) {
    /* 1. Reduce the massive gap at the top of ALL pages */
    [class$="-page"] {
        padding-top: 100px !important; /* Brings content up closer to the logo */
    }

    /* 2. Tighten the Hero sections */
    [class*="hero"] {
        padding: 40px 0 20px !important; /* Removes the "black holes" of space */
    }

    /* 3. Tighten H1 text spacing */
    h1 {
        margin: 0.75rem 0 !important;
        line-height: 1.2 !important;
        font-size: 2.2rem !important; /* Ensures text doesn't wrap awkwardly */
    }

    /* 4. Reduce sub-text margin */
    .hero-sub, .lead, .lead-text {
        margin-bottom: 1.5rem !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* 5. Shrink gaps between sections/tiles */
    .section-padding {
        padding: 40px 0 !important; 
    }

    /* 6. Fix Footer column stacking */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }
    
    .bottom-flex {
        flex-direction: column;
        gap: 1rem;
    }

    /* 7. Cookie Banner adjustments */
    .cookie-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-btn { width: 100%; }

    /* 8. Fix Brand Bar (if used) */
    .brand-bar {
        margin-top: 80px !important;
    }
}

/* --- UTILITIES --- */
.small-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-green); font-weight: 700; margin-bottom: 8px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { color: #fff; font-size: 1.2rem; transition: 0.3s; }
.social-icons a:hover { color: var(--accent-green); transform: translateY(-3px); }
/* --- SPECIFIC MOBILE FIX FOR INDEX PAGE --- */
@media (max-width: 768px) {
    /* 1. Pull the top content up (The Badge area) */
    .index-page {
        padding-top: 90px !important;
    }

    /* 2. Tighten the Hero section (The black space above/below text) */
    .hero-clean {
        padding: 30px 0 10px !important; /* Extremely tight padding */
        min-height: auto !important;
    }

    /* 3. Bring the Badge, Title, and Description closer */
    .hero-clean .badge {
        margin-bottom: 0.5rem !important;
    }

    .hero-clean h1 {
        font-size: 2.2rem !important;
        margin: 0.5rem 0 !important;
        line-height: 1.2 !important;
    }

    .hero-sub {
        margin-top: 0.5rem !important;
        margin-bottom: 2rem !important; /* Space before buttons */
        font-size: 1rem !important;
        line-height: 1.5 !important;
        padding: 0 10px; /* Prevents text hitting screen edges */
    }

    /* 4. Reduce space between Hero and Partners Scroller */
    .partners-strip {
        padding: 20px 0 40px !important;
    }

    /* 5. Tighten the SEO Intro section (Professional IT Solutions part) */
    .seo-intro-grid {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    /* 6. Shrink the huge gaps between the Service Tiles */
    .section-padding {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .section-intro-centered {
        margin-bottom: 30px !important;
    }

    /* 7. Ensure the "Strategic Infrastructure" line doesn't have huge bottom margin */
    .index-page section {
        margin-bottom: 10px !important;
    }

    /* 8. Make the buttons sit closer to the text */
    .hero-actions {
        margin-top: 0 !important;
        gap: 12px !important;
    }
}
/* --- THE "ULTIMATE" MOBILE TOP GAP FIX --- */
@media (max-width: 768px) {
    /* 1. Move the floating Navigation Pill higher to the top of the screen */
    .main-nav {
        top: 5px !important; /* Reduces the 20px gap to 5px */
    }

    /* 2. Pull the whole index page container up */
    .index-page {
        padding-top: 60px !important; /* Brings the badge closer to the Nav Pill */
    }

    /* 3. Remove the top padding from the Hero section itself */
    .hero-clean {
        padding-top: 0 !important; 
        margin-top: 0 !important;
    }

    /* 4. Make the Badge sit even tighter to the H1 */
    .hero-clean .badge {
        margin-top: 0 !important;
        margin-bottom: 5px !important;
    }

    /* 5. Tighten the H1 line height further */
    .hero-clean h1 {
        margin-top: 5px !important;
        margin-bottom: 10px !important;
        line-height: 1.1 !important;
        letter-spacing: -1px !important;
    }

    /* 6. Bring the Hero sub-text up */
    .hero-sub {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}