/* =====================================================================
   CLEAR WATER — brand layer for Volve (child theme)
   Volve provides the framework: header, sticky behaviour, Super Menu,
   layer (mobile) navigation, footer widgets, colours + font (Theme Panel).
   This file only: Arabic type, RTL corrections, restrained glass, brand details.
   Glass = transparency + blur + very subtle tonal gradients (approved).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root{
  --cw-navy:#0A1F3D; --cw-navy-deep:#061529; --cw-navy-2:#112B52;
  --cw-baby:#7CC4EA; --cw-baby-soft:#EEF7FC; --cw-baby-line:#C3E5F7;
  --cw-purple:#5B3FA0; --cw-purple-dark:#48318A;
  --cw-ink:#0E1B2C; --cw-slate:#4F6075; --cw-mist:#A9B9CC; --cw-line:rgba(10,31,61,.10);
  --cw-font:"IBM Plex Sans Arabic",system-ui,"Segoe UI",Tahoma,sans-serif;
  /* Glass recipe (light) */
  --cw-glass:rgba(255,255,255,.72);
  --cw-glass-strong:rgba(255,255,255,.86);
  --cw-glass-edge:rgba(255,255,255,.55);
  --cw-blur:saturate(160%) blur(18px);
  --cw-shadow:0 18px 40px -18px rgba(10,31,61,.28),0 1px 0 rgba(10,31,61,.04);
  --cw-ease:220ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- 2. Arabic typography (font itself loaded by Volve's Theme Panel) ---------- */
body.cw{font-family:var(--cw-font);line-height:1.8;-webkit-font-smoothing:antialiased}
body.cw :where(h1,h2,h3,h4,h5,h6,p,a,li,button,input,textarea,select,label,td,th,blockquote,.btn,.button){font-family:var(--cw-font);letter-spacing:0}
body.cw :where(h1,h2,h3,h4,h5,h6){line-height:1.3}

/* ---------- 3. Header — minimalist floating glass bar (RTL) ---------- */
body.cw #header{--cw-bar-h:68px}
body.cw #header .header__container{height:96px;position:relative;transition:height var(--cw-ease)}
body.cw #header.is-sticky.is-scrolled .header__container{height:84px}
body.cw #header .header__inner{
  height:var(--cw-bar-h);margin-top:14px;padding:0 10px 0 18px;border-radius:20px;
  background-color:rgba(255,255,255,.62);
  background-image:linear-gradient(180deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.12) 100%);
  -webkit-backdrop-filter:saturate(170%) blur(20px);backdrop-filter:saturate(170%) blur(20px);
  border:1px solid rgba(255,255,255,.75);
  box-shadow:0 10px 30px -16px rgba(10,31,61,.30),inset 0 1px 0 rgba(255,255,255,.85);
  transition:background-color var(--cw-ease),box-shadow var(--cw-ease),border-color var(--cw-ease);
}
body.rtl.cw #header .header__inner{padding:0 18px 0 10px}
/* Sticky: Volve's white bar → transparent wrapper, the glass bar floats */
body.cw #header.is-sticky.is-scrolled{background-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
body.cw #header.is-sticky.is-scrolled .header__inner{background-color:rgba(255,255,255,.72);box-shadow:0 14px 36px -18px rgba(10,31,61,.38),inset 0 1px 0 rgba(255,255,255,.9)}
/* Over dark heroes (Volve .bg-dark-global, before scrolling): dark frosted glass, white text */
body.cw.bg-dark-global #header:not(.is-scrolled) .header__inner{
  background-color:rgba(10,31,61,.30);
  background-image:linear-gradient(180deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,0) 100%);
  border-color:rgba(255,255,255,.16);box-shadow:0 10px 30px -16px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.12)}
body.cw .site-logo img{max-height:36px;width:auto}
body.rtl.cw .header-standard .primary-navigation{margin:0;margin-inline-start:20px}

/* ---------- 4. Navigation — quiet links, glass pill on hover/active ---------- */
body.rtl.cw .primary-navigation div>ul>li{float:right}
body.cw .primary-navigation div>ul{display:flex;align-items:center;gap:2px}
body.cw .primary-navigation a{margin:0}
body.cw .primary-navigation div>ul>li>a{
  display:flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:12px;
  font-size:15px;font-weight:500;line-height:1;color:var(--cw-navy);
  transition:background-color var(--cw-ease),color var(--cw-ease)}
@media (max-width:1240px){body.cw .primary-navigation div>ul>li>a{padding:0 10px;font-size:14.5px}}
body.cw .primary-navigation div>ul>li>a:hover,
body.cw .primary-navigation div>ul>li.active>a{background-color:rgba(10,31,61,.06)}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation div>ul>li>a{color:#fff}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation div>ul>li>a:hover,
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation div>ul>li.active>a{background-color:rgba(255,255,255,.12)}
/* Current page: soft tinted pill instead of Volve's brand circle */
body.cw .primary-navigation>div>ul>li.current-menu-item::before,
body.cw .primary-navigation>div>ul>li.current-menu-ancestor::before,
body.cw .primary-navigation>div>ul>li.current-menu-parent::before,
body.cw .primary-navigation>div>ul>li.current-page-ancestor::before{display:none}
body.cw .primary-navigation>div>ul>li.current-menu-item>a{background-color:rgba(124,196,234,.22);font-weight:600}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation>div>ul>li.current-menu-item>a{background-color:rgba(124,196,234,.22)}
/* Chevron */
body.cw .primary-navigation div>ul>li.menu-item-has-children>a::after{
  content:"";position:static;display:block;width:6px;height:6px;margin-top:-3px;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);opacity:.55;transition:transform var(--cw-ease),margin var(--cw-ease)}
body.cw .primary-navigation div>ul>li.active>a::after{transform:rotate(-135deg);margin-top:4px}
/* ECPUW */
body.cw .primary-navigation li.cw-ecpuw>a{font-weight:600;letter-spacing:.04em}
/* CTA — glass-tinted purple pill */
body.cw .primary-navigation li.cw-cta{margin-inline-start:8px}
body.cw .primary-navigation li.cw-cta>a{
  height:44px;padding:0 20px;border-radius:14px;color:#fff!important;font-weight:600;
  background-color:var(--cw-purple);
  background-image:linear-gradient(180deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,0) 100%);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 8px 20px -10px rgba(91,63,160,.75),inset 0 1px 0 rgba(255,255,255,.25)}
body.cw .primary-navigation li.cw-cta>a:hover{background-color:var(--cw-purple-dark)}
body.cw .primary-navigation a:focus-visible{outline:2px solid var(--cw-purple);outline-offset:2px}

/* ---------- 5. Mega menus (Volve Super Menu) — floating frosted panels ---------- */
body.cw .primary-navigation li.super-menu,body.cw .primary-navigation div>ul{position:static}
body.cw .primary-navigation .super-menu-wrap{
  left:30px!important;right:30px!important;width:auto!important;top:calc(100% + 2px)!important;
  padding:22px 22px 24px;border-radius:22px;
  background-color:rgba(255,255,255,.80);
  background-image:linear-gradient(180deg,rgba(255,255,255,.60) 0%,rgba(255,255,255,.10) 100%);
  -webkit-backdrop-filter:saturate(170%) blur(22px);backdrop-filter:saturate(170%) blur(22px);
  border:1px solid rgba(255,255,255,.8);
  box-shadow:0 30px 60px -28px rgba(10,31,61,.40),inset 0 1px 0 rgba(255,255,255,.9);
  transform-origin:50% 0!important}
body.cw .primary-navigation .super-menu-wrap::before{content:"";position:absolute;inset-inline:0;top:-18px;height:18px} /* hover bridge */
/* Group label (minimal, from the menu item it belongs to) */
body.cw .primary-navigation .cw-mega .super-menu-wrap::after{
  position:absolute;top:22px;inset-inline-start:30px;font-size:13px;font-weight:600;color:var(--cw-slate)}
body.cw .primary-navigation .cw-mega--solutions .super-menu-wrap::after{content:"حلول المياه حسب القطاع"}
body.cw .primary-navigation .cw-mega--systems .super-menu-wrap::after{content:"أنظمة ومنتجات معالجة المياه"}
body.cw .primary-navigation .super-menu-wrap>ul{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 10px;
  max-width:1060px;margin:0 auto;padding:34px 8px 0;
  background:transparent!important;box-shadow:none!important;border-radius:0}
body.cw .primary-navigation .super-menu-wrap>ul>li{width:auto!important;float:none;padding:0}
body.cw .primary-navigation .super-menu-wrap>ul>li>a{
  display:flex;align-items:center;gap:12px;min-height:50px;margin:0;padding:10px 14px;border-radius:14px;
  text-align:start;font-size:15px;font-weight:500!important;line-height:1.5;color:var(--cw-ink)!important;
  border:1px solid transparent;transition:background-color var(--cw-ease),border-color var(--cw-ease),color var(--cw-ease)}
body.cw .primary-navigation .super-menu-wrap>ul>li>a::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:var(--cw-baby);transition:background-color var(--cw-ease),transform var(--cw-ease)}
body.cw .primary-navigation .super-menu-wrap>ul>li>a:hover{
  background-color:rgba(255,255,255,.75);border-color:rgba(10,31,61,.06);color:var(--cw-navy)!important;
  box-shadow:0 6px 18px -12px rgba(10,31,61,.35)}
body.cw .primary-navigation .super-menu-wrap>ul>li>a:hover::before{background:var(--cw-purple);transform:scale(1.25)}
@media (max-width:1180px){body.cw .primary-navigation .super-menu-wrap>ul{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- 6. Standard dropdown (التركيب والصيانة) ---------- */
body.rtl.cw .primary-navigation li:not(.super-menu)>ul.sub-menu{
  left:auto;right:0;width:240px;top:50px;padding:8px;border-radius:18px;
  background-color:rgba(255,255,255,.80);
  background-image:linear-gradient(180deg,rgba(255,255,255,.60) 0%,rgba(255,255,255,.10) 100%);
  -webkit-backdrop-filter:saturate(170%) blur(22px);backdrop-filter:saturate(170%) blur(22px);
  border:1px solid rgba(255,255,255,.8);box-shadow:0 24px 48px -24px rgba(10,31,61,.40),inset 0 1px 0 rgba(255,255,255,.9)}
body.cw .primary-navigation li:not(.super-menu)>ul.sub-menu li{padding:0}
body.cw .primary-navigation li:not(.super-menu)>ul.sub-menu a{text-align:start;padding:11px 14px;border-radius:12px;font-size:15px;font-weight:500;color:var(--cw-ink)}
body.cw .primary-navigation li:not(.super-menu)>ul.sub-menu a:hover{background-color:rgba(255,255,255,.8);color:var(--cw-navy)}

/* Menus over dark heroes (before scrolling): dark frosted glass so busy imagery never shows through text */
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation .super-menu-wrap,
body.rtl.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation li:not(.super-menu)>ul.sub-menu{
  background-color:rgba(8,24,48,.92);
  background-image:linear-gradient(180deg,rgba(255,255,255,.08) 0%,rgba(255,255,255,0) 100%);
  -webkit-backdrop-filter:saturate(150%) blur(32px);backdrop-filter:saturate(150%) blur(32px);
  border-color:rgba(255,255,255,.14);box-shadow:0 30px 60px -28px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.10)}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation .super-menu-wrap>ul>li>a,
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation li:not(.super-menu)>ul.sub-menu a{color:#fff!important}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation .super-menu-wrap>ul>li>a:hover,
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation li:not(.super-menu)>ul.sub-menu a:hover{background-color:rgba(255,255,255,.10);border-color:rgba(255,255,255,.10);box-shadow:none}
body.cw.bg-dark-global #header:not(.is-scrolled) .primary-navigation .cw-mega .super-menu-wrap::after{color:var(--cw-mist)}

/* Keyboard access: Volve opens menus on hover only */
body.cw .primary-navigation li.menu-item-has-children:focus-within>.super-menu-wrap,
body.cw .primary-navigation li.menu-item-has-children:focus-within>ul.sub-menu{display:block!important;opacity:1!important;transform:none!important}

/* ---------- 7. Mobile & tablet: glass bar + frosted layer navigation ---------- */
@media (max-width:991.98px){
  body.cw #header{--cw-bar-h:60px}
  body.cw #header .header__container{height:82px}
  body.cw #header .header__inner{margin-top:11px}
  body.cw #header .header__inner{-webkit-backdrop-filter:saturate(160%) blur(14px);backdrop-filter:saturate(160%) blur(14px)}
}
@media (max-width:575.98px){body.cw #header .header__container{padding-inline:12px}}
body.rtl.cw #header .l-nav-btn{margin-right:0;margin-left:10px}
body.cw #header .l-nav-btn{width:44px;height:44px;border-radius:12px;background-color:rgba(10,31,61,.06);border:0}
body.cw.bg-dark-global #header:not(.is-scrolled) .l-nav-btn{background-color:rgba(255,255,255,.14)}
body.cw .l-nav{
  background-color:rgba(246,249,252,.78);
  background-image:linear-gradient(180deg,rgba(255,255,255,.55) 0%,rgba(238,244,250,.20) 100%);
  -webkit-backdrop-filter:saturate(170%) blur(24px);backdrop-filter:saturate(170%) blur(24px)}
body.cw .l-nav__wrap{-webkit-mask-image:none;mask-image:none}
/* Volve widens .l-nav__wrap by 30px to hide its scrollbar; in RTL that eats the left gutter */
body.rtl.cw .l-nav-list{box-sizing:border-box;padding-left:22px}
body.rtl.cw .layer-header{left:0;right:0}
body.rtl.cw .layer-header__inner{justify-content:flex-start}
body.cw .l-nav .btn-close-layer{border-radius:12px;background-color:rgba(10,31,61,.06);border:0}
body.cw .l-nav ul{padding:120px 0 64px}
body.rtl.cw .l-nav li a{padding-right:0;padding-left:0;text-align:right}
body.cw .l-nav div>ul>li{margin:4px 0;border:0}
body.cw .l-nav div>ul>li>a{
  display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;padding:0 18px!important;
  border-radius:16px;font-size:clamp(18px,2.2vw,24px);font-weight:500;color:var(--cw-navy);
  background-color:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.75);
  box-shadow:0 4px 14px -10px rgba(10,31,61,.25);transition:background-color var(--cw-ease)}
body.cw .l-nav div>ul>li>a:hover{background-color:rgba(255,255,255,.85);color:var(--cw-navy)}
body.cw .l-nav li.menu-item-has-children>a::after{content:"";flex:none;width:8px;height:8px;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);opacity:.5}
body.cw .l-nav .submenu a{font-size:clamp(16px,2vw,20px)}
body.cw .l-nav li.cw-cta>a{background-color:var(--cw-purple);color:#fff;border-color:rgba(255,255,255,.2);justify-content:center}
body.rtl.cw .l-nav .submenu__back .icon{display:inline-block;transform:scaleX(-1)}
body.cw .l-nav .submenu__back{border:0;background:none}
body.cw .l-nav .submenu__back>a,body.cw .l-nav .submenu__back>div{background:none!important;border:0!important;box-shadow:none!important}
@media (max-width:575.98px){body.cw .l-nav ul{padding-top:104px}}

/* Layer-menu contact block (Theme Panel → hamburger details) */
body.rtl.cw .l-nav__details{margin-left:0;margin-inline-start:auto;text-align:right;color:var(--cw-slate)}
body.cw .l-nav__details h3{font-size:16px;font-weight:600;color:var(--cw-navy);margin-bottom:8px}
body.cw .l-nav__details a{color:var(--cw-navy)}
@media (max-width:991.98px){body.cw .l-nav__details{display:none}}

/* ---------- 8. Footer (Volve footer widgets) ---------- */
body.cw #footer.bg-dark{background-color:var(--cw-navy-deep);color:var(--cw-mist)}
body.cw #footer .footer-widgets{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,.8fr) minmax(0,1.05fr) minmax(0,1.05fr);gap:40px 36px;padding-top:72px;padding-bottom:40px}
body.cw #footer .footer-column{width:auto;max-width:none;flex:none;float:none;padding:0}
body.cw #footer .widget{margin-bottom:28px}
body.cw #footer .widget-title{margin:0 0 14px;font-size:15px;font-weight:600;line-height:1.4;color:var(--cw-baby)}
body.cw #footer .widget ul{list-style:none;margin:0;padding:0}
body.cw #footer .widget li{margin:0;padding:0;border:0}
body.cw #footer .widget li a{display:inline-flex;align-items:center;min-height:34px;font-size:14.5px;line-height:1.5;color:var(--cw-mist);transition:color var(--cw-ease)}
body.cw #footer .widget li a:hover{color:#fff}
body.cw #footer .widget_nav_menu div>ul>li>a{font-weight:400}
body.cw #footer .widget_nav_menu div>ul>li>a[href="#ecpuw"]{color:#fff;font-weight:600;letter-spacing:.04em}
body.cw #footer .cw-fbrand__name{margin:0 0 12px;font-size:20px;font-weight:700;color:#fff}
body.cw #footer .cw-fbrand__name span{display:block;font-size:11px;font-weight:600;letter-spacing:.16em;color:var(--cw-mist)}
body.cw #footer .cw-fbrand__about{margin:0 0 20px;font-size:14.5px;line-height:1.85;max-width:38ch;color:var(--cw-mist)}
body.cw #footer .cw-fcontact{list-style:none;margin:0;padding:0;display:grid;gap:12px}
body.cw #footer .cw-fcontact li{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.65;min-height:0}
body.cw #footer .cw-fcontact svg{width:17px;height:17px;flex:none;margin-top:3px;color:var(--cw-baby)}
body.cw #footer .cw-fcontact strong{display:block;color:#fff;font-weight:500}
body.cw #footer .cw-fcontact a{display:inline;min-height:0;color:var(--cw-mist)}
body.cw #footer .cw-fcontact a:hover{color:#fff}
body.cw #footer .footer-bottom{border-top:1px solid var(--cw-navy-2);padding:20px 0;font-size:14px;color:var(--cw-mist)}
body.cw #footer .footer-bottom a{color:var(--cw-mist)}
body.cw #footer .footer-bottom a:hover{color:#fff}
body.rtl.cw #footer .footer-bottom__left{text-align:right}
body.rtl.cw #footer .footer-bottom__right{text-align:left}
body.cw #footer .cw-sep{margin:0 8px;opacity:.5}
@media (max-width:991.98px){body.cw #footer .footer-widgets{grid-template-columns:repeat(2,minmax(0,1fr))}body.cw #footer .footer-column:first-child{grid-column:1/-1}}
@media (max-width:575.98px){body.cw #footer .footer-widgets{grid-template-columns:minmax(0,1fr);padding-top:52px}body.rtl.cw #footer .footer-bottom__left,body.rtl.cw #footer .footer-bottom__right{text-align:center}}
