/* ============================================================================
   CMG — Arabic / Middle East theme overlay  (theme-ar.css)
   Loaded AFTER css/site.css and css/rtl.css. Every rule is scoped with
   html[dir="rtl"] so the English site is untouched.
   1) self-hosted Arabic typefaces (Tajawal + Almarai, no external requests)
   2) Middle East palette: Saudi green / desert sand / antique gold
   3) softer geometry: 8-16px radii, warm shadows, islamic geometric pattern
   ========================================================================== */

/* ---------- 1. local font faces (css/fonts/*.woff2) ---------- */
@font-face{font-family:"Tajawal";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/tajawal-arabic-400-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/tajawal-latin-400-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/tajawal-arabic-700-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/tajawal-latin-700-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:800;font-display:swap;
  src:url("fonts/tajawal-arabic-800-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:800;font-display:swap;
  src:url("fonts/tajawal-latin-800-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

@font-face{font-family:"Noto Kufi Arabic";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/noto-kufi-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Noto Kufi Arabic";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/noto-kufi-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}

@font-face{font-family:"Almarai";font-style:normal;font-weight:300;font-display:swap;
  src:url("fonts/almarai-arabic-300-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Almarai";font-style:normal;font-weight:300;font-display:swap;
  src:url("fonts/almarai-latin-300-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:"Almarai";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/almarai-arabic-400-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Almarai";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/almarai-latin-400-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:"Almarai";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/almarai-arabic-700-normal.woff2") format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E,U+2010-2011,U+204F,U+2E41;}
@font-face{font-family:"Almarai";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/almarai-latin-700-normal.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

/* ---------- 2. palette ---------- */
html[dir="rtl"]{
  --navy-900:#052420;
  --navy-800:#093A31;
  --navy-700:#0C4739;
  --navy-600:#105744;
  --steel:#2C6A57;
  --accent:#8E6B27;
  --accent-2:#C9A227;
  --accent-soft:#F6EBD3;
  --paper:#ffffff;
  --bg:#F8F3E9;
  --bg-2:#EFE7D6;
  --line:#E4D9C4;
  --line-dark:rgba(255,255,255,.16);
  --text:#221B12;
  --muted:#6B6152;
  --muted-2:#9B9077;
}

/* ---------- 3. typography ---------- */
html[dir="rtl"] body,
html[dir="rtl"] *{font-family:"Almarai","Tajawal","Inter","Segoe UI",Arial,sans-serif}
html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3,html[dir="rtl"] h4,html[dir="rtl"] h5,
html[dir="rtl"] .section-title,html[dir="rtl"] .page-hero h1,html[dir="rtl"] .pro-sum h1,
html[dir="rtl"] .cta-band h2,html[dir="rtl"] .footer-cta h3,html[dir="rtl"] .stat b,
html[dir="rtl"] .cat-title,html[dir="rtl"] .pro-name{
  font-family:"Noto Kufi Arabic","Tajawal","Almarai",sans-serif}
html[dir="rtl"] .nav-item,html[dir="rtl"] .btn,html[dir="rtl"] .mega-item,
html[dir="rtl"] .section-link,html[dir="rtl"] .tag,html[dir="rtl"] .chip{
  font-family:"Tajawal","Almarai","Inter",sans-serif}
html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3{font-weight:700}
html[dir="rtl"] body{font-size:16.5px;line-height:1.85;background:#FBF7EE;color:var(--text)}
html[dir="rtl"] p{line-height:1.85}
html[dir="rtl"] .section-title{font-weight:700;line-height:1.25;letter-spacing:0;text-transform:none}
html[dir="rtl"] .hero-title,html[dir="rtl"] .page-hero h1{font-weight:700;line-height:1.28}
html[dir="rtl"] .section-lead,html[dir="rtl"] .hero-sub,html[dir="rtl"] .page-hero p{line-height:1.85}

/* ---------- 3b. hero heading scale for Arabic line lengths ---------- */
html[dir="rtl"] .hero h1{
  font-size:clamp(28px,3.2vw,46px);line-height:1.4;letter-spacing:0;
  max-width:820px;font-weight:700;margin-bottom:4px}
html[dir="rtl"] .page-hero h1{
  font-size:clamp(24px,2.8vw,40px);line-height:1.42;letter-spacing:0;max-width:820px}
html[dir="rtl"] .hero-sub{font-size:15.5px;line-height:1.82;max-width:660px;color:#CFE0D3}
html[dir="rtl"] .page-hero .lead{font-size:15.5px;line-height:1.82;max-width:720px;color:#CFE0D3}
html[dir="rtl"] .hero-cta{margin-top:28px;gap:12px}

/* ---------- 3c. bidi safety for latin code / numbers inside Arabic ---------- */
html[dir="rtl"] .spec-table td,html[dir="rtl"] .spec-table th,
html[dir="rtl"] .pro-spec li,html[dir="rtl"] .stat b,html[dir="rtl"] .hero-stats{unicode-bidi:plaintext}
html[dir="rtl"] .stat b,html[dir="rtl"] .metric b{white-space:nowrap}

/* ---------- 4. header / top bar ---------- */
html[dir="rtl"] header,
html[dir="rtl"] .site-header{
  background:linear-gradient(180deg,#0A3A31 0%,#08302A 100%);
  box-shadow:inset 0 3px 0 0 #C9A227,0 2px 14px rgba(6,26,22,.18)}
html[dir="rtl"] .topbar{background:#052420;color:#CBB98E;border-bottom:1px solid rgba(201,162,39,.22)}
html[dir="rtl"] .topbar a{color:#E4D6AE}
html[dir="rtl"] .nav-item{color:#D6E3D8;font-weight:700}
html[dir="rtl"] .nav-item:hover{color:#E8CE86}
html[dir="rtl"] .nav-item::after{background:#C9A227}
html[dir="rtl"] .mega{background:#08302A;border:1px solid rgba(201,162,39,.28);box-shadow:0 24px 48px rgba(4,22,18,.28)}
html[dir="rtl"] .mega-txt .m-t{color:#F1E4C2}
html[dir="rtl"] .mega:hover .mega-item{background:rgba(255,255,255,.03)}
html[dir="rtl"] .mega-item:hover{background:rgba(201,162,39,.1)}
html[dir="rtl"] .lang-btn,html[dir="rtl"] .lang-switch{color:#E7DCBE}
html[dir="rtl"] .lang-menu{background:#08302A;border:1px solid rgba(201,162,39,.3)}
html[dir="rtl"] .lang-menu a{color:#DCE9DE}
html[dir="rtl"] .burger span,html[dir="rtl"] .burger span::before,html[dir="rtl"] .burger span::after{background:#E8CE86}

/* ---------- 5. hero & page hero: green-to-black with geometric veil ---------- */
html[dir="rtl"] .hero{background:#04231E}
html[dir="rtl"] .hero::before{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='72'%20height='72'%20viewBox='0%200%2072%2072'%3E%3Cg%20fill='none'%20stroke='%23C9A227'%20stroke-width='1.1'%20opacity='1'%3E%3Crect%20x='18'%20y='18'%20width='36'%20height='36'/%3E%3Crect%20x='18'%20y='18'%20width='36'%20height='36'%20transform='rotate(45%2036%2036)'/%3E%3C/g%3E%3C/svg%3E");
  background-size:72px 72px;opacity:.10}
html[dir="rtl"] .hero-media::after{
  background:linear-gradient(270deg,rgba(4,32,26,.95) 0%,rgba(4,32,26,.78) 42%,rgba(4,32,26,.30) 70%,rgba(5,42,34,.52) 100%),
             linear-gradient(0deg,rgba(3,24,19,.96) 0%,rgba(3,24,19,0) 42%)}
html[dir="rtl"] .page-hero{background:linear-gradient(180deg,#0A3A31 0%,#052420 100%)}
html[dir="rtl"] .page-hero::after{
  background:linear-gradient(270deg,rgba(5,32,26,.94),rgba(5,32,26,.62) 55%,rgba(5,32,26,.30) 100%)}
html[dir="rtl"] .page-hero::before{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='84'%20height='84'%20viewBox='0%200%2084%2084'%3E%3Cg%20fill='none'%20stroke='%23C9A227'%20stroke-width='1.1'%3E%3Ccircle%20cx='42'%20cy='42'%20r='14'/%3E%3Crect%20x='21'%20y='21'%20width='42'%20height='42'%20transform='rotate(45%2042%2042)'/%3E%3C/g%3E%3C/svg%3E");
  background-size:84px 84px;opacity:.10}
html[dir="rtl"] .hero .wrap,html[dir="rtl"] .page-hero .wrap{position:relative;z-index:2}
html[dir="rtl"] .hero-dots span{background:rgba(255,255,255,.45)}
html[dir="rtl"] .hero-dots span.on{background:#C9A227}
html[dir="rtl"] .stat{border-color:rgba(201,162,39,.28)}
html[dir="rtl"] .stat b{color:#EBD79F}

/* ---------- 6. buttons ---------- */
html[dir="rtl"] .btn{
  border-radius:8px;letter-spacing:0;font-weight:700;font-size:13.5px;
  background:#C9A227;color:#1E1708;border-color:#C9A227;
  box-shadow:0 8px 22px rgba(201,162,39,.24)}
html[dir="rtl"] .btn:hover{background:#DDB74A;border-color:#DDB74A;color:#1E1708}
html[dir="rtl"] .btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.4);box-shadow:none}
html[dir="rtl"] .btn-ghost:hover{background:rgba(201,162,39,.14);border-color:#C9A227;color:#F4E6C0}
html[dir="rtl"] .btn-outline{background:#fff;color:#0C4739;border-color:#DFD3BC;box-shadow:none}
html[dir="rtl"] .btn-outline:hover{border-color:#C9A227;color:#8E6B27;background:#FDF8ED}
html[dir="rtl"] .section-link{color:#8E6B27;font-weight:700;border-bottom:1px solid rgba(201,162,39,.45)}

/* ---------- 7. cards / media radius ---------- */
html[dir="rtl"] .cat-card,html[dir="rtl"] .pro-card,html[dir="rtl"] .news-row,
html[dir="rtl"] .case-card,html[dir="rtl"] .article-card,html[dir="rtl"] .art-box,
html[dir="rtl"] .note-strip,html[dir="rtl"] .pd-points{
  border-radius:16px;border-color:#E6DCC8;background:#fff;
  box-shadow:0 2px 10px rgba(34,27,18,.04)}
html[dir="rtl"] .cat-card:hover,html[dir="rtl"] .pro-card:hover{
  border-color:#C9A227;box-shadow:0 18px 40px rgba(9,58,49,.14);transform:translateY(-5px)}
html[dir="rtl"] .news-row:hover{background:#FBF5E8}
html[dir="rtl"] .cat-media,html[dir="rtl"] .pro-card .ph,html[dir="rtl"] .nr-img,
html[dir="rtl"] .split-img img,html[dir="rtl"] .case-img,html[dir="rtl"] .cat-media img{
  border-radius:12px;overflow:hidden}
html[dir="rtl"] .split-img .badge{border-radius:12px;border-right-width:4px;box-shadow:0 14px 30px rgba(6,26,22,.22)}
html[dir="rtl"] .cat-media .tag{background:#093A31;color:#F0DFB8;border-radius:0 0 0 10px}
html[dir="rtl"] .note-strip{border-right-width:4px;background:#FBF5E8;border-right-color:#C9A227}

/* ---------- 8. tables: frameless zebra (sand tones) ---------- */
html[dir="rtl"] .spec-table{
  border:0;border-radius:14px;overflow:hidden;background:#fff;
  box-shadow:0 2px 12px rgba(34,27,18,.05)}
html[dir="rtl"] .spec-table th,html[dir="rtl"] .spec-table td{
  border:0;padding:14px 18px;text-align:right;vertical-align:middle}
html[dir="rtl"] .spec-table thead th,
html[dir="rtl"] .spec-table tr:first-child th{
  background:#093A31;color:#F3E6C4;font-weight:700;font-size:13px}
html[dir="rtl"] .spec-table tbody tr:nth-child(even) td,
html[dir="rtl"] .spec-table tr:nth-child(even) td{background:#FBF5E8}
html[dir="rtl"] .spec-table tbody tr:nth-child(odd) td{background:#fff}
html[dir="rtl"] .spec-table td:first-child{font-weight:700;color:#0C4739}
html[dir="rtl"] .spec-table caption{color:#6B6152;font-weight:700}
html[dir="rtl"] .spec-table.tbl-fit tr:first-child th{border:0}

/* ---------- 9. section headings with gold rule ---------- */
html[dir="rtl"] .section-title{color:#0C4739}
html[dir="rtl"] .section-title .light{color:#8E6B27}
html[dir="rtl"] .kicker,html[dir="rtl"] .eyebrow,html[dir="rtl"] .sec-kicker{
  color:#8E6B27;font-weight:700;letter-spacing:0}
html[dir="rtl"] .section-head .lead{color:#6B6152}

/* ---------- 10. cta band & footer ---------- */
html[dir="rtl"] .cta-band{background:linear-gradient(135deg,#0A3A31 0%,#052420 100%)}
html[dir="rtl"] .cta-band::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%3E%3Cg%20fill='none'%20stroke='%23C9A227'%20stroke-width='1.1'%3E%3Crect%20x='16'%20y='16'%20width='32'%20height='32'/%3E%3Crect%20x='16'%20y='16'%20width='32'%20height='32'%20transform='rotate(45%2032%2032)'/%3E%3C/g%3E%3C/svg%3E");
  background-size:64px 64px;opacity:.09}
html[dir="rtl"] .cta-band .wrap{position:relative;z-index:2}
html[dir="rtl"] footer{background:#04231E;color:#BFD3C6;box-shadow:inset 0 3px 0 0 rgba(201,162,39,.55)}
html[dir="rtl"] .footer-cta{border-bottom-color:rgba(201,162,39,.22)}
html[dir="rtl"] footer a:hover{color:#E8CE86}
html[dir="rtl"] footer h4,html[dir="rtl"] .footer-col h4{color:#F1E4C2}

/* ---------- 11. small chips / pills ---------- */
html[dir="rtl"] .tag,html[dir="rtl"] .chip,html[dir="rtl"] .pill{
  border-radius:8px;background:#F6EBD3;color:#7A5B1D;font-weight:700}
html[dir="rtl"] .app-list li::before,html[dir="rtl"] .pd-points li::before,
html[dir="rtl"] .legacy ul li:before,html[dir="rtl"] .art-box li:before{background:#C9A227}

/* ---------- 12. forms ---------- */
html[dir="rtl"] .inquiry-form input,html[dir="rtl"] .inquiry-form textarea,
html[dir="rtl"] form input,html[dir="rtl"] form textarea,html[dir="rtl"] form select{
  border-radius:10px;border-color:#E1D6C1;background:#fff}
html[dir="rtl"] form input:focus,html[dir="rtl"] form textarea:focus,html[dir="rtl"] form select:focus{
  border-color:#C9A227;box-shadow:0 0 0 3px rgba(201,162,39,.15);outline:none}

/* ---------- 13. mobile fine-tuning ---------- */
@media (max-width:992px){
  html[dir="rtl"] body{font-size:16px}
  html[dir="rtl"] .cat-card,html[dir="rtl"] .pro-card,html[dir="rtl"] .news-row{border-radius:14px}
  html[dir="rtl"] .mobile-panel{background:#08302A}
  html[dir="rtl"] .mobile-panel a{color:#DCE9DE}
}
@media (max-width:600px){
  html[dir="rtl"] .btn{border-radius:7px;font-size:13px;padding:0 22px}
}
