@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700;800;900&family=Roboto+Slab:wght@100..900&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

    /* English Headings, Navbar, & Footer Typography: Roboto Slab */
    html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6,
    [dir="ltr"] h1, [dir="ltr"] h2, [dir="ltr"] h3, [dir="ltr"] h4, [dir="ltr"] h5, [dir="ltr"] h6,
    html[lang="en"] #main-header, html[lang="en"] #main-header .nav-link, html[lang="en"] nav .nav-link,
    [dir="ltr"] #main-header, [dir="ltr"] #main-header .nav-link, [dir="ltr"] nav .nav-link,
    html[lang="en"] footer, html[lang="en"] footer h1, html[lang="en"] footer h2, html[lang="en"] footer h3,
    html[lang="en"] footer h4, html[lang="en"] footer p, html[lang="en"] footer a, html[lang="en"] footer span,
    [dir="ltr"] footer, [dir="ltr"] footer h1, [dir="ltr"] footer h2, [dir="ltr"] footer h3,
    [dir="ltr"] footer h4, [dir="ltr"] footer p, [dir="ltr"] footer a, [dir="ltr"] footer span {
        font-family: 'Roboto Slab', Georgia, serif !important;
    }

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

    /* English Body & Text Typography: EB Garamond */
    html[lang="en"] p,
    html[lang="en"] span:not(.fa-solid):not(.fas):not(.far):not(.fab):not(.fa),
    html[lang="en"] div:not(#main-header *):not(.brand-text *),
    html[lang="en"] a:not(.nav-link):not(.brand-text),
    html[lang="en"] button,
    html[lang="en"] input,
    html[lang="en"] textarea,
    html[lang="en"] label,
    html[lang="en"] li,
    html[lang="en"] td,
    html[lang="en"] th,
    html[lang="en"] blockquote,
    [dir="ltr"] p,
    [dir="ltr"] span:not(.fa-solid):not(.fas):not(.far):not(.fab):not(.fa),
    [dir="ltr"] button,
    [dir="ltr"] input,
    [dir="ltr"] label,
    [dir="ltr"] li {
        font-family: 'EB Garamond', Georgia, 'Times New Roman', serif !important;
        font-size: clamp(1rem, 1.05vw + 0.35rem, 1.25rem) !important;
        line-height: 1.8 !important;
    }

/* ==========================================================================
   100% Unified IBM Plex Sans Arabic Font & Super Compact Navbar System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
p, span, div, a, button, input, textarea, select, label, li, td, th, blockquote,
#main-header, header, nav, .nav-link, #mobile-menu, .mobile-nav-link, .brand-text,
#hero, .hero-title, .hero-subtitle,
#services, .service-card, .service-desc,
#about, .about-card, #journey, .journey-card, #portfolio, .portfolio-card,
#team, #service-features, #contact, #footer, footer, .footer,
.btn, .read-more-btn {
    font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

i, i[class*="fa-"], i.fa-solid, i.fa-brands, i.fas, i.far, i.fab, .menu-icon,
#main-header i, header i, nav i, #mobile-menu i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-style: normal !important;
    font-weight: 900 !important;
}

/* Super Compact Navbar & Icon Right-Alignment */
#main-header .nav-link, #main-header .nav-link *, nav .nav-link, nav .nav-link * {
    font-size: 9px !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
    line-height: 1.2 !important;
}

#main-header .nav-link, nav .nav-link {
    padding-left: 2px !important;
    padding-right: 2px !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
}

html[dir="rtl"] .nav-link, [dir="rtl"] .nav-link, html[lang="ar"] .nav-link {
    direction: rtl !important;
    flex-direction: row !important;
}

html[dir="rtl"] .nav-link i, [dir="rtl"] .nav-link i, html[lang="ar"] .nav-link i {
    order: 1 !important;
    margin-left: 3px !important;
    margin-right: 0 !important;
    font-size: 8px !important;
}

html[dir="rtl"] .nav-link span, [dir="rtl"] .nav-link span, html[lang="ar"] .nav-link span {
    order: 2 !important;
}

@media (min-width: 1280px) {
    #main-header .nav-link, #main-header .nav-link *, nav .nav-link, nav .nav-link * {
        font-size: 9.5px !important;
    }
    #main-header .nav-link, nav .nav-link {
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
    #main-header .nav-link i, nav .nav-link i {
        font-size: 8.5px !important;
    }
}


/* Core Values & About Cards Border System */
.about-card-item {
    border-width: 2px !important;
    border-style: solid !important;
    border-radius: 55px 10px 55px 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.about-card-item.bg-white {
    border-color: rgba(25, 144, 155, 0.35) !important;
}

.about-card-item.bg-white:hover {
    border-color: #19909B !important;
    box-shadow: 0 20px 35px -10px rgba(25, 144, 155, 0.25) !important;
}

.about-card-item.bg-\[\#C51B6B\] {
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.about-card-item.bg-\[\#C51B6B\]:hover {
    border-color: #ffffff !important;
    box-shadow: 0 20px 35px -10px rgba(197, 27, 107, 0.4) !important;
}


/* Asymmetric Leaf Corner Shapes for Cards (as shown in image 2) */
.about-card-item,
#values-container > div,
#core-values .reveal-on-scroll {
    border-radius: 55px 10px 55px 10px !important;
}


/* Hero Title Line 2 Gradient & Letter N Placement */
.hero-title-line2,
.animated-gradient-text {
    background: linear-gradient(135deg, #19909B 0%, #24ccd9 45%, #C51B6B 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    display: inline-block !important;
}

html[dir="rtl"] .hero-title-line2, [dir="rtl"] .hero-title-line2 {
    padding-right: 1.8em !important;
}


    /* Global Compact Font System for AR & EN across Entire Website */
    html {
        font-size: 14.5px !important;
    }
    
    @media (min-width: 768px) {
        html {
            font-size: 15px !important;
        }
    }
    
    @media (min-width: 1280px) {
        html {
            font-size: 15.5px !important;
        }
    }

    h1 {
        font-size: clamp(1.8rem, 3.2vw + 1rem, 2.8rem) !important;
    }

    h2 {
        font-size: clamp(1.5rem, 2.5vw + 0.8rem, 2.2rem) !important;
    }

    h3 {
        font-size: clamp(1.25rem, 1.8vw + 0.6rem, 1.65rem) !important;
    }

    h4, h5, h6 {
        font-size: clamp(1.1rem, 1.3vw + 0.5rem, 1.35rem) !important;
    }

    p, span, div, li, button, input {
        line-height: 1.75 !important;
    }


    /* Far Right Logo Placement with Zero Right Space */
    #main-header nav {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    html[dir="rtl"] #main-header .logo,
    html[dir="rtl"] #main-header .brand-text,
    [dir="rtl"] #main-header .logo {
        margin-right: 0 !important;
    }


    /* Tight & Compact Navbar Link Spacing */
    #main-header .nav-link, nav .nav-link {
        padding-left: 2px !important;
        padding-right: 2px !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
        gap: 2px !important;
    }


    /* Compact Language Switcher Button */
    .lang-switch {
        padding: 3px 10px !important;
        min-height: 28px !important;
        gap: 4px !important;
    }
    .lang-switch svg {
        width: 14px !important;
        height: 14px !important;
    }
    .lang-switch span {
        font-size: 12px !important;
        font-weight: 700 !important;
    }


    /* Service Card Title Multi-line Wrapping & Containment */
    #services .service-card h3 {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }

    html[lang="en"] #services .service-card h3,
    [dir="ltr"] #services .service-card h3 {
        font-size: clamp(0.95rem, 1.2vw + 0.35rem, 1.25rem) !important;
        line-height: 1.25 !important;
        letter-spacing: normal !important;
        word-break: break-word !important;
        white-space: normal !important;
    }


    /* Brand Logo & Text Gap Elimination & Font Size Boost */
    #main-header .brand-text {
        font-size: clamp(1.35rem, 1.8vw + 0.75rem, 2.1rem) !important;
        font-weight: 900 !important;
        letter-spacing: -0.02em !important;
        margin-left: 1px !important;
        margin-right: 1px !important;
    }

    #main-header .logo {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }


    /* Hero Title Font Size Reduction & English Line 2 'E' Alignment under 't' of technology */
    #home h1, .hero-main-title {
        font-size: clamp(1.45rem, 2.3vw + 0.75rem, 2.25rem) !important;
        line-height: 1.35 !important;
    }

    html[lang="en"] .hero-title-line2,
    [dir="ltr"] .hero-title-line2 {
        padding-left: 2.15em !important;
        padding-right: 0 !important;
        display: inline-block !important;
    }

    html[dir="rtl"] .hero-title-line2,
    [dir="rtl"] .hero-title-line2 {
        padding-right: 1.8em !important;
        padding-left: 0 !important;
    }


    /* Mobile Screen Responsive Optimization for Hero Title & Header */
    @media (max-width: 767px) {
        #home h1, .hero-main-title {
            font-size: clamp(0.95rem, 4vw, 1.25rem) !important;
            line-height: 1.35 !important;
            word-break: break-word !important;
            overflow-wrap: break-word !important;
            max-width: 100% !important;
        }

        html[lang="en"] .hero-title-line2,
        [dir="ltr"] .hero-title-line2 {
            padding-left: 0.5em !important;
            padding-right: 0 !important;
            display: inline-block !important;
        }

        html[dir="rtl"] .hero-title-line2,
        [dir="rtl"] .hero-title-line2 {
            padding-right: 0.5em !important;
            padding-left: 0 !important;
        }

        /* Hide overlapping header slogan/tagline on mobile screens */
        #main-header .site-tagline,
        #main-header .header-slogan,
        #main-header .brand-tagline {
            display: none !important;
        }

        /* Prevent any horizontal overflow on mobile body */
        body, #home, section {
            max-width: 100vw !important;
            overflow-x: hidden !important;
        }
    }


    /* Align 'Advanced' at the exact same left start position as 'Innovating' */
    html[lang="en"] #home .hero-main-title,
    html[lang="en"] #home h1,
    [dir="ltr"] #home .hero-main-title,
    [dir="ltr"] #home h1 {
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        align-items: flex-start !important;
    }

    html[lang="en"] #home .hero-badge-pill,
    [dir="ltr"] #home .hero-badge-pill {
        margin-left: 0 !important;
    }


    /* Zero Gap & Extra Big Brand Logo */
    #main-header .brand-text {
        font-size: clamp(1.65rem, 2.3vw + 0.9rem, 2.65rem) !important;
        font-weight: 900 !important;
        letter-spacing: -0.03em !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #main-header .brand-text span.site-name-part2 {
        margin-left: 2px !important;
        margin-right: 2px !important;
    }

    #main-header .logo {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #main-header div.shrink-0 {
        gap: 0px !important;
    }


/* Mobile Hero Title Font Size Reduction per User Request */
@media (max-width: 767px) {
    #home h1,
    .hero-main-title,
    .hero-title-group,
    .hero-title-group span {
        font-size: clamp(0.95rem, 4vw, 1.25rem) !important;
        line-height: 1.35 !important;
    }
}
@media (max-width: 480px) {
    #home h1,
    .hero-main-title,
    .hero-title-group,
    .hero-title-group span {
        font-size: clamp(0.85rem, 3.8vw, 1.15rem) !important;
        line-height: 1.35 !important;
    }
}


/* About Us Image Height Increase on Read More Toggle */
#about-us-img {
    transition: max-height 0.5s ease-in-out, height 0.5s ease-in-out, transform 0.5s ease-in-out !important;
}

#about-us-img.about-img-expanded {
    max-height: 100% !important;
    height: 100% !important;
    min-height: 280px !important;
}

@media (max-width: 767px) {
    #about-us-img.about-img-expanded {
        max-height: 520px !important;
        min-height: 320px !important;
        height: 100% !important;
    }
}


/* Mobile Cards & Text Overflow Prevention System */
@media (max-width: 767px) {
    /* 1. Prevent justify word-stretching gaps inside narrow cards on mobile */
    #core-values p,
    .about-card-item p,
    #values-container p,
    .service-card p,
    .service-desc {
        text-align: center !important;
        text-justify: auto !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }

    /* 2. Fix Services Card Title Overflow on Mobile */
    #services .service-card h3,
    .service-card h3 {
        font-size: clamp(0.62rem, 2.7vw, 0.85rem) !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        overflow: hidden !important;
        max-width: 100% !important;
        letter-spacing: normal !important;
    }

    /* 3. Ensure Service Card Container Padding & Strict Containment */
    #services .service-card,
    .service-card {
        padding: 0.5rem 0.6rem !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    /* 4. Scale Service Card Descriptions on Mobile */
    #services .service-card .service-desc,
    .service-desc {
        font-size: clamp(0.58rem, 2.3vw, 0.78rem) !important;
        line-height: 1.3 !important;
    }

    /* 5. Scale Core Values Cards Text & Padding on Mobile */
    #core-values .about-card-item,
    .about-card-item {
        padding: 0.5rem 0.4rem !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    #core-values .about-card-item h3,
    .about-card-item h3 {
        font-size: clamp(0.75rem, 3vw, 0.95rem) !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    #core-values .about-card-item p,
    .about-card-item p {
        font-size: clamp(0.6rem, 2.4vw, 0.78rem) !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 480px) {
    #services .service-card h3,
    .service-card h3 {
        font-size: clamp(0.58rem, 2.5vw, 0.78rem) !important;
    }
}


/* English (LTR) Mobile Hero Title Size Reduction & Overflow Fix per User Request */
@media (max-width: 767px) {
    html[lang="en"] #home h1,
    html[lang="en"] .hero-main-title,
    [dir="ltr"] #home h1,
    [dir="ltr"] .hero-main-title,
    [dir="ltr"] .hero-title-group,
    [dir="ltr"] .hero-title-group span,
    [dir="ltr"] [data-i18n="transformDigital"],
    [dir="ltr"] .hero-title-line2 {
        font-size: clamp(0.82rem, 3.7vw, 1.1rem) !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
    }

    html[lang="en"] .hero-title-line2,
    [dir="ltr"] .hero-title-line2 {
        padding-left: 0 !important;
        margin-left: 0 !important;
        white-space: nowrap !important;
        display: block !important;
    }

    [dir="ltr"] [data-i18n="transformDigital"] {
        white-space: nowrap !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    html[lang="en"] #home h1,
    html[lang="en"] .hero-main-title,
    [dir="ltr"] #home h1,
    [dir="ltr"] .hero-main-title,
    [dir="ltr"] .hero-title-group,
    [dir="ltr"] .hero-title-group span,
    [dir="ltr"] [data-i18n="transformDigital"],
    [dir="ltr"] .hero-title-line2 {
        font-size: clamp(0.75rem, 3.4vw, 0.98rem) !important;
        line-height: 1.3 !important;
    }
}


/* Portfolio Tech Stack Badges (Node.js, React, Xampp, PHP Laravel, etc.) Mobile Font Size Reduction */
@media (max-width: 767px) {
    .portfolio-tech-badge {
        font-size: clamp(0.58rem, 2.4vw, 0.72rem) !important;
        padding: 0.15rem 0.45rem !important;
        font-weight: 700 !important;
        letter-spacing: normal !important;
        line-height: 1.2 !important;
        border-radius: 9999px !important;
    }
}

@media (max-width: 480px) {
    .portfolio-tech-badge {
        font-size: clamp(0.55rem, 2.2vw, 0.68rem) !important;
        padding: 0.1rem 0.35rem !important;
    }
}


/* Core Values Grid Items (Trustworthiness, Responsibility, Transparency, etc.) Mobile Overflow Fix */
#values-container h4,
#core-values h4,
.about-card-item h4,
.about-card-item h3 {
    font-size: clamp(1.1rem, 1.6vw + 0.5rem, 1.75rem);
    line-height: 1.2;
}

@media (max-width: 767px) {
    #values-container h4,
    #core-values h4,
    .about-card-item h4,
    .about-card-item h3 {
        font-size: clamp(0.58rem, 2.5vw, 0.82rem) !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
        overflow: hidden !important;
        letter-spacing: -0.02em !important;
        text-align: center !important;
    }

    #values-container p,
    #core-values p,
    .about-card-item p {
        font-size: clamp(0.55rem, 2.2vw, 0.75rem) !important;
        line-height: 1.3 !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    #values-container > div,
    #core-values .reveal-on-scroll {
        padding: 0.6rem 0.35rem !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    #values-container .w-16,
    #values-container .w-20,
    #values-container .w-24,
    #values-container .h-16,
    #values-container .h-20,
    #values-container .h-24 {
        width: 2rem !important;
        height: 2rem !important;
        min-width: 2rem !important;
    }

    #values-container i {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    #values-container h4,
    #core-values h4,
    .about-card-item h4,
    .about-card-item h3 {
        font-size: clamp(0.52rem, 2.3vw, 0.75rem) !important;
    }
}


/* Portfolio & Project Titles (Mama Africa, Digital Age Cloud POS, etc.) Mobile Font Size Reduction */
#portfolio h3,
.portfolio-project-title,
#client-works h3 {
    font-size: clamp(1.25rem, 1.8vw + 0.6rem, 2.2rem);
    line-height: 1.25;
}

@media (max-width: 767px) {
    #portfolio h3,
    .portfolio-project-title,
    #client-works h3 {
        font-size: clamp(0.78rem, 3.2vw, 1.05rem) !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        letter-spacing: -0.01em !important;
    }
}

@media (max-width: 480px) {
    #portfolio h3,
    .portfolio-project-title,
    #client-works h3 {
        font-size: clamp(0.72rem, 2.9vw, 0.95rem) !important;
        line-height: 1.22 !important;
    }
}


/* Service Card Description Increase & Read More Button Decrease on Mobile per User Request */
@media (max-width: 767px) {
    /* 1. Increase Description Text Size on Mobile */
    #services .service-card .service-desc,
    .service-card .service-desc,
    .service-desc {
        font-size: clamp(0.72rem, 2.7vw, 0.88rem) !important;
        line-height: 1.35 !important;
        color: #cbd5e1 !important; /* brighter, clear text */
        font-weight: 500 !important;
    }

    /* 2. Decrease Read More Button Size on Mobile */
    #services .service-card .read-more-btn,
    .service-card .read-more-btn,
    .read-more-btn {
        font-size: clamp(0.58rem, 2.2vw, 0.68rem) !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
        margin-top: 0.25rem !important;
    }
}

@media (max-width: 480px) {
    #services .service-card .service-desc,
    .service-card .service-desc,
    .service-desc {
        font-size: clamp(0.68rem, 2.5vw, 0.82rem) !important;
    }

    #services .service-card .read-more-btn,
    .service-card .read-more-btn,
    .read-more-btn {
        font-size: clamp(0.55rem, 2.0vw, 0.65rem) !important;
    }
}


/* Footer Copyright & Policies Mobile Size Reduction per User Request */
@media (max-width: 767px) {
    .footer-copyright-text {
        font-size: clamp(0.68rem, 2.8vw, 0.85rem) !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
    }

    .footer-policy-links,
    .footer-policy-links a {
        font-size: clamp(0.7rem, 2.9vw, 0.88rem) !important;
    }
}

@media (max-width: 480px) {
    .footer-copyright-text {
        font-size: clamp(0.62rem, 2.5vw, 0.78rem) !important;
    }

    .footer-policy-links,
    .footer-policy-links a {
        font-size: clamp(0.65rem, 2.6vw, 0.82rem) !important;
    }
}



/* Center text and add side padding in About Us Cards (طموحنا, غايتنا, فلسفتنا, التزامنا, رسالتنا) on Mobile per User Request */
@media (max-width: 767px) {
    .about-card-item {
        padding: 0.85rem 1.1rem !important;
        text-align: center !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
    }

    .about-card-item h4 {
        font-size: clamp(0.8rem, 3.4vw, 1rem) !important;
        line-height: 1.25 !important;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .about-card-item p {
        font-size: clamp(0.68rem, 2.7vw, 0.82rem) !important;
        line-height: 1.4 !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        color: inherit !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin: 0 auto !important;
    }

    .about-card-item .w-9,
    .about-card-item .h-9 {
        width: 1.75rem !important;
        height: 1.75rem !important;
        min-width: 1.75rem !important;
    }
}

@media (max-width: 480px) {
    .about-card-item {
        padding: 0.75rem 0.9rem !important;
    }

    .about-card-item p {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem) !important;
        line-height: 1.38 !important;
    }
}



/* Header Brand Text (ديجيتال أيج / Digital Age) Mobile Font Size Reduction per User Request */
@media (max-width: 767px) {
    #main-header .brand-text,
    .brand-text,
    .brand-text span {
        font-size: clamp(0.95rem, 3.8vw, 1.22rem) !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
    }
}

@media (max-width: 480px) {
    #main-header .brand-text,
    .brand-text,
    .brand-text span {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem) !important;
    }
}


/* Portfolio Image Height Expansion on Read More toggle per User Request */
#portfolio .shrink-0 {
    transition: max-height 0.5s ease-in-out, height 0.5s ease-in-out, transform 0.5s ease-in-out !important;
}

#portfolio .shrink-0.portfolio-img-expanded {
    aspect-ratio: auto !important;
    max-height: 100% !important;
    height: 100% !important;
    align-self: stretch !important;
}

@media (max-width: 767px) {
    #portfolio .shrink-0.portfolio-img-expanded {
        max-height: 380px !important;
        min-height: 160px !important;
        height: 100% !important;
    }
}



/* Conditional Portfolio Image Expansion: Rectangle/Square expands height, Circle stays fixed per User Request */
#portfolio .shrink-0 {
    transition: all 0.4s ease-in-out !important;
}

#portfolio .shrink-0 img {
    object-fit: cover !important;
    object-position: center !important;
    transition: all 0.4s ease-in-out !important;
}

#portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded {
    max-height: 100% !important;
    height: 100% !important;
    align-self: stretch !important;
}

#portfolio .shrink-0.rounded-full {
    transform: none !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
}

@media (max-width: 767px) {
    #portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded {
        max-height: 350px !important;
        min-height: 160px !important;
        height: 100% !important;
    }
}



/* Service Card Titles Mobile Font Size Reduction (Digital Transformation, Web App Dev, POS Systems, etc.) per User Request */
@media (max-width: 767px) {
    #services .service-card h3,
    .service-card h3,
    html[lang="en"] #services .service-card h3,
    [dir="ltr"] #services .service-card h3 {
        font-size: clamp(0.65rem, 2.6vw, 0.85rem) !important;
        line-height: 1.25 !important;
        letter-spacing: -0.01em !important;
        font-weight: 800 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
}

@media (max-width: 480px) {
    #services .service-card h3,
    .service-card h3,
    html[lang="en"] #services .service-card h3,
    [dir="ltr"] #services .service-card h3 {
        font-size: clamp(0.6rem, 2.4vw, 0.78rem) !important;
        line-height: 1.22 !important;
}

/* Values Container Mobile Custom Color Rules */
@media (max-width: 1023px) {
    #values-container .val-card-magenta {
        background-color: #C51B6B !important;
        color: #ffffff !important;
        border-color: #C51B6B !important;
    }
    #values-container .val-card-magenta h4,
    #values-container .val-card-magenta p,
    #values-container .val-card-magenta i {
        color: #ffffff !important;
    }
    #values-container .val-card-magenta .icon-box {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    #values-container .val-card-white {
        background-color: #ffffff !important;
        color: #1e293b !important;
        border-color: #e2e8f0 !important;
    }
    #values-container .val-card-white h4,
    #values-container .val-card-white i {
        color: #C51B6B !important;
    }
    #values-container .val-card-white p {
        color: #475569 !important;
    }
    #values-container .val-card-white .icon-box {
        background-color: #fff1f2 !important;
        color: #C51B6B !important;
    }
}


/* Navbar Logo Text Size Reduction (20-25%) & Height Constraints per User Request */
#main-header .brand-text,
.brand-text,
.brand-text span {
    font-size: clamp(1.05rem, 1.2vw + 0.65rem, 1.45rem) !important;
    line-height: 1.15 !important;
}

@media (max-width: 1024px) {
    #main-header .brand-text,
    .brand-text,
    .brand-text span {
        font-size: clamp(0.95rem, 1.1vw + 0.55rem, 1.22rem) !important;
    }
}

@media (max-width: 767px) {
    #main-header .brand-text,
    .brand-text,
    .brand-text span {
        font-size: clamp(0.82rem, 2.8vw, 1.02rem) !important;
    }
}

#main-header div.shrink-0:has(.brand-text),
#main-header .brand-text {
    max-height: 54px !important;
}

@media (max-width: 1024px) {
    #main-header div.shrink-0:has(.brand-text),
    #main-header .brand-text {
        max-height: 44px !important;
    }
}

@media (max-width: 767px) {
    #main-header div.shrink-0:has(.brand-text),
    #main-header .brand-text {
        max-height: 36px !important;
    }
}


/* Header Logo Icon Size Increase per User Request */
#main-header .logo {
    height: 52px !important;
    max-height: 58px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (max-width: 1024px) {
    #main-header .logo {
        height: 44px !important;
        max-height: 48px !important;
    }
}

@media (max-width: 767px) {
    #main-header .logo {
        height: 38px !important;
        max-height: 40px !important;
    }
}


/* Mobile About Card Header Centering, Icon Containment, & Larger Title Font per User Request */
@media (max-width: 767px) {
    .about-card-item {
        padding: 1.25rem 1.15rem !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    .about-card-item > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
    }

    .about-card-item h4 {
        font-size: clamp(1.15rem, 4.2vw, 1.4rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .about-card-item p {
        font-size: clamp(0.85rem, 3.2vw, 1.0rem) !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    .about-card-item .w-9,
    .about-card-item .h-9 {
        width: 2.25rem !important;
        height: 2.25rem !important;
        min-width: 2.25rem !important;
    }
}


/* Semicircle Roadmap Step Titles Full Display on Mobile (No Truncation / Ellipsis) */
#semicircle-roadmap-container h3 {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
    overflow: visible !important;
}

@media (max-width: 767px) {
    #semicircle-roadmap-container h3 {
        font-size: clamp(0.85rem, 3.4vw, 1.15rem) !important;
        line-height: 1.3 !important;
    }
}


/* Animated Flow & Glow Effects for Roadmap Arc Line */
.roadmap-base-line {
    animation: roadmapPulseGlow 3s ease-in-out infinite alternate;
}

.roadmap-flow-line {
    stroke-dasharray: 25 75;
    stroke-dashoffset: 200;
    animation: roadmapFlowBeam 3s linear infinite, roadmapPulseGlow 3s ease-in-out infinite alternate;
    opacity: 0.95;
    filter: drop-shadow(0 0 10px #00F2FE) drop-shadow(0 0 18px #FF2E93);
}

@keyframes roadmapFlowBeam {
    0% {
        stroke-dashoffset: 200;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes roadmapPulseGlow {
    0% {
        filter: drop-shadow(0 0 6px rgba(197, 27, 107, 0.5)) drop-shadow(0 0 12px rgba(25, 144, 155, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 18px rgba(255, 46, 147, 0.95)) drop-shadow(0 0 28px rgba(0, 242, 254, 0.95));
    }
}


/* Remove excessive top space above 'Our Values / Our Vision' badge on Mobile (<= 768px) */
@media (max-width: 768px) {
    #about {
        padding-bottom: 0.75rem !important;
        margin-bottom: 0 !important;
    }

    #core-values {
        padding-top: 1.25rem !important;
        padding-bottom: 2rem !important;
        margin-top: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        justify-content: flex-start !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #core-values > div {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    #core-values .max-w-5xl {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 1.25rem !important;
        transform: none !important;
    }

    #core-values .max-w-5xl > div:first-child,
    #core-values .mb-4 {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 0.75rem !important;
        transform: none !important;
    }

    #core-values .max-w-5xl span.inline-flex {
        margin-top: 0 !important;
        transform: none !important;
    }
}


/* Portfolio Image Height Expansion matching expanded card height per User Request */
#portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded {
    aspect-ratio: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    align-self: stretch !important;
}

#portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 767px) {
    #portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded {
        aspect-ratio: auto !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        align-self: stretch !important;
    }

    #portfolio .shrink-0:not(.rounded-full).portfolio-img-expanded img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }
}


/* Fix for English LTR Mobile Word Spacing / Stretched Gaps per User Request */
html[lang="en"] p,
[dir="ltr"] p,
html[lang="en"] .about-desc-container p,
[dir="ltr"] .about-desc-container p {
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

@media (max-width: 768px) {
    html[lang="en"] p,
    [dir="ltr"] p {
        text-align: left !important;
        text-justify: auto !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
    }
}


/* Increased Services Card Description Font Size per User Request */
#services .service-card .service-desc,
.service-card .service-desc,
.service-desc {
    font-size: clamp(0.92rem, 0.8vw + 0.65rem, 1.15rem) !important;
    line-height: 1.65 !important;
}

@media (max-width: 768px) {
    #services .service-card .service-desc,
    .service-card .service-desc,
    .service-desc {
        font-size: clamp(0.88rem, 1.5vw + 0.6rem, 1.05rem) !important;
        line-height: 1.6 !important;
    }
}
