/* DigiCode Homepage Safe Improvements v3.4
 * Non-destructive layer: keeps original backgrounds, slider images, section colors,
 * hexagonal shapes, card layouts, and visual identity exactly as provided by the theme.
 */

/* ---------------- Typography system ---------------- */
.hero-title,
.services-section-header .main-title,
.service-clean-card h3,
.service-title,
.service-title a,
.digi-logos-slider-section h2,
.premium-why-content h2,
.p-card-title,
.achievements-header h2,
.achieve-label,
.testimonials-header h2,
.client-details h4,
.cta-contact-text h2,
.digicode-newsletter h3,
.btn,
.cta-action-controls a,
.digicode-newsletter button {
    font-family: var(--font-headers, "Cairo", sans-serif) !important;
    text-rendering: optimizeLegibility;
}

.hero-subtitle,
.services-section-header .section-desc,
.service-clean-card p,
.service-subtitle,
.service-desc,
.digi-logos-slider-section p,
.premium-why-content p,
.p-card-desc,
.premium-stat-text,
.achievements-header p,
.testimonials-header p,
.testimonial-text,
.client-details span,
.cta-contact-text p,
.cta-trust-badge,
.digicode-newsletter > p,
.digicode-newsletter input {
    font-family: var(--font-main, "Sakkal Majalla", "Cairo", sans-serif) !important;
    text-rendering: optimizeLegibility;
}

.counter-wrapper,
.achieve-number,
.counter-symbol {
    font-family: var(--font-accent, "Questv1", "Cairo", sans-serif) !important;
}

/* Preserve the theme's original color hierarchy. */
.services-section-header .main-title,
.service-clean-card h3,
.service-title a,
.testimonials-header h2 {
    color: var(--primary-blue, #3b71b9) !important;
}

.services-section-header .sub-title,
.hero-title .highlight,
.brand-highlight {
    color: var(--accent-green, #5bc4bf) !important;
}

/* ---------------- Hero: same images and colors, safer responsive text ---------------- */
.hero-slide-item {
    background-size: cover;
    background-position: center;
}

.hero-content-box {
    max-width: min(760px, 58%);
}

.hero-title {
    font-size: clamp(2.45rem, 4.15vw, 3.8rem);
    line-height: 1.18;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: clamp(1.15rem, 1.7vw, 1.6rem);
    line-height: 1.7;
    max-width: 700px;
}

.hero-btns {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

/* Keep original button colors; only unify dimensions, typography, interaction. */
.btn,
.cta-action-controls a,
.digicode-newsletter button,
.digi-more-btn {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover,
.cta-action-controls a:hover,
.digicode-newsletter button:hover,
.digi-more-btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible,
.cta-action-controls a:focus-visible,
.digicode-newsletter button:focus-visible,
.digicode-newsletter input:focus-visible,
.digi-more-btn:focus-visible,
.swiper-nav-next:focus-visible,
.swiper-nav-prev:focus-visible {
    outline: 3px solid rgba(91, 196, 191, .48);
    outline-offset: 3px;
}

/* Reset browser defaults after changing slider navigation elements to buttons. */
.hero-slider .swiper-nav-next,
.hero-slider .swiper-nav-prev {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

/* ---------------- Features: equal rhythm, original cards untouched ---------------- */
.services-wrapper .services-grid {
    align-items: stretch;
}

.service-clean-card {
    height: 100%;
}

.service-clean-card .card-body {
    height: 100%;
}

.service-clean-card h3 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.4;
}

.service-clean-card p {
    font-size: clamp(1.12rem, 1.45vw, 1.45rem);
    line-height: 1.65;
}

/* ---------------- Services: image consistency only ---------------- */
.digi-service-slide-card {
    height: 100%;
}

.service-graphic-box {
    overflow: hidden;
}

.service-graphic-box .service-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-title a {
    line-height: 1.45;
}

/* ---------------- Logos: preserve hexagons and animation ---------------- */
.logo-item img {
    object-fit: contain;
}

.logos-slider-wrapper:hover .logos-slide-track,
.logos-slider-wrapper:focus-within .logos-slide-track {
    animation-play-state: paused;
}

/* ---------------- Why us, achievements, testimonials ---------------- */
.premium-feature-card,
.testimonial-card {
    height: 100%;
}

.premium-why-content h2,
.achievements-header h2,
.testimonials-header h2,
.cta-contact-text h2 {
    line-height: 1.3;
    text-wrap: balance;
}

.testimonial-text {
    line-height: 1.75;
}

.client-img img {
    object-fit: cover;
}

/* Keep original achievements gradient and hexagonal mask untouched. */
.achievement-item,
.logo-item {
    isolation: isolate;
}

/* ---------------- CTA: original colors/background, compact newsletter ---------------- */
.digi-cta-contact-section .cta-contact-wrapper {
    max-width: 900px;
}

.digi-cta-contact-section .cta-action-controls {
    align-items: center;
}

.digi-cta-contact-section .cta-action-controls a {
    justify-content: center;
}

.digi-cta-contact-section .cta-newsletter-slot {
    width: 100%;
    margin-top: 22px;
}

.digi-cta-contact-section .digicode-newsletter {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .97);
    color: var(--black-fakhim, #172338);
    box-shadow: 0 14px 34px rgba(8, 22, 43, .18);
}

.digi-cta-contact-section .digicode-newsletter h3 {
    margin: 0 0 6px;
    color: var(--black-fakhim, #172338);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

.digi-cta-contact-section .digicode-newsletter > p {
    margin: 0 0 14px;
    color: var(--text-dim, #5f6b7b);
}

.digi-cta-contact-section .digicode-newsletter form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(100%, 500px);
    margin: 0 auto;
}

.digi-cta-contact-section .digicode-newsletter input[type="email"] {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #d5ddea;
    border-radius: 13px;
    background: #fff;
    color: #172338;
}

.digi-cta-contact-section .digicode-newsletter button {
    min-width: 116px;
    height: 46px;
    padding: 0 20px;
    border: 0;
    background: linear-gradient(135deg, var(--primary-blue, #3b71b9), var(--black-fakhim, #172f55));
    color: #fff;
}

/* ---------------- English layout support only ---------------- */
body.ltr .hero-content-box,
body.ltr .services-section-header,
body.ltr .premium-why-content,
body.ltr .achievements-header,
body.ltr .testimonials-header,
body.ltr .cta-contact-wrapper {
    direction: ltr;
}

body.ltr .hero-content-box,
body.ltr .premium-why-content {
    text-align: left;
}

/* ---------------- Responsive, without changing original design language ---------------- */
@media (max-width: 1024px) {
    .hero-content-box {
        max-width: 68%;
    }
}

@media (max-width: 768px) {
    .hero-content-box {
        width: 100% !important;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(1.9rem, 8vw, 2.55rem);
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: clamp(1.05rem, 4.8vw, 1.3rem);
        line-height: 1.65;
    }

    .hero-btns {
        gap: 10px;
    }

    .hero-btns .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .service-clean-card h3 {
        font-size: 1.55rem;
    }

    .service-clean-card p {
        font-size: 1.18rem;
    }

    .digi-cta-contact-section .digicode-newsletter {
        padding: 16px 14px;
    }

    .digi-cta-contact-section .digicode-newsletter form {
        grid-template-columns: 1fr;
    }

    .digi-cta-contact-section .digicode-newsletter button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logos-slide-track {
        animation-play-state: paused !important;
    }

    .btn,
    .cta-action-controls a,
    .digi-more-btn,
    .service-clean-card,
    .digi-service-slide-card,
    .testimonial-card {
        transition: none !important;
    }
}

/* ========================================================================
   DigiCode Visual Polish v3.8 â€” Phase 1
   Safe visual refinements only. Does not alter header, slider images,
   section backgrounds, hexagonal masks, content order, or layout structure.
   ======================================================================== */

/* 1) Better secondary-text readability while preserving the original fonts. */
.services-section-header .section-desc,
.service-clean-card p,
.premium-lead-desc,
.p-card-text p,
.achievements-header p,
.testimonials-header p,
.testimonial-text,
.footer-desc {
    color: #59677a !important;
    text-rendering: optimizeLegibility;
}

.services-section-header .section-desc,
.premium-lead-desc,
.achievements-header p,
.testimonials-header p {
    max-width: 820px;
    line-height: 1.85 !important;
}

/* 2) One consistent visual language for small section labels. */
.services-section-header .sub-title,
.premium-tagline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin-bottom: 10px;
    color: var(--accent-green, #5bc4bf) !important;
    font: 800 .92rem/1.35 var(--font-headers, "Cairo", sans-serif) !important;
    letter-spacing: .01em;
}

.services-section-header .main-title,
.premium-main-title,
.achievements-header h2,
.testimonials-header h2 {
    text-wrap: balance;
}

/* 3) Feature cards: equal vertical rhythm without changing their design. */
.services-wrapper .services-grid {
    align-items: stretch;
}

.service-clean-card {
    display: flex;
    height: 100%;
}

.service-clean-card .card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.service-clean-card .card-icon {
    flex: 0 0 auto;
}

.service-clean-card h3 {
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    text-align: center;
}

.service-clean-card p {
    margin-top: 0;
    margin-bottom: 0;
    font-size: clamp(1.08rem, 1.35vw, 1.28rem) !important;
    line-height: 1.72 !important;
    text-align: center;
}

/* 4) Service cards: consistent title area and cleaner copy on hover/mobile. */
.digi-service-slide-card {
    isolation: isolate;
}

.service-title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9em;
    margin: 0 0 12px;
    line-height: 1.42 !important;
    text-wrap: balance;
}

.service-excerpt-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin-bottom: 16px;
    color: #5c697b !important;
    line-height: 1.65 !important;
}

.digi-more-btn {
    min-width: 150px;
    box-shadow: 0 8px 18px rgba(91, 196, 191, .18);
}

/* 5) Why-us: improve rhythm, not the composition or image. */
.premium-why-content {
    align-self: center;
}

.premium-main-title {
    margin-bottom: 16px !important;
    line-height: 1.32 !important;
}

.premium-lead-desc {
    margin-bottom: 26px !important;
    font-size: clamp(1.05rem, 1.4vw, 1.22rem) !important;
}

.premium-features-grid {
    gap: 18px !important;
}

.premium-feature-card {
    align-items: flex-start;
}

.p-card-text h3 {
    margin-bottom: 7px !important;
    color: var(--primary-blue, #3b71b9) !important;
    line-height: 1.45 !important;
    text-wrap: balance;
}

.p-card-text p {
    margin-bottom: 0;
    line-height: 1.75 !important;
}

/* 6) Testimonials: equal-height cards and calmer reading. */
.testimonials-grid {
    align-items: stretch;
}

.testimonial-card {
    height: 100%;
    padding: 24px 22px !important;
}

.testimonial-text {
    margin: 0 0 20px !important;
    font-size: clamp(1.12rem, 1.25vw, 1.24rem) !important;
    line-height: 1.75 !important;
    text-align: start !important;
    hyphens: none;
}

.client-info {
    margin-top: auto;
}

.client-details h4 {
    line-height: 1.35;
}

.client-details span {
    line-height: 1.45;
}

.quote-icon {
    margin-bottom: 4px !important;
    opacity: .78;
}

/* 7) Footer: improved contrast and spacing only. */
.site-footer .footer-container {
    align-items: flex-start;
}

.footer-desc {
    color: #4e5d70 !important;
    line-height: 1.85 !important;
}

.footer-title {
    margin-bottom: 20px !important;
}

.footer-list li,
.footer-services-grid li {
    margin-bottom: 11px;
}

.footer-list li a,
.footer-services-grid li a,
.contact-item,
.contact-item a {
    line-height: 1.65;
}

.footer-contact-info {
    gap: 14px !important;
}

.footer-contact-info a[href^="tel:"],
.footer-contact-info a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.footer-copyright {
    letter-spacing: 0;
}

/* 8) Keyboard focus: visible, consistent, and within the original palette. */
.service-title a:focus-visible,
.footer-list a:focus-visible,
.footer-services-grid a:focus-visible,
.footer-contact-info a:focus-visible,
.client-info a:focus-visible {
    outline: 3px solid rgba(91, 196, 191, .46);
    outline-offset: 3px;
    border-radius: 5px;
}

/* 9) LTR language support without reversing visual identity. */
body.ltr .service-clean-card p,
body.ltr .service-title,
body.ltr .service-excerpt-text,
body.ltr .premium-why-content,
body.ltr .testimonial-text,
body.ltr .footer-col {
    text-align: left !important;
}

body.ltr .service-clean-card h3,
body.ltr .service-title {
    justify-content: flex-start;
}

/* 10) Mobile refinements. No section redesign. */
@media (max-width: 768px) {
    .services-section-header .section-desc,
    .premium-lead-desc,
    .achievements-header p,
    .testimonials-header p {
        font-size: 1.05rem !important;
        line-height: 1.75 !important;
    }

    .service-clean-card h3 {
        min-height: auto;
    }

    .service-title {
        min-height: auto;
        margin-bottom: 6px;
    }

    .service-excerpt-text {
        display: block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        margin-bottom: 9px;
    }

    .testimonial-card {
        padding: 20px !important;
    }

    .testimonial-text {
        font-size: 1.14rem !important;
        line-height: 1.68 !important;
    }

    .site-footer .footer-container {
        gap: 30px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-clean-card,
    .digi-service-slide-card,
    .premium-feature-card,
    .testimonial-card,
    .digi-more-btn,
    .footer-list a,
    .footer-services-grid a {
        transition: none !important;
    }
}

/* ========================================================================
   DigiCode Visual Polish Hotfix v3.8.1
   - Put the green accent line BELOW feature titles again.
   - Slightly reduce the gap between service image and title.
   ======================================================================== */

/* 1) Feature titles: do not use flex on the h3 itself, so ::after sits below text. */
.service-clean-card h3 {
    display: block !important;
    min-height: 2.8em;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.service-clean-card h3::after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    background-color: var(--accent-green, #5bc4bf);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 2) Service cards: reduce the top gap a little between image and title. */
.service-sliding-info {
    height: 74px;
    padding: 11px 14px 10px;
}

.digi-service-slide-card:hover .service-sliding-info {
    height: 252px;
}

.service-title {
    min-height: 2.55em;
    margin: 0 0 8px;
    line-height: 1.35 !important;
}

@media (max-width: 768px) {
    .service-clean-card h3 {
        min-height: auto;
    }

    .service-sliding-info {
        height: 70px;
        padding-top: 10px;
    }

    .service-title {
        min-height: auto;
        margin-bottom: 6px;
    }
}

/* ========================================================================
   DigiCode Homepage Mobile & Accessibility v3.9 â€” Phase 2
   Safe responsive/accessibility layer only. Original colors, images,
   backgrounds, hexagons, card identity, header and section order remain intact.
   ======================================================================== */

/* Anchor links should not hide behind the sticky header. */
#homepage-hero,
#services-boxes,
#services,
.digi-logos-slider-section,
.digi-premium-why-us,
.digi-achievements-section,
.digi-testimonials-section,
#cta-contact {
    scroll-margin-top: 110px;
}

/* Accessible touch sizes without recoloring controls. */
.hero-btns .btn,
.digi-more-btn,
.cta-action-controls a,
.digicode-newsletter button,
.swiper-nav-next,
.swiper-nav-prev,
.back-to-top {
    min-width: 44px;
    min-height: 44px;
}

/* A single, visible keyboard-focus language across the homepage. */
.home .hero-btns a:focus-visible,
.home .service-title a:focus-visible,
.home .digi-more-btn:focus-visible,
.home .cta-action-controls a:focus-visible,
.home .digicode-newsletter input:focus-visible,
.home .digicode-newsletter button:focus-visible,
.home .swiper-nav-next:focus-visible,
.home .swiper-nav-prev:focus-visible,
.home .footer-list a:focus-visible,
.home .footer-services-grid a:focus-visible,
.home .footer-contact-info a:focus-visible {
    outline: 3px solid rgba(91, 196, 191, .62) !important;
    outline-offset: 4px !important;
}

/* Keyboard users can reveal the same service information as mouse users. */
.digi-service-slide-card:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .2);
}

.digi-service-slide-card:focus-within .service-sliding-info {
    height: 252px;
}

.digi-service-slide-card:focus-within .sliding-content-inner {
    opacity: 1;
}

/* Avoid horizontal overflow caused by long Arabic/English words. */
.hero-title,
.hero-subtitle,
.service-clean-card h3,
.service-clean-card p,
.service-title,
.service-excerpt-text,
.premium-main-title,
.p-card-text h3,
.p-card-text p,
.testimonial-text,
.cta-contact-text h2,
.cta-contact-text p {
    overflow-wrap: anywhere;
}

/* Tablet refinement. */
@media (max-width: 1024px) {
    .hero-content-box {
        max-width: 64%;
    }

    .services-grid {
        gap: 22px;
    }

    .service-clean-card {
        padding-inline: 22px;
    }

    .premium-why-wrapper {
        gap: 46px;
    }

    .testimonials-grid.cards-count-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Main mobile layout: 360 / 390 / 412 / 768px. */
@media (max-width: 768px) {
    /* Hero stays visually identical, but text and controls fit smaller screens. */
    .hero-slide-item {
        min-height: 620px;
        background-position: center;
    }

    .slide-inner {
        min-height: 620px;
        padding-inline: 18px;
    }

    .hero-content-box {
        width: 100% !important;
        max-width: 100% !important;
        padding: 24px 16px;
    }

    .hero-title {
        font-size: clamp(1.9rem, 8.4vw, 2.5rem) !important;
        line-height: 1.24 !important;
    }

    .hero-subtitle {
        max-width: 100%;
        font-size: clamp(1.02rem, 4.7vw, 1.24rem) !important;
        line-height: 1.7 !important;
    }

    .top-badge {
        max-width: 100%;
        white-space: normal;
        line-height: 1.45;
    }

    .hero-btns {
        justify-content: center;
        gap: 10px;
    }

    .hero-btns .btn {
        padding: 11px 18px;
    }

    .hero-slider .swiper-nav-next,
    .hero-slider .swiper-nav-prev {
        width: 42px;
        height: 42px;
    }

    /* Feature cards keep the same design and become comfortably readable. */
    .services-wrapper {
        overflow: hidden;
    }

    .services-wrapper .services-grid {
        width: 100%;
        gap: 18px;
        padding-inline: 14px;
    }

    .service-clean-card {
        width: 100%;
        max-width: 520px;
        padding: 26px 20px;
    }

    .service-clean-card .card-icon img {
        width: 66px;
        margin-bottom: 16px;
    }

    .service-clean-card h3 {
        font-size: 1.55rem !important;
        line-height: 1.38 !important;
    }

    .service-clean-card p {
        font-size: 1.08rem !important;
        line-height: 1.72 !important;
    }

    /* Services remain swipe-friendly and retain their original card identity. */
    .services-interactive-grid {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
        padding-inline: max(16px, calc((100vw - 330px) / 2));
        padding-bottom: 16px;
    }

    .digi-service-slide-card {
        flex: 0 0 min(82vw, 310px) !important;
        width: min(82vw, 310px);
        height: 300px !important;
        scroll-snap-align: center;
    }

    .service-sliding-info {
        height: 70px;
        padding: 10px 12px 9px;
    }

    .service-title {
        font-size: 1.28rem !important;
        line-height: 1.35 !important;
    }

    /* Partner logos keep their hexagons but fit mobile width. */
    .logo-item {
        width: 104px;
        height: 104px;
        margin-inline: 12px;
        padding: 10px;
    }

    /* Why-us becomes one column without changing its styling. */
    .premium-why-wrapper {
        grid-template-columns: 1fr !important;
        gap: 38px !important;
    }

    .premium-why-content,
    body.ltr .premium-why-content {
        text-align: start !important;
    }

    .premium-main-title {
        font-size: clamp(1.9rem, 7.4vw, 2.5rem) !important;
    }

    .premium-features-grid {
        gap: 18px !important;
    }

    .premium-feature-card {
        gap: 15px !important;
        padding: 14px !important;
    }

    .p-card-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .visual-container {
        height: min(110vw, 480px) !important;
    }

    /* Achievements preserve hexagons in a balanced 2Ã—2 grid. */
    .achievements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px 10px !important;
        padding-inline: 10px;
    }

    .achievement-item {
        width: 100%;
        max-width: 170px;
    }

    /* Testimonials become one clean column. */
    .testimonials-grid.cards-count-4,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .testimonial-card {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
    }

    .testimonial-text {
        font-size: 1.08rem !important;
        line-height: 1.72 !important;
    }

    /* Footer links stay easy to tap. */
    .site-footer a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }
}

/* Small phones. */
@media (max-width: 480px) {
    #homepage-hero,
    #services-boxes,
    #services,
    .digi-logos-slider-section,
    .digi-premium-why-us,
    .digi-achievements-section,
    .digi-testimonials-section,
    #cta-contact {
        scroll-margin-top: 92px;
    }

    .hero-slide-item,
    .slide-inner {
        min-height: 580px;
    }

    .hero-content-box {
        padding-inline: 8px;
    }

    .hero-title {
        font-size: clamp(1.72rem, 8.5vw, 2.15rem) !important;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .hero-btns .btn {
        width: min(100%, 290px);
    }

    .services-section-header,
    .achievements-header,
    .testimonials-header {
        padding-inline: 16px;
    }

    .services-section-header .main-title,
    .achievements-header h2,
    .testimonials-header h2 {
        font-size: 1.8rem !important;
        line-height: 1.35 !important;
    }

    .digi-service-slide-card {
        flex-basis: min(86vw, 300px) !important;
        width: min(86vw, 300px);
    }

    .logo-item {
        width: 94px;
        height: 94px;
        margin-inline: 10px;
    }

    .premium-feature-card {
        align-items: flex-start;
    }

    .p-card-text h3 {
        font-size: 1.15rem !important;
    }

    .achievements-grid {
        gap: 14px 6px !important;
    }

    .achievement-item {
        max-width: 150px;
    }

    .achieve-label {
        font-size: .9rem !important;
    }
}

/* Very narrow phones: keep 2-column achievements if possible, otherwise one. */
@media (max-width: 340px) {
    .achievements-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Respect motion preferences everywhere on the homepage. */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    .logos-slide-track {
        animation: none !important;
        transform: none !important;
    }

    .hero-slider *,
    .service-clean-card,
    .digi-service-slide-card,
    .premium-feature-card,
    .testimonial-card,
    .btn,
    .digi-more-btn,
    .cta-action-controls a,
    .back-to-top {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* DigiCode v4.1: use the optimized homepage image variants without changing crops or layout. */
.hero-slide-item {
    background-image: var(--hero-image-desktop) !important;
}

@media (max-width: 768px) {
    .hero-slide-item {
        background-image: var(--hero-image-mobile, var(--hero-image-desktop)) !important;
    }
}

/* ========================================================================
   DigiCode v4.2 â€” Final Mobile + Desktop Performance & Accessibility
   Lightweight hero, stronger contrast, explicit stable layout, and polished
   responsive behavior. The visual identity and section order are unchanged.
   ======================================================================== */

:root {
    --accent-accessible: #267872;
    --accent-accessible-dark: #1f6268;
}

/* Lightweight hero slider: replaces the homepage Swiper dependency. */
.hero-slider .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider .hero-slide-item {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .72s ease, visibility .72s step-end;
}

.hero-slider .hero-slide-item.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .72s ease;
}

.hero-slider .swiper-pagination {
    position: absolute;
    z-index: 5;
    inset-inline: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    pointer-events: none;
}

.hero-slider .hero-pagination-bullet {
    width: 11px;
    height: 11px;
    min-width: 11px;
    min-height: 11px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    cursor: pointer;
    pointer-events: auto;
    transition: width .2s ease, background-color .2s ease, transform .2s ease;
}

.hero-slider .hero-pagination-bullet.is-active {
    width: 29px;
    background: #fff;
}

.hero-slider .hero-pagination-bullet:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.hero-slider .swiper-nav-next,
.hero-slider .swiper-nav-prev {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 50%;
    background: rgba(16, 40, 72, .58);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-slider .swiper-nav-next { inset-inline-end: 18px; }
.hero-slider .swiper-nav-prev { inset-inline-start: 18px; }
.hero-slider .swiper-nav-next svg,
.hero-slider .swiper-nav-prev svg { width: 22px; height: 22px; }

/* Text/background contrast corrections identified by Lighthouse. */
.services-section-header .sub-title,
.premium-tagline {
    color: var(--accent-accessible) !important;
}

.top-badge,
.btn-main,
.digi-more-btn {
    background-color: var(--accent-accessible) !important;
    border-color: var(--accent-accessible) !important;
    color: #fff !important;
}

.btn-main:hover,
.digi-more-btn:hover,
.digi-more-btn:focus-visible {
    background-color: #fff !important;
    color: var(--accent-accessible-dark) !important;
    border-color: #fff !important;
}

.achievements-header p {
    color: rgba(255, 255, 255, .94) !important;
}

.digi-cta-corporate .cta-corporate-primary {
    background: linear-gradient(135deg, var(--accent-accessible), var(--accent-accessible-dark));
    color: #fff;
}

.digi-cta-corporate .cta-corporate-description,
.digi-cta-corporate .cta-corporate-phone,
.digi-cta-corporate .cta-corporate-trust > span {
    color: rgba(255, 255, 255, .92);
}

.brand-copyright.green-text {
    color: #eafffd !important;
}

/* Updated semantic heading selector after h4 -> h3 accessibility repair. */
.client-details h3 {
    margin: 0 0 4px;
    color: var(--primary-blue, #3b71b9);
    font-family: var(--font-headers, "Cairo", sans-serif) !important;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.35;
}

/* Stable media boxes and less layout movement. */
.service-thumb,
.logo-item img,
.client-img img,
.card-icon img,
.achieve-icon-img img,
.footer-logo-box img,
.card-watermark-logo img {
    height: auto;
}

.service-graphic-box {
    aspect-ratio: 301 / 251;
}

.card-watermark-logo img {
    width: 50px;
    height: 50px;
}

.footer-logo-box img {
    width: 90px;
    height: 80px;
    object-fit: contain;
}

/* The back-to-top control is removed from layout until it is needed. */
.back-to-top { display: none !important; }
.back-to-top.is-visible { display: flex !important; }

/* Footer semantics changed without changing its appearance. */
.footer-brand-name {
    line-height: 1.35;
}

/* Better desktop balance without changing card identities. */
@media (min-width: 769px) {
    .digi-testimonials-section .testimonial-card {
        min-height: 360px;
    }

    .services-interactive-grid {
        align-items: stretch;
    }
}

/* Mobile refinements verified against 360/390/412/768 widths. */
@media (max-width: 768px) {
    .hero-slider .swiper-nav-next,
    .hero-slider .swiper-nav-prev {
        top: auto;
        bottom: 10px;
        width: 38px;
        height: 38px;
        transform: none;
    }

    .hero-slider .swiper-nav-next { inset-inline-end: 14px; }
    .hero-slider .swiper-nav-prev { inset-inline-start: 14px; }
    .hero-slider .swiper-pagination { bottom: 22px; }

    .hero-content-box {
        margin-inline: auto;
    }

    .services-interactive-grid {
        scroll-padding-inline: 16px;
    }

    .testimonials-grid.cards-count-4,
    .testimonials-grid {
        display: grid !important;
        width: 100% !important;
        overflow: visible !important;
        padding-inline: 0 !important;
    }

    .testimonial-card {
        flex: none !important;
    }

    .site-footer {
        padding-top: 42px !important;
    }

    .site-footer .footer-container {
        gap: 28px !important;
    }

    .footer-copyright {
        margin-top: 38px !important;
        padding-inline: 70px !important;
    }
}

@media (max-width: 430px) {
    .hero-slider .swiper-nav-next,
    .hero-slider .swiper-nav-prev {
        display: none;
    }

    .hero-slider .swiper-pagination {
        bottom: 14px;
    }

    .service-clean-card {
        border-radius: 18px;
    }

    .premium-feature-card {
        padding-inline: 8px !important;
    }

    .footer-copyright {
        padding-inline: 62px !important;
        font-size: .92rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider .hero-slide-item,
    .hero-slider .hero-pagination-bullet {
        transition: none !important;
    }
}

body.rtl .hero-slider .swiper-nav-next svg,
body.rtl .hero-slider .swiper-nav-prev svg {
    transform: scaleX(-1);
}


/* ========================================================================
   DigiCode v4.2.1 â€” Lighthouse Touch Target + ARIA Hotfix
   Enlarges the clickable pagination target without enlarging the visible dot.
   ======================================================================== */
.hero-slider .swiper-pagination {
    gap: 0;
}

.hero-slider .hero-pagination-bullet,
.hero-slider .hero-pagination-bullet.is-active {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hero-slider .hero-pagination-bullet::before {
    content: "";
    display: block;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    transition: width .2s ease, background-color .2s ease, transform .2s ease;
}

.hero-slider .hero-pagination-bullet.is-active::before {
    width: 29px;
    background: #fff;
}

.hero-slider .hero-pagination-bullet:hover::before {
    transform: scale(1.08);
}

.hero-slider .hero-pagination-bullet:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 0;
    border-radius: 999px;
}

/* Keep compact controls visually unchanged while meeting minimum target sizing. */
@media (pointer: coarse), (max-width: 768px) {
    .mobile-only-social .social-hex,
    .site-header .menu-toggle,
    .site-header .header-cta .btn-start,
    .digi-cta-contact-section .cta-action-controls a,
    .digicode-newsletter button,
    .back-to-top {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========================================================================
   DigiCode v4.2.4 â€” English-only safe alignment layer
   Restores the v4.2 slider engine and adjusts only English text alignment.
   ======================================================================== */
body.ltr #homepage-hero .hero-content-box {
    width: 48%;
    max-width: min(700px, 48%);
    text-align: left !important;
}

body.ltr #homepage-hero .hero-title {
    max-width: 12ch;
    font-size: clamp(2.55rem, 3.45vw, 3.85rem);
    line-height: 1.16;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

body.ltr #homepage-hero .hero-subtitle {
    max-width: 38rem;
    font-size: clamp(1.05rem, 1.25vw, 1.3rem);
    line-height: 1.7;
}

body.ltr #homepage-hero .hero-btns {
    justify-content: flex-start;
}

/* Center English service-card copy and hover details. */
body.ltr .services-section-header,
body.ltr .services-section-header .sub-title,
body.ltr .services-section-header .main-title,
body.ltr .services-section-header .section-desc,
body.ltr .digi-service-slide-card,
body.ltr .service-sliding-info,
body.ltr .sliding-content-inner,
body.ltr .service-title,
body.ltr .service-title a,
body.ltr .service-excerpt-text,
body.ltr .testimonials-header,
body.ltr .testimonials-header h2,
body.ltr .testimonials-header p {
    text-align: center !important;
}

body.ltr .service-sliding-info,
body.ltr .sliding-content-inner {
    align-items: center;
}

body.ltr .service-title {
    justify-content: center !important;
    margin-inline: auto;
}

body.ltr .digi-more-btn {
    margin-inline: auto;
}

@media (max-width: 1024px) {
    body.ltr #homepage-hero .hero-content-box {
        width: 58%;
        max-width: 58%;
    }
}

@media (max-width: 768px) {
    body.ltr #homepage-hero .hero-content-box {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-inline: auto;
    }

    body.ltr #homepage-hero .hero-title,
    body.ltr #homepage-hero .hero-subtitle {
        max-width: none;
        text-align: center !important;
    }

    body.ltr #homepage-hero .hero-btns {
        justify-content: center;
    }
}
/* ========================================================================== 
   DigiCode v4.2.14 - Unified homepage/services card identity
   The homepage-only stylesheet now mirrors the approved services-page card.
   ========================================================================== */

#services.digi-services-block .digi-service-slide-card {
    height: 340px !important;
}

#services.digi-services-block .service-sliding-info {
    box-sizing: border-box;
    height: 92px !important;
    min-height: 92px;
    padding: 12px 14px !important;
    justify-content: center !important;
    background: var(--white, #ffffff) !important;
}

#services.digi-services-block .service-title {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0 !important;
    margin: 0 !important;
    font-size: clamp(1.1rem, 1.3vw, 1.48rem) !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

#services.digi-services-block .sliding-content-inner {
    max-height: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#services.digi-services-block .digi-more-btn {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 10px 24px !important;
    background: var(--accent-green, #5bc4bf) !important;
    border: 2px solid var(--accent-green, #5bc4bf) !important;
    border-radius: 30px !important;
    box-shadow: none !important;
    color: var(--white, #ffffff) !important;
    transform: none !important;
}

#services.digi-services-block .digi-more-btn:hover,
#services.digi-services-block .digi-more-btn:focus-visible {
    background: transparent !important;
    border-color: var(--accent-green, #5bc4bf) !important;
    color: var(--accent-green, #5bc4bf) !important;
    transform: none !important;
}

@media (hover: hover) and (pointer: fine) {
    #services.digi-services-block .digi-service-slide-card:hover .service-sliding-info,
    #services.digi-services-block .digi-service-slide-card:focus-within .service-sliding-info {
        height: 100% !important;
        min-height: 100%;
        padding: 22px 18px !important;
        justify-content: center !important;
    }

    #services.digi-services-block .digi-service-slide-card:hover .service-title,
    #services.digi-services-block .digi-service-slide-card:focus-within .service-title {
        margin-bottom: 12px !important;
    }

    #services.digi-services-block .digi-service-slide-card:hover .sliding-content-inner,
    #services.digi-services-block .digi-service-slide-card:focus-within .sliding-content-inner {
        max-height: 230px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    #services.digi-services-block .digi-service-slide-card {
        height: 310px !important;
    }

    #services.digi-services-block .service-sliding-info,
    #services.digi-services-block .digi-service-slide-card:hover .service-sliding-info,
    #services.digi-services-block .digi-service-slide-card:focus-within .service-sliding-info {
        height: 96px !important;
        min-height: 96px;
        padding: 10px 12px !important;
    }

    #services.digi-services-block .service-title {
        font-size: 1.22rem !important;
        line-height: 1.35 !important;
    }

    #services.digi-services-block .sliding-content-inner,
    #services.digi-services-block .digi-service-slide-card:hover .sliding-content-inner,
    #services.digi-services-block .digi-service-slide-card:focus-within .sliding-content-inner {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ========================================================================
   DigiCode v4.2.58.8.11 — English hero overlay restoration
   Restores the branded dark color layer for English while preserving the
   dedicated artwork, balanced layout, controls, and responsive behavior.
   ======================================================================== */

@media (min-width: 769px) {
    body.ltr #homepage-hero {
        height: clamp(660px, 42vw, 760px);
        min-height: 660px;
        max-height: 760px;
        background-color: #3c70b6;
    }

    body.ltr #homepage-hero .hero-slide-item {
        background-color: #3c70b6;
        background-size: auto 100% !important;
        background-position: right center !important;
        background-repeat: no-repeat;
    }

    body.ltr #homepage-hero .hero-slide-item::before {
        content: "";
        position: absolute;
        inset: 0;
        /* Mirror the Arabic branded overlay: dark behind English text,
           gently transparent toward the artwork on the right. */
        background: linear-gradient(
            to right,
            var(--black-fakhim, #172f55) 0%,
            rgba(23, 47, 85, .96) 34%,
            rgba(17, 24, 39, .62) 58%,
            rgba(17, 24, 39, .20) 100%
        );
        opacity: .84;
        z-index: 1;
        pointer-events: none;
    }

    body.ltr #homepage-hero .slide-inner {
        display: flex;
        align-items: center;
        height: 100%;
        min-height: 100%;
        padding-block: clamp(44px, 4.2vw, 70px);
    }

    body.ltr #homepage-hero .hero-content-box {
        width: min(50%, 680px);
        max-width: 680px;
        margin: 0;
        padding: 0;
    }

    body.ltr #homepage-hero .top-badge {
        max-width: 100%;
        margin-bottom: 18px;
        padding: 9px 20px;
        font-size: clamp(.96rem, 1vw, 1.1rem);
        line-height: 1.2;
        white-space: normal;
    }

    body.ltr #homepage-hero .hero-title {
        max-width: 20ch;
        margin-bottom: 18px;
        font-size: clamp(2.8rem, 3.1vw, 3.5rem);
        line-height: 1.12;
        letter-spacing: -.026em;
        overflow-wrap: normal;
        word-break: normal;
        text-wrap: balance;
    }

    body.ltr #homepage-hero .hero-subtitle {
        max-width: 39rem;
        margin-bottom: 28px;
        font-size: clamp(1.05rem, 1.15vw, 1.2rem);
        line-height: 1.65;
    }

    body.ltr #homepage-hero .hero-btns {
        align-items: center;
        gap: 12px;
    }

    body.ltr #homepage-hero .hero-btns .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 52px;
        padding: 13px 28px;
        font-size: 1.08rem;
        line-height: 1.2;
    }

    body.ltr #homepage-hero .swiper-pagination {
        bottom: 22px;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    body.ltr #homepage-hero {
        height: clamp(620px, 62vw, 700px);
        min-height: 620px;
        max-height: 700px;
    }

    body.ltr #homepage-hero .hero-slide-item {
        background-size: auto 95% !important;
    }

    body.ltr #homepage-hero .hero-content-box {
        width: 52%;
        max-width: 600px;
    }

    body.ltr #homepage-hero .hero-title {
        max-width: 18ch;
        font-size: clamp(2.45rem, 4.1vw, 3rem);
    }

    body.ltr #homepage-hero .hero-subtitle {
        max-width: 34rem;
        font-size: 1.05rem;
    }
}

@media (max-width: 768px) {
    body.ltr #homepage-hero {
        height: auto;
        min-height: 760px;
        max-height: none;
        background-color: #3c70b6;
    }

    body.ltr #homepage-hero .hero-slide-item {
        min-height: 760px;
        background-color: #3c70b6;
        background-size: auto 52% !important;
        background-position: center bottom !important;
        background-repeat: no-repeat;
    }

    body.ltr #homepage-hero .hero-slide-item::before {
        content: "";
        position: absolute;
        inset: 0;
        /* Full mobile tint keeps white copy readable over the lower artwork. */
        background: linear-gradient(
            180deg,
            rgba(17, 24, 39, .72) 0%,
            rgba(23, 47, 85, .62) 48%,
            rgba(17, 24, 39, .46) 100%
        );
        opacity: 1;
        z-index: 1;
        pointer-events: none;
    }

    body.ltr #homepage-hero .slide-inner {
        display: flex;
        align-items: flex-start;
        min-height: 760px;
        padding: 42px 18px 104px;
    }

    body.ltr #homepage-hero .hero-content-box {
        width: min(100%, 580px) !important;
        max-width: 580px !important;
        margin-inline: auto;
        padding: 0;
    }

    body.ltr #homepage-hero .top-badge {
        margin-bottom: 16px;
        padding: 8px 16px;
        font-size: clamp(.9rem, 3.6vw, 1rem);
        line-height: 1.3;
    }

    body.ltr #homepage-hero .hero-title {
        max-width: 17ch;
        margin-inline: auto;
        margin-bottom: 16px;
        font-size: clamp(2rem, 8vw, 2.65rem) !important;
        line-height: 1.16 !important;
        letter-spacing: -.022em;
        overflow-wrap: normal;
        word-break: normal;
        text-wrap: balance;
    }

    body.ltr #homepage-hero .hero-subtitle {
        max-width: 34rem;
        margin-inline: auto;
        margin-bottom: 24px;
        font-size: clamp(.98rem, 4vw, 1.12rem) !important;
        line-height: 1.58 !important;
    }

    body.ltr #homepage-hero .hero-btns {
        gap: 10px;
    }

    body.ltr #homepage-hero .hero-btns .btn {
        min-height: 48px;
        padding: 11px 18px;
        font-size: 1rem;
    }

    body.ltr #homepage-hero .swiper-pagination {
        bottom: 16px;
    }
}

@media (max-width: 430px) {
    body.ltr #homepage-hero,
    body.ltr #homepage-hero .hero-slide-item,
    body.ltr #homepage-hero .slide-inner {
        min-height: 780px;
    }

    body.ltr #homepage-hero .slide-inner {
        padding-top: 36px;
    }

    body.ltr #homepage-hero .hero-title {
        max-width: 15ch;
        font-size: clamp(1.9rem, 8.7vw, 2.35rem) !important;
    }

    body.ltr #homepage-hero .hero-btns {
        width: 100%;
    }

    body.ltr #homepage-hero .hero-btns .btn {
        flex: 1 1 145px;
        padding-inline: 14px;
    }
}
