/* ============================================================
   Saudi Arabia page — page-specific styles
   Sections covered:
     1. Saudi Presence strip (dark gradient with feature cards)
     2. Riyadh Office card (dark card + map)
   Loaded only by /saudi-arabia/index.html
   ============================================================ */

/* ---------- 1. Saudi Presence Strip ---------- */
.hp-presence {
    padding: 64px 0;
    background: linear-gradient(135deg, #0B1220 0%, #1E293B 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hp-presence::before {
    content: "";
    position: absolute;
    top: -150px;
    right: -100px;
    width: 420px;
    height: 420px;
    background: radial-gradient(closest-side, rgba(30, 64, 175, .4), transparent);
    border-radius: 50%;
}
.hp-presence::after {
    content: "";
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 420px;
    height: 420px;
    background: radial-gradient(closest-side, rgba(14, 165, 233, .3), transparent);
    border-radius: 50%;
}
.hp-presence .container {
    position: relative;
    z-index: 1;
}
.hp-presence-wrap {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 1.2fr;
    gap: 48px;
    align-items: center;
    padding: 0 16px;
}
.hp-presence-left {
    background: #0B1220;
    border: 1.5px solid #0EA5E9;
    border-radius: 18px;
    padding: 30px 28px;
    box-shadow: 0 22px 44px -14px rgba(14, 165, 233, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hp-presence-left .hp-eyebrow-dark {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: #93C5FD;
    background: rgba(30, 64, 175, .25);
    border: 1px solid rgba(96, 165, 250, .4);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.hp-presence-left h3 {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.2;
    margin: 0 0 14px;
    color: #fff;
}
.hp-presence-left h3 .accent {
    background: linear-gradient(110deg, #93C5FD, #0EA5E9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hp-presence-left p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: #CBD5E1;
    max-width: 460px;
}
.hp-presence-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.ksa-stat {
    background: #0B1220;
    border: 1.5px solid #0EA5E9;
    border-radius: 18px;
    padding: 24px 22px;
    box-shadow: 0 22px 44px -14px rgba(14, 165, 233, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: all .2s ease;
}
.ksa-stat:hover {
    background: #0F172A;
    border-color: #38BDF8;
    transform: translateY(-3px);
    box-shadow: 0 28px 52px -14px rgba(14, 165, 233, .65);
}
.ksa-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px -6px rgba(14, 165, 233, .5);
}
.ksa-stat h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.005em;
    line-height: 1.25;
}
.ksa-stat p {
    margin: 5px 0 0;
    font-size: 12.5px;
    color: #CBD5E1;
    line-height: 1.5;
}

@media (max-width: 880px) {
    .hp-presence-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    .hp-presence-left {
        padding: 26px 22px;
    }
    .hp-presence-left p {
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 480px) {
    .hp-presence-stats {
        grid-template-columns: 1fr;
    }
}


/* ---------- 2. Riyadh Office card ---------- */
.ksa-office-sec {
    padding: 96px 0 88px;
    background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
}
.ksa-office-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}
.ksa-office-card {
    background: #0B1220;
    border: 1.5px solid #0EA5E9;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    box-shadow: 0 30px 60px -22px rgba(14, 165, 233, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
    position: relative;
}
.ksa-office-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #006C35 0%, #1E40AF 50%, #0EA5E9 100%);
    z-index: 2;
}
.ksa-office-info {
    padding: 48px 44px 44px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ksa-office-flag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.ksa-office-flag img {
    width: 64px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6);
}
.ksa-office-flag .ksa-office-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: #86EFAC;
    background: rgba(6, 78, 59, .45);
    border: 1px solid rgba(134, 239, 172, .4);
    padding: 5px 12px;
    border-radius: 999px;
}
.ksa-office-info h3 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.015em;
    line-height: 1.2;
}
.ksa-office-info h3 .accent {
    background: linear-gradient(110deg, #93C5FD, #0EA5E9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ksa-office-addr {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #CBD5E1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ksa-office-addr i {
    color: #60A5FA;
    font-size: 14px;
    margin-top: 4px;
    flex: none;
}
.ksa-office-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.ksa-office-meta a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 12px 14px;
    border: 1px solid rgba(96, 165, 250, .3);
    border-radius: 12px;
    transition: all .2s ease;
    background: rgba(15, 23, 42, .6);
}
.ksa-office-meta a:hover {
    border-color: #0EA5E9;
    background: rgba(14, 165, 233, .12);
    color: #93C5FD;
    transform: translateY(-1px);
}
.ksa-office-meta i {
    font-size: 13px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.ksa-office-cta {
    margin-top: 8px;
}
.ksa-office-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    color: #fff;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
    box-shadow: 0 14px 28px -14px rgba(14, 165, 233, .6);
}
.ksa-office-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px -16px rgba(14, 165, 233, .75);
}
.ksa-office-map {
    position: relative;
    min-height: 380px;
    background: linear-gradient(135deg, #0B1220, #1E293B);
    overflow: hidden;
}
.ksa-office-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: saturate(.9);
}

@media (max-width: 880px) {
    .ksa-office-card {
        grid-template-columns: 1fr;
    }
    .ksa-office-map {
        min-height: 280px;
    }
}
@media (max-width: 560px) {
    .ksa-office-info {
        padding: 36px 24px 32px;
    }
}


/* ============================================================
   3. Portrait composition (About section — Arabic guy)
   Circular image with floating chips, gradient blobs, ring & flag.
   ============================================================ */
.ksa-portrait {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ksa-portrait-frame {
    position: relative;
    width: 78%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        0 30px 60px -22px rgba(15, 23, 42, 0.35),
        0 0 0 6px rgba(255, 255, 255, 1),
        0 0 0 7.5px rgba(30, 64, 175, 0.18);
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    z-index: 3;
}
.ksa-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.ksa-portrait:hover .ksa-portrait-img {
    transform: scale(1.04);
}

/* Outer animated ring */
.ksa-portrait-ring {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 2px dashed rgba(30, 64, 175, 0.35);
    animation: ksaRingSpin 32s linear infinite;
    z-index: 1;
}
@keyframes ksaRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Decorative gradient blobs */
.ksa-portrait-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.ksa-portrait-blob--a {
    width: 220px; height: 220px;
    top: -10px; left: -10px;
    background: radial-gradient(closest-side, rgba(14, 165, 233, .35), transparent);
}
.ksa-portrait-blob--b {
    width: 240px; height: 240px;
    bottom: -20px; right: -20px;
    background: radial-gradient(closest-side, rgba(0, 108, 53, .25), transparent);
}

/* Dotted accent pattern */
.ksa-portrait-dotgrid {
    position: absolute;
    width: 90px; height: 90px;
    bottom: 8%; left: 2%;
    background-image: radial-gradient(rgba(30, 64, 175, 0.4) 1.4px, transparent 1.6px);
    background-size: 14px 14px;
    opacity: .55;
    z-index: 1;
    pointer-events: none;
}

/* Saudi flag badge */
.ksa-portrait-flag {
    position: absolute;
    top: 8%; right: 6%;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    overflow: hidden;
    padding: 6px;
}
.ksa-portrait-flag img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Floating chips with icons */
.ksa-portrait-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0B1220;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: 0 18px 38px -16px rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(226, 232, 240, 1);
    z-index: 5;
    white-space: nowrap;
}
.ksa-portrait-chip i {
    color: #1E40AF;
    font-size: 13px;
}
.ksa-portrait-chip--top {
    top: 18%; left: -4%;
    animation: ksaFloatA 5s ease-in-out infinite;
}
.ksa-portrait-chip--bottom {
    bottom: 22%; right: -2%;
    animation: ksaFloatB 6s ease-in-out infinite;
}
@keyframes ksaFloatA {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes ksaFloatB {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(10px); }
}

/* Stat callout (5+ سنوات خبرة) */
.ksa-portrait-stat {
    position: absolute;
    bottom: 4%; left: 4%;
    background: linear-gradient(135deg, #1E40AF, #0EA5E9);
    color: #fff;
    padding: 14px 18px;
    border-radius: 18px;
    box-shadow: 0 22px 44px -16px rgba(30, 64, 175, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    z-index: 5;
    min-width: 86px;
    text-align: center;
}
.ksa-portrait-stat strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.ksa-portrait-stat small {
    font-size: 10.5px;
    font-weight: 600;
    margin-top: 4px;
    opacity: .95;
    letter-spacing: .02em;
}


/* ============================================================
   4. RTL fine-tuning — chevrons, arrows, mirror flips
   ============================================================ */
html[dir="rtl"] .dropdown-symbol {
    margin-right: 4px;
}
html[dir="rtl"] .fa-arrow-right::before {
    content: "\f060"; /* fa-arrow-left */
}
html[dir="rtl"] .fa-arrow-left::before {
    content: "\f061"; /* fa-arrow-right */
}
html[dir="rtl"] .hp-about-content h2,
html[dir="rtl"] .hp-about-lead {
    text-align: right;
}
html[dir="rtl"] .hp-section-head {
    text-align: center;
}
/* Section heads should still center their text */
.hp-section-head h2,
.hp-section-head p {
    text-align: center;
}


/* ============================================================
   5. Mobile responsiveness — full page
   Tightens spacing, stacks columns, scales typography for Arabic.
   ============================================================ */

/* Tablets and below */
@media (max-width: 880px) {
    /* About section */
    .hp-about-sec { padding: 64px 0 56px; }
    .hp-about-grid { gap: 36px !important; }
    .ksa-portrait { max-width: 360px; }
    .ksa-portrait-chip { font-size: 12px; padding: 8px 14px; }

    /* Presence + offices */
    .hp-presence { padding: 48px 0; }
    .ksa-office-sec { padding: 60px 0 56px; }

    /* Hero a bit tighter */
    .hero-section .header-heading h1 { font-size: clamp(28px, 6vw, 40px) !important; }
    .hero-section .header-heading p  { font-size: 14.5px !important; line-height: 1.55; }
    .hero-section .hero-logo-zoho img       { height: 56px !important; }
    .hero-section .hero-logo-shyphan-ai img { height: 220px !important; }
    .hero-section .hero-logo-shyphan-ai     { margin-top: 48px !important; }

    /* Generic section heads */
    .hp-section-head { margin-bottom: 32px; }
    .hp-section-head h2 { font-size: clamp(22px, 4.6vw, 28px); }
    .hp-section-head p  { font-size: 14px; padding: 0 8px; }
}

/* Phones */
@media (max-width: 560px) {
    /* About */
    .hp-about-sec { padding: 48px 0 40px; }
    .hp-about-wrap { padding: 0 14px; }
    .hp-about-content { text-align: center; }
    .hp-about-content h2,
    .hp-about-lead { text-align: center !important; }
    .hp-about-features { gap: 14px; }
    .hp-about-feature h4 { font-size: 14.5px; }
    .hp-about-feature p { font-size: 13px; line-height: 1.6; }

    /* Portrait composition shrinks */
    .ksa-portrait { max-width: 300px; }
    .ksa-portrait-frame {
        box-shadow:
            0 22px 44px -18px rgba(15, 23, 42, 0.35),
            0 0 0 5px rgba(255, 255, 255, 1),
            0 0 0 6.5px rgba(30, 64, 175, 0.15);
    }
    .ksa-portrait-chip { font-size: 11px; padding: 7px 12px; }
    .ksa-portrait-chip i { font-size: 11px; }
    .ksa-portrait-chip--top { left: -8%; top: 14%; }
    .ksa-portrait-chip--bottom { right: -6%; bottom: 18%; }
    .ksa-portrait-flag { width: 46px; height: 46px; top: 4%; right: 0%; padding: 4px; }
    .ksa-portrait-stat { padding: 11px 14px; min-width: 70px; }
    .ksa-portrait-stat strong { font-size: 18px; }
    .ksa-portrait-stat small { font-size: 9.5px; }
    .ksa-portrait-blob--a { width: 140px; height: 140px; }
    .ksa-portrait-blob--b { width: 160px; height: 160px; }
    .ksa-portrait-dotgrid { width: 60px; height: 60px; }

    /* Presence strip — already responsive, just tighten chrome */
    .hp-presence { padding: 40px 0; }
    .hp-presence-wrap { padding: 0 14px; gap: 22px; }
    .hp-presence-left { padding: 22px 18px; }
    .hp-presence-left h3 { font-size: 22px; line-height: 1.25; }
    .hp-presence-left p { font-size: 13.5px; }
    .ksa-stat { padding: 18px 16px; border-radius: 16px; }
    .ksa-stat h4 { font-size: 13.5px; }
    .ksa-stat p { font-size: 12px; }
    .ksa-stat-icon { width: 34px; height: 34px; font-size: 14px; }

    /* Office card */
    .ksa-office-sec { padding: 48px 0 44px; }
    .ksa-office-card { border-radius: 18px; }
    .ksa-office-info { padding: 28px 20px 26px; gap: 14px; }
    .ksa-office-flag img { width: 52px; height: 38px; }
    .ksa-office-info h3 { font-size: 22px; }
    .ksa-office-addr { font-size: 13.5px; }
    .ksa-office-meta a { font-size: 13.5px; padding: 10px 12px; }
    .ksa-office-cta a { padding: 12px 22px; font-size: 13.5px; }
    .ksa-office-map { min-height: 240px; }

    /* Tighten section heads for phones */
    .hp-section-head { margin-bottom: 24px; padding: 0 12px; }
    .hp-section-head h2 { font-size: 22px; }
    .hp-section-head p  { font-size: 13.5px; line-height: 1.55; }

    /* Hero further tightens */
    .hero-section .text-block.niwax > .container { padding-top: 96px !important; }
    .hero-section .header-heading h1 { font-size: 28px !important; line-height: 1.2; }
    .hero-section .header-heading p  { font-size: 13.5px !important; padding: 0 14px; }
    .hero-section .hero-logos-section { margin: 14px 0 4px !important; }
    .hero-section .hero-logo-zoho img       { height: 48px !important; }
    .hero-section .hero-logo-shyphan-ai img { height: 190px !important; }
    .hero-section .hero-logo-shyphan-ai     { margin-top: 40px !important; }

    /* Stat counters — readable on phones */
    .hp-stats-sec { padding: 56px 0 48px; }
    .hp-stat-num { font-size: 24px !important; }
    .hp-stat-label { font-size: 11.5px !important; }

    /* Industry, Why, How, Blog, Compliance — tighten paddings */
    .hp-ind-sec, .hp-why-sec, .hp-work-sec, .hp-blog-sec,
    .hp-comp-sec, .hp-zoho-sec, .hp-intg-sec {
        padding: 56px 0 48px !important;
    }
    .hp-ind-card h4,
    .hp-why-card h4,
    .hp-work-step h4 { font-size: 14.5px; }
    .hp-ind-card p,
    .hp-why-card p,
    .hp-work-step p { font-size: 12.5px; line-height: 1.55; }

    /* Testimonials */
    .dg-testimonial-section { padding: 56px 0 48px !important; }
    .review-card p { font-size: 13.5px !important; line-height: 1.6; padding: 0 8px; }
    .review-card h5 { font-size: 14.5px; }
    .testimonial-avatar { width: 64px; height: 64px; }

    /* Promise CTA band */
    .hp-promise-sec { padding: 20px 0 56px !important; }
    .hp-promise-card { padding: 28px 22px !important; border-radius: 20px; }
    .hp-promise-text h3 { font-size: 22px !important; }
    .hp-promise-text p { font-size: 13.5px !important; }
    .hp-promise-btn { padding: 12px 22px !important; font-size: 13.5px !important; }

    /* Footer tightens */
    footer.dark-footer { padding-top: 40px; }
    footer .ftr-brand-pp p,
    footer .footer-country-info a { font-size: 13.5px; }
    footer h5 { font-size: 15px !important; margin: 22px 0 14px !important; }
}

/* Very small phones */
@media (max-width: 380px) {
    .ksa-portrait { max-width: 260px; }
    .ksa-portrait-chip { font-size: 10px; padding: 6px 10px; }
    .ksa-portrait-chip i { font-size: 10px; }
    .hero-section .header-heading h1 { font-size: 24px !important; }
    .hp-section-head h2 { font-size: 20px; }
}


/* ============================================================
   6. RTL — specific responsive fixes for Arabic layout
   ============================================================ */
html[dir="rtl"] .ksa-portrait-flag      { right: auto; left: 6%; }
html[dir="rtl"] .ksa-portrait-stat      { left: auto;  right: 4%; }
html[dir="rtl"] .ksa-portrait-dotgrid   { left: auto;  right: 2%; }
html[dir="rtl"] .ksa-portrait-chip--top    { left: auto; right: -4%; }
html[dir="rtl"] .ksa-portrait-chip--bottom { right: auto; left: -2%; }
html[dir="rtl"] .hp-about-content h2,
html[dir="rtl"] .hp-about-lead {
    text-align: right;
}
@media (max-width: 560px) {
    html[dir="rtl"] .hp-about-content h2,
    html[dir="rtl"] .hp-about-lead { text-align: center; }
    html[dir="rtl"] .ksa-portrait-chip--top    { right: -8%; left: auto; }
    html[dir="rtl"] .ksa-portrait-chip--bottom { left: -6%;  right: auto; }
    html[dir="rtl"] .ksa-portrait-flag         { left: 0%;   right: auto; }
    html[dir="rtl"] .ksa-portrait-stat         { right: 4%;  left: auto; }
}


/* ============================================================
   7. Global polish — typography, scroll, focus, reduced motion
   ============================================================ */

/* Better Arabic typography with proper fallback stack */
html[dir="rtl"] body,
html[dir="rtl"] .ksa-portrait-chip,
html[dir="rtl"] .ksa-portrait-stat,
html[dir="rtl"] .hp-presence-left,
html[dir="rtl"] .hp-section-head,
html[dir="rtl"] .hp-about-content,
html[dir="rtl"] .ksa-office-info,
html[dir="rtl"] .hp-stat-label,
html[dir="rtl"] .ksa-stat,
html[dir="rtl"] .hp-zoho-card,
html[dir="rtl"] .hp-ind-card,
html[dir="rtl"] .hp-why-card,
html[dir="rtl"] .hp-work-step,
html[dir="rtl"] .hp-blog-card,
html[dir="rtl"] .review-card,
html[dir="rtl"] .footer-country-info,
html[dir="rtl"] footer p,
html[dir="rtl"] footer li,
html[dir="rtl"] footer h5,
html[dir="rtl"] .hero-section .header-heading h1,
html[dir="rtl"] .hero-section .header-heading p {
    font-family: "Cairo", "Tajawal", "Noto Kufi Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
}

/* Smooth scrolling for in-page anchors */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ksa-portrait-ring,
    .ksa-portrait-chip--top,
    .ksa-portrait-chip--bottom,
    .shyphan-ai-logo-animated { animation: none !important; }
    .ksa-portrait-img,
    .hp-zoho-card,
    .hp-why-card,
    .hp-blog-card,
    .ksa-stat,
    .hp-about-feature {
        transition: none !important;
    }
}

/* Visible focus ring for keyboard users — important for accessibility */
.lang-btn:focus-visible,
.btn-main:focus-visible,
.hp-zoho-card:focus-visible,
.hp-blog-card:focus-visible,
.ksa-office-meta a:focus-visible,
.ksa-office-cta a:focus-visible,
.hp-promise-btn:focus-visible,
.hp-stat:focus-visible,
.lang-option:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.45);
    outline-offset: 3px;
    border-radius: 12px;
}

/* Avoid scroll anchor bumping under the sticky header */
html { scroll-padding-top: 90px; }

/* ============================================================
   8. Page-leave fade transition
   When clicking an outbound link, fade the page out briefly so the
   handoff to the destination feels smooth instead of a hard cut.
   ============================================================ */
body {
    transition: opacity .25s ease;
    opacity: 1;
}
body.is-leaving {
    opacity: 0;
    pointer-events: none;
}
body.is-leaving::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(30, 64, 175, 0.18);
    border-top-color: #1E40AF;
    border-radius: 50%;
    animation: ksaSpin .8s linear infinite;
    opacity: 1;
    z-index: 999999;
}
@keyframes ksaSpin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    body, body.is-leaving { transition: none !important; opacity: 1 !important; }
    body.is-leaving::after { animation: none; }
}


/* ============================================================
   9. Header — keep its original LTR layout regardless of page dir
   The page is RTL but the navigation chrome is forced LTR via
   dir="ltr" on the <header> and #main-nav, so the logo stays on
   the left, menu items in original order, and the language picker
   stays on the right exactly as before.
   ============================================================ */
html[dir="rtl"] header[dir="ltr"],
html[dir="rtl"] nav[dir="ltr"] {
    direction: ltr;
    text-align: left;
}
html[dir="rtl"] header[dir="ltr"] *,
html[dir="rtl"] nav[dir="ltr"] * {
    direction: ltr;
}
/* Arabic menu labels still read RTL inside their containers */
html[dir="rtl"] header[dir="ltr"] .menu-links,
html[dir="rtl"] nav[dir="ltr"] .menu-links,
html[dir="rtl"] header[dir="ltr"] .nav-list a,
html[dir="rtl"] nav[dir="ltr"] .nav-list a {
    unicode-bidi: plaintext;
}
/* Header CTA "اطلب عرض أسعار" — keep button text natural */
html[dir="rtl"] header[dir="ltr"] .btn-br.bg-btn3 {
    unicode-bidi: plaintext;
}

/* ----- Mobile header — keep original layout, just bump text size ----- */
@media (max-width: 991px) {
    /* Language picker — readable text */
    .main-header .lang-btn .lang-flag { font-size: 18px !important; }
    .main-header .lang-btn .lang-code { font-size: 14px !important; font-weight: 700; }
    .main-header .lang-btn { gap: 6px; padding: 6px 12px !important; }
    /* Language dropdown — readable options */
    .main-header .lang-dropdown .lang-option {
        padding: 12px 16px !important;
        font-size: 14.5px !important;
        font-weight: 600;
    }
    .main-header .lang-dropdown .lang-option span:first-child {
        font-size: 20px !important;
    }
    /* Mobile slide-in nav — readable Arabic menu */
    #main-nav .menu-links {
        font-size: 17px !important;
        font-weight: 600;
        padding: 14px 20px;
        line-height: 1.4;
    }
    #main-nav .sub-menu-column a {
        font-size: 15px !important;
        padding: 8px 0;
        line-height: 1.5;
    }
}
@media (max-width: 560px) {
    .main-header .lang-btn .lang-flag { font-size: 17px !important; }
    .main-header .lang-btn .lang-code { font-size: 13.5px !important; }
    #main-nav .menu-links { font-size: 16.5px !important; }
    #main-nav .sub-menu-column a { font-size: 14.5px !important; }
}


/* ============================================================
   10. Footer — proper RTL alignment for Arabic
   ============================================================ */
html[dir="rtl"] footer.dark-footer {
    text-align: right;
}
html[dir="rtl"] footer.dark-footer .row {
    /* Bootstrap default direction stays — but visual order reads RTL */
    direction: rtl;
}
html[dir="rtl"] footer.dark-footer .ftr-brand-pp p,
html[dir="rtl"] footer.dark-footer .ftr-brand-pp .mt20 p,
html[dir="rtl"] footer.dark-footer h5,
html[dir="rtl"] footer.dark-footer .footer-address-list li,
html[dir="rtl"] footer.dark-footer .footer-address-list a,
html[dir="rtl"] footer.dark-footer .footer-country-info a,
html[dir="rtl"] footer.dark-footer .footer-copyrights- p,
html[dir="rtl"] footer.dark-footer .footer-link-- li,
html[dir="rtl"] footer.dark-footer .footer-link-- a {
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

/* Address pin icon — push it to the right of the text in RTL */
html[dir="rtl"] footer.dark-footer .ftr-brand-pp .mt20 p {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
}
html[dir="rtl"] footer.dark-footer .ftr-brand-pp .mt20 p .fas {
    margin-top: 6px;
    color: #93C5FD;
}

/* Country list rows — flag on the right of the contact info in RTL */
html[dir="rtl"] footer.dark-footer .footer-country-list .footer-country {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 12px;
}
html[dir="rtl"] footer.dark-footer .footer-country-info {
    text-align: right;
}
html[dir="rtl"] footer.dark-footer .footer-country-info a {
    display: block;
}

/* Bullet/links list — remove default left-padding bullets, align right */
html[dir="rtl"] footer.dark-footer .footer-address-list,
html[dir="rtl"] footer.dark-footer .footer-link-- {
    padding-right: 0;
    padding-left: 0;
    list-style: none;
}
html[dir="rtl"] footer.dark-footer .footer-link-- {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 18px;
}

/* Social icons — keep them as a row, but flowing from right in RTL */
html[dir="rtl"] footer.dark-footer .ff-social-icons {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 12px;
}
html[dir="rtl"] footer.dark-footer .ff-social-icons a {
    margin: 0;
}

/* Underline transitions — link-hover treatment */
html[dir="rtl"] footer.dark-footer .link-hover a {
    transition: color .2s ease, padding .2s ease;
}
html[dir="rtl"] footer.dark-footer .link-hover a:hover {
    color: #93C5FD;
    padding-right: 4px;
}

/* Copyright row — center on phone, balance on desktop */
html[dir="rtl"] footer.dark-footer .end-footer- {
    align-items: center;
}
html[dir="rtl"] footer.dark-footer .footer-copyrights- {
    text-align: right;
}

/* Mobile footer — center everything for readability */
@media (max-width: 768px) {
    html[dir="rtl"] footer.dark-footer,
    html[dir="rtl"] footer.dark-footer .ftr-brand-pp p,
    html[dir="rtl"] footer.dark-footer .ftr-brand-pp .mt20 p,
    html[dir="rtl"] footer.dark-footer h5,
    html[dir="rtl"] footer.dark-footer .footer-address-list li,
    html[dir="rtl"] footer.dark-footer .footer-copyrights- p {
        text-align: center;
    }
    html[dir="rtl"] footer.dark-footer .ftr-brand-pp .mt20 p {
        flex-direction: row-reverse;
        justify-content: center;
    }
    html[dir="rtl"] footer.dark-footer .footer-country-list .footer-country {
        justify-content: center;
    }
    html[dir="rtl"] footer.dark-footer .ff-social-icons {
        justify-content: center;
    }
    html[dir="rtl"] footer.dark-footer .footer-link-- {
        justify-content: center;
        margin-top: 12px;
    }
    html[dir="rtl"] footer.dark-footer .end-footer- {
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }
}


