/* Health Means - lightweight static site styles (RTL/LTR ready) */

:root {
  --bg: #0b0f19;
  --panel: #0f172a;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --text: #e5e7eb;
  --muted: rgba(229, 231, 235, 0.74);
  --border: rgba(229, 231, 235, 0.16);
  --accent: #ef233c;
  --accent2: #ff6b6b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius2: 24px;
  --max: 1120px;

  /* Logo tuning (premium, subtle) */
  --logo-saturate: 1.14;
  --logo-contrast: 1.06;
  --logo-brightness: 1.02;
  --logo-shadow: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.28));

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-sans-ar: "Tajawal", "Cairo", "Noto Kufi Arabic", "Noto Sans Arabic", var(--font-sans);

  --page-bg:
    radial-gradient(1200px 520px at 16% -10%, rgba(239, 35, 60, 0.22), transparent 60%),
    radial-gradient(1000px 520px at 90% 0%, rgba(255, 107, 107, 0.16), transparent 60%),
    linear-gradient(180deg, #070a12 0%, #0b0f19 60%, #070a12 100%);

  --bar-bg: rgba(7, 10, 18, 0.6);
  --bar-border: rgba(229, 231, 235, 0.12);
  --menu-bg: rgba(7, 10, 18, 0.92);
  --heroMedia-bg:
    radial-gradient(700px 420px at 20% 10%, rgba(239, 35, 60, 0.22), transparent 60%),
    radial-gradient(700px 420px at 80% 30%, rgba(255, 107, 107, 0.18), transparent 60%),
    rgba(7, 10, 18, 0.6);

  --nav-text: rgba(229, 231, 235, 0.92);
  --nav-hover-bg: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --card: rgba(2, 6, 23, 0.04);
  --card2: rgba(2, 6, 23, 0.06);
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.68);
  --border: rgba(2, 6, 23, 0.14);
  --shadow: 0 18px 60px rgba(2, 6, 23, 0.12);
  --page-bg:
    radial-gradient(1200px 520px at 16% -10%, rgba(239, 35, 60, 0.10), transparent 60%),
    radial-gradient(1000px 520px at 90% 0%, rgba(255, 107, 107, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f6f7fb 65%, #ffffff 100%);

  --bar-bg: rgba(255, 255, 255, 0.78);
  --bar-border: rgba(2, 6, 23, 0.10);
  --menu-bg: rgba(255, 255, 255, 0.94);
  --heroMedia-bg:
    radial-gradient(700px 420px at 20% 10%, rgba(239, 35, 60, 0.12), transparent 60%),
    radial-gradient(700px 420px at 80% 30%, rgba(255, 107, 107, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.65);

  --nav-text: rgba(11, 18, 32, 0.92);
  --nav-hover-bg: rgba(2, 6, 23, 0.05);

  /* Light mode logo tuning */
  --logo-saturate: 1.10;
  --logo-contrast: 1.04;
  --logo-brightness: 1.00;
  --logo-shadow: drop-shadow(0 10px 22px rgba(2, 6, 23, 0.10));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { scroll-padding-top: 92px; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.55;
  text-align: start;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

html[lang="ar"] body { font-family: var(--font-sans-ar); }
body.noScroll { overflow: hidden; }

html[lang="ar"] .heroContent h1 { line-height: 1.16; }
[dir="rtl"] .nav a { text-align: start; }

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 78px 0; }
.section.compact { padding: 56px 0; }
.sectionTitle {
  font-size: clamp(22px, 1.4vw + 16px, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}
.sectionLead { margin: 0; color: var(--muted); max-width: 70ch; }

.pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}
.pillSmall {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--nav-text);
  background: var(--card2);
}
.pillRow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.08); border-color: rgba(229, 231, 235, 0.26); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%); border-color: transparent; color: #070a12; }
.btn.primary:hover { filter: brightness(1.02); }
.btn.small { padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.btn.ghost { background: transparent; }

.headerWrap { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); }
.header {
  border-bottom: 1px solid var(--bar-border);
  background: var(--bar-bg);
}
.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}
.brand img {
  width: 140px;
  height: auto;
  filter: saturate(var(--logo-saturate)) contrast(var(--logo-contrast)) brightness(var(--logo-brightness)) var(--logo-shadow);
  transform: translateZ(0);
}
.brandText { display: flex; flex-direction: column; gap: 2px; }
.brandText strong { font-size: 14px; letter-spacing: 0.02em; }
.brandText span { color: var(--muted); font-size: 12px; }

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav a {
  color: var(--nav-text);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.nav a:hover { background: var(--nav-hover-bg); border-color: var(--bar-border); }
.nav a[aria-current="page"] {
  background: var(--nav-hover-bg);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--bar-border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}

.headerActions { display: flex; align-items: center; gap: 10px; }
.menuBtn { display: none; }

/* Smart header action pills (language + theme) */
.actionBtn {
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--nav-hover-bg);
  border-color: var(--bar-border);
  color: var(--nav-text);
  box-shadow: none;
}
.actionBtn:hover {
  transform: translateY(-1px);
  background: var(--card2);
  border-color: rgba(229, 231, 235, 0.22);
}
html[data-theme="light"] .actionBtn:hover { border-color: rgba(2, 6, 23, 0.18); }
.actionBtn:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 65%, transparent);
  outline-offset: 2px;
}
.actionBtn .actionIcon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}
.actionBtn .actionIcon svg { width: 18px; height: 18px; display: block; }
.actionBtn .actionLabel {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.themeBtn {
  padding-inline: 10px;
}
.themeBtn .actionLabel { display: none; }
.langBtn { min-width: 56px; justify-content: center; }

@media (max-width: 520px) {
  .langBtn .actionIcon { display: none; }
  .langBtn { min-width: 48px; padding-inline: 10px; }
}

.hero {
  padding: 70px 0 24px;
}
.heroGrid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.heroCard {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.heroMedia {
  height: 100%;
  min-height: 320px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--heroMedia-bg);
}
.heroMedia .tile {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}
.heroMedia .tile img { width: 100%; height: 100%; object-fit: cover; }
.heroMedia .tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.32));
}

.heroContent h1 {
  margin: 14px 0 12px 0;
  font-size: clamp(30px, 2.4vw + 16px, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.heroContent p { margin: 0 0 18px 0; color: var(--muted); max-width: 70ch; }
.heroCtas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 14px; }
.grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.catalogMore {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.catalogCount { color: var(--muted); font-size: 13px; }

/* Catalog preview strip (small thumbnails) */
.catalogPreview {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 14px;
}
.catalogPreviewHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.catalogPreviewHead h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.catalogPreviewHead p { margin: 0; color: var(--muted); font-size: 13px; }
.thumbGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.thumb {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span {
  position: absolute;
  inset: auto 8px 8px 8px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  background: color-mix(in oklab, var(--bg) 35%, transparent);
  border: 1px solid var(--bar-border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
@media (max-width: 960px) {
  .thumbGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .thumbGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Catalog wizard (modal details) */
.wizOverlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  padding: 18px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
}
html[data-theme="light"] .wizOverlay { background: rgba(2, 6, 23, 0.45); }
.wizOverlay.isOpen { display: grid; place-items: center; }
.wizModal {
  width: min(980px, 100%);
  max-height: min(86svh, 860px);
  overflow: auto;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--card));
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.wizTop {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in oklab, var(--panel) 88%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wizTitle { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.wizMeta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.wizClose {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.wizBody { padding: 16px; }
.wizGrid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items: start;
}
.wizGallery .cardMedia { aspect-ratio: 16 / 10; }
.wizThumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.wizThumbs button {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}
.wizThumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wizActions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.wizNav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 12px;
}
@media (max-width: 960px) {
  .wizGrid { grid-template-columns: 1fr; }
  .wizThumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .wizOverlay { padding: 10px; }
  .wizModal { max-height: 92svh; }
}

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.card h3 { margin: 10px 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.cardMedia {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card2);
  aspect-ratio: 16 / 10;
}
.cardMedia img { width: 100%; height: 100%; object-fit: cover; }

.listTicks { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.listTicks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.tick {
  width: 22px; height: 22px; border-radius: 999px;
  background: rgba(239, 35, 60, 0.15);
  border: 1px solid rgba(239, 35, 60, 0.3);
  flex: 0 0 auto;
  display: grid; place-items: center;
  margin-top: 2px;
}
.tick svg { width: 14px; height: 14px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.logoWall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.logoWall .logoTile {
  border: 1px solid var(--border);
  background: var(--card2);
  border-radius: 14px;
  padding: 14px;
  min-height: 56px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.logoWall .logoTile img {
  height: 36px;
  width: auto;
  opacity: 0.86;
  filter: grayscale(1);
}

.contactGrid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: start;
}
.contactCard { padding: 22px; }
.contactRow { display: grid; gap: 6px; margin-top: 12px; color: var(--text); }
.contactRow span { color: var(--muted); font-size: 13px; }
.contactRow a { text-decoration: underline; text-underline-offset: 3px; }
.contactRow a { direction: ltr; unicode-bidi: plaintext; }
.contactRow [data-company-phones],
.contactRow [data-company-emails] {
  display: grid;
  gap: 6px;
}
.contactRow [data-company-phones] a,
.contactRow [data-company-emails] a {
  display: inline-block;
  width: fit-content;
}

form { margin-top: 12px; }
.fieldRow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--nav-text); font-weight: 650; }
.input, textarea, select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
  text-align: start;
}
::placeholder { color: color-mix(in oklab, var(--muted) 85%, transparent); opacity: 1; }
html[data-theme="light"] ::placeholder { color: color-mix(in oklab, var(--muted) 90%, transparent); }
textarea { resize: vertical; min-height: 120px; }
.input:focus, textarea:focus, select:focus { border-color: rgba(255, 107, 107, 0.55); box-shadow: 0 0 0 4px rgba(239, 35, 60, 0.14); }
.help { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.formStatus { margin-top: 10px; font-size: 14px; }
.formStatus.ok { color: rgba(56, 189, 248, 0.95); }
.formStatus.err { color: rgba(248, 113, 113, 0.95); }

/* Dropdown (select/option) theming */
html[data-theme="dark"] select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea { color-scheme: dark; }

html[data-theme="light"] select,
html[data-theme="light"] input,
html[data-theme="light"] textarea { color-scheme: light; }

select option,
select optgroup {
  background-color: var(--panel);
  color: var(--text);
}

.footer {
  border-top: 1px solid var(--bar-border);
  background: var(--bar-bg);
  padding: 22px 0;
}
.footerGrid { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer small { color: var(--muted); }
.footerLinks { display: flex; gap: 12px; flex-wrap: wrap; }
.footerLinks a { color: var(--nav-text); text-decoration: underline; text-underline-offset: 3px; }

.langChooser {
  padding: 64px 0 46px;
  min-height: calc(100svh - 72px);
  display: grid;
  align-content: center;
}
.chooserCard {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}
.chooserCard .copy h1 { margin: 10px 0 10px; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(28px, 1.8vw + 16px, 42px); }
.chooserCard .copy p { margin: 0 0 14px; color: var(--muted); }
.chooserCard .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.chooserCard .logoBox {
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  display: grid;
  place-items: center;
}
.chooserCard .logoBox img {
  width: min(260px, 100%);
  filter: saturate(var(--logo-saturate)) contrast(var(--logo-contrast)) brightness(var(--logo-brightness)) var(--logo-shadow);
  transform: translateZ(0);
}

/* RTL helpers */
[dir="rtl"] .nav { gap: 12px; }
[dir="rtl"] .heroCtas { justify-content: flex-start; }
[dir="rtl"] .heroContent h1,
[dir="rtl"] .sectionTitle { letter-spacing: 0; }

.section[id] { scroll-margin-top: 92px; }

/* Mobile */
@media (max-width: 960px) {
  .heroGrid { grid-template-columns: 1fr; }
  .heroMedia { min-height: 280px; }
  .grid.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logoWall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .contactGrid { grid-template-columns: 1fr; }
  .chooserCard { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .brand { min-width: unset; }
  .nav {
    position: fixed;
    inset: 72px 14px auto 14px;
    border: 1px solid var(--border);
    background: var(--menu-bg);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav.isOpen { display: flex; }
  .nav a { padding: 12px 12px; }
  .menuBtn { display: inline-flex; }
  .fieldRow { grid-template-columns: 1fr; }
  .grid.cols3, .grid.cols4 { grid-template-columns: 1fr; }
}
