/*
Theme Name: INFIWITS Consulting Pro
Theme URI: https://infiwits.com
Author: INFIWITS
Author URI: https://infiwits.com
Description: A premium consulting & IT services WordPress theme with modern glassmorphism design, animated sections, and full service showcase for ERP, E-Commerce, Digital Marketing, Tax & Accounting, Cloud Computing, and IT Services.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: infiwits-consulting
Tags: consulting, business, dark, modern, animated, services, it, erp, ecommerce
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
    --bg-primary:     #050B20;
    --bg-secondary:   #080F2A;
    --bg-card:        rgba(255, 255, 255, 0.04);
    --bg-card-hover:  rgba(255, 255, 255, 0.08);
    --border-glass:   rgba(255, 255, 255, 0.1);

    --color-blue:     #00B4D8;
    --color-violet:   #7B2FBE;
    --color-cyan:     #0AFFEF;
    --color-pink:     #FF2D78;
    --color-gold:     #FFD60A;
    --color-green:    #00F5A0;

    --gradient-main:  linear-gradient(135deg, #7B2FBE 0%, #00B4D8 100%);
    --gradient-dark:  linear-gradient(180deg, #050B20 0%, #080F2A 100%);
    --gradient-glow:  linear-gradient(135deg, rgba(123,47,190,0.15) 0%, rgba(0,180,216,0.15) 100%);

    --text-primary:   #F0F4FF;
    --text-secondary: #A8B5D8;
    --text-muted:     #5A6A8A;

    --font-heading:   'Space Grotesk', sans-serif;
    --font-body:      'Inter', sans-serif;

    --radius-sm:      8px;
    --radius-md:      16px;
    --radius-lg:      24px;
    --radius-xl:      40px;

    --shadow-glow:    0 0 40px rgba(123, 47, 190, 0.3);
    --shadow-card:    0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-blue:    0 0 30px rgba(0, 180, 216, 0.25);

    --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   BASE RESET
============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* =============================================
   CRITICAL FOUNDATION — hardcoded fallbacks
   (these must survive even if main.css fails)
============================================= */

/* Dark background — must win over WordPress block styles */
html,
body {
    background-color: #050B20 !important;
    background:       #050B20 !important;
    color:            #F0F4FF !important;
}

body {
    font-family: 'Inter', 'Space Grotesk', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* WordPress injects .wp-block-* and entry-content styles; reset them */
.wp-block-group,
.wp-block-cover,
.wp-site-blocks,
.wp-block-template-part { background: transparent !important; }

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ─── CRITICAL NAV — ensures horizontal layout always ───── */
.main-nav {
    background: rgba(5, 11, 32, 0.92) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: 0;
}
.nav-inner {
    display:         flex        !important;
    flex-direction:  row         !important;
    align-items:     center      !important;
    justify-content: space-between !important;
    gap:             24px;
    padding:         14px 24px;
    max-width:       1240px;
    margin:          0 auto;
}
.nav-menu-wrap { flex: 1; }

/* Horizontal desktop nav */
ul.nav-menu {
    display:        flex      !important;
    flex-direction: row       !important;
    flex-wrap:      nowrap    !important;
    align-items:    center    !important;
    gap:            4px;
    list-style:     none      !important;
    margin:         0         !important;
    padding:        0         !important;
}
ul.nav-menu > li         { position: relative; }
ul.nav-menu > li > a {
    display:     block;
    padding:     8px 14px;
    font-size:   0.88rem;
    font-weight: 500;
    color:       #A8B5D8 !important;
    border-radius: 8px;
    transition:  all 0.3s ease;
    white-space: nowrap;
}
ul.nav-menu > li > a:hover,
ul.nav-menu > li.current-menu-item > a {
    color:      #F0F4FF    !important;
    background: rgba(255,255,255,0.06);
}

/* Sub-menus — hidden by default on desktop */
ul.nav-menu .sub-menu {
    position:   absolute   !important;
    top:        calc(100% + 8px);
    left:       0;
    min-width:  220px;
    background: rgba(8,15,42,0.98) !important;
    border:     1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding:    8px;
    list-style: none !important;
    margin:     0    !important;
    /* Hidden until hover */
    opacity:    0           !important;
    visibility: hidden      !important;
    transform:  translateY(-8px);
    transition: all 0.3s ease;
    z-index:    999;
}
ul.nav-menu > li:hover > .sub-menu {
    opacity:    1           !important;
    visibility: visible     !important;
    transform:  translateY(0);
}
ul.nav-menu .sub-menu a {
    display:       block;
    padding:       9px 14px;
    color:         #A8B5D8 !important;
    border-radius: 8px;
    font-size:     0.85rem;
    transition:    all 0.3s ease;
}
ul.nav-menu .sub-menu a:hover {
    color:      #F0F4FF            !important;
    background: rgba(255,255,255,0.06);
}

/* ─── LEVEL 3 SUB-MENU (desktop: flies out to the right) ─── */
ul.nav-menu .sub-menu li { position: relative; }

/* Arrow on items that have a nested sub-menu */
ul.nav-menu .sub-menu li.menu-item-has-children > a::after {
    content:     '›';
    margin-left: auto;
    padding-left: 8px;
    font-size:    1rem;
    line-height:  1;
    opacity:      0.55;
}

ul.nav-menu .sub-menu .sub-menu {
    position:   absolute  !important;
    top:        0         !important;
    left:       100%      !important;
    margin-left: 4px;
    min-width:  210px;
    /* stay hidden until parent li hovered */
    opacity:    0         !important;
    visibility: hidden    !important;
    transform:  translateX(-8px) !important;
}
ul.nav-menu .sub-menu li:hover > .sub-menu {
    opacity:    1         !important;
    visibility: visible   !important;
    transform:  translateX(0) !important;
}

/* ─── LOGO ───────────────────────────────────────────────── */
.site-logo,
.site-logo a,
.footer-logo { display: flex; align-items: center; text-decoration: none; }
.text-logo {
    display:     flex;
    align-items: center;
    gap:         2px;
    font-family: 'Space Grotesk', sans-serif;
    font-size:   1.6rem;
    font-weight: 800;
    white-space: nowrap;
}
.logo-infi { color: #F0F4FF; }
.logo-wits { color: #00B4D8; }
.logo-dot  {
    width: 6px; height: 6px;
    background: #7B2FBE;
    border-radius: 50%;
    margin-left: 3px;
    margin-bottom: 10px;
}
.custom-logo { height: 48px; width: auto; }

/* ─── NAV CTA BUTTON (always visible) ───────────────────── */
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-toggle  { display: none; }

/* ─── TOP BAR ────────────────────────────────────────────── */
.header-topbar {
    background:    rgba(5,11,32,0.98) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding:       7px 24px;
}
.topbar-inner {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    max-width:       1240px;
    margin:          0 auto;
    gap:             16px;
    flex-wrap:       wrap;
}
.topbar-left        { display: flex; gap: 20px; }
.topbar-right       { display: flex; align-items: center; gap: 12px; }
.topbar-item        { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #A8B5D8; }
.topbar-social      { display: flex; gap: 8px; }
.topbar-social a    { color: #5A6A8A; transition: color 0.3s; }
.topbar-social a:hover { color: #00B4D8; }
.topbar-badge       { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: #00F5A0; font-weight: 500; }

/* ─── BUTTONS (hardcoded so they always look right) ──────── */
.btn {
    display:      inline-flex !important;
    align-items:  center;
    gap:          8px;
    font-family:  'Space Grotesk', sans-serif;
    font-weight:  600;
    border-radius: 100px;
    cursor:       pointer;
    transition:   all 0.3s ease;
    border:       none;
    text-decoration: none;
    white-space:  nowrap;
}
.btn-sm  { font-size: 0.8rem;  padding: 9px 20px; }
.btn-lg  { font-size: 1rem;    padding: 16px 36px; }

.btn-primary {
    background: linear-gradient(135deg, #7B2FBE 0%, #00B4D8 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(123,47,190,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(123,47,190,0.5); }

.btn-ghost {
    background:    transparent !important;
    color:         #F0F4FF     !important;
    border:        1px solid rgba(255,255,255,0.15) !important;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06) !important; }

.btn-outline {
    background:    transparent !important;
    color:         #F0F4FF     !important;
    border:        2px solid rgba(255,255,255,0.25) !important;
}

/* ─── SECTIONS background ────────────────────────────────── */
section,
.site-header,
.site-footer,
.pre-footer-cta,
.footer-main,
.footer-bottom { background-color: transparent; }

/* ─── PULSE DOT ──────────────────────────────────────────── */
.pulse-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #00F5A0;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: #00F5A0;
    opacity: 0.3;
    animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
    0%   { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ─── CONTAINER ───────────────────────────────────────────── */
.container {
    width:      100%;
    max-width:  1240px;
    margin:     0 auto;
    padding:    0 24px;
}

/* ─── GRADIENT TEXT ──────────────────────────────────────── */
.gradient-text {
    background:              linear-gradient(135deg, #7B2FBE 0%, #00B4D8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip:         text;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #050B20; }
::-webkit-scrollbar-thumb { background: #7B2FBE; border-radius: 3px; }

/* ─── MOBILE NAV (overrides) ─────────────────────────────── */
@media (max-width: 900px) {
    .nav-toggle {
        display:         flex !important;
        flex-direction:  column;
        justify-content: center;
        gap:             5px;
        width:           38px;
        height:          38px;
        background:      rgba(255,255,255,0.06);
        border:          1px solid rgba(255,255,255,0.1);
        border-radius:   8px;
        cursor:          pointer;
        padding:         8px;
    }
    .nav-toggle span {
        display:       block;
        width:         100%;
        height:        2px;
        background:    #F0F4FF;
        border-radius: 2px;
        transition:    all 0.3s;
    }
    .nav-menu-wrap {
        position:    fixed           !important;
        top:         0;
        left:        -100%;
        width:       82%;
        max-width:   360px;
        height:      100vh;
        background:  rgba(8,15,42,0.99) !important;
        border-right: 1px solid rgba(255,255,255,0.1);
        padding:     80px 24px 32px;
        transition:  left 0.4s ease;
        z-index:     1001;
        overflow-y:  auto;
    }
    .nav-menu-wrap.open { left: 0 !important; }
    ul.nav-menu {
        flex-direction: column    !important;
        align-items:    stretch   !important;
        gap:            4px;
    }
    ul.nav-menu .sub-menu {
        position:   static  !important;
        opacity:    1       !important;
        visibility: visible !important;
        transform:  none    !important;
        background: rgba(255,255,255,0.04) !important;
        border:     none    !important;
        border-radius: 8px;
        margin:     4px 0 4px 16px !important;
        display:    none;
    }
    ul.nav-menu li.open > .sub-menu { display: block !important; }

    /* Level 3 on mobile: indent further, never fly-out */
    ul.nav-menu .sub-menu .sub-menu {
        left:       0               !important;
        transform:  none            !important;
        margin:     4px 0 4px 16px !important;
    }
    /* Remove level-3 arrow on mobile (already indented) */
    ul.nav-menu .sub-menu li.menu-item-has-children > a::after { display: none; }

    .topbar-left { display: none !important; }
}
