/*
Theme Name: ISH Irbid Specialty Hospital
Theme URI: https://ishjo.com/
Author: IT.JO
Author URI: https://it.jo/
Description: Fast, accessible, Arabic-first theme for Irbid Specialty Hospital. No page builder.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: ishjo
*/

:root {
  --g-900: #0a3d22;
  --g-800: #0c4f2c;
  --g-700: #0e6b3a;
  --g-600: #13804a;
  --g-100: #e6f3ec;
  --g-50: #f3f9f5;
  --red: #c62828;
  --red-50: #fdecec;
  --ink: #15211b;
  --ink-2: #44524b;
  --muted: #6b7a72;
  --line: #e2e9e5;
  --bg: #ffffff;
  --bg-2: #f6f8f7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 61, 34, .06), 0 8px 24px rgba(10, 61, 34, .07);
  --wrap: 1200px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.75; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--g-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; color: var(--g-900); font-weight: 700; }
h1 { font-size: clamp(30px, 4.6vw, 48px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--g-900); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; border: 2px solid transparent; cursor: pointer; text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-pri { background: var(--g-700); color: #fff; }
.btn-pri:hover { background: var(--g-800); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #a91f1f; }
.btn-out { border-color: currentColor; color: var(--g-700); background: transparent; }
.btn-out:hover { background: var(--g-50); }
.btn-light { background: #fff; color: var(--g-800); }
.btn-light:hover { background: var(--g-50); }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }

/* ---------- emergency strip ---------- */
.er-strip { background: var(--red); color: #fff; font-size: 15px; }
.er-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.er-strip a { color: #fff; font-weight: 700; }
.er-strip .er-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fff; margin-inline-end: 8px; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: erpulse 2s infinite; vertical-align: middle; }
@keyframes erpulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.er-strip .er-side { display: flex; gap: 18px; align-items: center; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 52px; width: auto; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav > ul > li { position: relative; }
.nav a { display: block; padding: 10px 12px; color: var(--ink); font-weight: 600; font-size: 15.5px; border-radius: 10px; text-decoration: none; }
.nav a:hover, .nav .current > a { background: var(--g-50); color: var(--g-700); }
.nav .sub { display: none; position: absolute; top: 100%; inset-inline-start: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 260px; flex-direction: column; columns: 2; column-gap: 4px; }
.nav .sub.wide { min-width: 520px; display: none; }
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { font-weight: 500; font-size: 15px; break-inside: avoid; }
.head-cta { display: flex; gap: 8px; flex: none; }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 12px; width: 48px; height: 48px; cursor: pointer; color: var(--g-900); }
.menu-btn svg { width: 24px; height: 24px; }

@media (max-width: 1080px) {
  .head-cta .btn-out { display: none; }
}
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .head-cta { display: none; }
  .nav { position: fixed; inset: 0; top: 0; background: #fff; z-index: 60; margin: 0; padding: 84px 20px 120px; overflow-y: auto; display: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { display: block; }
  body.nav-open .menu-btn { position: fixed; top: 54px; inset-inline-end: 20px; z-index: 61; background: #fff; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 8px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .sub, .nav .sub.wide { display: block; position: static; box-shadow: none; border: 0; padding: 0 16px 0 0; min-width: 0; columns: 1; }
  .nav .sub a { font-size: 16px; padding: 10px 8px; color: var(--ink-2); }
  .brand img { height: 44px; }
  .site-head .wrap { min-height: 66px; }
}

/* ---------- mobile action bar ---------- */
.act-bar { display: none; }
@media (max-width: 760px) {
  .act-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom); }
  .act-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font-size: 13px; font-weight: 600; color: var(--g-800); text-decoration: none; }
  .act-bar a svg { width: 22px; height: 22px; }
  .act-bar a.er { color: var(--red); }
  body { padding-bottom: 64px; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: var(--g-900); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-img) center/cover no-repeat; opacity: .28; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,61,34,.15), rgba(10,61,34,.85) 60%); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero h1 { color: #fff; max-width: 14em; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); max-width: 34em; color: #e3f1e9; }
.hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); padding: 6px 14px; border-radius: 999px; font-size: 14px; margin-bottom: 18px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* quick actions under hero */
.quick { margin-top: -40px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.q-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; gap: 14px; align-items: flex-start; color: var(--ink); text-decoration: none !important; border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.q-card:hover { transform: translateY(-2px); border-color: var(--g-600); }
.q-card .ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--g-100); color: var(--g-700); }
.q-card .ic svg { width: 24px; height: 24px; }
.q-card.er .ic { background: var(--red-50); color: var(--red); }
.q-card b { display: block; font-size: 17px; color: var(--g-900); }
.q-card span { font-size: 14.5px; color: var(--muted); line-height: 1.5; display: block; }
@media (max-width: 960px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .quick-grid { grid-template-columns: 1fr; } .quick { margin-top: -28px; } }

/* ---------- sections ---------- */
.sec { padding: clamp(48px, 7vw, 88px) 0; }
.sec-alt { background: var(--bg-2); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head p { color: var(--muted); margin: 0; max-width: 40em; }
.kicker { color: var(--g-600); font-weight: 700; font-size: 14px; letter-spacing: .02em; margin-bottom: 6px; display: block; }

/* departments grid */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dept { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 100%; }
.dept:hover { border-color: var(--g-600); box-shadow: var(--shadow); transform: translateY(-2px); }
.dept .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--g-100); color: var(--g-700); display: inline-flex; align-items: center; justify-content: center; }
.dept .ic svg { width: 24px; height: 24px; }
.dept.er .ic { background: var(--red-50); color: var(--red); }
.dept h3 { margin: 4px 0 0; font-size: 18px; }
.dept p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.dept .more { margin-top: auto; font-size: 14.5px; font-weight: 600; color: var(--g-700); padding-top: 6px; }

/* split about */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split .media { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--g-100); }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.ticks { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; border-radius: 50%; background: var(--g-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6b3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* doctors */
.doc-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.doc-tools input, .doc-tools select { font: inherit; font-size: 16px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; background: #fff; color: var(--ink); }
.doc-tools input { flex: 1 1 260px; }
.doc-tools select { flex: 0 1 260px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; }
.doc .av { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--g-100); color: var(--g-700); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 20px; }
.doc .av img { width: 100%; height: 100%; object-fit: cover; }
.doc b { display: block; color: var(--g-900); font-size: 16.5px; line-height: 1.45; }
.doc span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.doc .tag { display: inline-block; margin-top: 6px; background: var(--g-50); color: var(--g-700); font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.doc-empty { padding: 28px; text-align: center; color: var(--muted); background: var(--bg-2); border-radius: var(--radius); }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card .ph { aspect-ratio: 4/3; background: var(--g-100); overflow: hidden; }
.post-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.post-card .bd { padding: 16px 18px 20px; }
.post-card time { font-size: 13.5px; color: var(--muted); }
.post-card h3 { margin: 4px 0 0; font-size: 18px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--g-800), var(--g-600)); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dff0e6; margin: 0; }
.cta-band .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } .cta-band .acts { justify-content: flex-start; } }

/* info cards (contact / hours) */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--g-100); color: var(--g-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.info .ic svg { width: 22px; height: 22px; }
.info h3 { font-size: 17px; margin-bottom: 4px; }
.info p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }

/* page header + content */
.page-head { background: var(--g-50); border-bottom: 1px solid var(--line); padding: clamp(28px, 5vw, 52px) 0; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 4px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 46em; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }
.prose { max-width: 760px; }
.prose img { border-radius: 14px; margin: 1em 0; }
.prose h2 { font-size: 26px; margin-top: 1.4em; }
.prose ul { padding-inline-start: 1.2em; }
.layout-side { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.side-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 100px; }
.side-box h3 { font-size: 17px; }
.side-box ul { list-style: none; padding: 0; margin: 0 0 16px; }
.side-box li a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.side-box li a:hover, .side-box li a[aria-current] { background: #fff; color: var(--g-700); text-decoration: none; }
.side-box .btn { width: 100%; margin-top: 8px; }
@media (max-width: 960px) { .layout-side { grid-template-columns: 1fr; } .side-box { position: static; } }
.note { background: var(--g-50); border: 1px solid var(--g-100); border-radius: 12px; padding: 14px 16px; color: var(--ink-2); font-size: 15.5px; }
.note.er { background: var(--red-50); border-color: #f5c6c6; }

/* gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gal a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--g-100); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gal a:hover img { transform: scale(1.04); }

/* forms (Contact Form 7) */
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 input[type=date], .wpcf7 select, .wpcf7 textarea { width: 100%; font: inherit; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.wpcf7 textarea { min-height: 120px; }
.wpcf7 input[type=submit] { background: var(--g-700); color: #fff; border: 0; border-radius: 999px; min-height: 48px; padding: 10px 26px; font: inherit; font-weight: 700; cursor: pointer; }

/* footer */
.site-foot { background: var(--g-900); color: #cfe3d7; margin-top: 0; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; padding: 56px 0 36px; }
.foot-grid h3 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-grid ul a { color: #cfe3d7; }
.foot-logo { background: #fff; border-radius: 14px; padding: 10px 14px; display: inline-block; margin-bottom: 14px; }
.foot-logo img { height: 46px; width: auto; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.social { display: flex; gap: 8px; margin-top: 12px; }
.social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; }
.social svg { width: 20px; height: 20px; fill: #fff; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* preview ribbon (only with the preview cookie) */
.preview-ribbon { background: #fff7d6; color: #5c4600; text-align: center; font-size: 14px; padding: 6px 12px; border-bottom: 1px solid #f0dc8a; }
.preview-ribbon a { color: #5c4600; font-weight: 700; text-decoration: underline; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.pagination .current { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.doc details.quals { margin-top: 8px; font-size: 14.5px; }
.doc details.quals summary { cursor: pointer; color: var(--g-700); font-weight: 600; }
.doc details.quals ul { margin: 6px 0 0; padding-inline-start: 1.1em; color: var(--ink-2); line-height: 1.6; }
#doc-list .doc { align-items: flex-start; }
.post-hero { border-radius: 18px; overflow: hidden; margin-bottom: 22px; background: var(--g-100); }
.post-hero img { width: 100%; height: auto; }
.e404 { text-align: center; padding: 72px 0; }
.e404 .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
