/* ==========================================================================
   WEB QUANTIX SOLUTIONS — HIGH-TECH ANIMATED DESIGN SYSTEM & NAVBAR
   Primary Palette: Royal Blue (#3C72FC), Sky Cyan (#0EA5E9), Indigo (#6366F1), Obsidian Ink (#080D1A)
   ========================================================================== */

:root {
    /* Brand Color Tokens matching Web Quantix Logo */
    --brand-royal: #3c72fc;
    --brand-royal-dark: #2563eb;
    --brand-cyan: #0ea5e9;
    --brand-cyan-light: #38bdf8;
    --brand-indigo: #6366f1;
    --brand-navy: #080d1a;
    --brand-navy-soft: #0f172a;
    --brand-surface: #f8fafc;
    --brand-white: #ffffff;
    --brand-text: #1e293b;
    --brand-text-muted: #64748b;
    --brand-border: rgba(14, 165, 233, 0.16);

    /* Gradients */
    --brand-gradient: linear-gradient(135deg, #3c72fc 0%, #0ea5e9 50%, #6366f1 100%);
    --brand-gradient-hover: linear-gradient(135deg, #2563eb 0%, #0284c7 50%, #4f46e5 100%);
    --brand-glow: 0 0 24px rgba(60, 114, 252, 0.35);

    /* Navbar Metrics */
    --nav-h: 78px;
    --nav-h-scrolled: 68px;
    --nav-bg: rgba(255, 255, 255, 0.94);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
}

/* ==========================================================================
   1. ANIMATED TOPBAR & STICKY NAVBAR
   ========================================================================== */
.topbar {
    background: var(--brand-navy) !important;
    padding: 8px 0 !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    position: relative;
    z-index: 995;
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-left a, .topbar-right a {
    color: rgba(255, 255, 255, 0.8) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.25s ease;
}

.topbar-left a:hover, .topbar-right a:hover {
    color: var(--brand-cyan-light) !important;
}

.topbar-phone {
    background: rgba(14, 165, 233, 0.15) !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
    color: #ffffff !important;
    padding: 5px 16px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-phone:hover {
    background: var(--brand-gradient) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4) !important;
}

/* Base Navbar Container */
.navbar {
    position: sticky;
    top: 0;
    z-index: 990;
    background: var(--nav-bg) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid var(--brand-border) !important;
    height: var(--nav-h) !important;
    transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Animated Shimmer Accent Line along bottom edge of navbar */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: linear-gradient(90deg, transparent 0%, #3c72fc 25%, #0ea5e9 50%, #6366f1 75%, transparent 100%);
    background-size: 200% 100%;
    animation: navShimmerLine 4.5s linear infinite;
    opacity: 0.9;
    pointer-events: none;
}

@keyframes navShimmerLine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Scrolled Navbar State */
.navbar.scrolled {
    height: var(--nav-h-scrolled) !important;
    background: var(--nav-bg-scrolled) !important;
    box-shadow: 0 10px 30px -10px rgba(8, 13, 26, 0.12),
                0 0 1px 1px rgba(60, 114, 252, 0.1) !important;
    border-bottom-color: rgba(60, 114, 252, 0.25) !important;
}

/* Inner Container */
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styling */
.nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.nav-logo:hover {
    transform: scale(1.02);
}

.nav-logo video,
.nav-logo img {
    height: 58px;
    max-height: 58px;
    width: auto;
    object-contain: contain;
    border-radius: 8px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled .nav-logo video,
.navbar.scrolled .nav-logo img {
    height: 50px;
    max-height: 50px;
}

/* Nav Links Layout */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    position: relative;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    color: var(--brand-text) !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Modern Sliding Underline on Hover */
.nav-links > a::after,
.nav-dropdown > a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-gradient);
    border-radius: 4px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links > a:hover::after,
.nav-dropdown:hover > a::after {
    width: calc(100% - 24px);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-royal) !important;
    background: rgba(60, 114, 252, 0.06) !important;
}

.nav-links a.active::after {
    width: calc(100% - 24px);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    cursor: pointer;
}

.nav-dropdown > a i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > a i {
    transform: rotate(180deg);
}

.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(60, 114, 252, 0.2);
    border-radius: 14px;
    box-shadow: 0 16px 36px -10px rgba(8, 13, 26, 0.18),
                0 0 0 1px rgba(60, 114, 252, 0.08);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu-custom a {
    display: block;
    padding: 9px 14px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--brand-text) !important;
    transition: all 0.2s ease !important;
}

.dropdown-menu-custom a::after {
    display: none !important;
}

.dropdown-menu-custom a:hover {
    background: rgba(60, 114, 252, 0.08) !important;
    color: var(--brand-royal) !important;
    padding-left: 18px !important;
}

/* Glowing Animated "Get a Quote" CTA Button */
.nav-cta {
    position: relative;
    overflow: hidden;
    background: var(--brand-gradient) !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    box-shadow: 0 4px 18px rgba(60, 114, 252, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.25) inset !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-cta::after {
    display: none !important; /* disable link underline */
}

/* Light sweep animation over CTA */
.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: ctaShineSweep 4s infinite ease-in-out;
}

@keyframes ctaShineSweep {
    0%, 60% { left: -100%; }
    100% { left: 160%; }
}

.nav-cta:hover {
    transform: translateY(-2.5px) scale(1.02) !important;
    background: var(--brand-gradient-hover) !important;
    box-shadow: 0 8px 26px rgba(60, 114, 252, 0.55),
                0 0 0 1.5px rgba(255, 255, 255, 0.4) inset !important;
    color: #ffffff !important;
}

.nav-cta i {
    transition: transform 0.25s ease;
}

.nav-cta:hover i {
    transform: translateX(3px);
}

/* Hamburger Toggle Button */
.hamburger {
    display: none;
    background: rgba(60, 114, 252, 0.08);
    border: 1px solid rgba(60, 114, 252, 0.2);
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--brand-royal);
    font-size: 18px;
    transition: all 0.25s ease;
}

.hamburger:hover {
    background: var(--brand-royal);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(60, 114, 252, 0.35);
}

/* Mobile Drawer */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.65);
    backdrop-filter: blur(8px);
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(340px, 86vw);
    height: 100%;
    background: #ffffff;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(8, 13, 26, 0.2);
    overflow-y: auto;
    animation: drawerSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-nav-close {
    align-self: flex-end;
    background: rgba(60, 114, 252, 0.08);
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-royal);
    font-size: 16px;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.mobile-nav-close:hover {
    background: var(--brand-royal);
    color: #ffffff;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-links a {
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-text);
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(60, 114, 252, 0.08);
    color: var(--brand-royal);
    padding-left: 20px;
}

/* Responsive Breakpoint for Navbar */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: inline-flex;
    }
}

/* ==========================================================================
   2. LOGO COLOR COMBINATION & ANIMATED WEBSITE REDESIGN ELEMENTS
   ========================================================================== */

/* Ambient Floating Glow Orbs for Hero / Sections */
.tech-ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    animation: orbDrift 12s ease-in-out infinite alternate;
}

.orb-royal {
    background: radial-gradient(circle, rgba(60, 114, 252, 0.5) 0%, transparent 70%);
}

.orb-cyan {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, transparent 70%);
}

.orb-indigo {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
}

@keyframes orbDrift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(-25px, 25px) scale(0.95); }
}

/* Animated High-Tech Live Badge */
.tech-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(60, 114, 252, 0.08);
    border: 1px solid rgba(60, 114, 252, 0.25);
    color: var(--brand-royal);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(60, 114, 252, 0.12);
    animation: badgePulse 3s ease-in-out infinite alternate;
}

@keyframes badgePulse {
    0% { box-shadow: 0 2px 12px rgba(60, 114, 252, 0.12); }
    100% { box-shadow: 0 4px 20px rgba(60, 114, 252, 0.28); }
}

.pulse-dot-tech {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    display: inline-block;
}

.pulse-dot-tech::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0.6;
    animation: dotRipple 1.8s ease-out infinite;
}

@keyframes dotRipple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Gradient Text matching Web Quantix Logo */
.gradient-text-tech {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Card 3D Lift & Radiant Border Glow on Hover */
.service-card,
.product-card,
.feature-card,
.pricing-card,
.team-card,
.process-box {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.service-card:hover,
.product-card:hover,
.feature-card:hover,
.team-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    border-color: rgba(60, 114, 252, 0.35) !important;
    box-shadow: 0 20px 45px -10px rgba(60, 114, 252, 0.18),
                0 0 1px 1px rgba(60, 114, 252, 0.15) !important;
}

/* Primary Tech Button */
.btn-tech-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--brand-gradient);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 30px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(60, 114, 252, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-tech-primary:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(60, 114, 252, 0.5);
    color: #ffffff !important;
}

/* Secondary Tech Button */
.btn-tech-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: var(--brand-royal) !important;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 30px;
    border-radius: 50px;
    border: 1.5px solid rgba(60, 114, 252, 0.25);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(8, 13, 26, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-tech-secondary:hover {
    background: rgba(60, 114, 252, 0.06);
    border-color: var(--brand-royal);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(60, 114, 252, 0.15);
}

/* ==========================================================================
   3. GALLERY LIGHTBOX & INTERACTIVE VIEWER STYLING
   ========================================================================== */
.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #0f172a;
    aspect-ratio: 4/3;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    filter: none !important;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 13, 26, 0.95) 0%, rgba(8, 13, 26, 0.4) 45%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-7px) scale(1.015);
    box-shadow: 0 20px 40px -10px rgba(60, 114, 252, 0.32),
                0 0 0 1px rgba(60, 114, 252, 0.4);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 13, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #0f172a;
    border: 1px solid rgba(60, 114, 252, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(60, 114, 252, 0.25);
    animation: lightboxPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxPop {
    from { opacity: 0; transform: scale(0.92) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.lightbox-img-wrap {
    width: 100%;
    max-height: 72vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-wrap img {
    max-height: 72vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.lightbox-caption {
    padding: 18px 24px;
    background: #0a0f1d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(8, 13, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--brand-royal);
    transform: rotate(90deg);
}

/* ==========================================================================
   4. PRELOADER (Ultra-Modern High-Tech Pulse)
   ========================================================================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pl-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: plLogoGlow 2s ease-in-out infinite;
}

.pl-logo span {
    color: var(--brand-cyan-light);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

@keyframes plLogoGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.pl-bar-wrap {
    width: min(320px, 80vw);
    height: 3.5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.pl-bar {
    height: 100%;
    width: 0;
    background: var(--brand-gradient);
    border-radius: 10px;
    animation: plBarFill 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
    box-shadow: 0 0 12px var(--brand-cyan);
}

@keyframes plBarFill {
    to { width: 100%; }
}
