/* ==========================================================================
   YBWeb shared UI layer — header, mobile menu, language switcher, footer,
   floating buttons and mobile layout fixes. Loaded last on every page.
   Desktop (>900px) keeps its original design; only logo, language switcher
   and footer are unified there.
   ========================================================================== */

/* ---------- 0. Layout safety: fix the causes of sideways scrolling ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:96px}
/* "clip" (unlike "hidden") does not turn <body> into a scroll box, so the sticky header keeps working */
html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:visible}
@supports (overflow-x:clip){html,body{overflow-x:clip}}
body{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
img,svg,video,canvas,iframe{max-width:100%}
/* flex/grid children may shrink below their content width instead of pushing the page wider */
.nav>*,.hero-grid>*,.case-compact>*,.clarity-grid>*,.partner-banner>*,.order-wrap>*,.cta-box>*,.price-teaser-box>*,
.service-grid>*,.cards>*,.services-six>*,.blog-grid>*,.related-grid>*,.pricing>*,.subscription-grid>*,.workflow-grid>*,
.market-grid>*,.market-card>*,.trust>*,.belgium-strip>*,.footer-columns>*,.footer-grid>*,.form-grid>*,form>*{min-width:0}
h1,h2,h3,h4,p,li,a,summary,label,span,strong{overflow-wrap:break-word}
[id]{scroll-margin-top:96px}
/* slide-in animations moved cards sideways past the screen edge on narrower screens: animate them vertically there */
@media(max-width:1260px){[data-reveal="left"]:not(.is-in),[data-reveal="right"]:not(.is-in){transform:translate3d(0,20px,0)}}

/* ---------- 1. Header ---------- */
.site-header{position:sticky;top:0;z-index:40}
.site-header.menu-open{z-index:60}
.site-header .nav{position:relative}
.brand{display:flex;align-items:center;flex:0 1 auto;min-width:0;line-height:0}
.brand-logo{display:block;width:auto;height:46px;max-width:100%;object-fit:contain}

/* language switcher: always AR | NL | EN in this order, also on RTL pages */
.lang-switcher{display:flex;flex:none;align-items:center;gap:6px;padding:5px;border:1px solid rgba(148,189,230,.18);border-radius:16px;background:rgba(255,255,255,.035);direction:ltr;unicode-bidi:isolate}
.lang-switcher a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;padding:8px 11px;border-radius:12px;color:#c9d7e9;font-family:Inter,Tajawal,system-ui,sans-serif;font-size:13px;font-weight:600;line-height:1.2;letter-spacing:.02em;white-space:nowrap;transition:color .2s ease,background-color .2s ease}
.lang-switcher a:hover{color:#fff}
.lang-switcher a.active{background:linear-gradient(90deg,#0c9df2,#2563eb);color:#fff;font-weight:800;box-shadow:0 8px 22px rgba(22,132,255,.25)}
.lang-switcher .l-full{display:none}
@media(min-width:901px){
  .lang-switcher.has-full .l-full{display:inline}
  .lang-switcher.has-full .l-code{display:none}
  .lang-switcher.has-full a{font-weight:400;letter-spacing:0;padding:8px 12px}
  .lang-switcher.has-full a.active{font-weight:800}
}

/* hamburger */
.yb-burger{display:none;flex:none;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:14px;border:1px solid rgba(148,189,230,.22);background:rgba(255,255,255,.045);color:#fff;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.yb-burger:focus-visible,.lang-switcher a:focus-visible,.yb-menu a:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}
.yb-burger-box{position:relative;display:block;width:20px;height:14px;pointer-events:none}
.yb-burger-box i{position:absolute;left:0;right:0;height:2px;border-radius:2px;background:currentColor;transition:transform .24s ease,opacity .18s ease,top .24s ease}
.yb-burger-box i:nth-child(1){top:0}.yb-burger-box i:nth-child(2){top:6px}.yb-burger-box i:nth-child(3){top:12px}
.yb-burger[aria-expanded="true"]{background:rgba(34,167,255,.14);border-color:rgba(56,189,248,.5)}
.yb-burger[aria-expanded="true"] i:nth-child(1){top:6px;transform:rotate(45deg)}
.yb-burger[aria-expanded="true"] i:nth-child(2){opacity:0}
.yb-burger[aria-expanded="true"] i:nth-child(3){top:6px;transform:rotate(-45deg)}

/* mobile menu panel (hidden on desktop) */
.yb-menu{display:none}

@media(min-width:901px) and (max-width:1160px){
  .brand-logo{height:38px}
  .site-header .nav{gap:14px}
  .site-header .navlinks,.site-header .simple-nav{gap:16px}
}
@media(min-width:901px) and (max-width:1023px){
  .brand-logo{height:32px}
  .site-header .nav{gap:12px}
  .site-header .navlinks,.site-header .simple-nav{gap:11px;font-size:13px}
  .site-header .simple-nav a{font-size:13px}
  .lang-switcher{gap:2px;padding:4px}
  .lang-switcher a{min-width:34px;padding:7px 8px}
  .site-header .header-cta{padding:10px 14px!important;font-size:13px}
}

@media(max-width:900px){
  html{scroll-padding-top:76px}
  [id]{scroll-margin-top:76px}
  .site-header .nav{min-height:64px;gap:10px;flex-wrap:nowrap}
  .site-header .navlinks,.site-header .simple-nav,.site-header .header-cta{display:none!important}
  .brand{flex:1 1 auto}
  .brand-logo{width:100%;max-width:190px;height:auto}
  .lang-switcher{gap:2px;padding:3px;border-radius:13px;margin:0!important}
  .lang-switcher a{min-width:36px;height:36px;padding:0 6px;border-radius:10px;font-size:12.5px;font-weight:700}
  .yb-burger{display:inline-flex}
  .yb-menu{position:absolute;top:100%;left:0;right:0;z-index:5;max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px);overflow-y:auto;overscroll-behavior:contain;background:#050f1e;border-top:1px solid rgba(148,189,230,.16);border-bottom:1px solid rgba(148,189,230,.16);box-shadow:0 26px 46px rgba(0,0,0,.5)}
  .yb-menu.open{display:block;animation:ybMenuIn .2s ease both}
  .yb-menu nav{display:grid;gap:4px;padding:10px 0 calc(14px + env(safe-area-inset-bottom,0px))}
  .yb-menu a{display:flex;align-items:center;min-height:50px;padding:0 14px;border-radius:14px;color:#e7eef8;font-size:16px;font-weight:600;line-height:1.3;-webkit-tap-highlight-color:transparent}
  .yb-menu a:hover,.yb-menu a:active{background:rgba(255,255,255,.06)}
  .yb-menu a[aria-current="page"]{color:#6fd3ff;background:rgba(34,167,255,.09)}
}
@media(max-width:345px){
  .site-header .nav{gap:6px}
  .lang-switcher a{min-width:31px;height:34px;padding:0 4px;font-size:12px}
  .yb-burger{width:40px;height:40px;border-radius:12px}
}
@keyframes ybMenuIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.yb-menu.open{animation:none}.yb-burger-box i{transition:none}}

/* ---------- 2. Footer (one footer for every page and language) ---------- */
.site-footer{background:#050f1e;border-top:1px solid rgba(145,184,223,.14);padding:56px 0 26px;color:#9fb0c8;position:relative}
.site-footer .footer-columns{display:grid;grid-template-columns:1.5fr .8fr .9fr .9fr;gap:38px}
.site-footer .footer-logo{display:inline-block;line-height:0;font-size:0;letter-spacing:0}
.site-footer .footer-logo img{display:block;width:auto;height:44px;border-radius:0}
.site-footer .footer-about p,.site-footer .footer-col p{max-width:330px;margin:14px 0;color:#91a4bb;font-size:14px;line-height:1.65}
.site-footer .footer-contact{display:grid;gap:6px;font-size:13px}
.site-footer .footer-contact a{color:#62c8ff}
.site-footer .footer-col{display:grid;align-content:start;gap:9px}
.site-footer .footer-col h4{margin:0 0 6px;color:#f3f8ff;font-size:15px}
.site-footer .footer-col a{color:#a9bad0;font-size:14px}
.site-footer .footer-col a:hover,.site-footer .footer-legal a:hover{color:#65cbff}
.site-footer .social-row{display:flex;gap:10px;direction:ltr}
.rtl .site-footer .social-row{justify-content:flex-end}
.site-footer .social-row .social-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(112,184,240,.2);border-radius:12px;color:#6dd0ff;background:rgba(16,39,69,.8);transition:.2s}
.site-footer .social-row .social-icon:hover{transform:translateY(-2px);border-color:#4dbfff;background:rgba(25,72,116,.8)}
.site-footer .social-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.site-footer .social-icon[aria-label="Facebook"] svg{width:18px;height:18px;fill:currentColor;stroke:none}
.site-footer .footer-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 16px;margin-top:34px;padding-top:18px;border-top:1px solid rgba(145,184,223,.14);color:#8296af;font-size:12px}
.site-footer .footer-legal a{color:#a9bad0}
@media(max-width:900px){
  .site-footer{padding:42px 0 22px}
  .site-footer .footer-columns{grid-template-columns:1fr 1fr;gap:28px 20px}
  .site-footer .footer-about,.site-footer .footer-col:last-child{grid-column:1/-1}
  .site-footer .footer-logo img{height:38px}
  .site-footer .footer-about p,.site-footer .footer-col p{max-width:none;margin:12px 0}
  .site-footer .footer-col{gap:4px}
  .site-footer .footer-col a{display:flex;align-items:center;min-height:36px}
  .site-footer .footer-col h4{margin-bottom:4px}
  .site-footer .social-row{margin-top:4px}
  .site-footer .footer-bottom{margin-top:24px;line-height:1.7}
}

/* ---------- 3. Floating buttons ----------
   Desktop: unchanged floating column in the corner.
   Mobile: a slim action bar docked to the bottom edge. It is "sticky", so it has its own
   reserved strip: it never lies on top of text, cards, forms or the footer, and at the end
   of the page it simply sits below the footer. */
.yb-float{position:fixed;right:20px;bottom:20px;z-index:50;display:flex;flex-direction:column;align-items:flex-end;gap:12px;pointer-events:none}
.rtl .yb-float{right:auto;left:20px}
.yb-float>a{pointer-events:auto}
.floating-stack.yb-float{gap:10px}
/* inside the wrapper the buttons no longer position themselves */
body .yb-float>.request-float,body .yb-float>.wa{position:relative!important;right:auto!important;left:auto!important;bottom:auto!important;top:auto!important}
.yb-float .wa2{color:#fff}
.yb-float .wa2 svg{display:block;width:27px;height:27px}
@media(max-width:900px){
  body .yb-float,body .floating-stack.yb-float,body.rtl .yb-float,body.rtl .floating-stack.yb-float{
    position:-webkit-sticky;position:sticky;left:auto;right:auto;bottom:0;z-index:45;
    display:flex;flex-direction:row;align-items:center;justify-content:center;justify-items:initial;gap:8px;
    width:auto;margin:0;padding:7px calc(11px + env(safe-area-inset-right,0px)) calc(7px + env(safe-area-inset-bottom,0px)) calc(11px + env(safe-area-inset-left,0px));
    background:rgba(5,15,30,.94);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
    border-top:1px solid rgba(145,184,223,.16);box-shadow:0 -10px 28px rgba(0,0,0,.28);
    pointer-events:auto;transition:opacity .18s ease,visibility .18s ease}
  body .yb-float>a{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;flex:1 1 0;min-width:0;max-width:280px;
    width:auto!important;height:42px!important;min-height:0!important;padding:0 12px!important;border-radius:13px!important;
    font-family:inherit;font-size:13.5px!important;font-weight:800;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    color:#fff;transform:none!important;-webkit-tap-highlight-color:transparent}
  body .yb-float>.request-float,body .yb-float>.quote{background:linear-gradient(90deg,#0a9ff5,#2467ff);border:1px solid rgba(125,211,252,.28);box-shadow:0 6px 18px rgba(36,103,255,.26)}
  body .yb-float>.wa,body .yb-float>.wa2{background:#1fb457;border:1px solid rgba(134,239,172,.3);box-shadow:0 6px 18px rgba(34,197,94,.22)}
  body .yb-float>.wa svg,body .yb-float>.wa2 svg{flex:none;width:20px;height:20px}
  body .yb-float>.wa::after,body .yb-float>.wa2::after{content:"WhatsApp";position:static;inset:auto;background:none;transform:none;font-family:Inter,system-ui,sans-serif}
  body .yb-float>.request-float::after{display:none}
  /* while typing in a form the bar steps aside so it cannot sit on the fields above the keyboard */
  .yb-float.is-away{opacity:0;visibility:hidden;pointer-events:none}
  #cookieBanner{padding:14px 14px calc(14px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){.yb-float{transition:none!important}}

/* ---------- 4. Mobile layout tuning (design unchanged, only sizes and spacing) ---------- */
.price-start .price-from{display:block;margin-bottom:2px;color:#9fb0c8;font-size:13px;font-weight:700;letter-spacing:.02em;line-height:1.3;text-align:center}
.yb-note{padding:0 0 46px}
.yb-note .container{max-width:860px;text-align:center}
.yb-note h2{margin:0 0 8px;font-size:20px;line-height:1.35;color:#dbe7f5}
.yb-note p{margin:0;color:#94a8c0;font-size:15px;line-height:1.75}
.yb-form-status{min-height:0;font-size:14px;line-height:1.6}
.yb-form-status:empty{display:none}
.yb-form-status.ok,.yb-form-status.err{padding:12px 14px;border-radius:12px}
.yb-form-status.ok{color:#bbf7d0;background:rgba(34,197,94,.10);border:1px solid rgba(34,197,94,.26)}
.yb-form-status.err{color:#fecaca;background:rgba(248,113,113,.08);border:1px solid rgba(248,113,113,.32)}

@media(max-width:900px){
  section{padding-top:54px;padding-bottom:54px}
  .page-hero{padding:48px 0 30px}
  .blog-hero{padding:44px 0 18px}
  .breadcrumbs{margin-top:28px}
}
@media(max-width:560px){
  /* vertical rhythm */
  section{padding-top:40px;padding-bottom:40px}
  .section-head{margin-bottom:22px}
  .section-head h2{font-size:clamp(24px,7vw,28px);line-height:1.22}
  .section-head p{font-size:15.5px}
  .lead{font-size:16px;line-height:1.7}
  h1{font-size:clamp(28px,8.4vw,34px);line-height:1.18}

  /* buttons */
  .btn{min-height:48px;padding:12px 18px;text-align:center}
  .actions{gap:10px;margin:22px 0 0}
  .actions .btn{flex:1 1 100%}

  /* homepage */
  .hero{min-height:0!important;padding:30px 0 34px}
  .hero h1,.hero h1 .gradient{font-size:clamp(28px,8.4vw,34px);line-height:1.22}
  .hero h1{margin:16px 0 14px;letter-spacing:-.01em}
  .hero .lead{line-height:1.7}
  .hero .badge{font-size:12px;max-width:100%}
  .trust{gap:10px;margin-top:22px}
  .trust .item{padding:13px 14px;border-radius:16px}
  .trust strong{font-size:16px;line-height:1.3}
  .market-strip{padding:18px 0 4px}
  .market-card{min-height:70px;border-radius:16px}
  .home-short{padding:36px 0 6px!important}
  #services{padding-top:36px!important;padding-bottom:40px!important}
  #services .card,.services-six .card{min-height:0;padding:20px}
  .card{padding:20px}
  .card h3{font-size:19px}
  .portfolio-case{padding:14px 0 30px!important}
  .case-copy h2{font-size:24px!important;line-height:1.25}
  .price-teaser{padding:6px 0 36px}
  .price-teaser-box{gap:16px;padding:24px 18px;border-radius:20px}
  .price-teaser-box .actions{margin:0}
  .price-start{font-size:42px;line-height:1.1}
  .belgium-strip{gap:8px;padding:12px;border-radius:18px}
  .city{padding:12px}
  #faq .section-head{text-align:start}
  #contact{padding-top:8px!important}
  .cta-box{gap:14px;padding:24px 18px}
  .cta-box h2{font-size:22px;line-height:1.3}
  .cta-box .actions{margin:0}

  /* inner pages: about, pricing, contact, services */
  .page-hero{padding:34px 0 22px}
  .page-hero h1{font-size:clamp(28px,8.4vw,34px);line-height:1.16;margin:10px 0 12px}
  .page-hero p{font-size:16px;line-height:1.7;margin:0}
  .service-grid{gap:12px}
  .service-box{padding:20px;border-radius:20px}
  .service-box h3{font-size:19px;line-height:1.35}
  .page-cta{padding:24px 18px;border-radius:20px}
  .page-cta h2{margin:0 0 10px;font-size:22px;line-height:1.3}
  .page-cta p{margin:0 0 4px;font-size:15.5px}
  .company-meta{gap:6px 14px;margin-top:16px;font-size:12.5px}
  .price-big{font-size:42px;line-height:1.15}
  .package-request{align-self:stretch;margin-top:16px}
  .page-cta>.btn{display:flex;width:100%;margin-top:14px}
  .page-hero+section,.blog-hero+section{padding-top:14px}
  .package-features{margin:12px 0 6px}

  /* blog + articles */
  .blog-hero{padding:32px 0 10px}
  .blog-hero h1{font-size:clamp(26px,7.6vw,31px)!important;line-height:1.22!important}
  .blog-hero p{font-size:16px!important;line-height:1.7!important}
  .blog-grid{gap:12px}
  .blog-card{padding:20px;border-radius:20px}
  .blog-card h3{font-size:18.5px;line-height:1.4}
  .blog-card p{margin:0;line-height:1.7}
  .blog-card a.read,.blog-card span.read{margin-top:12px}
  .breadcrumbs{margin-top:20px}
  .article-wrap{padding:10px 0 44px}
  .article-wrap h1{font-size:clamp(26px,7.6vw,31px);line-height:1.25}
  .article-wrap h2{font-size:21px;margin:30px 0 12px}
  .article-wrap p{font-size:16px;line-height:1.85}
  .article-cta{margin-top:32px;padding:22px 18px}
  .related{margin-top:34px;padding-top:24px}
  .yb-note{padding-bottom:34px}
}

/* contact form on phones/tablets: full-width fields, comfortable touch height, 16px text (stops iOS zooming in on focus) */
@media(max-width:900px){
  #request-form h2{margin:0 0 14px}
  #request-form form input:not([type=checkbox]):not([type=hidden]),#request-form form select,#request-form form textarea{width:100%;min-width:0;min-height:50px;font-family:inherit;font-size:16px;line-height:1.4;box-sizing:border-box;-webkit-appearance:none;appearance:none}
  #request-form form select{background-image:linear-gradient(45deg,transparent 50%,#9fb0c8 50%),linear-gradient(135deg,#9fb0c8 50%,transparent 50%)!important;background-position:calc(100% - 20px) 50%,calc(100% - 14px) 50%!important;background-size:6px 6px,6px 6px!important;background-repeat:no-repeat!important;padding-inline-end:38px!important}
  .rtl #request-form form select{background-position:14px 50%,20px 50%!important}
  #request-form form textarea{min-height:140px;resize:vertical}
  #request-form form label{display:flex;align-items:flex-start;gap:10px;line-height:1.55;cursor:pointer}
  #request-form form label input[type=checkbox]{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:#1d80ff}
  #request-form form button[type=submit]{min-height:52px;cursor:pointer;font-family:inherit;font-size:16px}
  #request-form form button[disabled]{opacity:.65;cursor:not-allowed}
  #request-form form input:focus,#request-form form select:focus,#request-form form textarea:focus{outline:none;border-color:#38bdf8!important;box-shadow:0 0 0 3px rgba(56,189,248,.14)}
}

/* ---------- 5. RTL details ---------- */
.rtl .lang-switcher,.rtl .social-row{direction:ltr}
.rtl h1,.rtl h2,.rtl h3{letter-spacing:0}
@media(max-width:560px){
  .rtl h1,.rtl .page-hero h1,.rtl .hero h1,.rtl .hero h1 .gradient{font-size:clamp(27px,8vw,32px);line-height:1.5}
  .rtl .blog-hero h1,.rtl .article-wrap h1{line-height:1.5!important}
  .rtl .section-head h2,.rtl .page-cta h2,.rtl .cta-box h2{line-height:1.5}
}
