/* ============================================================
   Webito Homepage Fixes — homepage-fixes.css
   ============================================================
   All modular improvements: spacing, hero, VM, counters,
   clients carousel, product images, dark mode, performance.
   DO NOT edit inline styles in index.blade.php — use this file.
   ============================================================ */

/* ─── 0. GLOBAL ANIMATIONS ─────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ─── 1. GLOBAL SPACING SYSTEM ─────────────────────────────── */
:root {
    --section-space-lg: 72px;
    --section-space-md: 48px;
    --section-space-sm: 28px;

    /* Dark mode surface tokens (light defaults) */
    --surface: #FBFAFF;
    --card: #FFFFFF;
    --text-main: #1a1a2e;
    --text-soft: #556877;
    --vm-line-color: rgba(0, 0, 0, 0.18);

    /* Typography Tokens - Unified to Brand Fonts */
    --font-premium: 'Poppins', 'Montserrat', sans-serif;
    --font-heading: 'Poppins', 'Montserrat', sans-serif;
}

/* Base Typography Unification — ensure "Same font overall" */
.heading-title,
.sub-heading-title,
.section-header h2,
.section-header h3,
.vm-title,
.intro-content-left h1,
.development_tabcontent h3,
#software_development_services h3 {
    font-family: var(--font-premium) !important;
}

.heading-title {
    font-size: 26px !important;
    font-weight: 500 !important;
    position: relative;
    color: var(--color-9);
}

@media (min-width: 993px) {
    .heading-title {
        margin-top: 20px;
    }
}

/* Dark mode token overrides */
body.dark-mode {
    --surface: #0f172a;
    --card: #111827;
    --text-main: #e5e7eb;
    --text-soft: #94a3b8;
    --vm-line-color: rgba(255, 255, 255, 0.15);
}


/* ─── 2. HERO SECTION ─────────────────────────────────────────
   • Remove false affordance (play icon)
   • Blend image into background with gradient overlay
   • Prevent CLS with aspect-ratio on image container
   ─────────────────────────────────────────────────────────── */

/* ─── 2. HERO SECTION — PREMIUM SAAS REDESIGN ──────────────── */

#intro {
    background-color: #f8fafc !important;
    background-image: radial-gradient(circle, rgba(15, 23, 42, 0.04) 1px, transparent 1px) !important;
    background-size: 32px 32px !important;
    background-position: 0 0 !important;
    /* Specific clean SaaS grey */
    position: relative;
    overflow: hidden;
    padding: 80px 0 10px 0;
    width: 100%;
}

/* Enhanced immersive blue glow behind image */
#intro::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

#intro .container {
    position: relative;
    z-index: 10;
}

/* Typography & Content */
.intro-content-left {
    padding-right: 40px;
}

#intro .heading-title {
    font-size: 56px !important;
    font-weight: 700 !important;
    color: var(--hero-heading-color, #0F172A) !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    font-family: var(--font-premium) !important;
}

.text-gradient {
    background: linear-gradient(135deg, #1f5fc9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

#intro .section-header p {
    font-size: 17px !important;
    color: #64748b;
    line-height: 1.75;
    max-width: 90%;
}

/* Premium CTA Buttons */
.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-primary-hero {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    color: #fff !important;
    padding: 1.1rem 2.4rem !important;
    border-radius: 16px !important;
    font-weight: 600 !important;
    font-size: 17px !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    text-decoration: none !important;
}

.btn-secondary-hero {
    background: transparent !important;
    color: #0F172A !important;
    padding: 1.1rem 2rem !important;
    border-radius: 16px !important;
    font-weight: 600 !important;
    font-size: 17px !important;
    border: 1.5px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.btn-primary-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 35px -10px rgba(37, 99, 235, 0.4) !important;
}

.btn-secondary-hero:hover {
    background: rgba(15, 23, 42, 0.05) !important;
    border-color: #0F172A !important;
}

/* Trust Badge in Hero */
.trust-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(31, 95, 201, 0.05);
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid rgba(31, 95, 201, 0.1);
}

.badge-pill {
    font-size: 13px;
    font-weight: 600;
    color: #1f5fc9;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark-mode .trust-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .badge-pill {
    color: #94a3b8;
}

/* Image Frame Spacing */
.hero-cta-group {
    margin-top: 40px;
    margin-bottom: 20px;
}

/* SEAMLESS IMAGE BLENDING (Right Side) */
.intro-content-right {
    position: relative;
}

.hero-img-frame {
    width: 100%;
    max-width: 780px;
    position: relative;

    /* REFINED MASK: removes pixels from all 4 edges naturally (less fog) */
    -webkit-mask-image:
        linear-gradient(to right, transparent, black 5%, black 95%, transparent),
        linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
    mask-image:
        linear-gradient(to right, transparent, black 5%, black 95%, transparent),
        linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;

    will-change: transform;
}

.hero-img-frame img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.01);
    filter: saturate(1.02) contrast(1.02);
}

/* Depth effect: slightly soften the edges */
.hero-img-frame::after {
    display: none !important;
    /* Remove old boxy gradients */
}

/* Hero section spacing — more space under image */
#intro {
    padding-bottom: 50px !important;
}

/* Kill excessive hero bottom padding on mobile */
/* Small Laptop / Tablet Landscape optimization (Desktop Mode) */
@media (min-width: 993px) and (max-width: 1366px) {
    #intro .heading-title {
        font-size: 44px !important;
        margin-bottom: 24px;
    }

    #intro .section-header p {
        font-size: 17px;
        max-width: 95%;
    }

    #intro {
        padding: 100px 0 60px 0;
    }

    /* Prevent CTA wrapping on small laptops */
    .btn-primary-hero,
    .btn-secondary-hero {
        font-size: 15px !important;
        padding: 0.9rem 1.6rem !important;
        white-space: nowrap;
    }

    .hero-cta-group {
        gap: 12px;
    }

    /* Scale down trust badge */
    .trust-badge {
        padding: 6px 12px;
    }

    .badge-pill {
        font-size: 12px;
    }

    .badge-pill.ml-2 {
        margin-left: 10px !important;
    }
}

/* ─── 3. MOBILE HERO & COUNTER REDESIGN (Premium Engineering Focus) ─── */

@media (max-width: 992px) {
    #intro {
        padding: 100px 0 60px 0 !important;
        text-align: center;
        background: #f8fafc !important;
        position: relative;
    }

    /* Option B: Hide image completely for authority & clarity */
    .intro-content-right {
        display: none !important;
    }

    .intro-content-left {
        padding-right: 0 !important;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }

    #intro .heading-title {
        font-size: 34px !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
        margin-bottom: 24px !important;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        letter-spacing: -0.015em !important;
    }

    #intro .section-header p {
        font-size: 17px !important;
        line-height: 1.75 !important;
        color: #334155 !important;
        /* Slightly darker slate */
        max-width: 92%;
        margin: 0 auto 36px !important;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 20px !important;
        /* Spacious gap between primary/secondary */
        width: 100%;
        padding: 0 20px;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100% !important;
        height: 54px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-right: 0 !important;
        border-radius: 14px !important;
        font-size: 16px !important;
    }

    .btn-secondary-hero {
        border: 1.5px solid #cbd5e1 !important;
    }

    /* Radial blue glow behind text instead of image */
    #intro::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 350px;
        height: 350px;
        background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
        z-index: 0;
        pointer-events: none;
    }

    .trust-badge {
        justify-content: center;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .trust-badge .badge-pill {
        justify-content: center;
        width: 100%;
    }

    .trust-badge .badge-pill.ml-2 {
        margin-left: 0 !important;
        margin-top: 4px;
    }
}

/* ─── 4. MOBILE METRICS REDESIGN (2-Column Grid) ───────────── */
@media (max-width: 768px) {
    .metrics-section {
        padding: 50px 0 !important;
        background: #f8fafc !important;
        border-top: none !important;
        border-bottom: none !important;
    }

    .metrics-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 40px 20px !important;
        padding: 0 24px !important;
    }

    .metric-item {
        width: 100% !important;
        border: none !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        text-align: center;
    }

    .metric-number {
        font-size: 38px !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
        letter-spacing: -0.01em !important;
    }

    .metric-label {
        font-size: 13px !important;
        font-weight: 500 !important;
        text-transform: none !important;
        color: #64748b !important;
        letter-spacing: normal !important;
    }

    /* Reset desktop logic for items */
    .metric-item:nth-child(odd) {
        border-right: none !important;
    }
}

/* ─── 5. FLOATING ELEMENTS SCROLL VISIBILITY ────────────── */

/* Base Styles (Shared Mobile & Desktop) */
/* Chatbot + WhatsApp: shared scroll-reveal + circle style */
.webi-chat-icon,
.floating-whatsapp-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    pointer-events: none !important;
    position: fixed !important;
    right: 30px !important;
    left: auto !important;
    z-index: 10000 !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    padding: 0 !important;
    background-color: #0675e8 !important;
}

/* Scroll-to-Top: Only manage visibility + alignment — keep original visual design */
#scrollUp {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    /* Force hide by default, overridden by class */
    transform: translateY(20px) rotate(0deg) !important;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    pointer-events: none !important;
    position: fixed !important;
    right: 38px !important;
    /* Center-aligned with 60px circles */
    bottom: 30px !important;
    z-index: 10000 !important;
    text-decoration: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Stacked upward chevrons styling */
/* Stacked upward chevrons styling - Tighter ^^ look */
.floating-scroll-btn i,
#scrollUp i {
    display: block !important;
    line-height: 1 !important;
    font-size: 18px !important;
    margin: -6px 0 !important;
    /* Aggressively pull them together */
    padding: 0 !important;
    height: auto !important;
    width: auto !important;
    font-weight: 700 !important;
}

/* Visibility State (Visible) */
.webi-chat-icon.floating-visible,
.floating-whatsapp-btn.floating-visible,
.floating-scroll-btn.floating-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

#scrollUp.floating-visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    /* Force show as flex */
    transform: translateY(0) rotate(0deg) !important;
    pointer-events: auto !important;
}

/* Vertical Stacking */
.webi-chat-icon {
    bottom: 180px !important;
}

.floating-whatsapp-btn {
    bottom: 105px !important;
    background-color: #25D366 !important;
}

/* Chatbot Fix: Single Circle & Visible Icon */
.webi-chat-icon .webi-robot-wrapper {
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    filter: none !important;
    animation: none !important;
    box-shadow: none !important;
    position: relative !important;
}

.webi-chat-icon .webi-robot-wrapper svg {
    width: 44px !important;
    height: 44px !important;
    display: block !important;
}

/* WhatsApp Icon Standard Size */
.floating-whatsapp-btn span img {
    width: 40px !important;
    height: 40px !important;
    display: block !important;
}

/* Scroll Up Icon — do NOT override original icon color/size */

/* Mobile Specific Tweaks */
@media (max-width: 992px) {

    /* Bot + WhatsApp: tighten up on mobile */
    .webi-chat-icon,
    .floating-whatsapp-btn {
        right: 16px !important;
        width: 52px !important;
        height: 52px !important;
    }

    .webi-chat-icon {
        bottom: 155px !important;
    }

    .floating-whatsapp-btn {
        bottom: 93px !important;
    }

    /* Scroll btn: align center with 52px circles + position above mobile chrome */
    #scrollUp {
        right: 20px !important;
        /* Center-aligned with 52px circles (16+26-22) */
        bottom: 20px !important;
        -webkit-transform: rotate(0deg) translateY(20px) !important;
        transform: rotate(0deg) translateY(20px) !important;
        /* Force upright + hide offset */
        visibility: hidden !important;
        opacity: 0 !important;
    }

    #scrollUp.floating-visible {
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
        -webkit-transform: rotate(0deg) translateY(0) !important;
        transform: rotate(0deg) translateY(0) !important;
    }

    .floating-scroll-btn i,
    #scrollUp i {
        font-size: 16px !important;
        transform: none !important;
        /* Ensure no rotation on icons */
    }

    .webi-chat-icon .webi-robot-wrapper svg {
        width: 38px !important;
        height: 38px !important;
    }

    .floating-whatsapp-btn span img {
        width: 34px !important;
        height: 34px !important;
    }
}

/* Notification Badge Correction */
.webi-notification-badge {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
    top: -2px !important;
    right: -2px !important;
    z-index: 10001 !important;
}

/* Reduce gap AFTER hero */
#intro+.vm-section {
    margin-top: 0;
}


/* ─── 3. VISION & MISSION — DESIGN SYSTEM INTEGRATION ────────
   • Remove Gilroy font override → inherit Poppins
   • Match site heading scale
   • Fix spacing gaps
   • Apply dark mode tokens
   ─────────────────────────────────────────────────────────── */

.vm-section {
    background: var(--surface);
    padding: 28px 0 28px;
    margin-top: 0 !important;
}

.vm-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.vm-card {
    flex: 1;
    background: var(--card);
    border-radius: 12px;
    min-height: unset;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 4px 24px rgba(15, 35, 52, 0.05);
    transition: all 0.3s ease;
}

/* Font — inherit Poppins, match heading scale */
.vm-title {
    font-family: inherit !important;
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.2;
    color: #0675e8;
    margin: 0;
    opacity: 1;
}

.vm-line {
    width: 40px;
    height: 3px;
    background: var(--vm-line-color);
    border-radius: 2px;
    margin: 4px 0 6px;
    /* tightened from 4px 0 8px */
}

.vm-desc {
    font-family: inherit !important;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-soft);
    margin: 0;
}

.vm-text {
    flex: 1;
    max-width: 65%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vm-img {
    flex-shrink: 0;
    width: 35%;
    display: flex;
    justify-content: flex-end;
}

.vm-img img {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Dark mode overrides for VM Card */
body.dark-mode .vm-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

body.dark-mode .vm-title {
    color: var(--color-8, #74b5fc);
}

/* If the text color classes are still on the elements, make them inherit the theme color */
body.dark-mode .vm-title-vision,
body.dark-mode .vm-title-mission {
    color: var(--color-8, #74b5fc) !important;
}

body.dark-mode .vm-desc {
    color: var(--text-soft);
}

/* Mobile responsive override */
@media (max-width: 992px) {
    .vm-section {
        padding: 40px 0 var(--section-space-sm);
    }

    .vm-wrapper {
        flex-direction: column;
        padding: 0 16px;
        gap: 16px;
    }

    .vm-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
        gap: 14px;
    }

    .vm-text {
        max-width: 100%;
        align-items: center;
    }

    .vm-title {
        font-size: 22px;
    }

    .vm-img {
        width: 100%;
        height: auto;
        justify-content: center;
        margin-top: 12px;
    }

    .vm-card-left .vm-img img,
    .vm-card-right .vm-img img {
        max-width: 160px;
        height: auto;
    }
}

@media (max-width: 576px) {
    .vm-section {
        padding: 24px 0 var(--section-space-sm);
    }

    .vm-wrapper {
        padding: 0 12px;
        gap: 12px;
    }

    .vm-card {
        padding: 20px 16px;
    }

    .vm-title {
        font-size: 20px;
    }

    .vm-desc {
        font-size: 14px;
    }
}



/* ─── 4. METRICS WALL (MINIMAL COUNTER SECTION) ─────────────
   • Replaces heavy stat cards with clean horizontal layout
   • divide-x effect on desktop
   • 2x3 grid transition for mobile
   ─────────────────────────────────────────────────────────── */

.metrics-section {
    background: #fff;
    padding: 64px 0;
    border-top: 1px solid var(--vm-line-color);
    border-bottom: 1px solid var(--vm-line-color);
}

body.dark-mode .metrics-section {
    background: #0f172a !important;
    /* Force the deep navy surface */
    border-color: rgba(255, 255, 255, 0.1) !important;
    display: flex;
    justify-content: center;
}

body.dark-mode .metric-item {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

.metric-item {
    text-align: center;
    padding: 10px 20px;
    border-right: 1px solid var(--vm-line-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    min-width: 160px;
    /* Prevent horizontal fluctuation */
}

.metric-item:last-child {
    border-right: none;
}

.metric-item:hover {
    transform: translateY(-5px);
}

.metric-number {
    font-size: clamp(32px, 3.8vw, 44px);
    font-weight: 600;
    color: #0675e8;
    margin-bottom: 8px;
    line-height: 1;
    font-family: inherit;
    display: block;
    font-variant-numeric: tabular-nums;
    /* Prevents fluctuation during counting */
}

body.dark-mode .metric-number {
    color: var(--color-8, #74b5fc);
}

.metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: inherit;
    line-height: 1.4;
    min-height: 40px;
    /* Force same height for labels to align numbers */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive: Clean grid transition */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .metric-item {
        border-right: 1px solid var(--vm-line-color);
        margin-bottom: 40px;
    }

    .metric-item:nth-child(3n) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-item {
        border-right: none;
        padding: 0 10px;
        margin-bottom: 32px;
    }

    .metric-item:nth-child(odd) {
        border-right: 1px solid var(--vm-line-color);
    }

    /* ONLY show first 4 items on mobile */
    .metric-item:nth-child(n+5) {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        padding: 0 16px;
    }

    .metric-item {
        width: 100%;
        border-right: none !important;
        margin-bottom: 24px !important;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--vm-line-color);
    }

    .metric-item:last-child {
        border-bottom: none;
        margin-bottom: 0 !important;
        padding-bottom: 0;
    }
}


/* ─── 4. COUNTER SECTION — MOBILE GLASS CARD GRID ────────────
   Desktop: unchanged row layout
   Mobile ≤768px: 2-column glassmorphism stat card grid
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .counter-bg .counters {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        padding: 12px 16px !important;
        /* Reduced from 20px */
    }

    .counter-bg .counters .media-query-by-p {
        flex: unset;
        width: 100%;
        max-width: 100%;
        padding: 0 !important;
    }

    /* Glass stat card */
    .stat-card {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 14px;
        padding: 16px 12px;
        /* Reduced from 20px */
        text-align: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100px;
    }

    body.dark-mode .stat-card {
        background: rgba(31, 95, 201, 0.12);
        border-color: rgba(116, 181, 252, 0.2);
    }

    .stat-card h2 {
        font-size: 26px !important;
        font-weight: 700;
        color: var(--color-1);
        margin: 0 0 4px !important;
        line-height: 1.1;
    }

    .stat-card p {
        font-size: 12px !important;
        color: #556877;
        margin: 0 !important;
        font-weight: 500;
        letter-spacing: 0.02em;
    }

    body.dark-mode .stat-card p {
        color: var(--text-soft);
    }
}


/* ─── 5. CLIENTS SECTION — TRUST-FOCUSED REDESIGN ────────────
   • Clean "Credential Wall" aesthetic
   • Logo normalization (grayscale, fixed height)
   • Passive auto-fade carousel
   ─────────────────────────────────────────────────────────── */

.clients-section-refined {
    background: #ecf5ff !important;
    padding: var(--section-space-md) 0;
}

body.dark-mode .clients-section-refined {
    background: #111827 !important;
}

.trust-subtitle {
    color: var(--text-soft);
    font-size: 16px;
    margin-top: -24px;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ───── 5. CLIENTS SECTION - 2-ROW CROSS-FADE GRID ───────── */

.logo-wall-container {
    padding: 30px 0 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 in a row = 20 total across 4 rows */
    gap: 30px 40px;
    align-items: center;
    justify-items: center;
}

.logo-slot {
    position: relative;
    width: 100%;
    max-width: 180px;
    height: 100px;
    /* Significantly larger icons as requested */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-slot img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 1.5s ease-in-out;
    /* Slower, smoother cross-fade */
    opacity: 0;
}

.logo-slot img.active {
    opacity: 1;
    z-index: 2;
}

.logo-slot img.next {
    opacity: 0;
    z-index: 1;
}

.client_view_all_div {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 0 !important;
    padding-bottom: 40px;
}

/* Responsive Grid */
@media (max-width: 1199px) {
    .logo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px 30px;
    }
}

@media (max-width: 768px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 in a row on mobile as requested */
        gap: 45px 20px;
    }

    .logo-slot {
        height: 75px;
        /* Larger mobile icons */
    }
}

@media (max-width: 480px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Maintain 3 in a row even on small mobile */
    }
}

@media (max-width: 768px) {
    .clients-section-refined {
        padding: 60px 0 0 0;
    }
}

/* ─── 10. UNIFIED LARGE SCREEN OPTIMIZATION (min-width: 1400px) ─────
   Optimizes Intro, VM, Metrics, and Clients for high-res displays.
   Ensures consistent vertical alignment and premium width.
   ─────────────────────────────────────────────────────────── */
@media (min-width: 1400px) {

    /* Global containers for these sections */
    #intro .container,
    .vm-wrapper,
    .clients-section-refined .container {
        max-width: 1880px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Spread the Vision & Mission cards further apart */
    .vm-wrapper {
        gap: 60px !important;
    }

    /* Vision & Mission refinements */
    .vm-card {
        padding: 50px 70px;
        border-radius: 20px;
    }

    .vm-img img {
        max-width: 300px;
    }

    .vm-desc {
        font-size: 16.5px;
    }

    /* Metrics wall refinements - perfectly centered */
    .metrics-grid {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 40px !important;
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        width: 100% !important;
    }

    .metric-item {
        padding: 0 30px;
    }

    /* Logo Wall container */
    .logo-wall-container {
        max-width: 1700px;
    }

    /* Intro / Hero Section - slightly larger visual mass */
    .hero-img-frame img {
        transform: scale(1.25);
        /* More presence on large screens */
    }

    .main-page-header {
        width: 100vw !important;
        /* Let the SVG wave span wider */
    }
}


/* ─── 6. PROJECT PORTFOLIO — FIXED ASPECT-RATIO IMAGES ───────
   Prevents images from shrinking in flex container on mobile
   ─────────────────────────────────────────────────────────── */

.project-img-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-frame .project-portfolio-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
    padding: 0;
}

.project_portfolio_main_div:hover .project-portfolio-image {
    transform: scale(1.02);
}

/* Remove old direct img styling that causes shrink */
.project-portfolio-image {
    width: 100%;
    height: auto;
}

/* Dark mode: keep image frame clean */
body.dark-mode .project-img-frame {
    background: #1a1f2e;
}


/* ─── 7. PERFORMANCE — CONTENT-VISIBILITY ────────────────────
   Defer rendering of below-fold sections.
   intrinsic-size prevents CLS while content-visibility is auto.
   ─────────────────────────────────────────────────────────── */

#project_portfolio,
#why-us,
#portfolio {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}


/* ─── 8. MOBILE FIRST — TYPOGRAPHY & SPACING ─────────────────
   Thumb-friendly, readable, reduced scroll fatigue
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* Hero heading */
    #intro .heading-title {
        font-size: clamp(22px, 6vw, 32px);
        line-height: 1.3;
    }

    /* Body text readable line length */
    #intro .p-margin20,
    .vm-desc,
    .section-header p {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Section padding */
    section {
        padding-top: var(--section-space-md);
        padding-bottom: var(--section-space-md);
    }

    /* Ideas section cards */
    #ideas_section .col-xxl-5,
    #ideas_section .col-xxl-7 {
        margin-bottom: 16px;
    }

    /* Software dev services tab — mobile spacing */
    #software_development_services .development_tab {
        gap: 4px;
    }

    /* Project portfolio cards */
    #project_portfolio .col-xxl-6 {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .heading-title {
        font-size: clamp(20px, 6.5vw, 28px) !important;
    }

    .sub-heading-title {
        font-size: clamp(16px, 5vw, 22px) !important;
    }

    p {
        font-size: 14px;
        line-height: 1.7;
    }
}


/* ─── 9. SPACING NORMALISATION ──────────────────────────────
   Fix stacked Bootstrap margins + custom paddings
   ─────────────────────────────────────────────────────────── */

/* Conflicting 80px padding-top removed to allow tighter spacing */

/* Redundant gap rule removed for consistency */

/* Counter section gap — tight padding to remove white space */
.counter-bg {
    margin-top: 0;
    padding: 24px 0 !important;
}

/* --- 10. IDEAS & SERVICES SPACING --- */
#ideas_section {
    padding-top: 5px !important;
    padding-bottom: 0 !important;
}

#ideas_section .container {
    margin-top: 0 !important;
}

#ideas_section .section-header {
    margin-bottom: 20px !important;
}

#ideas_section .heading-title {
    margin-top: 2rem !important;
    margin-bottom: 5px !important;
}

.client_view_all {
    margin-top: 2rem !important;
}

#software_development_services {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

#software_development_services .section-header {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 768px) {
    #software_development_services {
        padding-top: 15px !important;
        padding-bottom: 0px !important;
    }

    #software_development_services .section-header {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
    }

    .software_development_services_right_part {
        padding: 24px 20px !important;
        margin: 15px 12px !important;
        width: auto !important;
        background-color: #0F1628 !important;
        /* Force black background */
        color: #fff !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        z-index: 10;
    }

    .software_development_services_right_part h3,
    .software_development_services_right_part p,
    .software_development_services_right_part ul li,
    .software_development_services_right_part ul.a li {
        color: #fff !important;
    }

    .development_tabcontent {
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* TARGET THE FEATURES WRAPPER FOR CUMULATIVE LIST CUTOFF */
    .software_development_services_right_part .features-container {
        max-height: 155px !important;
        /* strictly show ~5 links */
        overflow: hidden !important;
        position: relative;
        transition: max-height 0.5s ease-in-out;
        margin-bottom: 0px !important;
        display: block !important;
        /* Force block to ensure vertical stacking works for clipping */
    }

    .software_development_services_right_part .features-container.expanded {
        max-height: 2500px !important;
    }

    .software_development_services_right_part .features-container:not(.expanded)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: linear-gradient(transparent, #0F1628) !important;
        pointer-events: none;
        z-index: 5;
    }

    /* Reset the single list constraint */
    .software_development_services_right_part ul.a {
        max-height: none !important;
        overflow: visible !important;
        margin-bottom: 10px !important;
    }

    .view-more-list {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #74b5fc !important;
        font-weight: 600;
        font-size: 14px;
        margin: 10px auto !important;
        padding: 8px 16px;
        cursor: pointer;
        position: relative;
        z-index: 10;
        width: fit-content;
        border: 1px solid rgba(116, 181, 252, 0.2);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.03);
    }

    /* CENTER THE BUILD SOFTWARE BUTTON ON MOBILE */
    .software_development_services_right_part .mt-4 {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .software_development_services_right_part .mt-4 a {
        justify-content: center !important;
        width: 100% !important;
    }

    /* REDUCE GAPS BETWEEN SECTIONS ON MOBILE */
    #software_development_services {
        padding-bottom: 0px !important;
    }

    #software_development_services .row[style*="padding"] {
        padding-bottom: 0px !important;
    }

    #project_portfolio {
        padding-top: 20px !important;
        padding-bottom: 0 !important;
    }

    #project_portfolio .row.mb-5 {
        margin-bottom: 0 !important;
    }

    #why-us {
        padding-top: 35px !important;
    }

    #why-us .heading-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .project-portfolio-btn {
        margin-top: 0 !important;
        margin-bottom: 2rem !important;
    }

    #project_portfolio .section-header {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }

    #project_portfolio .section-header p {
        padding-top: 5px !important;
        padding-bottom: 15px !important;
    }
}

/* ───── 6. PROJECT PORTFOLIO OPTIMIZATION ───────── */

.project-img-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 600 / 337;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

body.dark-mode .project-img-frame {
    background: #1e293b;
}

.project-portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
}

.project-portfolio-image.loaded {
    opacity: 1;
}

/* Skeleton Shimmer */
.project-img-frame::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.7) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
    z-index: 1;
}

body.dark-mode .project-img-frame::before {
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
}

.project-img-frame.loaded::before {
    display: none;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.project_label {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

body.dark-mode .project_label {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.project_portfolio_main_div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

/* Responsive Description Toggle */
@media (max-width: 767px) {
    .desktop-desc {
        display: none !important;
    }

    .mobile-desc {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .desktop-desc {
        display: block !important;
    }

    .mobile-desc {
        display: none !important;
    }
}

.project_portfolio_main_div:hover {
    transform: translateY(-5px);
}

.project-portfolio-image:hover {
    transform: scale(1.03);
}

@media (min-width: 769px) {
    .view-more-list {
        display: none !important;
    }

    .software_development_services_right_part {
        background-color: #1a1f2e !important;
        color: #fff !important;
    }

    .software_development_services_right_part h3,
    .software_development_services_right_part p,
    .software_development_services_right_part ul li {
        color: #fff !important;
    }
}

/* Software Development Services Dark Mode Tab Styling */
body.dark-mode .development_tab button {
    color: #cbd5e1 !important;
    /* Soft white/grey */
    border-color: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
}

body.dark-mode .development_tab button:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

body.dark-mode .development_tab button.active {
    background-color: #1f5fc9 !important;
    /* Brand Blue */
    color: #fff !important;
    border-color: #1f5fc9 !important;
}

body.dark-mode .development_tab button .service-icon {
    /* Ensure icons are also visible/colored appropriately */
    opacity: 0.9;
}

/* Fix for unreadable titles in Software Development Services Dark Mode */
body.dark-mode #software_development_services .heading-title,
body.dark-mode #software_development_services h3 {
    color: #ffffff !important;
}


/* ─── 11. HERO SECTION — DARK MODE SUPPORT ───────────────────
   Fixes: background, radial glow, heading, paragraph, secondary
   CTA button, and text-gradient span. The global style.css rule
   `body.dark-mode .heading-title { color: white }` is intentionally
   countered here via the CSS variable + !important specificity
   so the gradient word stays visible and styled correctly.
   ─────────────────────────────────────────────────────────── */

body.dark-mode {
    --hero-heading-color: #f1f5f9;
}

/* Background — switch from light SaaS grey to deep navy */
body.dark-mode #intro {
    background-color: #080f1e !important;
    background-image: radial-gradient(circle, #1e293b 1px, transparent 1px) !important;
}

/* Radial glow — increase opacity for visibility on dark */
body.dark-mode #intro::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, transparent 70%) !important;
}

/* Heading — use variable set above (overrides style.css global white) */
body.dark-mode #intro .heading-title {
    color: var(--hero-heading-color) !important;
}

/* Gradient word — keep the blue gradient, just ensure it renders
   correctly when the parent heading color is overridden to white. */
body.dark-mode .text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Sub-paragraph — lighter slate for readability on dark bg */
body.dark-mode #intro .section-header p {
    color: #94a3b8 !important;
}

/* Secondary CTA — dark mode: ghost style with visible border + light text */
body.dark-mode .btn-secondary-hero {
    color: #e2e8f0 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

body.dark-mode .btn-secondary-hero:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(148, 163, 184, 0.6) !important;
    color: #f1f5f9 !important;
}

/* Primary CTA — brighten shadow on dark bg for depth */
body.dark-mode .btn-primary-hero {
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.45) !important;
}

body.dark-mode .btn-primary-hero:hover {
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.55) !important;
}

/* Hero image — slight brightening so it doesn't look washed out on dark */
body.dark-mode .hero-img-frame img {
    filter: saturate(1.1) contrast(1.05) brightness(0.92) !important;
}

/* ── BACKGROUND SCROLL LOCK (Mobile & Open State) ── */
body.pm-menu-open,
html.pm-menu-open,
body.webi-chat-open,
html.webi-chat-open {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    width: 100% !important;
}

/* ─── SECTION SYMMETRIC SPACING ───────────────────────────────
   Ensure bottom padding = top padding for all homepage sections
   ─────────────────────────────────────────────────────────── */

/* Clients section */
.clients-section-refined {
    padding: 36px 0 !important;
}

/* Core Technology (ideas_section) */
#ideas_section {
    padding: 40px 0 !important;
}

/* Software Development Services */
#software_development_services {
    padding: 20px 0 !important;
}

/* Project Portfolio */
#project_portfolio {
    padding: 20px 0 !important;
}

#project_portfolio .section-header,
#portfolio .section-header {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}

#project_portfolio .heading-title,
#portfolio .heading-title {
    margin-top: 0 !important;
    padding-top: 18px !important;
    padding-bottom: 0 !important;
}


/* Why Choose Us */
#why-us {
    padding: 20px 0 !important;
}

#why-us .card-wow,
#why-us .card-title,
#why-us .card-text {
    color: #444444 !important;
}

/* Our Products */
#portfolio {
    padding: 20px 0 !important;
}

/* ── Mobile overrides (≤768px) ── */
@media (max-width: 768px) {
    .clients-section-refined {
        padding: 24px 0 !important;
    }

    #ideas_section {
        padding: 28px 0 !important;
    }

    #software_development_services {
        padding: 28px 0 !important;
    }

    #project_portfolio {
        padding: 28px 0 !important;
    }

    #why-us {
        padding: 20px 0 !important;
    }

    #portfolio {
        padding: 28px 0 !important;
    }

    .section-subtitle {
        display: block !important;
    }
}

.section-subtitle,
.portfolio-desc span,
.p-margin20,
.vm-desc,
.trust-subtitle {
    margin-top: 12px !important;
    margin-bottom: 25px !important;
    font-size: 15px !important;
    color: #444444 !important;
    line-height: 1.6;
    display: block;
}

@media (max-width: 767px) {

    .section-subtitle,
    .portfolio-desc span,
    .p-margin20,
    .vm-desc,
    .trust-subtitle {
        margin-bottom: 15px !important;
    }
}

/* Dark Mode Overrides for Visibility */
body.dark-mode .section-subtitle,
body.dark-mode .portfolio-desc span,
body.dark-mode .p-margin20,
body.dark-mode .vm-desc,
body.dark-mode .trust-subtitle {
    color: #cbd5e1 !important;
    /* Lighter grey for dark mode */
}

body.dark-mode #why-us .card-wow,
body.dark-mode #why-us .card-title,
body.dark-mode #why-us .card-text {
    color: #cbd5e1 !important;
}

/* Contact section top spacing reduction */
.contain {
    padding-top: 1rem !important;
}