/* ==========================================================
   Areeba Medics – home page, v2 (new layout)
   Signature shape: the ARCH (a doorway = "care at your door")
   Fonts: Bricolage Grotesque (headings) + Figtree (body)
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Figtree:wght@400;500;600&display=swap');

:root {
  --ink:    #0C2B2E;
  --teal:   #0F6E6A;
  --teal-d: #0A4F4D;
  --mint:   #D6EBE4;
  --mist:   #EFF7F4;
  --sun:    #F2A93B;
  --text:   #27403F;
  --muted:  #5E7473;
  --white:  #fff;
  --font-head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 24px 50px -28px rgba(12,43,46,.5);
}

/* ---------- Base ---------- */
body { margin: 0; font: 400 1.0625rem/1.65 var(--font-body); color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 64ch; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---------- Buttons & links ---------- */
.btn { display: inline-block; padding: .85em 1.6em; border-radius: 999px; background: var(--teal); border: 2px solid var(--teal);
  color: var(--white); font: 600 1rem/1.2 var(--font-body); text-decoration: none; text-align: center; transition: background-color .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--teal-d); border-color: var(--teal-d); }
.btn-green { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-green:hover { background: #ffbe5e; border-color: #ffbe5e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-block { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--sun); padding-bottom: 2px; white-space: nowrap; }
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { color: var(--ink); }

/* ---------- Loader & image boxes ---------- */
.site-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--ink); color: var(--white);
  animation: loaderOut .5s ease 1.6s forwards; }
.site-loader.is-hidden, .site-loader.hidden, .site-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s, visibility .4s; }
.site-loader__inner { text-align: center; }
.site-loader__inner p { margin: 14px auto 0; font-size: .95rem; opacity: .8; }
.site-loader__logo { width: 96px; background: var(--white); padding: 10px; border-radius: 48px 48px 14px 14px; }
.site-loader__spinner { display: block; width: 34px; height: 34px; margin: 22px auto 0; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--sun); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.image-loading-box { position: relative; overflow: hidden; background: var(--mist); }
.image-loading-box img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.image-loader { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid var(--mint); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.image-error-message { display: none; position: absolute; inset: 0; z-index: 2; place-items: center; text-align: center; padding: 12px; font-size: .9rem; color: var(--muted); background: var(--mist); }
.image-loading-box.is-error .image-error-message { display: grid; }

/* ---------- Section rhythm ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section--tint { background: var(--mist); }
.section--dark { background: var(--ink); color: #CFE2DE; padding-bottom: clamp(56px, 7vw, 90px); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--flush { padding-top: 0; }
.head { max-width: 680px; margin-bottom: 44px; }
.head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section--dark .head p { color: #9FBDB8; }
.section--dark .link-arrow { color: var(--white); }

/* ---------- HERO ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); background: linear-gradient(180deg, var(--mist), var(--white) 85%); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.8vw, 4.6rem); font-weight: 800; margin-bottom: .35em; }
.hero__lead { font-size: 1.2rem; color: var(--text); max-width: 54ch; margin-bottom: 1.6em; }
.hero__facts { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--mint); }
.hero__facts li { padding: 18px 18px 0 0; }
.hero__facts li + li { padding-left: 18px; border-left: 1px solid var(--mint); }
.hero__facts strong { display: block; font: 700 1.05rem var(--font-head); color: var(--ink); }
.hero__facts span { font-size: .93rem; color: var(--muted); line-height: 1.4; display: block; }

.hero__visual { position: relative; padding: 0 18px 28px 0; }
.arch { position: relative; aspect-ratio: 4 / 5; border-radius: 999px 999px 28px 28px; background: var(--teal); display: grid; place-items: center; padding: 12%; box-shadow: var(--shadow); }
.arch::before { content: ""; position: absolute; inset: 0; transform: translate(16px, 16px); z-index: -1; border-radius: 999px 999px 28px 28px; background: var(--sun); }
.arch::after { content: ""; position: absolute; inset: 14px; border: 2px solid rgba(255,255,255,.35); border-radius: 999px 999px 18px 18px; pointer-events: none; }
.arch__logo { width: 100%; aspect-ratio: 1; border-radius: 999px 999px 20px 20px; background: var(--white); }
.arch__logo img { object-fit: contain; padding: 18px; }
.chip { position: absolute; padding: .45em 1em; border-radius: 999px; background: var(--white); color: var(--ink); font: 600 .95rem var(--font-body); box-shadow: var(--shadow); }
.chip--a { left: -14px; bottom: 22%; }
.chip--b { right: 0; top: 14%; }

/* ---------- SERVICES (service_card() output) ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.service-grid > * { background: var(--white); border: 1px solid var(--mint); border-radius: 18px; padding: 28px; box-shadow: inset 0 -4px 0 var(--teal); transition: transform .2s, box-shadow .2s; }
.service-grid > *:hover { box-shadow: inset 0 -4px 0 var(--sun), var(--shadow); }
.service-grid h3 a { color: inherit; text-decoration: none; }
.service-grid p { color: var(--muted); font-size: .98rem; }
.service-grid .btn { padding: .55em 1.2em; font-size: .95rem; }

/* ---------- EQUIPMENT RAIL ---------- */
.rail { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px max(20px, calc((100vw - 1180px) / 2)) 22px; scrollbar-color: var(--teal) transparent; }
.gear { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; display: flex; flex-direction: column; background: var(--white); color: var(--text); border-radius: 160px 160px 20px 20px; padding: 16px 16px 24px; }
.gear__img { aspect-ratio: 1; border-radius: 999px 999px 14px 14px; margin-bottom: 18px; }
.gear h3, .gear p, .gear__prices { padding-inline: 8px; }
.gear h3 { color: var(--ink); }
.gear__desc { color: var(--muted); font-size: .97rem; }
.gear__prices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; margin-top: auto; }
.gear__prices span { background: var(--mist); border-radius: 999px; padding: .3em .9em; font-size: .9rem; }
.gear__prices b { color: var(--ink); }
.gear .btn { margin: 0 8px; }

/* ---------- HOW IT WORKS ---------- */
.process { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 7vw, 100px); align-items: start; }
.process__intro { position: sticky; top: 100px; }
.process__intro p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.6em; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(var(--mint) 0 8px, transparent 8px 16px); }
.path__item { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding-bottom: 44px; }
.path__item:last-child { padding-bottom: 0; }
.path__mark { width: 64px; height: 76px; display: grid; place-items: center; border-radius: 32px 32px 10px 10px; background: var(--teal); color: var(--white); font: 800 1.6rem var(--font-head); }
.path__item:nth-child(2) .path__mark { background: var(--sun); color: var(--ink); }
.path__item:nth-child(3) .path__mark { background: var(--ink); }
.path__item h3 { font-size: 1.4rem; margin-top: 6px; }
.path__item p { color: var(--muted); margin: 0; }

/* ---------- INFO ACCORDION ---------- */
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 64px); align-items: start; }
.info__item { border-bottom: 1px solid #BFDDD3; padding: 22px 0; }
.info__item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; font: 700 1.2rem/1.3 var(--font-head); color: var(--ink); }
.info__item summary::-webkit-details-marker { display: none; }
.info__item summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--white); color: var(--teal); font-size: 1.3rem; line-height: 1; transition: transform .2s, background-color .2s; }
.info__item[open] summary::after { transform: rotate(45deg); background: var(--sun); color: var(--ink); }
.info__item p { color: var(--muted); margin: 14px 0 14px; font-size: 1rem; }

/* ---------- BLOG (magazine) ---------- */
.mag { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--mint); border-radius: 20px; overflow: hidden; }
.post-card .thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--mist); font-size: 3rem; }
.blog-image-box { width: 100%; height: 100%; }
.post-card .body { padding: 22px 24px 26px; }
.post-card .meta { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.post-card p { color: var(--muted); font-size: .98rem; margin: 0; }
.post-card:first-child { grid-row: span 2; }
.post-card:first-child .thumb { aspect-ratio: 16 / 11; }
.post-card:first-child h3 { font-size: 1.7rem; }
.post-card:not(:first-child) { flex-direction: row; }
.post-card:not(:first-child) .thumb { flex: 0 0 38%; aspect-ratio: auto; }
.post-card:not(:first-child) .body { padding: 20px; }

/* ---------- CTA ---------- */
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; padding: clamp(32px, 5vw, 64px);
  background: var(--teal-d); color: #D3E8E3; border-radius: 240px 240px 28px 28px / 120px 120px 28px 28px; padding-top: clamp(56px, 8vw, 110px); }
.cta h2 { color: var(--white); font-size: clamp(1.9rem, 4vw, 3rem); }
.cta p { margin: 0; font-size: 1.1rem; }
.cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta__phone { color: var(--white); font: 800 1.6rem var(--font-head); text-decoration: none; }
.cta__phone:hover { color: var(--sun); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .process, .info, .mag { grid-template-columns: 1fr; }
  .hero__visual { max-width: 340px; margin-inline: auto; order: -1; }
  .process__intro { position: static; }
  .post-card:first-child { grid-row: auto; }
  .cta { border-radius: 120px 120px 24px 24px / 60px 60px 24px 24px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--mint); margin-top: 14px; }
  .actions .btn { width: 100%; }
  .post-card:not(:first-child) { flex-direction: column; }
  .post-card:not(:first-child) .thumb { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; } }