/* =========================================
   CA/CS FIRM WEBSITE - DESIGN SYSTEM
   Inspired by Startupwala + RegisterKaro
   ========================================= */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - MANDATORY */
    --color-primary-blue: #0A58CA;
    --color-cta-orange: #F9A825;
    --color-white: #FFFFFF;

    /* Secondary Colors */
    --color-light-blue: #E8F1FF;
    --color-dark-grey: #1F1F1F;
    --color-green-whatsapp: #28A745;
    --color-text-secondary: #666666;
    --color-border: #E5E5E5;

    /* Gradients (Subtle) */
    --gradient-blue: linear-gradient(135deg, #0A58CA 0%, #0949B0 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-headings: 'Outfit', 'Inter', sans-serif;

    /* Spacing System */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-Index System */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

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

body {
    font-family: var(--font-primary);
    color: var(--color-dark-grey);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

a {
    color: var(--color-primary-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-cta-orange);
}

/* ===== LAYOUT UTILITIES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 900px;
}

.section {
    padding: var(--spacing-3xl) 0;
}

.section-sm {
    padding: var(--spacing-2xl) 0;
}

.section-lg {
    padding: var(--spacing-3xl) 0;
}

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ===== FLEX UTILITIES ===== */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
    margin-right: var(--spacing-lg);
}

.logo img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo span {
    color: var(--color-cta-orange);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
    flex-wrap: nowrap;
}

.nav-link {
    display: inline-block;
    color: var(--color-dark-grey);
    font-weight: 500;
    font-size: 0.9375rem;
    /* 15px - increased by 2px from 13px */
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary-blue);
    background: var(--color-light-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--color-cta-orange);
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-dark-grey);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ===== HERO SECTION (STARTUPWALA STYLE) ===== */
.hero {
    background: var(--gradient-blue);
    color: #FFFBF0;
    padding: var(--spacing-xl) 0;
    /* Reduced from 3xl */
    position: relative;
    overflow: hidden;
}

.hero .container .text-center h1 {
    color: #FFFBF0;
}

.hero .container .text-center .subtitle {
    color: #FFFBF0;
}


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><circle cx="900" cy="400" r="300" fill="rgba(255,255,255,0.05)"/><circle cx="1100" cy="200" r="200" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-lg);
    /* Reduced from xl */
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    color: #FFFBF0;
    margin-bottom: var(--spacing-sm);
    /* Reduced from md */
    font-size: clamp(2rem, 4vw, 3rem);
    /* Reduced from 2.5/5/4 */
    line-height: 1.2;
}

.hero-text .subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    /* Reduced from 1.1/2/1.4 */
    margin-bottom: var(--spacing-lg);
    /* Reduced from xl */
    color: rgba(255, 251, 240, 0.95);
    line-height: 1.5;
}

.trust-indicators {
    display: flex;
    gap: var(--spacing-md);
    /* Reduced from lg */
    margin-bottom: var(--spacing-lg);
    /* Reduced from xl */
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.trust-item svg {
    width: 24px;
    height: 24px;
    fill: var(--color-cta-orange);
}

.trust-item span {
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-ctas {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--color-cta-orange);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(249, 168, 37, 0.3);
}

.btn-primary:hover {
    background: #E89614;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 168, 37, 0.4);
}

.btn-success {
    background: #00D95F;
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 217, 95, 0.3);
}

.btn-success:hover {
    background: #00b34e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 95, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary-blue);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-blue);
    border: 2px solid var(--color-primary-blue);
}

.btn-outline:hover {
    background: var(--color-primary-blue);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

/* ===== QUICK QUOTE FORM (CRITICAL) ===== */
.quote-form-card {
    background: var(--color-white);
    padding: var(--spacing-lg);
    /* Reduced from xl */
    border-radius: var(--radius-lg);
    /* Slightly reduces radius for compact look */
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease;
}

.quote-form-card h3 {
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-sm);
    /* Reduced from md */
    font-size: 1.3rem;
    /* Reduced from 1.5rem */
}

/* Compact form overrides for Quote Card */
.quote-form-card .form-group {
    margin-bottom: 10px;
}

.quote-form-card .form-label {
    margin-bottom: 2px;
    font-size: 0.85rem;
}

.quote-form-card .form-input,
.quote-form-card .form-select {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.quote-form-card .btn {
    padding: 10px 20px;
    font-size: 1rem;
    width: 100%;
    margin-top: 5px;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-dark-grey);
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--color-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.1);
}

.form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

/* ===== FILE INPUT STYLING ===== */
input[type="file"]::file-selector-button {
    background-color: var(--color-light-blue);
    color: var(--color-primary-blue);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    margin-right: 16px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 500;
    transition: var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--color-primary-blue);
    color: var(--color-white);
}

/* ===== SERVICE CARDS ===== */
.service-card {
    background: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 2px solid transparent;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-blue);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--color-light-blue);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    background: var(--color-primary-blue);
}

.service-card:hover .service-icon svg {
    fill: var(--color-white);
}

.service-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--color-primary-blue);
    transition: var(--transition-base);
}

.service-card h3 {
    color: var(--color-dark-grey);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

/* ===== SECTION BACKGROUNDS ===== */
.section-blue {
    background: var(--color-light-blue);
}

.section-white {
    background: var(--color-white);
}

.section-grey {
    background: #F8F9FA;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.section-header h2 {
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark-grey);
    color: var(--color-white);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--color-cta-orange);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-icon:hover {
    background: var(--color-cta-orange);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease;
}

/* ===== RESPONSIVE DESIGN (MOBILE-FIRST) ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transition: var(--transition-base);
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .logo img {
        max-height: 42px;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .trust-indicators {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .quote-form-card {
        padding: var(--spacing-lg);
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ===== 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;
}

/* ===== LOADING STATES ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== FAQ ACCORDION STYLES ===== */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--color-light-blue);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark-grey);
    flex: 1;
    padding-right: var(--spacing-md);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-blue);
    transition: var(--transition-base);
    min-width: 30px;
    text-align: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 var(--spacing-lg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.faq-answer p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ===== PROCESS TIMELINE STYLES ===== */
.process-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    position: relative;
    padding-left: 80px;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.6s ease backwards;
}

.process-step:nth-child(1) {
    animation-delay: 0.1s;
}

.process-step:nth-child(2) {
    animation-delay: 0.2s;
}

.process-step:nth-child(3) {
    animation-delay: 0.3s;
}

.process-step:nth-child(4) {
    animation-delay: 0.4s;
}

.process-step:nth-child(5) {
    animation-delay: 0.5s;
}

.process-step:nth-child(6) {
    animation-delay: 0.6s;
}

.process-step:nth-child(7) {
    animation-delay: 0.7s;
}

.process-step:nth-child(8) {
    animation-delay: 0.8s;
}

.process-step::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 60px;
    width: 2px;
    height: calc(100% + var(--spacing-xl));
    background: var(--color-border);
}

.process-step:last-child::before {
    display: none;
}

.process-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-blue);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(10, 88, 202, 0.3);
    z-index: 1;
}

.process-step h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark-grey);
    font-size: 1.3rem;
}

.process-step p {
    color: var(--color-text-secondary);
    margin: 0;
}

/* ===== FEATURE LIST STYLES ===== */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-green-whatsapp);
    font-weight: 700;
    font-size: 1.2rem;
}

.feature-list li strong {
    color: var(--color-dark-grey);
}

/* Mobile responsiveness for timeline */
@media (max-width: 640px) {
    .process-step {
        padding-left: 60px;
    }

    .process-number {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .process-step::before {
        left: 22px;
    }
}

/* ===== MEGA MENU STYLES ===== */
.nav-item-services {
    position: static !important;
    /* Allow full-width menu relative to header/nav */
}

/* Mega Menu Container */
.mega-menu {
    position: absolute;
    top: 80px;
    /* Header height */
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-top: 1px solid var(--color-border);
}

/* Show Menu on Hover (Desktop) */
@media (min-width: 969px) {
    .nav-item-services:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.mega-menu-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    height: 500px;
    /* Fixed height for consistent design */
}

/* Left Panel - Categories */
.mega-sidebar {
    width: 25%;
    background: #F8F9FA;
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    padding: var(--spacing-md) 0;
}

.mega-category {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-dark-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mega-category:hover,
.mega-category.active {
    background: var(--color-white);
    color: var(--color-primary-blue);
    border-left-color: var(--color-primary-blue);
}

.mega-category .arrow {
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.mega-category:hover .arrow,
.mega-category.active .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right Panel - Content */
.mega-content {
    width: 75%;
    padding: var(--spacing-lg);
    overflow-y: auto;
    background: var(--color-white);
}

.mega-subservices-grid {
    display: none;
    /* Hidden by default */
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    animation: fadeIn 0.3s ease;
}

.mega-subservices-grid.active {
    display: grid;
}

.subservice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.subservice-item:hover {
    background: var(--color-light-blue);
    transform: translateX(5px);
}

.subservice-link {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
}

.subservice-item:hover .subservice-link {
    color: var(--color-primary-blue);
}

/* Scrollbar Styling for Mega Menu */
.mega-sidebar::-webkit-scrollbar,
.mega-content::-webkit-scrollbar {
    width: 6px;
}

.mega-sidebar::-webkit-scrollbar-track,
.mega-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mega-sidebar::-webkit-scrollbar-thumb,
.mega-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mega-sidebar::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* ===== MOBILE MEGA MENU RESPONSIVENESS ===== */
@media (max-width: 968px) {
    .nav-item-services {
        position: relative !important;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .mega-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none;
        /* Hidden strictly on mobile until toggled */
        height: auto;
        padding-left: var(--spacing-md);
    }

    .nav-item-services.active .mega-menu {
        display: block;
    }

    .mega-menu-wrapper {
        flex-direction: column;
        height: auto;
    }

    .mega-sidebar {
        width: 100%;
        height: auto;
        background: transparent;
        border-right: none;
        padding: 0;
    }

    .mega-category {
        padding: 10px 0;
        border-left: none;
        border-bottom: 1px solid var(--color-border);
        background: transparent !important;
        /* No background change */
        color: var(--color-dark-grey);
    }

    .mega-category.active {
        color: var(--color-primary-blue);
        border-bottom: none;
        /* Remove border if expanded */
    }

    .mega-content {
        width: 100%;
        padding: 0 0 var(--spacing-sm) 0;
        height: auto;
        display: none;
        /* Hidden by default */
        background: transparent;
    }

    .mega-category.active+.mega-content {
        display: block;
    }

    .mega-subservices-grid {
        display: flex;
        /* Override active grid but use flex column */
        flex-direction: column;
        gap: 5px;
    }

    .mega-subservices-grid.active {
        display: flex;
    }

    .subservice-item {
        padding: 6px 0;
    }

    .subservice-item:hover {
        background: transparent;
        transform: none;
    }
}

/* ===== MEGA MENU STYLES (REVISED) ===== */
.nav-item-services {
    position: static !important;
    /* Allow full-width menu relative to header/nav */
}

/* Mega Menu Container */
.mega-menu {
    position: absolute;
    top: 80px;
    /* Header height */
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-top: 1px solid var(--color-border);
}

/* Show Menu on Hover (Desktop) */
@media (min-width: 969px) {
    .nav-item-services:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.mega-menu-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    height: 550px;
    /* Fixed height for consistent design */
    position: relative;
    /* Context for absolute positioning of content */
}

/* Left Panel - Categories List */
.mega-sidebar {
    width: 25%;
    background: #F8F9FA;
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    height: 100%;
}

.mega-category-item {
    position: static;
    /* Important: Allows child content to position relative to wrapper */
}

.mega-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-dark-grey);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
    font-size: 0.95rem;
}

.mega-category-link:hover,
.mega-category-item.active .mega-category-link {
    background: var(--color-white);
    color: var(--color-primary-blue);
    border-left-color: var(--color-primary-blue);
}

.mega-category-link .arrow {
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.mega-category-link:hover .arrow,
.mega-category-item.active .mega-category-link .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right Panel - Content (Nested inside li but positioned absolutely) */
.mega-content-panel {
    position: absolute;
    left: 25%;
    top: 0;
    width: 75%;
    height: 100%;
    padding: var(--spacing-lg) var(--spacing-xl);
    overflow-y: auto;
    background: var(--color-white);
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mega-category-item.active .mega-content-panel {
    display: block;
    opacity: 1;
}

/* Content Grid */
.subservices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.subservice-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.subservice-card:hover {
    background: var(--color-light-blue);
}

.subservice-link {
    color: var(--color-dark-grey);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.subservice-card:hover .subservice-link {
    color: var(--color-primary-blue);
}

/* Category Title in Mobile (Hidden on Desktop) */
.mobile-cat-title {
    display: none;
}

/* Scrollbar Styling */
.mega-sidebar::-webkit-scrollbar,
.mega-content-panel::-webkit-scrollbar {
    width: 6px;
}

.mega-sidebar::-webkit-scrollbar-track,
.mega-content-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mega-sidebar::-webkit-scrollbar-thumb,
.mega-content-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 968px) {
    .nav-item-services {
        display: flex;
        flex-direction: column;
    }

    .mega-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none;
        /* JS toggles this or CSS based on parent active class */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    .nav-item-services.active .mega-menu {
        display: block;
        max-height: 2000px;
        /* Arbitrary large height */
    }

    .mega-menu-wrapper {
        display: block;
        /* Stack vertically */
        height: auto;
        padding-left: var(--spacing-sm);
    }

    .mega-sidebar {
        width: 100%;
        height: auto;
        background: transparent;
        border: none;
    }

    .mega-category-item {
        position: relative;
        /* Reset to normal stacking */
        border-bottom: 1px solid var(--color-border);
    }

    .mega-category-link {
        padding: 12px 0;
        border-left: none;
        background: transparent !important;
        font-size: 1rem;
    }

    .mega-category-item.active .mega-category-link {
        color: var(--color-primary-blue);
    }

    .mega-category-link .arrow {
        transform: rotate(90deg);
        opacity: 1;
        /* Always show arrow on mobile to indicate expandability */
    }

    .mega-category-item.active .mega-category-link .arrow {
        transform: rotate(-90deg);
    }

    /* Content Panel on Mobile -> Accordion */
    .mega-content-panel {
        position: static;
        /* Stack under the link */
        width: 100%;
        height: auto;
        padding: 0 0 var(--spacing-md) var(--spacing-md);
        background: transparent;
        display: none;
        opacity: 1;
    }

    .mega-category-item.active .mega-content-panel {
        display: block;
    }

    .subservices-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 2px;
    }

    .subservice-card {
        padding: 6px 0;
    }

    .subservice-card:hover {
        background: transparent;
    }
}

/* ===== SIMPLE DROPDOWN MENU ===== */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle .dropdown-arrow {
    display: none;
    /* Remove dropdown symbol from About Us button */
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-xs) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: var(--z-dropdown);
    border-top: 2px solid var(--color-primary-blue);
}

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

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--color-dark-grey);
    font-weight: 500;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.dropdown-item:hover {
    background: var(--color-light-blue);
    color: var(--color-primary-blue);
    padding-left: 24px;
    /* Slide effect */
}

@media (max-width: 968px) {
    .nav-item-dropdown {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: var(--spacing-md);
        display: none;
        background: transparent;
        border-left: 2px solid var(--color-border);
        border-radius: 0;
        margin-top: 5px;
    }

    .nav-item-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 10px 15px;
        border-bottom: none;
    }

    .nav-item-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* ===== COMPACT SPLIT MEGA MENUS (3-WAY SPLIT) ===== */
.nav-item-compact-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.compact-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8875rem;
    /* 14.2px - increased by 2px from 12.2px */
    white-space: nowrap;
    /* Prevent text from wrapping */
    overflow: hidden;
    /* Hide overflow if text is too long */
}

.compact-toggle .dropdown-arrow {
    display: none;
    /* Remove dropdown symbol */
}

/* Mega Menu Container */
.mega-menu-compact {
    position: absolute;
    top: calc(100% + 5px);
    /* Small gap to prevent hover gap */
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 900px;
    max-width: 900px;
    min-width: 900px;
    max-height: 390px;
    /* 360-420px range */
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: var(--z-dropdown);
    overflow: hidden;
    overflow-x: hidden;
    overflow-y: auto;
}

.nav-item-compact-dropdown:hover .mega-menu-compact,
.nav-item-compact-dropdown.hover-active .mega-menu-compact,
.mega-menu-compact:hover {
    opacity: 1;
    visibility: visible;
}

/* Fix for last dropdown (Grow Your Business) to prevent horizontal overflow */
.nav-item-compact-dropdown:last-of-type .mega-menu-compact {
    left: auto;
    right: 0;
    transform: translateX(0);
    max-width: calc(100vw - 20px);
    overflow-x: hidden;
    overflow-y: auto;
}

.compact-container {
    display: flex;
    max-height: 390px;
    overflow: hidden;
}

/* Left Panel (Categories) */
.compact-left {
    width: 200px;
    /* Reduced from 220px to give more space to right panel */
    background: #ffffff;
    border-right: 1px solid var(--color-border);
    padding: 0;
    list-style: none;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 390px;
}

/* Thin Scrollbar Styling for Left Panel */
.compact-left {
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf #f5f5f5;
}

.compact-left::-webkit-scrollbar {
    width: 6px;
}

.compact-left::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.compact-left::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 10px;
}

.compact-left::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.compact-cat-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.8125rem;
    /* 13px */
    line-height: 1.3;
}

.compact-cat-item:hover {
    background: #f5f6f7;
    border-left-color: transparent;
}

.compact-cat-item.active {
    background: #f5f6f7;
    border-left-color: var(--color-primary-blue);
    color: var(--color-primary-blue);
}

.compact-cat-link {
    display: block;
    font-size: 0.8125rem;
    /* 13px */
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.compact-cat-link .arrow {
    display: none;
    /* Remove arrow icon */
}

/* Right Panel (Content) */
.compact-right {
    flex: 1;
    padding: 16px 24px;
    background: var(--color-white);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 390px;
}

/* Thin Scrollbar Styling for Right Panel */
.compact-right {
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf #f5f5f5;
}

.compact-right::-webkit-scrollbar {
    width: 6px;
}

.compact-right::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.compact-right::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 10px;
}

.compact-right::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.compact-sub-group {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 32px;
    /* Row gap: 20px, Column gap: 32px */
    align-content: start;
}

.compact-sub-group.active {
    display: grid;
}

/* Responsive columns for medium screens */
@media (min-width: 992px) and (max-width: 1200px) {
    .compact-sub-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 24px;
    }
}

.compact-sub-link {
    display: block;
    padding: 6px 10px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    /* 13px */
    font-weight: 400;
    line-height: 1.54;
    /* 20px / 13px */
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border-radius: var(--radius-sm);
}

.compact-sub-link:hover {
    color: var(--color-primary-blue);
    background: var(--color-light-blue);
    text-decoration: none;
}

.compact-sub-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--color-cta-orange);
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--transition-base);
}

.compact-sub-link:hover::after {
    transform: scaleX(1);
}

/* Mobile Adjustments for Compact Menu (Accordion) */
@media (max-width: 991px) {
    .mega-menu-compact {
        position: static;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        max-height: none;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        display: none;
        background: transparent;
        padding-left: 15px;
        overflow: visible;
    }

    .nav-item-compact-dropdown.active .mega-menu-compact {
        display: block;
    }

    .nav-item-compact-dropdown {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .compact-container {
        flex-direction: column;
        max-height: none;
        overflow: visible;
    }

    .compact-left {
        width: 100%;
        background: transparent;
        border-right: none;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    .compact-cat-item {
        padding: 12px 0;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        font-size: 0.875rem;
        /* 14px on mobile */
    }

    .compact-cat-item:last-child {
        border-bottom: none;
    }

    .compact-cat-item:hover {
        background: transparent;
    }

    .compact-cat-item.active {
        background: transparent;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .compact-cat-link {
        font-size: 0.875rem;
        /* 14px on mobile */
        font-weight: 600;
    }

    .compact-right {
        padding: 10px 0 15px 0;
        max-height: none;
        overflow: visible;
    }

    /* Mobile: Single column layout */
    .compact-sub-group {
        grid-template-columns: 1fr !important;
        gap: 8px;
        display: none;
    }

    .compact-sub-group.active {
        display: grid;
    }

    .compact-sub-link {
        padding: 8px 0;
        font-size: 0.8125rem;
        /* 13px */
        line-height: 1.54;
    }
}