/* =========================================================
   LUNOVA — Mining Equipment & Processing Solutions
   Premium industrial B2B website · European engineering style
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --navy-900: #041426;   /* deepest background */
  --navy-800: #061a33;
  --navy-700: #0b2547;
  --navy-600: #10355e;
  --steel-500: #2d5a8e;

  --ink: #101b29;        /* primary text */
  --ink-soft: #475569;   /* secondary text */
  --ink-faint: #7a8aa0;  /* muted text */

  --line: #dfe6ef;       /* hairlines */
  --line-strong: #c8d4e3;

  --paper: #ffffff;
  --paper-2: #f4f7fb;    /* alt section bg */
  --paper-3: #e8eef6;

  --brand: #0047AB;      /* Lunova blue */
  --brand-2: #0061df;
  --accent: #f3b201;     /* Lunova logo yellow */
  --accent-2: #ffc71f;
  --accent-ink: #b78500;

  --wa-green: #1e9e51;
  --wa-green-2: #16823f;

  --ok: #1f9d6b;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;

  --shadow-sm: 0 1px 2px rgba(4, 20, 38, .06), 0 2px 8px rgba(4, 20, 38, .05);
  --shadow: 0 6px 18px rgba(4, 20, 38, .08), 0 2px 6px rgba(4, 20, 38, .05);
  --shadow-lg: 0 18px 50px rgba(4, 20, 38, .16), 0 6px 16px rgba(4, 20, 38, .10);

  --container: 1200px;
  --container-narrow: 980px;

  --font-head: "Montserrat", "Cairo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Cairo", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.18; color: var(--ink); letter-spacing: -0.01em; }

/* ---------- Layout Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: var(--container-narrow); }
.section { padding: 104px 0; position: relative; }
.section.tight { padding: 84px 0; }
.section--alt { background: var(--paper-2); }
.section--dark {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0,71,171,.18), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #eaf1f8;
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #ffffff; }
.section--dark p { color: #d9e6f3; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--brand); border-radius: 2px; }
.section--dark .eyebrow { color: var(--brand-2); }

.section-head { max-width: 760px; margin: 18px 0 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 14px 0 16px; }
.section-head p { color: var(--ink-soft); font-size: 17px; }
.section--dark .section-head p { color: #d9e6f3; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-wa {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, var(--wa-green), var(--wa-green-2));
  color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .28);
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #0a1320; box-shadow: 0 8px 20px rgba(242, 92, 5, .30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(242, 92, 5, .42); }
.btn-dark { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(0, 71, 171, .28); }
.btn-dark:hover { transform: translateY(-2px); background: var(--brand-2); }
.btn-ghost { border: 1.5px solid var(--line-strong); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost.on-dark { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.10); border-color: #fff; }
.btn-wa {
  background: linear-gradient(180deg, var(--wa-green), var(--wa-green-2));
  color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .28);
}
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 211, 102, .40); }
.btn-lg { padding: 17px 34px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Floating WhatsApp (main contact) ---------- */
.wa-float {
  position: fixed; right: 36px; bottom: 36px; z-index: 200;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px 14px 16px; border-radius: 999px;
  background: linear-gradient(180deg, var(--wa-green), var(--wa-green-2));
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 28px rgba(30,158,81,.45);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wa-float svg { width: 26px; height: 26px; flex: 0 0 26px; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px rgba(30,158,81,.55); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: var(--wa-green); opacity: .55; z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .55; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (max-width: 520px) {
  .wa-float { padding: 14px; gap: 0; }
  .wa-float span { display: none; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 36px; bottom: 104px; z-index: 205;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(4, 20, 38, .22);
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, background .2s, color .2s, border-color .2s;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
  background: transparent;
}
.top-bar {
  background: rgba(4,20,38,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  padding: 8px 0;
  transition: max-height .25s var(--ease), padding .25s var(--ease), opacity .25s var(--ease);
  overflow: hidden;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tb-location { display: inline-flex; align-items: center; gap: 8px; }
.tb-location svg { width: 13px; height: 13px; opacity: .9; }
.tb-contact { display: inline-flex; align-items: center; gap: 18px; }
.tb-contact a {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.72); transition: color .2s;
}
.tb-contact a:hover { color: #fff; }
.tb-contact svg { width: 13px; height: 13px; }
.tb-contact a[href^="https://wa.me"] svg { color: var(--wa-green-2); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; transition: padding .3s var(--ease); }
.site-header.is-scrolled {
  background: rgba(255,255,255,.98);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(4,20,38,.07);
}
.site-header.is-scrolled .top-bar { max-height: 0; padding: 0; opacity: 0; }
.site-header.is-scrolled .bar { padding: 12px 0; }
.logo {
  display: inline-flex; align-items: center; gap: 14px;
  color: #fff; transition: color .3s var(--ease);
}
.logo img { height: 44px; width: auto; display: block; }
.site-header.is-scrolled .logo { color: var(--brand); }
.footer-brand .logo img { height: 52px; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  color: rgba(255,255,255,.86); padding: 10px 22px; border-radius: 8px;
  transition: color .2s, background .2s;
  position: relative;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.10); }
.nav a::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 4px; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0);
  transition: transform .25s var(--ease); opacity: .9;
}
.nav a:hover::after { transform: scaleX(1); }
.nav a.is-current { color: #fff; background: rgba(255,255,255,.12); }
.nav a.is-current::after { transform: scaleX(1); }
.site-header.is-scrolled .nav a.is-current { color: var(--brand); background: var(--paper-2); }
.site-header.is-scrolled .nav a { color: var(--ink-soft); }
.site-header.is-scrolled .nav a:hover { color: var(--brand); background: var(--paper-2); }
.site-header.is-scrolled .nav a::after { background: var(--brand); }
.nav-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; margin-left: 10px;
  color: rgba(255,255,255,.86); background: rgba(255,255,255,.08);
  transition: color .2s, background .2s;
}
.nav-search:hover { color: #fff; background: rgba(255,255,255,.16); }
.nav-search svg { width: 18px; height: 18px; }
.site-header.is-scrolled .nav-search { color: var(--ink-soft); background: var(--paper-2); }
.site-header.is-scrolled .nav-search:hover { color: var(--brand); background: var(--paper-3); }

.nav-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; margin-left: 8px;
  color: rgba(255,255,255,.86); background: rgba(255,255,255,.08);
  transition: color .2s, background .2s, transform .2s;
}
.nav-social:hover { color: #fff; background: rgba(255,255,255,.16); transform: translateY(-1px); }
.nav-social svg { width: 20px; height: 20px; }
.site-header.is-scrolled .nav-social { color: var(--ink-soft); background: var(--paper-2); }
.site-header.is-scrolled .nav-social:hover { color: var(--brand); background: var(--paper-3); }
.site-header.is-page .nav-social { color: var(--ink-soft); background: var(--paper-2); }
.site-header.is-page .nav-social:hover { color: var(--brand); background: var(--paper-3); }

/* Sub-page header starts light so nav is readable over light page-hero */
.site-header.is-page {
  background: rgba(255,255,255,.98);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(4,20,38,.07);
}
.site-header.is-page .top-bar { background: var(--navy-800); }
.site-header.is-page .logo { color: var(--brand); }
.site-header.is-page .nav a { color: var(--ink-soft); }
.site-header.is-page .nav a:hover { color: var(--brand); background: var(--paper-2); }
.site-header.is-page .nav a::after { background: var(--brand); }
.site-header.is-page .nav a.is-current { color: var(--brand); background: var(--paper-2); }
.site-header.is-page .nav-search { color: var(--ink-soft); background: var(--paper-2); }
.site-header.is-page .nav-search:hover { color: var(--brand); background: var(--paper-3); }
.site-header.is-page .nav-toggle { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { padding: 11px 20px; font-size: 14px; }
.header-actions .btn-wa {
  background: linear-gradient(180deg, var(--wa-green), var(--wa-green-2));
  color: #fff; box-shadow: 0 8px 20px rgba(30,158,81,.35);
}
.header-actions .btn-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(30,158,81,.50); }
.site-header.is-scrolled .header-actions .btn-wa { color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; color: #fff; }
.site-header.is-scrolled .nav-toggle { color: var(--brand); }
.nav-toggle svg { width: 24px; height: 24px; margin: auto; }
.mobile-nav { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
  padding-top: 140px; padding-bottom: 80px;
  background:
    linear-gradient(100deg, rgba(4,20,38,.78) 0%, rgba(4,20,38,.62) 55%, rgba(0,71,171,.16) 100%),
    url("../images/world-map.svg") center/cover no-repeat,
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 700px at 78% 30%, rgba(0,71,171,.14), transparent 55%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-right { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.hero-card { margin-top: 6px; }
.hero h1 {
  font-size: clamp(30px, 4.4vw, 52px); color: #fff; line-height: 1.12; font-weight: 800;
  letter-spacing: -0.02em;
}
.hero .sub {
  margin: 22px 0 30px; font-size: 18px; color: #d7e2ee; max-width: 540px; line-height: 1.7;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.point {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 18px 18px;
  backdrop-filter: blur(6px);
}
.point .num { font-family: var(--font-head); font-weight: 800; font-size: 26px; color: #fff; }
.point .num em { color: var(--brand-2); font-style: normal; }
.point .lbl { font-size: 13.5px; color: #c4d2e0; margin-top: 2px; }

/* Hero social icons above the card */
.hero-social { display: flex; justify-content: flex-end; gap: 10px; }
.hero-social a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #fff; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.hero-social a svg { width: 18px; height: 18px; }
.hero-social a:hover { transform: translateY(-3px); background: var(--brand); border-color: var(--brand); }

/* Hero side card (trust panel) */
.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-l); padding: 30px;
  backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
}
.hero-card h3 { color: #fff; font-size: 19px; margin-bottom: 6px; }
.hero-card p { color: #c4d2e0; font-size: 14.5px; margin-bottom: 20px; }
.hero-card .row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); }
.hero-card .row:first-of-type { border-top: none; }
.hero-card .ic {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff;
}
.hero-card .ic svg { width: 22px; height: 22px; }
.hero-card .row b { display: block; color: #fff; font-family: var(--font-head); font-size: 15px; }
.hero-card .row span { font-size: 13px; color: #b8c6d6; }

/* Hero card rotator: first slide = original text, next 3 = project photos */
.hero-card { position: relative; overflow: hidden; }
.hero-card-sizer { visibility: hidden; }
.hero-card-slides {
  position: absolute; inset: 0; padding: 30px; z-index: 1;
}
.hero-card-slide {
  position: absolute; inset: 0; padding: 30px;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 1s var(--ease);
  pointer-events: none;
}
.hero-card-slide.active { opacity: 1; z-index: 2; pointer-events: auto; }
.hero-card-slide.photo { padding: 0; }
.hero-card-slide.photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 65%;
  border-radius: 0;
}
/* Soft brand-tinted mask so the raw photos blend with the glass card */
.hero-card-slide.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background:
    radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(4,20,38,.22) 0%, rgba(4,20,38,0) 26%, rgba(4,20,38,0) 52%, rgba(4,20,38,.46) 100%),
    linear-gradient(125deg, rgba(0,71,171,.16), rgba(0,71,171,0) 42%);
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.45));
}
/* Hairline frame that echoes the glass card border over the photo */
.hero-card-slide.photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border-radius: var(--radius-l);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
/* Hasselblad-like natural color grade */
.hero-card-slide img.hasselblad {
  filter: contrast(1.06) saturate(0.92) brightness(1.03);
}

/* ---------- Generic cards ---------- */
.cards { display: grid; gap: 24px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* ---------- Products (vertical cards, image-on-top style) ---------- */
.product {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: #fff;
  text-decoration: none; color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product:hover .card-go { color: var(--brand-2); gap: 10px; }
.product:hover .thumb img { transform: scale(1.05); }
.product .thumb {
  height: 220px; position: relative; overflow: hidden;
  background: var(--navy-900);
  display: grid; place-items: center;
}
.product .thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 65%;
  transition: transform .4s var(--ease);
}
.product .thumb img.hasselblad {
  filter: saturate(0.9) contrast(1.05) brightness(1.03);
}
/* Uniform Hasselblad vignette over every graded product photo */
.product .thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.22) 100%);
}
.product .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.product h3 { font-size: 19px; margin-bottom: 8px; }
.product .desc { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 0; }
.product .card-go {
  margin-top: auto; padding-top: 18px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--brand);
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.product .card-go svg { width: 16px; height: 16px; }
#products .cards.c3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Solutions ---------- */
.solution {
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.solution:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.solution .visual {
  height: 190px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: grid; place-items: center; color: #fff;
}
.solution .visual .ic { width: 64px; height: 64px; opacity: .92; }
.solution .visual::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 80% 0%, rgba(242,183,5,.10), transparent 60%);
}
.solution .body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.solution .body h3 { font-size: 20px; }
.solution .for { color: var(--ink-soft); font-size: 14.5px; margin: 8px 0 16px; }
.solution .equip { margin-top: auto; }
.solution .equip .lbl { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.solution .equip .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.solution .equip .chips span {
  font-size: 13px; font-weight: 600; color: var(--brand); background: #eaf1f8;
  padding: 5px 12px; border-radius: 999px;
}

/* Solution card with project photo */
.solution .visual.photo {
  height: 260px; padding: 0;
  display: grid; align-items: end; justify-items: center;
  padding-bottom: 22px;
}
.solution .visual.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 55%;
  filter: saturate(0.92) contrast(1.05) brightness(1.03);
}
.solution .visual.photo::after {
  background: linear-gradient(180deg, rgba(4,20,38,.12) 0%, rgba(4,20,38,0) 30%, rgba(4,20,38,.62) 100%);
}

/* Solution card with icon-based flowchart */
.solution .visual.flow {
  position: relative; overflow: hidden;
  padding: 22px 18px 18px;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #f2f6fb 0%, #e1ebf5 100%);
  border-bottom: 1px solid var(--line);
}
.solution .visual.flow .flow-wrap {
  position: relative; width: 100%; height: auto; z-index: 1;
}
.solution .visual.flow svg { width: 100%; height: auto; display: block; }
.solution .body h3 {
  font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink);
  margin: 2px 0 4px;
}
.solution .body .subtitle {
  font-size: 13px; color: var(--brand); font-weight: 700; letter-spacing: .04em;
  margin: 0 0 12px;
}
.solution .body .for { margin-top: 0; }

/* Solution groups (reference-site style) */
.solution-group { margin-top: 60px; }
.solution-group:first-of-type { margin-top: 6px; }
.group-head { margin-bottom: 26px; }
.group-head .eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); }
.group-head h2 { font-family: var(--font-head); font-weight: 800; font-size: 27px; color: var(--ink); margin: 8px 0 10px; }
.group-head p { color: var(--ink-soft); font-size: 15px; max-width: 760px; line-height: 1.6; }

/* ---------- Project cards (photo + bottom title) ---------- */
.project-card {
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.project-card .cover {
  height: 380px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: grid; align-items: end; justify-items: center;
  padding-bottom: 24px;
}
.project-card .cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 55%;
  filter: saturate(0.92) contrast(1.05) brightness(1.03);
}
.project-card.crop-bottom .cover img { object-position: center 80%; }
.project-card.cool-mask .cover img { filter: saturate(0.62) contrast(1.05) brightness(0.98); }
.project-card.shift-up .cover img { object-position: center 38%; }
.project-card.crop-blur .cover img { object-position: center 75%; }
.project-card.cool-mask .cover::after {
  background:
    radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(4,20,38,.18) 0%, rgba(4,20,38,0) 35%, rgba(4,20,38,.68) 100%);
}
.project-card .cover::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(4,20,38,.12) 0%, rgba(4,20,38,0) 45%, rgba(4,20,38,.72) 100%);
}
.project-card.shift-up .cover::after {
  background:
    radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(4,20,38,.12) 0%, rgba(4,20,38,0) 35%, rgba(4,20,38,.82) 100%);
}
.project-card .cover .pname { position: relative; z-index: 3; text-align: center; padding: 0 18px; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.project-card .cover .pname b { display: block; font-family: var(--font-head); font-size: 22px; color: #fff; }
.project-card .cover .pname span { font-size: 13px; color: #dbe8f5; letter-spacing: .04em; }

/* Placeholder project cards (no photo yet) */
.project-card .cover.placeholder-cover {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  background: linear-gradient(135deg, #1a3a5c, #2d5a87);
}
.project-card .cover.placeholder-cover::after {
  background:
    radial-gradient(125% 125% at 50% 50%, transparent 60%, rgba(0,0,0,.20) 100%),
    linear-gradient(180deg, rgba(4,20,38,.12) 0%, rgba(4,20,38,0) 40%, rgba(4,20,38,.55) 100%);
}
.project-card .cover.placeholder-cover .placeholder-visual {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
}
.project-card .cover.placeholder-cover .placeholder-visual svg {
  width: 72px; height: 72px; color: rgba(255,255,255,.55);
}
.project-card .cover.placeholder-cover .pname { padding-bottom: 24px; z-index: 3; }

/* Page hero (used on sub-pages) */
.page-hero { padding-top: 160px; }
.page-hero .section-head h1 { font-size: clamp(32px, 4.6vw, 48px); margin: 14px 0 16px; }

/* Solutions page CTA */
.solution-cta {
  margin-top: 56px;
  padding: 42px 48px; border-radius: var(--radius-l);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: #fff; text-align: center;
}
.solution-cta h3 { color: #fff; font-size: 24px; margin-bottom: 10px; }
.solution-cta p { color: #c9d9ea; font-size: 16px; max-width: 640px; margin: 0 auto 24px; }

/* ---------- Product category pages ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-faint); margin-bottom: 14px;
}
.breadcrumb a { color: var(--brand); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--ink-soft); }

.product-item {
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.product-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-item .visual {
  height: 220px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: grid; place-items: center;
}
.product-item .visual img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 55%;
  filter: saturate(0.92) contrast(1.05) brightness(1.03);
}
.product-item .visual img.no-filter {
  filter: none;
}
.product-item .visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,20,38,.10) 0%, rgba(4,20,38,0) 40%, rgba(4,20,38,.45) 100%);
}
.product-item .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.product-item h3 { font-size: 18px; margin-bottom: 8px; }
.product-item .for { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.product-item .specs { margin-top: auto; }
.product-item .specs .lbl {
  font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
.product-item .specs .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.product-item .specs .chips span {
  font-size: 12.5px; font-weight: 600; color: var(--brand); background: #eaf1f8;
  padding: 5px 12px; border-radius: 999px;
}
.product-item .actions {
  display: flex; gap: 18px; margin-top: 18px;
}
.product-item .actions .btn {
  flex: 1; padding: 11px 16px; font-size: 14px;
}
.product-item .actions .btn-ghost {
  border-color: var(--line-strong); color: var(--ink-soft); background: #fff;
}
.product-item .actions .btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* Collapsible technical parameter tables (data sourced from reference spec sheets) */
.spec-block {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.spec-block > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--brand);
  background: #f7f9fc;
  user-select: none;
  transition: background .15s;
}
.spec-block > summary:hover { background: #eef3fa; }
.spec-block > summary::-webkit-details-marker { display: none; }
.spec-block > summary::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border: solid var(--brand);
  border-width: 0 4px 4px 0;
  transform: rotate(-45deg);
  margin-top: -2px;
  flex-shrink: 0;
  margin-left: 4px;
  transition: margin-left .25s ease;
}
.spec-block > summary:hover::after {
  margin-left: 9px;
}
/* Inline table hidden — clicking summary opens full-screen modal instead */
.spec-scroll { display: none; }
.spec-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.spec-table th,
.spec-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}
.spec-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
}
.spec-table tbody tr:nth-child(even) { background: #f7f9fc; }
.spec-table tbody td { color: var(--ink-soft); }


/* Spec fullscreen / enlarged modal — no horizontal dragging needed */
.spec-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.spec-modal.open { display: flex; }
.spec-modal__card {
  position: relative;
  width: min(1080px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .35);
}
.spec-modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.spec-modal__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spec-modal__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.spec-modal__close:hover { background: #e2e8f0; color: var(--ink); }
.spec-modal__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0;
}
.spec-modal__body .spec-table {
  font-size: 13px;
  min-width: 0;
}
.spec-modal__body .spec-table th,
.spec-modal__body .spec-table td {
  white-space: normal;
  padding: 9px 12px;
}
.spec-modal__hint {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-size: 11.5px;
  color: var(--ink-soft);
  background: #f7f9fc;
  border-top: 1px solid var(--line);
}

/* Solution cards: wider button gap and natural width */
.solution .actions {
  display: flex; gap: 24px; margin-top: 18px;
}
.solution .actions .btn {
  flex: 0 1 auto; padding: 11px 28px; font-size: 14px;
}

/* ---------- Why choose ---------- */
.adv { display: flex; gap: 20px; align-items: flex-start; padding: 26px; border-radius: var(--radius); transition: background .2s; }
.adv:hover { background: rgba(255,255,255,.04); }
.adv .n {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; font-family: var(--font-head);
  font-weight: 800; font-size: 18px;
}
.adv h3 { font-size: 18px; color: #fff; margin-bottom: 6px; }
.adv p { color: #d4e3f2; font-size: 14.5px; }

.about-tagline {
  margin-top: 56px; text-align: center;
  font-family: var(--font-head); font-weight: 700; letter-spacing: .04em;
  font-size: 15px; color: #dbe8f5;
  padding: 18px; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
}

.why-cta {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 32px 36px; border-radius: var(--radius-l);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
}
.why-cta-text h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.why-cta-text p { color: #c4d2e0; font-size: 15px; }

/* ---------- Manufacturing ---------- */
/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step .ring {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-3); color: var(--brand); font-family: var(--font-head); font-weight: 800; font-size: 22px;
  border: 2px solid var(--line-strong); margin-bottom: 18px; position: relative; z-index: 2;
}
.step .ring span { color: var(--brand); }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 14.5px; }
.step::before {
  content: ""; position: absolute; top: 50px; left: 64px; right: -24px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 16px); z-index: 1;
}
.step:last-child::before { display: none; }

/* ---------- Resources / Blog ---------- */
.post {
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post .top { height: 150px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); position: relative; display: grid; place-items: center; }
.post .top .ic { color: rgba(255,255,255,.85); width: 46px; height: 46px; }
.post .top .cat { position: absolute; top: 14px; left: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.28); padding: 5px 10px; border-radius: 999px; }
.post .body { padding: 22px; }
.post .body h3 { font-size: 17.5px; line-height: 1.34; }
.post .body p { color: var(--ink-soft); font-size: 14px; margin: 10px 0 16px; }
.post .more { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.post .more svg { width: 16px; height: 16px; transition: transform .2s; }
.post:hover .more svg { transform: translateX(4px); }

/* ---------- Final CTA ---------- */
.cta-final {
  position: relative; overflow: hidden; border-radius: var(--radius-l);
  background:
    linear-gradient(180deg, rgba(4,20,38,.72), rgba(4,20,38,.82)),
    url("../images/world-map.svg") center/cover no-repeat,
    var(--navy-900);
  padding: 72px 48px; text-align: center; color: #fff;
}
.cta-final h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.cta-final p { color: #cdd9e6; max-width: 620px; margin: 16px auto 30px; font-size: 17px; }
.cta-final .hero-cta { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: clamp(26px, 3.4vw, 36px); }
.contact-info p { color: var(--ink-soft); margin: 14px 0 28px; font-size: 16px; }
.ci-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--line); }
.ci-row .ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--brand); }
.ci-row .ic svg { width: 22px; height: 22px; }
.ci-row b { display: block; font-family: var(--font-head); font-size: 15px; }
.ci-row span, .ci-row a { color: var(--ink-soft); font-size: 14.5px; }
.ci-row a:hover { color: var(--brand); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 32px; box-shadow: var(--shadow); }
.form-card h3 { font-size: 20px; margin-bottom: 6px; }
.form-card .hint { color: var(--ink-faint); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,71,171,.12);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aebccb; padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; color: #9fb0c0; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 15px; letter-spacing: .04em; margin-bottom: 16px; }
.footer-col a { display: block; color: #aebccb; font-size: 14.5px; padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--brand-2); }
.footer-contact .ci-row { border-top: none; padding: 8px 0; }
.footer-contact .ci-row .ic { width: 38px; height: 38px; background: rgba(255,255,255,.06); color: var(--brand-2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: #8497a8; }

.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  color: #fff; background: rgba(255,255,255,.10);
  transition: background .2s, color .2s, transform .2s;
}
.social-links a:hover { background: var(--brand); transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; }

/* ---------- Badge / trust ---------- */
.trust-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }
.trust-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.trust-pill svg { width: 16px; height: 16px; color: var(--ok); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
/* Keep the language switcher reachable on tablet/narrow-desktop:
   collapse the primary nav to a hamburger earlier, and shrink the
   header where the full nav is still shown, so content never overflows. */
@media (max-width: 1440px) and (min-width: 1101px) {
  .site-header .bar { gap: 16px; }
  .nav a { padding: 9px 11px; font-size: 13px; }
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 10px 15px; font-size: 13px; }
}
@media (max-width: 1100px) {
  .nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .site-header .bar { gap: 14px; }
  .header-actions .btn { padding: 9px 14px; font-size: 13px; }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 920px) {
  .cards.c3, .cards.c4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .step::before { display: none; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat { border-bottom: 1px solid rgba(255,255,255,.10); }
}
@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .nav, .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .site-header .bar { gap: 12px; }
  .mobile-nav { display: none; }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: block; padding: 14px 4px; color: var(--ink); font-family: var(--font-head); font-weight: 600; border-bottom: 1px solid var(--line); }
  .mobile-nav .btn { margin-top: 14px; }
  .hero-points { grid-template-columns: 1fr; }
  .cards.c2, .cards.c3, .cards.c4 { grid-template-columns: 1fr; }
  .why-cta { flex-direction: column; align-items: flex-start; padding: 26px; }
  .why-cta-text h3 { font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-final { padding: 52px 22px; }
  .product .thumb { height: 180px; }
  .product-item .visual { height: 190px; }
  .product-item .actions { flex-direction: column; }
  .project .meta { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
  .logo img { height: 38px; }
}

/* ===== Language switcher — dropdown ===== */
.lang-switch {
  position: relative;
  margin-inline-start: 10px;
  flex: none;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.45);
  font: 600 12px/1.3 var(--font-head), system-ui, sans-serif;
  letter-spacing: .04em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.lang-trigger:hover { color: rgba(255,255,255,.82); background: rgba(255,255,255,.08); }
.lang-switch.is-open .lang-trigger,
.lang-trigger[aria-expanded="true"] {
  color: #fff;
  background: rgba(255,255,255,.12);
}
.lang-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .2s var(--ease);
  margin-inline-start: 1px;
}
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #15203c;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(4,20,38,.30);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  z-index: 80;
}
.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-item {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: start;
  color: rgba(255,255,255,.78);
  font: 600 13px/1.3 var(--font-head), system-ui, sans-serif;
  letter-spacing: .03em;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.lang-item:hover { color: #fff; background: rgba(255,255,255,.1); }
.lang-item.is-active {
  color: #fff;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Scrolled (white header) state */
.site-header.is-scrolled .lang-trigger { color: var(--ink-faint); }
.site-header.is-scrolled .lang-trigger:hover { color: var(--ink-soft); background: var(--paper-2); }
.site-header.is-scrolled .lang-switch.is-open .lang-trigger,
.site-header.is-scrolled .lang-trigger[aria-expanded="true"] {
  color: var(--brand);
  background: var(--paper-2);
}

@media (max-width: 1100px) {
  .lang-switch { margin-inline-start: 8px; }
  .lang-trigger { padding: 5px 9px; font-size: 11px; }
}
@media (max-width: 560px) {
  .lang-switch { margin-inline-start: 6px; }
  .lang-trigger { padding: 4px 8px; font-size: 10.5px; }
  .lang-menu { min-width: 124px; }
}

/* ===== Right-to-Left (Arabic) support ===== */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .section-head { text-align: right; }
[dir="rtl"] .section-head.center { text-align: center; }

/* Floating action buttons sit on the left edge in RTL */
[dir="rtl"] .wa-float { right: auto; left: 36px; }
[dir="rtl"] .back-to-top { right: auto; left: 36px; }

/* Reverse inline-arrow hovers for RTL reading direction */
[dir="rtl"] .post:hover .more svg { transform: translateX(-4px); }

/* Header utility icons: use logical inline-start margin so they flip correctly */
[dir="rtl"] .nav-search,
[dir="rtl"] .nav-toggle { margin-left: 0; margin-inline-start: 10px; }
