:root {
    --bg-white: #ffffff;
    --bg-light-gray: #f8f9fa;
    --text-dark: #111111;
    --text-muted: #666666;
    --accent-orange: #f5a623;
    --border-color: #e5e5e5;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* HOPE RISE HERO BANNER */
.hope-header {
    background-color: transparent;
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 30px 50px;
    z-index: 100;
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.hope-logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.hope-nav-links { display: flex; gap: 30px; }
.hope-nav-links a { text-decoration: none; color: var(--text-dark); font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; }
.hope-header-right { display: flex; align-items: center; gap: 15px; }
.hope-icon-circle, .icon-circle-small {
    width: 40px; height: 40px; border: 1px solid #ccc; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--text-dark); text-decoration: none;
}
.hope-btn-outline-pill {
    padding: 10px 25px; border: 1px solid #ccc; border-radius: 30px; text-decoration: none; color: var(--text-dark); font-size: 0.8rem; font-weight: 600;
}
.hope-hero {
    background: linear-gradient(to bottom, #fff5eb 0%, #faecd9 100%);
    padding: 150px 0 50px 0;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    position: relative;
    border-bottom: 1px solid #e0d0bc;
}
.massive-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -3px;
    margin-bottom: 40px;
    color: #222;
}
.title-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 5px; }
.oval-frame {
    width: 300px; height: 120px;
    border-radius: 60px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin: 0 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid transparent;
}
.oval-frame video { width: 100%; height: 100%; object-fit: cover; }
.hover-glow-pop:hover {
    transform: scale(1.1);
    border-color: #fff;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
}
.hope-hero-desc {
    max-width: 600px; margin: 0 auto 40px auto; color: var(--text-muted); font-size: 1.1rem;
}
.hope-hero-actions { display: flex; align-items: center; justify-content: center; gap: 20px; }
.hope-btn-green-solid {
    background: #22c55e; color: #fff; padding: 15px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.hope-btn-text-icon {
    display: flex; align-items: center; gap: 10px; color: var(--text-dark); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.arrow-circle-mini {
    width: 30px; height: 30px; border: 1px solid #ccc; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.hope-hero-bottom-strip {
    position: absolute; bottom: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 50px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.strip-item { display: flex; align-items: center; gap: 15px; font-size: 0.75rem; font-weight: 700; color: #555; }
.strip-logos { font-size: 1.2rem; color: #555; font-weight: 600; }

/* ANIMATIONS */
.slide-word {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUpFade 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.title-line:nth-child(1) .slide-word { animation-delay: 0.2s; }
.title-line:nth-child(2) .slide-word { animation-delay: 0.4s; }
.title-line:nth-child(3) .slide-word { animation-delay: 0.6s; }

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 1s ease forwards;
    animation-delay: 1s;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* NEW SERVICES LAYOUT */
.services-new-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.new-s-tab {
    padding: 10px 25px;
    border: 1px solid #ccc;
    background: transparent;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    color: #444;
}
.new-s-tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
}
.services-new-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.services-large-card {
    background: #fff;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}
.services-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.new-feature-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex; align-items: center;
}
.new-feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.services-bottom-row {
    display: flex;
    gap: 20px;
}
.services-small-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}
.tech-icons-card {
    gap: 30px;
    font-size: 2.5rem;
}
.tech-icons-card .divider {
    height: 40px;
    width: 1px;
    background: #eee;
}
.stats-card {
    gap: 40px;
}
.stat-col {
    display: flex;
    flex-direction: column;
}
.stat-col strong { font-size: 1.8rem; font-family: var(--font-heading); line-height: 1.2; }
.stat-col span { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.divider-tall {
    height: 60px; width: 1px; background: #eee;
}

/* CURSOR GLOW */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out; /* Smooth follow */
}

/* BIG STATS (SCROLL) */
.stats-section-scroll {
    height: 300vh; /* creates the scroll distance */
    position: relative;
    background-color: #ffffff;
    margin-top: -50px;
}
.sticky-content {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-curve-element {
    position: absolute;
    bottom: -10vh;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 60vh;
    background-color: #faecd9; /* beige color to match hero */
    border-radius: 50% 50% 0 0;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-light-gray {
    background-color: var(--bg-light-gray);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: -1px;
}
.text-orange { color: var(--accent-orange); }
.text-gold { color: #f5a623; }
.text-center { text-align: center; }

/* OUR SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}
.services-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.service-category {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 20px;
}
.service-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}
.s-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}
.s-tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
}
.service-features-box {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}
.feature-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.feature-item h4 i { margin-right: 8px; }
.feature-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.service-bottom-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.tech-stack-box, .stats-box {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.tech-stack-box i { font-size: 1.5rem; }
.stat-mini {
    display: flex;
    flex-direction: column;
}
.stat-mini strong { font-size: 1.2rem; font-family: var(--font-heading); }
.stat-mini span { font-size: 0.75rem; color: var(--text-muted); }
.find-out-more {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
}
.find-out-more .circle-icon {
    width: 40px; height: 40px;
    border: 1px solid #000;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* CASE STUDIES */
.case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}
.case-subtext {
    max-width: 500px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.case-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
}
.case-media-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 600px;
}
.case-video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.case-bottom-nav {
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    display: flex;
    gap: 20px;
}
.case-brand-tabs {
    display: flex;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    gap: 10px;
}
.c-tab {
    padding: 10px;
    border: 1px solid #eee;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
}
.c-tab.active { border-color: var(--accent-orange); }
.case-desc-float {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    flex: 1;
}
.case-desc-float h5 { margin-bottom: 5px; }
.case-desc-float p { font-size: 0.8rem; color: var(--text-muted); }

.case-info-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.case-info-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.case-info-header h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.2;
}
.brand-logo-placeholder {
    font-size: 0.7rem; font-weight: bold; color: #007bff;
}
.case-info-text {
    font-size: 0.85rem; color: var(--text-muted);
    margin-bottom: 40px;
}
.radial-diagram {
    position: relative;
    width: 250px; height: 250px;
    margin: 0 auto 40px auto;
    border: 1px dashed #ccc;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.center-stat { text-align: center; }
.center-stat strong { font-size: 3rem; display: block; line-height: 1; font-family: var(--font-heading); }
.center-stat span { font-size: 0.7rem; color: var(--text-muted); }
.radial-brand {
    position: absolute;
    background: #fff;
    padding: 5px 10px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: bold;
}
.radial-brand.top { top: -15px; left: 50%; transform: translateX(-50%); }
.radial-brand.bottom { bottom: -15px; left: 50%; transform: translateX(-50%); }
.radial-brand.left { left: -15px; top: 50%; transform: translateY(-50%); }
.radial-brand.right { right: -15px; top: 50%; transform: translateY(-50%); }

.success-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.success-stat { text-align: center; }
.success-stat strong { font-size: 1.5rem; display: block; font-family: var(--font-heading);}
.success-stat span { font-size: 0.75rem; color: var(--text-muted); }

.timeline-years {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 0.8rem;
}
.timeline-line {
    flex: 1;
    height: 1px;
    background: #ccc;
}

/* WHY CHOOSE US */
.top-tabs-scroll {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 30px;
    width: fit-content;
    margin: 0 auto 40px auto;
}
.top-tab {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
}
.top-tab.active {
    background: #000; color: #fff;
}
.why-choose-content {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}
.why-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}
.why-header-row h3 {
    font-size: 2.5rem; font-family: var(--font-heading); font-weight: 400;
}
.global-clients-stat { font-size: 1.2rem; }
.why-subtext { color: var(--text-muted); font-size: 0.9rem; max-width: 600px; margin-bottom: 40px; }

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.testimonial-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.quote-box {
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}
.quote-icon { font-size: 2rem; margin-bottom: 20px; }
.quote-box p { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-bottom: 20px; border-left: 2px solid var(--accent-orange); padding-left: 15px; }
.author-info { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.author-avatar { width: 30px; height: 30px; background: #ccc; border-radius: 50%; }
.author-info strong { display: block; }
.video-testimonial {
    border-radius: 20px; overflow: hidden; position: relative;
}
.video-overlay-author {
    position: absolute; bottom: 20px; left: 20px; color: #fff; font-size: 0.8rem;
}
.video-overlay-author strong { display: block; }

.logo-grid-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
}
.client-logo {
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex; align-items: center; justify-content: center;
    padding: 30px 10px;
    font-weight: bold; color: #999; font-size: 0.8rem;
}

/* Tab 3: Tech Marquee */
.tech-marquee-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
    padding: 10px 0;
}
.tech-marquee-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: marqueeSlide 30s linear infinite;
}
@keyframes marqueeSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); }
}
.tech-logo-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    width: 150px;
    flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 600; color: #555;
}
.tech-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.tech-col h5 {
    font-size: 1rem; margin-bottom: 15px; font-weight: 600;
}
.tech-col ul { list-style: none; padding: 0; }
.tech-col ul li {
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px;
    display: flex; align-items: flex-start; gap: 8px;
}
.tech-col ul li::before {
    content: "o"; color: #000; font-weight: bold; font-size: 0.7rem; margin-top: -2px;
}

/* Tab 4: Different */
.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.diff-card {
    background: #fbfbfb;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 30px;
}
.diff-card h4 { font-size: 1.1rem; margin-bottom: 15px; }
.diff-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Tab 5: Industries */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
}
.ind-box {
    padding: 40px 20px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    font-weight: 600; font-size: 0.85rem; color: #444;
}
.ind-box i { font-size: 2rem; margin-bottom: 15px; color: #333; }

/* ADVANTAGES */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.adv-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    /* base subtle border always visible */
    border: 1.5px solid #eaeaea;
}

/* Rotating comet arc border: only a glowing arc segment sweeps around */
.adv-card::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 16px;
    background: conic-gradient(
        from var(--card-angle, 0deg),
        transparent 0deg,
        transparent 260deg,
        rgba(249, 115, 22, 0.15) 275deg,
        rgba(249, 115, 22, 0.7) 285deg,
        #f97316 290deg,
        #1e3a5f 295deg,
        #0d1b2a 300deg,
        rgba(30, 58, 95, 0.4) 310deg,
        transparent 320deg,
        transparent 360deg
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1.5px;
    animation: cardBorderSweep 5s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@property --card-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}
@keyframes cardBorderSweep {
    to { --card-angle: 360deg; }
}

.adv-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0,0,0,0.08);
    border-color: transparent;
    /* Removed the dark background on hover so it stays white */
}
.adv-card:hover::before {
    animation-duration: 2.5s;
    /* Blue, Pink, Blue full gradient on hover */
    background: conic-gradient(
        from var(--card-angle, 0deg),
        #3b82f6 0deg,
        #ec4899 120deg,
        #3b82f6 240deg,
        #ec4899 360deg
    );
}
.adv-number {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    color: #e0e0e0;
    line-height: 1;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}
.adv-card h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}
.adv-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

/* SPEAK TO EXPERTS */
.speak-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.speak-subtext {
    color: var(--text-muted); margin-bottom: 40px; font-size: 1.1rem;
}
.contact-cards-row {
    display: flex;
    gap: 20px;
}
.expert-profile-card {
    width: 200px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.expert-profile-card img { width: 100%; height: 100%; object-fit: cover; }
.expert-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff; padding: 20px; font-size: 0.8rem;
}
.expert-info strong { display: block; }

.chat-action-card {
    background: #000;
    color: #fff;
    border-radius: 20px;
    padding: 40px;
    flex: 1;
}
.status-dot { display: inline-block; width: 8px; height: 8px; background: #00ff00; border-radius: 50%; margin-right: 5px; }
.chat-action-card h3 { font-size: 1.8rem; margin-bottom: 10px; font-weight: 400; }
.chat-action-card p { font-size: 0.85rem; color: #aaa; margin-bottom: 30px; }
.chat-buttons { display: flex; gap: 15px; }
.btn-whatsapp, .btn-call {
    padding: 10px 20px; border-radius: 30px; font-size: 0.85rem; text-decoration: none; font-weight: bold; color: #000;
}
.btn-whatsapp { background: #25d366; }
.btn-call { background: #fff; }

.contact-form-card {
    background: #111;
    color: #fff;
    border-radius: 20px;
    padding: 50px;
}
.contact-form-card h3 { font-size: 2rem; margin-bottom: 40px; font-weight: 400; font-family: var(--font-heading); }
.form-group-line { margin-bottom: 30px; }
.form-group-line label { display: block; font-size: 0.8rem; margin-bottom: 5px; color: #ccc; }
.text-red { color: red; }
.form-group-line input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 10px 0;
    color: #fff;
    outline: none;
}
.form-group-line input:focus { border-color: #fff; }

.submit-circle-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 40px;
}
.circle-outline {
    width: 50px; height: 50px; border: 1px solid #555; border-radius: 50%;
}

/* Nav Link Active & Hover States */
.mk-nav-links a {
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.mk-nav-links a:hover {
    background: rgba(0, 0, 0, 0.05);
}
.mk-nav-links a.active {
    background: #f97316 !important;
    color: #fff !important;
}
.mk-nav-links a.active span {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION (DESKTOP, TABLET, MOBILE)
   ========================================================================== */

@media (max-width: 1400px) {
    .mk-hero-composition { transform: scale(0.85); transform-origin: center right; }
    .services-split-grid { gap: 20px; }
}

@media (max-width: 1200px) {
    .container { padding: 0 30px; }
    .mk-hero-composition { transform: scale(0.7); }
    .services-split-grid { grid-template-columns: 1fr; }
    .services-left-image { min-height: 400px; display: none; /* Hide huge image on smaller tablets/mobile for better focus */ }
    
    .why-grid, .case-grid { grid-template-columns: 1fr; }
    .diff-grid { grid-template-columns: repeat(2, 1fr); }
    .industry-grid { grid-template-columns: repeat(3, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .speak-grid { grid-template-columns: 1fr; }
    
    .tech-columns { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    /* HEADER & NAVIGATION */
    .mk-nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; max-width: 320px; height: 100vh;
        background: #ffffff; flex-direction: column; justify-content: center; align-items: center;
        gap: 30px; box-shadow: -10px 0 40px rgba(0,0,0,0.15);
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1000;
        padding: 40px;
    }

    .mk-nav-links.active { right: 0; }
    .mk-nav-links a { font-size: 1rem !important; }
    
    .mobile-menu-btn { display: block !important; }
    
    .mk-header-right { gap: 15px; }
    .login-btn { display: none !important; } /* Simplify header on mobile */
    .join-btn { padding: 8px 15px !important; font-size: 0.75rem !important; }
    .header-inner { padding: 15px 20px !important; }
    
    /* TYPOGRAPHY & SECTIONS */
    .section-title { font-size: 3rem !important; }
    .mk-hero-text h1 { font-size: clamp(2.5rem, 8vw, 3.5rem) !important; }
    
    .mk-hero .container { grid-template-columns: 1fr; text-align: center; }
    .mk-hero-text { margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
    .mk-hero-actions { align-items: center !important; }
    .mk-hero-actions > div { margin-left: 0 !important; margin-top: 30px !important; }
    .mk-hero-composition { transform: scale(0.6); transform-origin: center; margin-top: -50px; }
    
    /* CARDS & GRIDS */
    .services-grid-2x2 { grid-template-columns: 1fr; gap: 20px; }
    .services-bottom-row { flex-direction: column; }
    .tech-grid-logos { grid-template-columns: repeat(3, 1fr) !important; }
    .contact-cards-row { flex-direction: column; }
    
    /* Aggressive inline grid fix for all pages */
    *[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    
    /* Prevent inline style overflow */
    *[style*="width:"] { max-width: 100% !important; }
}

@media (max-width: 767px) {
    /* MOBILE OPTIMIZATIONS */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    img, video {
        height: auto !important;
    }
    .container { padding: 0 20px; }
    .section { padding: 60px 0; }
    
    .mk-hero { padding: 120px 20px 40px 20px; min-height: auto; }
    /* .mk-hero-composition display none removed */
    
    .section-title, h2 { font-size: clamp(2rem, 6vw, 2.5rem) !important; margin-bottom: 25px !important; line-height: 1.2 !important; }
    .mk-hero-text h1, h1 { font-size: clamp(2.2rem, 8vw, 3rem) !important; line-height: 1.1 !important; }
    
    .services-large-card { padding: 25px; }
    .services-small-card { padding: 20px; }
    
    /* Force flex containers to wrap so they don't break viewport horizontally */
    *[style*="display: flex"], *[style*="display:flex"] { flex-wrap: wrap !important; }
    /* But prevent nav links from wrapping in strange ways if they are meant to be a column */
    .mk-nav-links { flex-wrap: nowrap !important; }
    
    /* Tabs & Filters */
    .top-tabs-scroll-wrapper { 
        position: static !important; left: auto !important; width: 100%; 
        overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; 
        padding: 5px; border-radius: 20px;
    }
    .top-tab { white-space: nowrap; font-size: 0.75rem; padding: 8px 15px; }
    
    .why-choose-content { padding: 25px; }
    .why-header-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .why-header-row h3 { font-size: 1.8rem !important; }
    
    .testimonial-card { grid-template-columns: 1fr; }
    .logo-grid-card { grid-template-columns: repeat(2, 1fr); }
    
    .diff-grid { grid-template-columns: 1fr; }
    .industry-grid { grid-template-columns: repeat(2, 1fr); }
    .advantages-grid { grid-template-columns: 1fr; }
    .tech-columns { grid-template-columns: 1fr; }
    
    .speak-grid { gap: 40px; }
    .contact-form-card { padding: 25px !important; }
    .expert-profile-card { width: 100%; height: 250px; }
    
    /* Layout Overrides */
    *[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    
    div[style*="width: 600px"], div[style*="width: 500px"], div[style*="width: 400px"], div[style*="width: 300px"], div[style*="width: 800px"],
    div[style*="width:600px"], div[style*="width:500px"], div[style*="width:400px"], div[style*="width:300px"], div[style*="width:800px"],
    *[style*="width: "] {
        width: 100% !important;
        height: auto !important;
    }
    div[style*="min-width: 300px"] {
        min-width: 100% !important;
    }
    
    /* Modals */
    #ai-booking-modal > div, #client-login-modal > div { 
        margin: 15px; width: auto !important; max-height: 90vh; overflow-y: auto; 
    }
}

/* Fix company.html 3-column cards alignment */
.three-col-grid > div {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.col-desc {
    flex-grow: 1;
}

/* Slide Animation for logos */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-marquee {
    animation: marquee 15s linear infinite;
    width: max-content;
}

@media (max-width: 991px) {
    .case-bottom-nav {
        flex-direction: column !important;
    }
    .case-brand-tabs {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
}


/* ==================================================
   FINAL MOBILE ORBITAL & BUTTON FIXES
================================================== */
@media (max-width: 991px) {
    /* 1. Mobile Orbital Animation Restored and Scaled */
    .mk-hero-composition {
        display: flex !important;
        transform: scale(0.45) !important;
        transform-origin: center center !important;
        margin-top: -120px !important;
        margin-bottom: -120px !important;
    }
    
    /* Protect orbital elements from the destructive global width:100% override */
    .mk-hero-composition div[style], 
    .mk-hero-composition img[style] {
        width: revert !important;
        height: revert !important;
        max-width: none !important;
    }

    /* 2. Reduce Button Sizes on Mobile */
    .btn-light, .btn-dark, .hero-btn, .hero-btn-dark, .hero-btn-outline,
    .action-btns a, a.btn-whatsapp, a.btn-call {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
        height: auto !important;
    }
    
    .action-btns {
        gap: 10px !important;
    }
}

/* Close Menu Button */
.close-menu-btn {
    display: none;
    position: absolute;
    top: 25px;
    right: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.close-menu-btn:hover {
    background: #ef4444;
    color: white;
}

@media (max-width: 991px) {
    .close-menu-btn {
        display: flex !important;
    }
}

/* ==================================================
   EXPLICIT ORBITAL SIZE RESTORATION (Overrides aggressive mobile grids)
================================================== */
@media (max-width: 991px) {
    /* Restore exactly fixed sizes for orbits so they remain perfect circles */
    .mk-hero-composition > div[style*="width:250px"], .mk-hero-composition > div[style*="width: 250px"] { width: 250px !important; height: 250px !important; max-width: 250px !important; }
    .mk-hero-composition > div[style*="width:400px"], .mk-hero-composition > div[style*="width: 400px"] { width: 400px !important; height: 400px !important; max-width: 400px !important; }
    .mk-hero-composition > div[style*="width:600px"], .mk-hero-composition > div[style*="width: 600px"] { width: 600px !important; height: 600px !important; max-width: 600px !important; }
    
    /* Restore explicitly the sizes of floating icons and images */
    .mk-hero-composition img[style*="width:40px"], .mk-hero-composition img[style*="width: 40px"] { width: 40px !important; height: 40px !important; max-width: 40px !important; }
    .mk-hero-composition img[style*="width:50px"], .mk-hero-composition img[style*="width: 50px"] { width: 50px !important; height: 50px !important; max-width: 50px !important; }
    .mk-hero-composition img[style*="width:45px"], .mk-hero-composition img[style*="width: 45px"] { width: 45px !important; height: 45px !important; max-width: 45px !important; }
    .mk-hero-composition img[style*="width:35px"], .mk-hero-composition img[style*="width: 35px"] { width: 35px !important; height: 35px !important; max-width: 35px !important; }
    
    .mk-hero-composition div[style*="width:45px"], .mk-hero-composition div[style*="width: 45px"] { width: 45px !important; height: 45px !important; max-width: 45px !important; }
    .mk-hero-composition div[style*="width:50px"], .mk-hero-composition div[style*="width: 50px"] { width: 50px !important; height: 50px !important; max-width: 50px !important; }
    .mk-hero-composition div[style*="width:60px"], .mk-hero-composition div[style*="width: 60px"] { width: 60px !important; height: 60px !important; max-width: 60px !important; }
    
    /* Ensure the text container doesn't get messed up */
    #hero-stat-container { width: auto !important; max-width: none !important; }
}

/* ==================================================
   FIX LOGO MARQUEE WRAPPING ON MOBILE
================================================== */
@media (max-width: 991px) {
    /* Prevent the global aggressive flex-wrap rule from ruining the marquee */
    .logo-marquee {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
    }
    
    .logo-grid-card {
        grid-template-columns: 1fr !important;
    }
    .client-logo {
        border-right: none !important;
    }
    .stats-flex-container {
        flex-direction: column !important;
        gap: 20px !important;
    }
}

/* ==================================================
   MOBILE FIX FOR CASE STUDIES HEADER
================================================== */
@media (max-width: 991px) {
    .case-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    .case-header .section-title {
        display: block !important;
        white-space: nowrap !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    .case-subtext {
        max-width: 100% !important;
        margin-top: 5px !important;
    }
}

/* ==================================================
   DATA SOURCE TAGS (MODAL)
================================================== */
.ds-tag {
    background: #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ds-tag:hover {
    background: #cbd5e1;
}
.ds-tag.selected {
    background: #0f172a;
    color: #fff;
}
.ds-tag i {
    display: none;
}
.ds-tag.selected i {
    display: inline-block;
}

/* ==================================================
   HIDE SCROLLBAR IN MOBILE VIEW
================================================== */
@media (max-width: 991px) {
    ::-webkit-scrollbar {
        display: none !important;
    }
    * {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
}

.whatsapp-float {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    color: #fff;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.whatsapp-float svg {
    width: 31px;
    height: 31px;
    fill: currentColor;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.04);
    background: #20bd5a;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
}

.whatsapp-float:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .whatsapp-float {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 54px;
        height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float {
        transition: none;
    }
}
