/* ============================================
   MGV INFOTECH — PREMIUM DESIGN SYSTEM 2026
   Inspired by: Stripe, Linear, Vercel, Apple
   ============================================ */

/* ===== CSS VARIABLES & DESIGN TOKENS ===== */
:root {
    /* === SPACING SYSTEM (8px base) === */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */
    --space-32: 8rem;      /* 128px */

    /* === TYPOGRAPHY SCALE === */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */
    --text-8xl: 6rem;        /* 96px */

    /* === LINE HEIGHTS === */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* === FONT WEIGHTS === */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* === BORDER RADIUS === */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-3xl: 2rem;      /* 32px */
    --radius-full: 9999px;

    /* === SHADOWS (Premium Soft) === */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-3xl: 0 35px 60px -15px rgba(0, 0, 0, 0.2);

    /* === PREMIUM COLOR PALETTE === */
    /* Neutrals (Refined Grays) */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Brand Colors (Refined) */
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    --blue-700: #1D4ED8;
    --blue-900: #1E3A8A;

    --amber-50: #FFFBEB;
    --amber-100: #FEF3C7;
    --amber-500: #F59E0B;
    --amber-600: #D97706;

    --emerald-50: #ECFDF5;
    --emerald-100: #D1FAE5;
    --emerald-500: #10B981;
    --emerald-600: #059669;

    /* === TRANSITIONS === */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* === Z-INDEX SCALE === */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===== GLOBAL RESETS & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--gray-700);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY SYSTEM ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 4.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 3rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    line-height: var(--leading-relaxed);
    color: var(--gray-600);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-600), var(--emerald-500), var(--amber-500));
    width: 0%;
    z-index: 9999;
    transition: width 100ms ease-out, box-shadow 300ms ease;
}

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 400ms ease-in-out;
}

/* ===== NAVIGATION (Premium Glassmorphism) ===== */
#navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Nav Links */
.nav-link {
    position: relative;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.nav-link:hover {
    color: var(--blue-600);
    background: var(--gray-100);
}

.nav-link.active {
    color: var(--blue-600);
    font-weight: var(--font-semibold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--blue-600);
    border-radius: var(--radius-full);
}

/* Dropdown Menu (Premium Mega Menu) */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
}

.group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.dropdown-item:hover {
    background: #F8FAFC;
    transform: translateX(3px);
}

.dropdown-item i {
    flex-shrink: 0;
    margin-top: 2px;
}

.dropdown-item div {
    flex: 1;
}

.dropdown-item span.block {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.4;
    margin-bottom: 2px;
}

.dropdown-item span.text-xs {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* Dropdown divider */
.nav-dropdown hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid #E2E8F0;
}

/* Column styling for mega menu */
.nav-dropdown .grid {
    gap: 16px;
}

.nav-dropdown .flex-col {
    gap: 0;
}

/* Mobile Menu */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--blue-50);
    color: var(--blue-600);
}

.mobile-dropdown-item {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--gray-600);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.mobile-dropdown-item:hover {
    color: var(--blue-600);
    border-left-color: var(--blue-600);
    background: var(--blue-50);
}

/* ===== BUTTON SYSTEM (Premium) ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: white;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md), 0 0 0 0 rgba(37, 99, 235, 0.4);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.btn-ghost:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* ===== PREMIUM CARD SYSTEM ===== */
.premium-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(37, 99, 235, 0.1);
}

.premium-card:hover::before {
    opacity: 1;
}

/* ===== HERO SECTION ENHANCEMENTS ===== */
.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.08), transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.06), transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -15%;
    left: -5%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--blue-600), var(--emerald-500), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal-modern {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-modern.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger Children Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== FADE UP ANIMATION ===== */
.animate-fade-up {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-200 {
    animation-delay: 200ms;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLL DOT ANIMATION ===== */
@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

.animate-scroll-dot {
    animation: scroll-dot 1.5s ease-in-out infinite;
}

/* ===== FAQ ACCORDION ===== */
.faq-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: var(--blue-200);
    box-shadow: var(--shadow-sm);
}

.faq-item.active {
    border-color: var(--blue-300);
    box-shadow: var(--shadow-md);
}

.faq-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-content {
    max-height: 500px;
    margin-top: var(--space-4);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ===== FOOTER ===== */
.footer-link {
    font-size: var(--text-sm);
    color: var(--gray-600);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--blue-600);
}

.footer-social {
    display: flex;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    color: var(--gray-600);
    transition: all var(--transition-base);
}

.footer-social:hover {
    background: var(--blue-600);
    color: white;
    transform: translateY(-2px);
}

/* ===== STICKY CTA ===== */
.sticky-cta {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.sticky-cta.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible (Premium) */
*:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
    }
    
    .premium-card {
        padding: var(--space-6);
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .scroll-progress,
    #navbar,
    .sticky-cta,
    footer {
        display: none;
    }
}


/* ===== IMPROVED WHY CARD STYLING ===== */
.why-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Larger icons for why cards */
.why-card .w-12 {
    width: 4rem !important;
    height: 4rem !important;
    margin-bottom: 1.5rem;
}

.why-card .w-6 {
    width: 2rem !important;
    height: 2rem !important;
}

/* Better text hierarchy */
.why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #111827;
}

.why-card p {
    line-height: 1.7;
    color: #64748b;
}

/* ===== IMPROVED MOBILE MENU STYLING ===== */
#mobile-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Better spacing for mobile nav links */
.mobile-nav-link {
    padding: 1rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #EFF6FF;
    color: #2563EB;
}

/* Mobile menu footer CTA */
#mobile-menu > div:last-child {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

/* ===== IMPROVED DROPDOWN MENU STYLING ===== */
/* Already defined above with mega menu styles */

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
    .why-card {
        padding: 2rem 1.5rem;
    }
    
    .why-card h3 {
        font-size: 1.125rem;
    }
    
    .why-card p {
        font-size: 0.875rem;
    }
}


/* ===== MOBILE DROPDOWN ITEMS ===== */
.mobile-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #64748b;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin-left: 0.5rem;
}

.mobile-dropdown-item:hover {
    color: #2563EB;
    background: #EFF6FF;
    border-left-color: #2563EB;
    transform: translateX(2px);
}

/* ===== IMPROVED CARD HOVER EFFECTS ===== */
.premium-card,
.service-card-large {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover,
.service-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===== BETTER ICON SIZING ===== */
.why-card [data-lucide] {
    width: 2rem;
    height: 2rem;
}

/* ===== IMPROVED BUTTON SPACING ===== */
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* ===== RESPONSIVE TEXT IMPROVEMENTS ===== */
@media (max-width: 640px) {
    /* Better mobile typography */
    h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* Better mobile spacing */
    .px-4 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Larger touch targets on mobile */
    .mobile-nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}
