/* houtia.org — one stylesheet for both languages.
   Direction comes from <html dir>; all spacing uses logical properties. */

@import url("../fonts/fonts.css");

:root {
  --green-900: #163f22;
  --green-800: #1d5a2e;
  --green-700: #237a38;
  --green-500: #2f8a3b;
  --green-100: #e4f0e6;
  --green-050: #f1f7f2;
  --orange: #e2801c;
  --orange-soft: #fbe9d6;
  --sand: #f6f2e9;
  --paper: #fffdf9;
  --ink: #1b211c;
  --muted: #59635b;
  --line: #e2dccf;
  --shadow: 0 1px 2px rgba(20, 40, 25, .06), 0 8px 24px rgba(20, 40, 25, .08);
  --radius: 10px;
  --wrap: 1120px;
  --font: "Plex Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--sand);
  text-rendering: optimizeLegibility;
}
[dir="ltr"] body, [dir="ltr"] { line-height: 1.65; }

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--green-900); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--green-900); font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.4em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; width: 34%; background: var(--green-050); }
address { font-style: normal; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--green-900); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px; z-index: 100; }
.skip:focus { top: 0; }

/* ---------- top bar + header ---------- */
.topbar { background: var(--green-900); color: #d9e8dc; font-size: .86rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.25rem; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
@media (max-width: 640px) { .topbar .wrap > span { display: none; } .topbar .wrap { justify-content: center; } }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--green-900); min-width: 0; }
.brand img { width: 52px; height: 52px; flex: none; }
.brand > span { max-width: 17.5rem; }
[dir="ltr"] .brand > span { flex: 0 0 15rem; }
[dir="ltr"] .nav a { font-size: .92rem; padding-inline: .6rem; }
.brand b { display: block; font-size: 1.02rem; line-height: 1.25; }
[dir="ltr"] .brand b { font-size: .95rem; }
.brand small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.nav { margin-inline-start: auto; display: flex; align-items: center; gap: .15rem; }
.nav a { text-decoration: none; color: var(--ink); padding: .5rem .7rem; border-radius: 6px; font-weight: 500; font-size: .96rem; white-space: nowrap; }
.nav a:hover { background: var(--green-050); color: var(--green-900); }
.nav a[aria-current="page"] { color: var(--green-800); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 6px 6px 0 0; }
.lang { margin-inline-start: .5rem; border: 1px solid var(--green-700); color: var(--green-800); padding: .35rem .75rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.lang:hover { background: var(--green-700); color: #fff; }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; font: inherit; color: var(--green-900); cursor: pointer; }
@media (max-width: 1080px) {
  .brand b { font-size: .95rem; }
  .menu-btn { display: inline-flex; align-items: center; gap: .5rem; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1rem; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .75rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; border-inline-start: 3px solid var(--orange); padding-inline-start: .75rem; }
  .lang { margin: .75rem 0 0; text-align: center; }
}
.no-js .menu-btn { display: none; }
.no-js .nav { display: flex; position: static; box-shadow: none; }

/* ---------- hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding-block: 3.5rem 3rem; }
.eyebrow { display: inline-block; color: var(--green-700); font-weight: 600; font-size: .9rem; letter-spacing: .02em; margin-bottom: .6rem; padding-inline-start: .9rem; border-inline-start: 3px solid var(--orange); }
.hero h1 { margin-bottom: .8rem; }
.lead { font-size: 1.15rem; color: #2f3a31; max-width: 38em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn { display: inline-block; padding: .75rem 1.35rem; border-radius: 8px; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); color: #fff; }
.btn-ghost { border-color: var(--green-700); color: var(--green-800); background: transparent; }
.btn-ghost:hover { background: var(--green-050); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.hero-media::before { content: ""; position: absolute; inset: 1.1rem -1.1rem -1.1rem 1.1rem; border: 2px solid var(--green-500); border-radius: var(--radius); z-index: -1; opacity: .55; }
[dir="ltr"] .hero-media::before { inset: 1.1rem 1.1rem -1.1rem -1.1rem; }
.hero-media figcaption { margin-top: .75rem; font-size: .88rem; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.25rem; } .hero-media { max-width: 520px; } }

/* ---------- facts strip ---------- */
.facts { background: var(--green-800); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.6rem; }
.fact b { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.fact span { color: #cfe3d3; font-size: .92rem; }
.fact .num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
@media (max-width: 720px) { .facts .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
.section { padding-block: 3.5rem; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); max-width: 42em; margin: 0; }
.more { white-space: nowrap; font-weight: 600; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .tag { display: inline-block; font-size: .78rem; color: var(--green-800); background: var(--green-100); border-radius: 999px; padding: .1rem .6rem; margin-bottom: .6rem; font-weight: 600; }
.card.num { position: relative; padding-inline-start: 4.2rem; }
.card.num > i { position: absolute; inset-inline-start: 1.25rem; top: 1.35rem; font-style: normal; font-weight: 700; color: var(--orange); font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.75rem; } }

.prose { max-width: 46em; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; color: var(--green-800); }
.notice { border: 1px solid #ead3b3; background: var(--orange-soft); border-radius: var(--radius); padding: 1rem 1.25rem; color: #4a3115; }
.notice p:last-child { margin: 0; }
.callout { background: var(--green-050); border-inline-start: 4px solid var(--green-500); padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; }
[dir="rtl"] .callout { border-radius: 8px 0 0 8px; }

/* timeline for history & news */
.timeline { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--green-100); }
.timeline li { position: relative; padding-inline-start: 1.75rem; padding-bottom: 1.75rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid var(--paper); }
.timeline time, .meta { display: block; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.timeline h3 { margin: .15rem 0 .35rem; }

/* news list */
.news-item { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; }
.news-item time { color: var(--green-800); font-weight: 600; font-variant-numeric: tabular-nums; }
.news-item h3 { margin-top: 0; }
.news-item .src { font-size: .88rem; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: .25rem; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .7rem .9rem; font-size: .9rem; color: var(--muted); }
.gallery .tall img { aspect-ratio: 3 / 4; object-fit: contain; background: #eef1ea; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

/* clinics list */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 1rem 0 0; }
.chips li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem; font-size: .95rem; }
.contact-block { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contact-block .card b { color: var(--muted); font-weight: 600; font-size: .85rem; display: block; margin-bottom: .25rem; }
.contact-block .card a { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.tel { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .contact-block { grid-template-columns: 1fr; } }

.doc-figure { margin: 1.5rem 0; }
.doc-figure img { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.doc-figure figcaption { font-size: .88rem; color: var(--muted); margin-top: .5rem; }

/* CTA band */
.cta { background: var(--green-900); color: #dfeee2; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-block: 2.5rem; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 .3rem; }
.cta p { margin: 0; max-width: 40em; }
.cta .btn-primary { background: var(--orange); color: #1b1408; }
.cta .btn-primary:hover { background: #f29b3c; }

/* ---------- footer ---------- */
.site-footer { background: #10301a; color: #c9dccd; font-size: .93rem; margin-top: 3rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding-block: 3rem 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .75rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand small { color: #b5c9b9; }
.legal { border-top: 1px solid rgba(255,255,255,.12); }
.legal .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1rem; font-size: .84rem; color: #a9bfae; }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 1.75rem; } }

/* page header for inner pages */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: 2.75rem 2.25rem; }
.page-head p { color: var(--muted); max-width: 44em; margin: 0; font-size: 1.08rem; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }
.crumbs span { margin-inline: .4rem; }

@media print {
  .topbar, .site-header, .cta, .site-footer, .actions, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
}
