/* =====================================================================
   LUXURY THEME LAYER — "Refined design layer (original navy & gold palette)"
   Loaded after styles.css. Re-skins the site without touching layout/JS.
   ===================================================================== */

:root {
  --gold-grad: linear-gradient(120deg, #1f4d8c 0%, #2f74d0 50%, #1f4d8c 100%);
  --gold-line: linear-gradient(90deg, transparent, rgba(143, 180, 240, 0.75), transparent);

  --shadow-gold: 0 10px 30px -8px rgba(74, 134, 220, 0.55);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --font-ar: 'IBM Plex Sans Arabic', 'Cairo', -apple-system, sans-serif;
  --font-ar-display: 'El Messiri', 'IBM Plex Sans Arabic', serif;
  --font-en: 'Manrope', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-en-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --ease-lux: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ---------- Base typography ---------- */
body {
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(74, 134, 220, 0.35);
  color: inherit;
}

h1, h2, h3, h4,
.hero-title, .section-title, .brand-name-primary {
  font-family: var(--font-ar-display);
  font-weight: 600;
}

html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3,
html[lang="en"] .hero-title, html[lang="en"] .section-title {
  font-family: var(--font-en-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

html[lang="en"] .brand-name-primary {
  font-family: var(--font-en-display);
  letter-spacing: 0.08em;
}

/* ---------- Utility bar ---------- */
.utility-bar {
  background: #061326;
  color: #dbe7f6;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(74, 134, 220, 0.16);
}

.utility-item { color: #dbe7f6; }
.utility-item:hover { color: var(--gold-300); }

.utility-admin-btn,
.utility-badge-emergency {
  border-radius: 2px !important;
  background: transparent !important;
  border: 1px solid rgba(74, 134, 220, 0.28) !important;
  color: var(--gold-300) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  transition: all 0.35s var(--ease-lux) !important;
}

.utility-admin-btn:hover,
.utility-badge-emergency:hover {
  background: rgba(74, 134, 220, 0.1) !important;
  border-color: var(--gold-400) !important;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(6, 19, 38, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: none;
  box-shadow: none;
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold-line);
}

.header-inner { padding-block: 16px; }

.brand-name-primary {
  color: #ffffff;
  font-size: 1.02rem;
}

.brand-name-secondary {
  color: var(--gold-400);
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.85;
}

.nav-link {
  color: #e2ecf9;
  font-weight: 500;
  font-size: 0.87rem;
  border-radius: 0;
  position: relative;
  background: transparent !important;
  transition: color 0.35s var(--ease-lux);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 50%;
  bottom: 2px;
  height: 1px;
  background: var(--gold-400);
  transition: inset-inline 0.4s var(--ease-lux);
}

.nav-link:hover,
.nav-link.active { color: var(--gold-300); }

.nav-link:hover::after,
.nav-link.active::after { inset-inline: 11px; }

.icon-pill-btn,
.mobile-menu-btn {
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(143, 180, 240, 0.25);
  color: #ffffff;
  font-weight: 500;
  transition: all 0.35s var(--ease-lux);
}

.icon-pill-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
  background: rgba(74, 134, 220, 0.08);
}

/* ---------- Buttons ---------- */
.btn-gold,
.rfq-trigger-btn,
.add-rfq-btn {
  position: relative;
  overflow: hidden;
  background: var(--gold-grad) !important;
  background-size: 220% 100% !important;
  background-position: 0% 0 !important;
  color: #061326 !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  border-radius: 2px !important;
  border: none;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transition: background-position 0.9s var(--ease-lux), transform 0.35s var(--ease-lux), box-shadow 0.35s var(--ease-lux) !important;
}

.btn-gold:hover,
.rfq-trigger-btn:hover,
.add-rfq-btn:hover {
  background-position: 100% 0 !important;
  transform: translateY(-2px);
  filter: none;
  box-shadow: 0 16px 36px -10px rgba(74, 134, 220, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.rfq-count-badge {
  background: #061326;
  color: var(--gold-300);
  font-weight: 600;
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(143, 180, 240, 0.45);
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.4s var(--ease-lux);
}

.btn-outline-light:hover {
  background: rgba(74, 134, 220, 0.1);
  border-color: var(--gold-300);
  color: var(--gold-300);
}

.btn-navy {
  background: #0f294d;
  color: #ffffff;
  border: 1px solid rgba(74, 134, 220, 0.35);
  border-radius: 2px;
  font-weight: 500;
  transition: all 0.4s var(--ease-lux);
}

.btn-navy:hover {
  background: #163a6b;
  border-color: var(--gold-400);
  color: var(--gold-300);
}

/* ---------- Hero ---------- */
.hero-section {
  background:
    radial-gradient(ellipse 60% 55% at 80% 12%, rgba(74, 134, 220, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 60% at 8% 100%, rgba(31, 77, 140, 0.14), transparent 70%),
    linear-gradient(170deg, #061326 0%, #0a1d37 55%, #102d54 100%);
  padding-block: 96px 104px;
  border-bottom: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold-line);
}

.hero-grid-pattern {
  background-image:
    linear-gradient(rgba(143, 180, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 180, 240, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.hero-eyebrow {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--gold-400);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 26px;
}

.hero-eyebrow::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-400), transparent);
}

html[dir="rtl"] .hero-eyebrow::after {
  background: linear-gradient(270deg, var(--gold-400), transparent);
}

html[lang="en"] .hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

.hero-title {
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: 1.18;
  color: #ffffff;
  margin-bottom: 24px;
}

.hero-title .gold-highlight,
.gold-text {
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: #cbd9ec;
  font-weight: 300;
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 34px;
}

.hero-search-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(143, 180, 240, 0.22);
  border-radius: 2px;
  padding: 6px;
  transition: border-color 0.4s var(--ease-lux), box-shadow 0.4s var(--ease-lux);
}

.hero-search-box:focus-within {
  border-color: rgba(143, 180, 240, 0.6);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 4px rgba(74, 134, 220, 0.08);
}

.hero-search-input { color: #ffffff; font-weight: 300; }
.hero-search-input::placeholder { color: #9cb2cf; }

.hero-cta-row { margin-bottom: 40px; }

.hero-pillar-chip {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(143, 180, 240, 0.2);
  border-radius: 0;
  padding: 14px 2px 0;
  color: #e2ecf9;
  font-weight: 500;
}

.hero-pillar-icon {
  background: transparent;
  border: 1px solid rgba(143, 180, 240, 0.35);
  border-radius: 50%;
  color: var(--gold-400);
}

.hero-command-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(10, 29, 55, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(143, 180, 240, 0.22);
  border-radius: 4px;
  padding: 30px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.75);
  position: relative;
}

.command-header { border-bottom-color: rgba(143, 180, 240, 0.14); }
.command-metrics-bar { border-top-color: rgba(143, 180, 240, 0.14); }

.quick-solve-btn {
  background: transparent;
  border: 1px solid rgba(143, 180, 240, 0.12);
  border-radius: 2px;
  transition: all 0.4s var(--ease-lux);
}

.quick-solve-btn:hover {
  background: rgba(74, 134, 220, 0.06);
  border-color: rgba(143, 180, 240, 0.5);
}

.qs-icon {
  background: transparent;
  border: 1px solid rgba(143, 180, 240, 0.3);
  border-radius: 50%;
  color: var(--gold-400);
}

.qs-title { font-weight: 600; color: #ffffff; }
.qs-desc { color: #b7c8df; font-weight: 300; }

.cmd-metric {
  background: transparent;
  border-inline-start: 1px solid rgba(143, 180, 240, 0.14);
  border-radius: 0;
}

.cmd-metric:first-child { border-inline-start: none; }

.cmd-metric strong {
  font-family: var(--font-en-display);
  font-size: 1.6rem;
  font-weight: 500;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cmd-metric span { color: #b7c8df; letter-spacing: 0.02em; }

.live-pulse-badge { border-radius: 2px; font-weight: 500; }

/* ---------- Generic sections ---------- */
.section { padding-block: 112px; }

.section-alt {
  background: var(--bg-subtle);
  position: relative;
}

.section-header { margin-bottom: 64px; }

.section-tag {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--gold-600);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  gap: 14px;
  margin-bottom: 18px;
}

.section-tag::before,
.section-tag::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

html[lang="en"] .section-tag {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
}

[data-theme="dark"] .section-tag { color: var(--gold-400); }

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-desc {
  font-weight: 300;
  font-size: 1.04rem;
  line-height: 1.9;
}

/* ---------- Cards (shared treatment) ---------- */
.division-card,
.product-card,
.kit-card,
.sector-spotlight-card,
.catalog-toolbar,
.repair-process-card,
.wizard-diagnosis-card,
.wizard-form-card,
.calc-workspace,
.tracker-shell,
.contact-info-card,
.faq-item,
.flyer-frame,
.bulk-boq-banner,
.tech-metric-box,
.calc-kpi {
  border-radius: 4px !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-lux), box-shadow 0.5s var(--ease-lux), border-color 0.5s var(--ease-lux) !important;
}

.division-card:hover,
.product-card:hover,
.kit-card:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 134, 220, 0.6) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(74, 134, 220, 0.15);
}

.division-card {
  border-top: 1px solid var(--border-color) !important;
  padding: 34px 28px;
  position: relative;
  overflow: hidden;
}

.division-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s var(--ease-lux);
}

.division-card:hover::before { transform: scaleX(1); }

.division-icon-box,
.product-svg-badge {
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 25%, #1f4d8c, #061326) !important;
  border: 1px solid rgba(74, 134, 220, 0.5);
  color: var(--gold-400) !important;
  box-shadow: 0 8px 20px -6px rgba(6, 19, 38, 0.5);
}

.division-card h3,
.kit-card h3,
.product-title {
  font-weight: 600;
}

.product-cat-tag {
  border-radius: 2px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
}

/* Pills / tabs */
.cat-pill,
.sector-tab,
.calc-tab-btn,
.symptom-chip,
.demo-code-chip {
  border-radius: 2px !important;
  font-weight: 500 !important;
  transition: all 0.35s var(--ease-lux) !important;
}

.cat-pill.active,
.sector-tab.active,
.calc-tab-btn.active,
.symptom-chip.active,
.symptom-chip.selected {
  background: #0a1d37 !important;
  color: var(--gold-300) !important;
  border-color: rgba(74, 134, 220, 0.7) !important;
}

/* Form controls */
.field-control,
.catalog-input,
.spec-select,
.qty-input-wrap,
.bulk-textarea {
  border-radius: 2px !important;
  transition: border-color 0.35s var(--ease-lux), box-shadow 0.35s var(--ease-lux) !important;
}

.field-control:focus,
.catalog-input:focus,
.spec-select:focus,
.bulk-textarea:focus {
  outline: none;
  border-color: var(--gold-500) !important;
  box-shadow: 0 0 0 3px rgba(74, 134, 220, 0.14) !important;
}

/* Dark feature panels that used navy gradients */
.bulk-boq-banner,
.calc-output-panel {
  background:
    radial-gradient(ellipse at 90% 0%, rgba(74, 134, 220, 0.14), transparent 60%),
    linear-gradient(160deg, #0a1d37, #0f294d) !important;
  border-color: rgba(74, 134, 220, 0.25) !important;
}

.sector-spotlight-card {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
}

.step-num-pill {
  border-radius: 50% !important;
  font-family: var(--font-en-display);
  font-weight: 600 !important;
}

/* ---------- Footer ---------- */
.site-footer {
  background:
    radial-gradient(ellipse 50% 80% at 50% 0%, rgba(74, 134, 220, 0.08), transparent 70%),
    #061326 !important;
  color: #dbe7f6;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 1px;
  background: var(--gold-line);
}

.footer-links a { transition: color 0.3s var(--ease-lux); }
.footer-links a:hover { color: var(--gold-300) !important; }

/* ---------- Drawer / modal / toast ---------- */
.rfq-drawer,
.modal-card {
  border-radius: 4px !important;
  border: 1px solid rgba(74, 134, 220, 0.25) !important;
}

.whatsapp-fab {
  border-radius: 999px;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.45);
}

/* ---------- Scroll reveal ---------- */
.lux-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-lux), transform 1s var(--ease-lux);
}

.lux-reveal.lux-in {
  opacity: 1;
  transform: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-600), var(--gold-400));
  border-radius: 10px;
  border: 3px solid var(--bg-page);
}

@media (prefers-reduced-motion: reduce) {
  .lux-reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 760px) {
  .section { padding-block: 76px; }
  .hero-section { padding-block: 64px 72px; }
}

/* ---------- Header fit (nav was overflowing between 1320–1560px) ---------- */
.site-header .container { max-width: 1520px; }
.main-nav { min-width: 0; gap: 0; }
.nav-link { padding-inline: 10px; }

@media (max-width: 1600px) {
  .brand-name-secondary { display: none; }
  .nav-link { font-size: 0.84rem; padding-inline: 8px; }
}

@media (max-width: 1480px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: grid; }
}

.main-nav.mobile-open {
  background: rgba(6, 19, 38, 0.97) !important;
  border-bottom: 1px solid rgba(74, 134, 220, 0.35) !important;
  padding: 20px 24px !important;
  gap: 4px;
}

.main-nav.mobile-open .nav-link {
  padding: 12px 6px;
  border-bottom: 1px solid rgba(74, 134, 220, 0.1);
}

.main-nav.mobile-open .nav-link::after { display: none; }

@media (max-width: 1480px) {
  .main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 95;
  }
}

/* ---------- Phone header fit (was overflowing to ~616px) ---------- */
@media (max-width: 680px) {
  .brand-lockup { flex-shrink: 1; min-width: 0; }
  .brand-titles { min-width: 0; }
  .brand-name-primary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-inner { gap: 10px; padding-block: 12px; }
  .icon-pill-btn, .mobile-menu-btn { width: 38px; padding-inline: 0; justify-content: center; }
  .rfq-trigger-btn { padding-inline: 10px; }
  .brand-logo-wrap { width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .brand-titles { display: none; }
}

/* ---------- Hero photo (electrician testing an electrical panel) ---------- */
.hero-section {
  --hero-photo: url("https://images.unsplash.com/photo-1615774925655-a0e97fc85c14?auto=format&fit=crop&w=1800&h=1100&q=80&crop=entropy");
  background:
    radial-gradient(ellipse 60% 55% at 80% 12%, rgba(74, 134, 220, 0.14), transparent 70%),
    linear-gradient(to left, rgba(6, 19, 38, 0.97) 0%, rgba(6, 19, 38, 0.82) 45%, rgba(10, 29, 55, 0.3) 100%),
    var(--hero-photo) center 30% / cover no-repeat,
    var(--navy-950);
}

html[dir="ltr"] .hero-section {
  background:
    radial-gradient(ellipse 60% 55% at 20% 12%, rgba(74, 134, 220, 0.14), transparent 70%),
    linear-gradient(to right, rgba(6, 19, 38, 0.97) 0%, rgba(6, 19, 38, 0.82) 45%, rgba(10, 29, 55, 0.3) 100%),
    var(--hero-photo) center 30% / cover no-repeat,
    var(--navy-950);
}

.hero-command-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 29, 55, 0.6);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.hero-photo-credit {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 16px;
  z-index: 3;
  font-family: var(--font-en);
  font-size: 0.68rem;
  color: rgba(226, 236, 249, 0.55);
  direction: ltr;
}

.hero-photo-credit:hover { color: var(--gold-300); }

@media (max-width: 1080px) {
  .hero-section,
  html[dir="ltr"] .hero-section {
    background:
      linear-gradient(180deg, rgba(6, 19, 38, 0.93) 0%, rgba(6, 19, 38, 0.86) 100%),
      var(--hero-photo) center 30% / cover no-repeat,
      var(--navy-950);
  }
}

/* =====================================================================
   ICONS — plain line icons: no background, no frame, no gold.
   They take the color of the surrounding text (white on navy, navy on light).
   ===================================================================== */
.division-icon-box,
.product-svg-badge,
.hero-pillar-icon,
.qs-icon,
.channel-icon {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

/* on light surfaces */
.division-icon-box,
.product-svg-badge,
.channel-icon,
.benefit-check {
  color: var(--navy-700) !important;
}

/* on dark (navy) surfaces */
.hero-pillar-icon,
.qs-icon,
[data-theme="dark"] .division-icon-box,
[data-theme="dark"] .product-svg-badge,
[data-theme="dark"] .channel-icon,
[data-theme="dark"] .benefit-check {
  color: #e2ecf9 !important;
}

.division-icon-box { justify-content: flex-start !important; margin-bottom: 18px; }
.division-icon-box .outline-icon { width: 34px; height: 34px; stroke-width: 1.4; }
.product-svg-badge .outline-icon { width: 30px; height: 30px; stroke-width: 1.5; }
.qs-icon .outline-icon { width: 24px; height: 24px; }

/* small icons inside gold-colored labels follow the text color, not gold */
.hero-eyebrow .ic,
.section-tag .ic,
.section-tag .outline-icon,
.utility-badge-emergency .ic,
.utility-admin-btn .ic,
.nav-link .ic,
.icon-pill-btn .ic,
.division-action-link .ic {
  color: inherit;
}

.hero-eyebrow .ic { color: #e2ecf9; }
.section-tag .ic, .section-tag .outline-icon { color: var(--text-secondary); }

/* =====================================================================
   SIMPLER SURFACES — fewer lines and shadows, more calm
   ===================================================================== */
.hero-pillar-chip { border-top: none; padding-top: 0; }

.quick-solve-btn { border-color: rgba(255, 255, 255, 0.1); }
.quick-solve-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.28); }

.hero-command-card { box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6); }

.division-card,
.product-card,
.kit-card {
  box-shadow: none;
}

.division-card:hover,
.product-card:hover,
.kit-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-md);
}

.division-card::before { display: none; }

.division-bullets li::before { background-color: var(--navy-700); opacity: 0.55; }
[data-theme="dark"] .division-bullets li::before { background-color: #e2ecf9; }
.contact-info-card .channel-icon { color: #e2ecf9 !important; }

/* =====================================================================
   NO GOLD — accent is the brand's own navy/blue family
   ===================================================================== */
.btn-gold,
.rfq-trigger-btn,
.add-rfq-btn {
  color: #ffffff !important;
  box-shadow: 0 10px 26px -10px rgba(31, 77, 140, 0.7) !important;
}

.btn-gold:hover,
.rfq-trigger-btn:hover,
.add-rfq-btn:hover {
  box-shadow: 0 16px 32px -12px rgba(31, 77, 140, 0.8) !important;
}

.rfq-count-badge { background: #ffffff; color: var(--navy-800); }

/* highlighted words sit on dark navy — use a light, readable blue */
.hero-title .gold-highlight,
.gold-text,
.cmd-metric strong {
  background: linear-gradient(120deg, #cfe0f8, #8fb4f0 60%, #cfe0f8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-tag { color: var(--navy-600); }
[data-theme="dark"] .section-tag { color: #8fb4f0; }

/* =====================================================================
   ROUNDED BUTTONS & CONTROLS — no sharp corners
   ===================================================================== */
.btn-gold,
.btn-outline-light,
.btn-navy,
.rfq-trigger-btn,
.add-rfq-btn,
.quick-solve-btn,
.utility-admin-btn,
.utility-badge-emergency,
.calc-tab-btn,
.division-action-link {
  border-radius: 12px !important;
}

.cat-pill,
.sector-tab,
.symptom-chip,
.demo-code-chip,
.live-pulse-badge,
.product-cat-tag {
  border-radius: 999px !important;
}

.hero-search-box { border-radius: 16px !important; }

.field-control,
.catalog-input,
.spec-select,
.qty-input-wrap,
.bulk-textarea {
  border-radius: 10px !important;
}

/* =====================================================================
   PAGE STRUCTURE — clean services homepage + organized tool center
   ===================================================================== */
body:not([data-view]) .tools-center,
body[data-view="home"] .tools-center,
body[data-view="tools"] .home-only {
  display: none !important;
}

.tool-panel { display: none; }
.tool-panel.is-active { display: block; }

/* consistent soft corners on cards (matches rounded buttons) */
.division-card, .product-card, .kit-card, .sector-spotlight-card, .catalog-toolbar,
.repair-process-card, .wizard-diagnosis-card, .wizard-form-card, .calc-workspace,
.tracker-shell, .contact-info-card, .faq-item, .flyer-frame, .bulk-boq-banner,
.tech-metric-box, .calc-kpi, .tool-card {
  border-radius: 16px !important;
}

/* ---------- Hero: a calm introduction, no tool widgets ---------- */
.hero-section .hero-search-box,
.hero-section .hero-command-card {
  display: none !important;
}

.hero-layout { grid-template-columns: minmax(0, 1fr) !important; }
.hero-layout > div:first-child { max-width: 680px; }
.hero-section { padding-block: 120px 128px; }
.hero-subtitle { margin-bottom: 36px; }
.hero-cta-row { margin-bottom: 56px; }
.hero-cta-row .btn-gold,
.hero-cta-row .btn-outline-light { padding: 14px 26px; font-size: 1rem; }
.hero-pillars-strip { max-width: 680px; }

/* ---------- Tools overview on the home page ---------- */
.tools-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: transform 0.4s var(--ease-lux), box-shadow 0.4s var(--ease-lux), border-color 0.4s var(--ease-lux);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.tool-card-icon { color: var(--navy-700); margin-bottom: 6px; }
[data-theme="dark"] .tool-card-icon { color: #e2ecf9; }
.tool-card-icon .outline-icon { width: 30px; height: 30px; stroke-width: 1.5; }

.tool-card h3 { font-size: 1.08rem; font-weight: 600; }
.tool-card p { font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary); flex: 1; }

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-600);
  margin-top: 6px;
}
[data-theme="dark"] .tool-card-link { color: #8fb4f0; }

/* ---------- Tool center ---------- */
.tools-center-head {
  background:
    radial-gradient(ellipse 50% 90% at 85% 0%, rgba(74, 134, 220, 0.18), transparent 70%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900));
  color: #ffffff;
  padding-block: 44px 40px;
}

.tools-center-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tools-center-tag {
  display: block;
  color: #8fb4f0;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.tools-center-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
}

.tools-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd9ec;
  font-size: 0.9rem;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  transition: all 0.3s var(--ease-lux);
}
.tools-back-link:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.45); }

.tools-tabs {
  position: sticky;
  top: 72px;
  z-index: 80;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.tools-tabs-inner {
  display: flex;
  gap: 6px;
  padding-block: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tools-tabs-inner::-webkit-scrollbar { display: none; }

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.3s var(--ease-lux), color 0.3s var(--ease-lux);
}

.tool-tab:hover { background: var(--bg-subtle); color: var(--text-primary); }

.tool-tab.active {
  background: var(--navy-800);
  color: #ffffff;
}
[data-theme="dark"] .tool-tab.active { background: #1f4d8c; }

.tools-center .tool-panel { padding-block: 64px 96px; background: var(--bg-page); }
.tools-center .tool-panel .section-header { margin-bottom: 44px; }

@media (max-width: 680px) {
  .hero-section { padding-block: 72px 80px; }
  .tools-center-head { padding-block: 32px 28px; }
  .tools-tabs { top: 66px; }
  .tool-tab { padding: 9px 14px; font-size: 0.85rem; }
  .tools-center .tool-panel { padding-block: 40px 64px; }
}

/* short 6-link menu fits on wide screens; collapses cleanly on <= 1220px */
.site-header { position: sticky; top: 0; }
.site-header .header-inner { position: static; }

@media (min-width: 1221px) {
  .main-nav { display: flex !important; position: static !important; flex-direction: row !important; background: none !important; padding: 0 !important; border: none !important; box-shadow: none !important; }
  .mobile-menu-btn { display: none !important; }
  .nav-link { font-size: 0.88rem; padding-inline: 10px; }
  html[lang="en"] .brand-name-primary { letter-spacing: 0.03em; font-size: 0.96rem; }
  html[lang="en"] .nav-link { font-size: 0.85rem; padding-inline: 9px; }
}
@media (max-width: 1220px) {
  .main-nav { display: none !important; }
  .main-nav.mobile-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #061326 !important;
    border-bottom: 1px solid rgba(143, 180, 240, 0.35) !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6) !important;
    padding: 18px 24px !important;
    z-index: 98;
  }
  .mobile-menu-btn { display: grid !important; }
}

/* arrows: flip once in English (wrapper + svg were both flipping = no flip) */
html[dir="ltr"] .ic.flip-rtl svg { transform: none; }

/* =====================================================================
   BRAND FLYERS — framed like prints on a soft mat, equal height
   ===================================================================== */
.brand-showcase-grid { gap: 28px; margin-bottom: 44px; }

.flyer-frame {
  margin: 0;
  padding: 14px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
}

.flyer-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  padding: 28px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 40%, var(--bg-surface), transparent 75%),
    var(--bg-subtle);
  cursor: zoom-in;
  overflow: hidden;
}

.flyer-frame .flyer-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  background: none;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(6, 19, 38, 0.08), 0 18px 40px -12px rgba(6, 19, 38, 0.3);
  transition: transform 0.6s var(--ease-lux);
}

.flyer-media:hover img { transform: scale(1.025); }

.flyer-caption {
  padding: 16px 6px 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.flyer-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s var(--ease-lux);
}
.flyer-open:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-subtle); }

@media (max-width: 680px) {
  .flyer-media { height: 300px; padding: 18px; }
}

/* lightbox */
.lux-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(6, 19, 38, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.lux-lightbox.open { opacity: 1; }
.lux-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lux-lightbox-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}
.lux-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* =====================================================================
   SERVICE PHOTO GALLERY — mosaic: one large photo + three
   ===================================================================== */
.service-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 250px 250px;
  grid-template-areas:
    "big a b"
    "big c c";
  gap: 16px;
  margin-bottom: 12px;
}

.gallery-item.g-big { grid-area: big; }
.gallery-item.g-a { grid-area: a; }
.gallery-item.g-b { grid-area: b; }
.gallery-item.g-c { grid-area: c; }

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy-900);
  cursor: zoom-in;
  isolation: isolate;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s var(--ease-lux);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 19, 38, 0.82) 100%);
  transition: opacity 0.5s var(--ease-lux);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
  position: absolute;
  inset-inline: 22px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #ffffff;
}

.gallery-caption strong {
  font-family: var(--font-ar-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.35;
}
html[lang="en"] .gallery-caption strong { font-family: var(--font-en-display); font-size: 1.2rem; }

.gallery-caption small {
  font-size: 0.82rem;
  color: #cbd9ec;
  font-weight: 400;
}

.g-big .gallery-caption strong { font-size: 1.45rem; }
html[lang="en"] .g-big .gallery-caption strong { font-size: 1.6rem; }

.gallery-credit {
  font-family: var(--font-en);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: end;
  margin-bottom: 40px;
  direction: ltr;
}
html[dir="rtl"] .gallery-credit { text-align: left; }

@media (max-width: 900px) {
  .service-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 300px 200px 200px;
    grid-template-areas:
      "big big"
      "a b"
      "c c";
  }
}

@media (max-width: 560px) {
  .service-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 260px repeat(3, 200px);
    grid-template-areas: "big" "a" "b" "c";
    gap: 12px;
  }
}

/* =====================================================================
   UNIFIED TOP UTILITY BAR & HEADER ALIGNMENT
   Single-row balanced bar aligned edge-to-edge with sticky header
   ===================================================================== */
.utility-bar .container,
.site-header .container {
  max-width: 1480px;
  padding-inline: 24px;
}

.utility-bar {
  background: #051020;
  border-bottom: 1px solid rgba(143, 180, 240, 0.14);
  font-size: 0.78rem;
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  min-height: 40px;
  padding-block: 6px;
}

.utility-contacts {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  min-width: 0;
}

.utility-contacts .utility-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #c8d8ee;
  padding-inline: 12px;
  border-inline-start: 1px solid rgba(143, 180, 240, 0.16);
  transition: color 0.25s ease;
}

.utility-contacts .utility-item:first-child {
  padding-inline-start: 0;
  border-inline-start: none;
}

.utility-contacts .utility-item:hover {
  color: #ffffff;
}

.utility-contacts .utility-item .ic {
  color: #8fb4f0;
  opacity: 0.95;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.utility-bar .utility-admin-btn,
.utility-bar .utility-badge-emergency {
  height: 28px;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utility-bar .utility-admin-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(143, 180, 240, 0.22) !important;
  color: #dbe7f6 !important;
}

.utility-bar .utility-admin-btn:hover {
  background: rgba(143, 180, 240, 0.12) !important;
  border-color: rgba(143, 180, 240, 0.48) !important;
  color: #ffffff !important;
}

.utility-bar .utility-badge-emergency {
  background: rgba(47, 116, 208, 0.24) !important;
  border: 1px solid rgba(143, 180, 240, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(31, 77, 140, 0.32);
}

.utility-bar .utility-badge-emergency:hover {
  background: rgba(47, 116, 208, 0.38) !important;
  border-color: #cfe0f8 !important;
}

@media (min-width: 1281px) {
  .brand-name-secondary {
    display: block;
  }
}

@media (max-width: 1280px) {
  .utility-bar [data-util="location"] {
    display: none;
  }
  .utility-bar [data-util="phone1"] {
    padding-inline-start: 0;
    border-inline-start: none;
  }
}

@media (max-width: 1180px) {
  .utility-bar [data-util="email"] {
    display: none;
  }
}

@media (max-width: 860px) {
  .utility-bar [data-util="phone2"],
  .utility-bar [data-util="pdf"] {
    display: none;
  }
  .utility-bar .container,
  .site-header .container {
    padding-inline: 16px;
  }
}

@media (max-width: 600px) {
  .utility-contacts {
    flex-shrink: 0;
  }
  .utility-actions {
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
  }
  .utility-bar [data-util="admin"] [data-i18n] {
    display: none;
  }
  .utility-bar [data-util="admin"] {
    padding-inline: 8px !important;
    flex-shrink: 0;
  }
  .utility-bar .utility-badge-emergency {
    padding-inline: 10px !important;
    font-size: 0.72rem !important;
    min-width: 0;
    max-width: 176px;
  }
  .utility-bar .utility-badge-emergency [data-i18n] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =====================================================================
   SELECT CONTROLS, QTY UNITS, BIDI CHIPS & FOOTER CLEARANCE POLISH
   ===================================================================== */
select.field-control,
select.catalog-input,
.spec-select {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

html[dir="rtl"] select.field-control:not([dir="ltr"]),
html[dir="rtl"] select.catalog-input:not([dir="ltr"]) {
  padding-left: 32px;
  padding-right: 12px;
}

html[dir="ltr"] select.field-control,
html[dir="ltr"] select.catalog-input,
select[dir="ltr"],
.spec-select {
  padding-right: 32px;
  padding-left: 12px;
  text-align: left;
}

.calc-tab-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

html[dir="rtl"] input.field-control.mono {
  text-align: right;
}

/* =====================================================================
   ENGINEERING CALCULATORS WORKSPACE REFINEMENT
   ===================================================================== */
.calc-workspace {
  align-items: stretch !important;
  gap: 32px;
  padding: 32px;
}

.calc-inputs-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.calc-pane-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.calc-pane-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

.calc-output-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 16px !important;
}

.calc-out-kicker {
  display: block;
  color: #8fb4f0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  text-align: start;
}

.calc-out-headline {
  font-family: var(--font-mono) !important;
  font-size: clamp(1.22rem, 2.1vw, 1.5rem) !important;
  font-weight: 700 !important;
  color: #ffffff;
  margin: 0 0 18px;
  text-align: start;
}

.calc-kpi-grid {
  margin-block: 0;
  gap: 12px;
}

.calc-kpi {
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(143, 180, 240, 0.2) !important;
  border-radius: 12px !important;
  padding: 14px 16px;
  text-align: start;
}

.calc-kpi span {
  font-size: 0.78rem;
  color: #b7c8df;
  margin-bottom: 4px;
  display: block;
}

.calc-kpi strong {
  font-family: var(--font-mono);
  font-size: 1.14rem;
  color: #ffffff !important;
  display: block;
  text-align: start;
}

.calc-kpi strong .outline-icon {
  vertical-align: -2px;
  margin-inline-start: 4px;
}

.calc-cta-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
}

.tech-metric-box strong {
  text-align: start;
}

.qty-input-wrap {
  width: 128px;
  padding-inline: 10px;
  gap: 4px;
}

.unit-hint {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.demo-code-chip {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-footer {
  padding-bottom: 84px !important;
}

/* =====================================================================
   BUTTON SYSTEM — one line, icon beside text, even heights (fixes
   Arabic labels breaking into cramped two-line stacks)
   ===================================================================== */
.btn-gold,
.btn-navy,
.btn-outline-light,
.add-rfq-btn,
.rfq-trigger-btn,
.tools-back-link,
.flyer-open,
.division-action-link {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.3;
  text-align: center;
}

.btn-gold,
.btn-navy,
.btn-outline-light {
  min-height: 46px;
  padding: 11px 20px;
}

.btn-gold > *,
.btn-navy > *,
.btn-outline-light > *,
.add-rfq-btn > *,
.rfq-trigger-btn > * {
  white-space: nowrap;
  flex-shrink: 0;
}

/* icon wrappers never take their own line */
.btn-gold .ic,
.btn-navy .ic,
.btn-outline-light .ic,
.add-rfq-btn .ic,
.rfq-trigger-btn .ic,
.btn-gold > span:has(> .ic:only-child),
.btn-navy > span:has(> .ic:only-child),
.btn-outline-light > span:has(> .ic:only-child) {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

/* chips & tabs stay on one line */
.cat-pill,
.sector-tab,
.symptom-chip,
.demo-code-chip,
.tool-tab,
.calc-tab-btn {
  white-space: nowrap;
}

/* numbers inside Arabic buttons keep their order */
.ltr-num { unicode-bidi: isolate; }

/* paired actions (quote form): full-width rows instead of two cramped columns */
.btn-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.btn-pair > * { width: 100%; }

/* button rows wrap as whole buttons, never as broken text */
.hero-cta-row,
.policy-notice-box,
.contact-info-card > div:has(> a.btn-gold, > a.btn-outline-light) {
  flex-wrap: wrap;
}

/* hero highlights: tidy 2×2 on mid widths instead of squeezed 4-up */
@media (max-width: 1200px) {
  .hero-pillars-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
}
.hero-pillar-chip { white-space: nowrap; }

/* very small phones: allow a long label to wrap, but centered and balanced */
@media (max-width: 420px) {
  .btn-gold,
  .btn-navy,
  .btn-outline-light {
    white-space: normal;
    text-wrap: balance;
    padding-inline: 16px;
  }
  .btn-gold > [data-i18n],
  .btn-navy > [data-i18n],
  .btn-outline-light > [data-i18n] {
    white-space: normal;
    flex-shrink: 1;
  }
  .hero-pillar-chip { white-space: normal; }
}

/* rows that used flex:1 (0 starting width) squeezed buttons into one-word-per-line columns */
.btn-gold[style*="flex:1"],
.btn-navy[style*="flex:1"],
.btn-outline-light[style*="flex:1"],
div[style*="flex-wrap:wrap"] > .btn-gold,
div[style*="flex-wrap:wrap"] > .btn-navy,
div[style*="flex-wrap:wrap"] > .btn-outline-light {
  flex: 1 1 auto !important;
}

@media (max-width: 600px) {
  div[style*="flex-wrap:wrap"] > .btn-gold,
  div[style*="flex-wrap:wrap"] > .btn-navy,
  div[style*="flex-wrap:wrap"] > .btn-outline-light,
  .hero-cta-row > a {
    flex: 1 1 100% !important;
    width: 100%;
  }
}

/* =====================================================================
   MOTOR MAINTENANCE SIMULATOR
   ===================================================================== */
#motor-sim-mount { scroll-margin-top: 140px; }

.sim-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.sim-case {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-align: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  transition: border-color 0.3s var(--ease-lux), box-shadow 0.3s var(--ease-lux), transform 0.3s var(--ease-lux);
}
.sim-case:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.sim-case.active {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(47, 116, 208, 0.14);
}
.sim-case-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sim-case.active .sim-case-num { color: var(--navy-600); }
[data-theme="dark"] .sim-case.active .sim-case-num { color: #8fb4f0; }
.sim-case-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sim-case-body strong { font-size: 0.93rem; font-weight: 600; line-height: 1.45; }
.sim-case-body small { font-size: 0.78rem; color: var(--text-muted); }

.sim-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.sim-intro-step {
  position: relative;
  padding: 26px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
}
.sim-intro-icon { color: var(--navy-700); display: inline-flex; margin-bottom: 10px; }
[data-theme="dark"] .sim-intro-icon { color: #e2ecf9; }
.sim-intro-n {
  position: absolute; top: 12px; inset-inline-start: 14px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted);
}
.sim-intro-step p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.sim-intro-cta { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; }

.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}
.sim-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.sim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
}
.sim-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.sim-title { font-size: 1.2rem; line-height: 1.45; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-site { font-size: 0.84rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.sim-complaint {
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--text-secondary);
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: 12px;
  border-inline-start: 3px solid var(--navy-600);
  margin-bottom: 16px;
}

/* engraved nameplate */
.sim-plate {
  border-radius: 10px;
  padding: 12px 14px;
  background: linear-gradient(160deg, #e6eaef, #c9d0d8);
  border: 1px solid #aab4bf;
  color: #1c2633;
  font-family: var(--font-mono);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.sim-plate-head {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(28, 38, 51, 0.25);
}
.sim-plate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.sim-plate-grid div { display: flex; flex-direction: column; }
.sim-plate-grid small { font-size: 0.64rem; color: #4a5868; }
.sim-plate-grid b { font-size: 0.92rem; }

/* safety status */
.sim-status-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sim-status-row strong { display: block; font-size: 0.95rem; }
.sim-status-row small { font-size: 0.82rem; color: var(--text-muted); }
.sim-status-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
}
.sim-status.is-live .sim-status-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.sim-status.is-locked .sim-status-dot { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
.sim-status.is-live { border-color: rgba(239, 68, 68, 0.35); }
.sim-status.is-locked { border-color: rgba(16, 185, 129, 0.4); }
.sim-loto-btn { width: 100%; }
.sim-clock { margin-top: 12px; font-size: 0.84rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* test bench */
.sim-tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sim-test {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  text-align: start;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-page);
  color: var(--text-primary);
  transition: border-color 0.25s var(--ease-lux), background 0.25s var(--ease-lux);
}
.sim-test:hover:not(:disabled) { border-color: var(--navy-600); background: var(--bg-surface); }
.sim-test:disabled { cursor: default; }
.sim-test.is-done { opacity: 0.6; }
.sim-test-icon { color: var(--navy-700); display: inline-flex; flex-shrink: 0; }
[data-theme="dark"] .sim-test-icon { color: #e2ecf9; }
.sim-test-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sim-test-body strong { font-size: 0.86rem; font-weight: 600; line-height: 1.45; }
.sim-test-body small { font-size: 0.74rem; color: var(--text-muted); }
.sim-test-check { color: #10b981; display: inline-flex; }
.sim-mode { font-weight: 600; }
.sim-mode-off { color: #0f9f6e; }
.sim-mode-run { color: #d9480f; }
[data-theme="dark"] .sim-mode-off { color: #34d399; }
[data-theme="dark"] .sim-mode-run { color: #fb923c; }

.sim-blocked {
  margin-top: 12px;
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.86rem; line-height: 1.7;
  color: #b42318;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
}
[data-theme="dark"] .sim-blocked { color: #fca5a5; }
.sim-blocked .outline-icon { flex-shrink: 0; margin-top: 4px; }
.sim-empty { font-size: 0.88rem; color: var(--text-muted); }

/* instrument displays */
.sim-readings { display: flex; flex-direction: column; gap: 12px; }
.sim-meter {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1f3655;
  background: #0b1a2e;
  color: #dbe7f6;
  animation: simIn 0.35s var(--ease-lux);
}
@keyframes simIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sim-meter-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px;
  font-size: 0.84rem; font-weight: 600;
  background: #102440;
  border-bottom: 1px solid #1f3655;
}
.sim-meter-head small { margin-inline-start: auto; font-weight: 400; color: #8fa7c6; font-size: 0.74rem; }
.sim-meter-screen { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.sim-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "k v" "ref ref";
  gap: 1px 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(143, 180, 240, 0.15);
}
.sim-line:last-child { border-bottom: none; padding-bottom: 0; }
.sim-line-k { grid-area: k; font-size: 0.85rem; color: #b7c8df; }
.sim-line-v {
  grid-area: v;
  font-family: var(--font-mono);
  font-size: 1rem; font-weight: 700;
  color: #7ee8b2;
  text-shadow: 0 0 10px rgba(126, 232, 178, 0.25);
  direction: ltr; unicode-bidi: isolate;
}
.sim-line-ref { grid-area: ref; font-size: 0.74rem; color: #7f95b3; }
.sim-meter-note {
  margin: 0; padding: 9px 14px;
  font-size: 0.8rem; line-height: 1.7;
  color: #cbd9ec;
  background: rgba(143, 180, 240, 0.06);
  border-top: 1px solid #1f3655;
}
.sim-meter.is-abort .sim-line-v { color: #fca5a5; text-shadow: none; }
.sim-meter.is-measuring .sim-meter-screen { flex-direction: row; align-items: center; gap: 10px; font-size: 0.88rem; color: #8fa7c6; padding-block: 16px; }
.sim-pulse { width: 10px; height: 10px; border-radius: 50%; background: #7ee8b2; animation: simPulse 0.9s ease-in-out infinite; }
@keyframes simPulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* graded readings in report */
.sim-line.lv-ok .sim-line-v { color: #7ee8b2; }
.sim-line.lv-warn .sim-line-v { color: #fcd34d; }
.sim-line.lv-bad .sim-line-v { color: #fca5a5; }
.sim-line.lv-na .sim-line-v { color: #8fa7c6; }
.sim-line.lv-bad { background: rgba(239, 68, 68, 0.07); margin-inline: -14px; padding-inline: 14px; }

/* diagnosis */
.sim-options { display: flex; flex-direction: column; gap: 8px; }
.sim-options.is-disabled { opacity: 0.55; }
.sim-option {
  display: flex; align-items: center; gap: 10px;
  text-align: start;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 0.9rem; line-height: 1.6;
  transition: border-color 0.25s var(--ease-lux), background 0.25s var(--ease-lux);
}
.sim-option:hover:not(:disabled) { border-color: var(--navy-600); background: var(--bg-surface); }
.sim-option-mark {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-grid; place-items: center;
}
.sim-option.is-wrong { opacity: 0.6; text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, 0.6); }
.sim-option.is-wrong .sim-option-mark { border-color: #ef4444; color: #ef4444; }

/* report */
.sim-report-head {
  display: flex; align-items: center; gap: 20px;
  padding: 22px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}
.sim-score {
  width: 96px; height: 96px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  padding-top: 28px;
  border: 4px solid;
}
.sim-score b { font-family: var(--font-mono); font-size: 1.9rem; line-height: 1; }
.sim-score small { font-size: 0.75rem; color: var(--text-muted); }
.sim-score-ok { border-color: #10b981; color: #0f9f6e; }
.sim-score-warn { border-color: #f59e0b; color: #b45309; }
.sim-score-bad { border-color: #ef4444; color: #b42318; }
[data-theme="dark"] .sim-score-ok { color: #34d399; }
[data-theme="dark"] .sim-score-warn { color: #fbbf24; }
[data-theme="dark"] .sim-score-bad { color: #fca5a5; }
.sim-report-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.84rem; color: var(--text-muted); margin-top: 6px; }
.sim-report-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.sim-violation { color: #b42318; font-weight: 600; }
.sim-answer { font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; }
.sim-explain { font-size: 0.92rem; line-height: 1.9; color: var(--text-secondary); }
.sim-actions { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 10px; }

.sim-report-cta {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: 16px;
  color: #ffffff;
  background:
    radial-gradient(ellipse 60% 120% at 90% 0%, rgba(74, 134, 220, 0.3), transparent 70%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
}
.sim-report-cta strong { font-size: 1.05rem; }
.sim-report-cta p { font-size: 0.88rem; color: #cbd9ec; margin-top: 2px; }
.sim-report-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.sim-disclaimer {
  margin-top: 24px;
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.8rem; line-height: 1.7;
  color: var(--text-muted);
}
.sim-disclaimer .outline-icon { flex-shrink: 0; margin-top: 3px; }

@media (max-width: 1000px) {
  .sim-grid { grid-template-columns: minmax(0, 1fr); }
  .sim-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .sim-picker { grid-template-columns: minmax(0, 1fr); }
  .sim-tests { grid-template-columns: minmax(0, 1fr); }
  .sim-plate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-report-head { flex-direction: column; text-align: center; }
  .sim-report-btns { width: 100%; }
  .sim-report-btns > * { flex: 1 1 100%; }
}

/* instrument values: numbers in mono/LTR, words in the page font and direction */
.sim-line-v.is-text {
  font-family: var(--font-ar);
  font-size: 0.9rem;
  font-weight: 600;
  direction: inherit;
  unicode-bidi: normal;
  text-align: end;
  text-shadow: none;
}
html[lang="en"] .sim-line-v.is-text { font-family: var(--font-en); }

/* ---------- simulator: equipment switch, PPE, panel label ---------- */
.sim-equip {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.sim-equip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem; font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background 0.25s var(--ease-lux), color 0.25s var(--ease-lux), box-shadow 0.25s var(--ease-lux);
}
.sim-equip-btn small {
  font-size: 0.72rem; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: var(--border-color); color: var(--text-muted);
}
.sim-equip-btn:hover { color: var(--text-primary); }
.sim-equip-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(6, 19, 38, 0.08), 0 4px 12px -4px rgba(6, 19, 38, 0.15);
}
.sim-equip-btn.active small { background: var(--navy-800); color: #fff; }

.sim-ppe {
  width: 100%;
  margin-top: 10px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  text-align: start;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-page);
  color: var(--text-primary);
  transition: border-color 0.25s var(--ease-lux), background 0.25s var(--ease-lux);
}
.sim-ppe:hover { border-color: var(--border-strong); }
.sim-ppe-icon { color: var(--text-muted); display: inline-flex; flex-shrink: 0; }
.sim-ppe-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sim-ppe-body strong { font-size: 0.88rem; font-weight: 600; }
.sim-ppe-body small { font-size: 0.76rem; color: var(--text-muted); }
.sim-ppe-switch {
  position: relative; flex-shrink: 0;
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.25s ease;
}
.sim-ppe-switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: inset-inline-start 0.25s var(--ease-lux);
}
.sim-ppe.is-on { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.06); }
.sim-ppe.is-on .sim-ppe-icon { color: #0f9f6e; }
.sim-ppe.is-on .sim-ppe-switch { background: #10b981; }
.sim-ppe.is-on .sim-ppe-switch::after { inset-inline-start: 21px; }

.sim-mode-any { color: var(--text-muted); }

/* panel rating label: white engraved plastic on grey steel */
.sim-plate.sim-plate-panel {
  background: linear-gradient(160deg, #fbfcfd, #e9edf1);
  border: 1px solid #c4ccd5;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 4px #d5dbe1;
  margin: 4px;
}
.sim-plate-panel .sim-plate-head { color: #1f4d8c; }

@media (max-width: 680px) {
  .sim-equip { display: flex; }
  .sim-equip-btn { flex: 1; justify-content: center; padding-inline: 10px; }
}

/* three equipment types: let the switch wrap neatly on narrow screens */
.sim-equip { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 480px) {
  .sim-equip-btn { flex: 1 1 calc(50% - 4px); padding: 9px 8px; font-size: 0.86rem; gap: 6px; }
  .sim-equip-btn:last-child:nth-child(odd) { flex-basis: 100%; }
}

/* ---------- admin sign-in ---------- */
.admin-login {
  max-width: 380px;
  margin: 12px auto;
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.admin-login-icon { color: var(--navy-700); display: inline-flex; justify-content: center; }
[data-theme="dark"] .admin-login-icon { color: #e2ecf9; }
.admin-login h4 { font-size: 1.2rem; }
.admin-login > p { font-size: 0.88rem; color: var(--text-muted); }
.admin-login .field-group { text-align: start; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; font-weight: 600; }
.admin-login-error {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  font-size: 0.86rem; color: #b42318;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px; padding: 8px 12px;
}
[data-theme="dark"] .admin-login-error { color: #fca5a5; }
.admin-session-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 10px 14px;
  border-radius: 12px; background: var(--bg-subtle);
  font-size: 0.86rem; color: var(--text-secondary);
}
.admin-session-bar > span { display: inline-flex; align-items: center; gap: 6px; }
.admin-logout-btn {
  min-height: 36px !important; padding: 6px 14px !important;
  color: var(--text-primary) !important; border-color: var(--border-strong) !important;
  font-size: 0.84rem;
}

/* =====================================================================
   RESPONSIVE POLISH — every screen size, no crowding
   Audited at 320 / 375 / 414 / 768 / 1024 / 1280 / 1920 px.
   ===================================================================== */

/* Readable line length everywhere */
.section-desc, .hero-subtitle { max-width: 68ch; margin-inline: auto; }
.hero-subtitle { margin-inline: 0; }

/* ---------- Hero highlights: wrap instead of being cut off ---------- */
.hero-pillar-chip { white-space: normal !important; line-height: 1.45; align-items: center; }
@media (min-width: 1201px) {
  .hero-pillars-strip { max-width: 820px; }
}
@media (max-width: 420px) {
  .hero-pillars-strip { grid-template-columns: minmax(0, 1fr) !important; row-gap: 12px; }
}

/* ---------- Hero title scales down on small phones ---------- */
@media (max-width: 400px) {
  .hero-title { font-size: 1.9rem; line-height: 1.32; }
  .hero-subtitle { font-size: 0.98rem; line-height: 1.8; }
  .hero-eyebrow { font-size: 0.76rem; }
}

/* ---------- Tool cards: 3 → 2 → 1 columns ---------- */
.tools-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .tools-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools-overview-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Top utility bar on phones: two tidy rows, nothing truncated ---------- */
@media (max-width: 480px) {
  .utility-inner { flex-wrap: wrap !important; justify-content: center; row-gap: 6px; padding-block: 8px; }
  .utility-contacts, .utility-actions { flex: 1 1 100% !important; justify-content: center !important; }
  .utility-bar .utility-badge-emergency { max-width: none !important; }
  .utility-bar .utility-badge-emergency [data-i18n] { overflow: visible; text-overflow: clip; }
}

/* ---------- Catalog: search row and quantity row on small screens ---------- */
.search-field-wrap { min-width: min(250px, 100%) !important; }
@media (max-width: 480px) {
  .catalog-search-row > * { flex: 1 1 100% !important; max-width: none !important; }
}
@media (max-width: 420px) {
  .qty-add-row { flex-wrap: wrap; }
  .qty-add-row .qty-input-wrap { flex: 1 1 100%; width: auto; }
  .qty-add-row .add-rfq-btn { flex: 1 1 100%; min-height: 42px; }
}

/* ---------- Long button labels on small phones: smaller, balanced ---------- */
@media (max-width: 420px) {
  .sector-spotlight-card .btn-gold,
  .sector-spotlight-card .btn-outline-light,
  .contact-info-card .btn-gold,
  .contact-info-card .btn-outline-light {
    font-size: 0.86rem;
    padding-inline: 12px;
  }
}
@media (max-width: 360px) {
  .contact-info-card .ltr-num { font-size: 0.8rem; }
}

/* ---------- Cards and panels breathe less on phones ---------- */
@media (max-width: 480px) {
  .container { padding-inline: 16px; }
  .section-header { margin-bottom: 36px; }
  .section-title { font-size: 1.6rem; }
  .division-card, .tool-card, .sim-card, .contact-info-card, .wizard-form-card { padding: 20px 18px; }
}

/* ---------- Tool tabs: scroll hint (edge fade) when they overflow ---------- */
@media (max-width: 1100px) {
  .tools-tabs-inner {
    mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    padding-inline: 18px;
    scroll-padding-inline: 18px;
  }
}

/* ---------- Large screens: keep content comfortable, not stretched ---------- */
@media (min-width: 1600px) {
  .container { max-width: 1360px; }
  .site-header .container, .utility-bar .container { max-width: 1480px; }
}

/* ---------- Landscape phones: hero should not fill several screens ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section { padding-block: 48px 56px; }
}

/* ---------- Touch devices: comfortable tap targets ---------- */
@media (pointer: coarse) {
  .nav-link, .tool-tab, .cat-pill, .sector-tab, .symptom-chip, .demo-code-chip, .sim-equip-btn { min-height: 40px; }
  .icon-pill-btn, .mobile-menu-btn { min-height: 40px; min-width: 40px; }
}

/* =====================================================================
   FLOATING WHATSAPP BUTTON — real WhatsApp mark, brand green, clean pill
   ===================================================================== */
.whatsapp-fab {
  position: fixed;
  z-index: 150;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: calc(22px + env(safe-area-inset-right, 0px));
  height: 56px;
  padding: 0 22px 0 6px;
  gap: 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #2fe074 0%, #25d366 45%, #1ebe5a 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 12px 28px -8px rgba(18, 140, 70, 0.55),
    0 4px 10px -4px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.35s var(--ease-lux), box-shadow 0.35s var(--ease-lux), filter 0.35s var(--ease-lux);
}
html[dir="ltr"] .whatsapp-fab { padding: 0 22px 0 6px; }
html[dir="rtl"] .whatsapp-fab { padding: 0 6px 0 22px; }

.whatsapp-fab:hover {
  transform: translateY(-3px);
  filter: saturate(1.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 18px 34px -10px rgba(18, 140, 70, 0.6),
    0 6px 14px -6px rgba(0, 0, 0, 0.25) !important;
}
.whatsapp-fab:active { transform: translateY(-1px) scale(0.98); }
.whatsapp-fab:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; box-shadow: 0 0 0 6px #128c4a !important; }

/* logo sits in its own darker disc */
.whatsapp-fab-icon {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 94, 52, 0.28);
  color: #ffffff;
}
.whatsapp-fab-icon .ic, .whatsapp-fab-icon svg { display: block; }

/* soft "online" pulse ring */
.whatsapp-fab-icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  opacity: 0;
  animation: waPulse 2.8s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab-icon::after { animation: none; }
}

.whatsapp-fab-label { line-height: 1; }

/* hide while the quote drawer or a dialog is open, so it never covers their buttons */
body:has(.rfq-drawer.open) .whatsapp-fab,
body:has(.modal-dialog.open) .whatsapp-fab,
body:has(.lux-lightbox) .whatsapp-fab { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* phones and small tablets: compact round button with the mark only */
@media (max-width: 680px) {
  .whatsapp-fab,
  html[dir="rtl"] .whatsapp-fab,
  html[dir="ltr"] .whatsapp-fab {
    width: 58px;
    height: 58px;
    padding: 0 !important;
    justify-content: center;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: calc(16px + env(safe-area-inset-right, 0px));
  }
  .whatsapp-fab-label { display: none !important; }
  .whatsapp-fab-icon { width: 58px; height: 58px; background: transparent; }
  .whatsapp-fab-icon svg { width: 30px; height: 30px; }
  .whatsapp-fab-icon::after { inset: 4px; }
}

/* WhatsApp mark inside normal buttons: same size as other icons */
.btn-gold [data-icon="whatsapp"] svg,
.btn-navy [data-icon="whatsapp"] svg,
.btn-outline-light [data-icon="whatsapp"] svg { width: 18px; height: 18px; }

/* =====================================================================
   PHONE TOP BAR — one clean row (replaces the two stacked rows)
   [ phone number ]                         [ ⚡ طوارئ ] [ 🔧 ]
   ===================================================================== */
@media (max-width: 600px) {
  .utility-bar .utility-inner {
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    min-height: 38px;
    padding-block: 5px !important;
    gap: 8px !important;
  }
  .utility-bar .utility-contacts,
  .utility-bar .utility-actions {
    flex: 0 1 auto !important;
    justify-content: flex-start !important;
    min-width: 0;
  }
  .utility-bar .utility-actions { flex-shrink: 0 !important; gap: 6px; }

  /* only the main number and the two actions stay */
  .utility-bar [data-util="location"],
  .utility-bar [data-util="phone2"],
  .utility-bar [data-util="email"],
  .utility-bar [data-util="pdf"] { display: none !important; }
  .utility-bar [data-util="phone1"] {
    padding-inline: 0 !important;
    border: none !important;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  /* emergency: short label */
  .utility-bar .utility-badge-emergency {
    height: 28px;
    padding-inline: 10px !important;
    max-width: none !important;
  }
  .utility-bar .utility-badge-emergency [data-i18n] { display: none !important; }
  html[lang="ar"] .utility-bar .utility-badge-emergency::after { content: "طوارئ"; }
  html[lang="en"] .utility-bar .utility-badge-emergency::after { content: "Emergency"; }
  .utility-bar .utility-badge-emergency::after { font-size: 0.74rem; font-weight: 600; line-height: 1; }

  /* admin: icon only, round */
  .utility-bar [data-util="admin"] {
    width: 28px;
    height: 28px;
    padding: 0 !important;
    justify-content: center;
  }
  .utility-bar [data-util="admin"] [data-i18n] { display: none !important; }
}

@media (max-width: 340px) {
  .utility-bar [data-util="phone1"] { font-size: 0.7rem; gap: 4px !important; }
  .utility-bar .utility-badge-emergency { padding-inline: 8px !important; }
}

/* =====================================================================
   PHONE DE-STACKING — no long one-item-per-line lists
   ===================================================================== */

/* ---------- 1. Hero highlights: compact 2×2 cards ---------- */
@media (max-width: 600px) {
  .hero-pillars-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    row-gap: 8px !important;
  }
  .hero-pillar-chip {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(143, 180, 240, 0.18) !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    white-space: normal !important;
  }
  .hero-pillar-chip .hero-pillar-icon .outline-icon { width: 18px; height: 18px; }
  .hero-photo-credit { font-size: 0.6rem; bottom: 6px; }
}

/* English copyright line keeps its word order inside the Arabic page */
.site-footer .container > div:last-child > span:first-child { direction: ltr; unicode-bidi: isolate; }

/* =====================================================================
   PHONE CONTENT REVIEW — everything visible, nothing scrolls sideways,
   nothing is cut off or hidden behind taps. Groups of buttons become
   tidy 2-column grids with full labels.
   ===================================================================== */
@media (max-width: 600px) {

  /* ---------- shared chip-grid look ---------- */
  .tools-tabs-inner,
  .sectors-bar,
  .category-pills,
  .calc-tabs-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    flex-wrap: initial !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    margin-inline: 0 !important;
  }
  .tools-tabs-inner .tool-tab,
  .sectors-bar .sector-tab,
  .category-pills .cat-pill,
  .calc-tabs-bar .calc-tab-btn {
    width: 100%;
    min-height: 46px;
    padding: 9px 10px !important;
    border-radius: 12px !important;
    white-space: normal !important;
    text-align: center;
    justify-content: center;
    line-height: 1.35;
    font-size: 0.8rem !important;
  }
  /* an odd last item spans the full row so the grid stays balanced */
  .tools-tabs-inner > :last-child:nth-child(odd),
  .sectors-bar > :last-child:nth-child(odd),
  .category-pills > :last-child:nth-child(odd),
  .calc-tabs-bar > :last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* ---------- tool center tabs: a full menu, not a cramped sticky strip ---------- */
  .tools-tabs {
    position: static !important;
    background: var(--bg-page) !important;
    backdrop-filter: none !important;
    border-bottom: 0 !important;
  }
  .tools-tabs-inner { padding: 14px 16px 6px !important; }
  .tools-tabs .tool-tab {
    flex-direction: row;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
  }
  .tools-tabs .tool-tab.active { border-color: transparent; }
  .tools-tabs .tool-tab .outline-icon { width: 16px; height: 16px; flex-shrink: 0; }
  .tools-center-head { padding-block: 26px 22px !important; }
  .tools-center-title { font-size: 1.35rem !important; }
  .tools-back-link { padding: 7px 12px; font-size: 0.82rem; }
  .tools-center .tool-panel { padding-top: 28px !important; }

  /* ---------- catalog: full spec names readable ---------- */
  .spec-full {
    display: block;
    margin-top: 6px;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--text-secondary);
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
  }
  .catalog-toolbar { padding: 14px !important; }

  /* ---------- footer: all groups visible, compact and ordered ---------- */
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px !important;
  }
  .footer-grid > div:not(:first-child) {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .footer-grid strong { font-size: 0.95rem; }
  .footer-links { margin-top: 10px !important; gap: 8px !important; font-size: 0.86rem !important; }
  /* the short portal links sit in two columns */
  .footer-grid > div:nth-child(3) .footer-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px !important;
  }
  /* contact lines as tappable rows */
  .footer-grid > div:last-child .footer-links li {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .footer-grid > div:last-child .footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
  }
  .site-footer .container > div:last-child {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
    gap: 6px !important;
    font-size: 0.74rem !important;
    padding-top: 16px !important;
  }
  .site-footer { padding-bottom: 150px !important; } /* clear the floating WhatsApp + back-to-top buttons */
}

/* very small phones: chips go full width so labels never squeeze */
@media (max-width: 340px) {
  .sectors-bar, .category-pills { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (min-width: 601px) { .spec-full { display: none; } }

/* phone: long CTA labels wrap instead of running off-screen */
@media (max-width: 600px) {
  .calc-cta-btn, .calc-cta-btn span { white-space: normal !important; text-align: center; line-height: 1.4; }
  .calc-cta-btn { height: auto !important; min-height: 48px; padding-block: 10px !important; width: 100% !important; max-width: 100%; overflow: visible !important; }
  .calc-cta-btn span { flex: 1 1 auto; min-width: 0; }
  /* nested padding ate the width on small phones */
  .calc-workspace { padding: 14px !important; }
  .calc-input-panel, .calc-output-panel { padding: 16px !important; }
}
