/* Binat-Ul-Solihaat — simple, clean, minimal */
:root {
  --paper: #faf8f3;
  --paper-2: #f1efe7;
  --ink: #1f2e28;
  --muted: #5d6b64;
  --sage: #7fa392;      /* taken from the students' uniform */
  --sage-deep: #3e6555;
  --line: #e2ded2;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 30px; height: 36px; color: var(--sage-deep); }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.nav { display: flex; gap: 28px; list-style: none; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--sage-deep); }
.nav a[aria-current="page"] { color: var(--sage-deep); font-weight: 600; }

/* ---------- Inner page header ---------- */
.page-hero { padding: 96px 0 64px; }
.page-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6vw, 64px); line-height: 1.1; margin-bottom: 18px;
}
.page-hero .intro { font-size: 19px; }
section.tight-top { padding-top: 0; }
.page-hero + .photo-band { margin-top: 0; }

.text-link { color: var(--sage-deep); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.section-more { margin-top: 32px; }

/* Home: link cards */
.link-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }
.link-card {
  flex: 0 1 calc((100% - 40px) / 3);
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px;
  transition: border-color .2s, transform .2s;
}
.link-card:hover { border-color: var(--sage); transform: translateY(-2px); }
.link-card p { color: var(--muted); flex: 1; margin-bottom: 16px; }
.link-card .more { color: var(--sage-deep); font-weight: 600; font-size: 15px; }

/* Call to action */
.cta { text-align: center; background: var(--paper-2); }
.cta .intro { margin: 0 auto; }
.cta .actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Contact map */
.map iframe {
  width: 100%; height: 100%; min-height: 360px; border: 0;
  border-radius: 14px; background: var(--paper-2);
}

/* ---------- Hero ---------- */
.hero { padding: 112px 0 104px; text-align: center; }
.hero-mark { width: 64px; height: 78px; margin: 0 auto 28px; color: var(--sage); }
.hero-arabic {
  font-family: var(--arabic); font-size: 40px; color: var(--sage-deep);
  line-height: 1.4; margin-bottom: 8px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(44px, 7vw, 76px); line-height: 1.05; letter-spacing: -.01em;
}
.hero .lede {
  max-width: 560px; margin: 24px auto 0; color: var(--muted); font-size: 19px;
}
.hero .actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; letter-spacing: .02em;
  border: 1px solid var(--sage-deep); transition: background .2s, color .2s;
}
.btn-solid { background: var(--sage-deep); color: #fff; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { color: var(--sage-deep); }
.btn-ghost:hover { background: var(--sage-deep); color: #fff; }

/* ---------- Building photo ---------- */
.photo-band { margin: 0 0 96px; }
.photo-inline img {
  width: 100%; height: auto; aspect-ratio: 1600 / 1073; object-fit: cover;
  border-radius: 16px; background: var(--paper-2);
}
.photo-band img {
  width: 100%; height: auto; aspect-ratio: 1600 / 640; object-fit: cover;
  border-radius: 16px; background: var(--paper-2);
}
.photo-inline { margin-top: 56px; }
.photo-band figcaption, .photo-inline figcaption {
  margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center;
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.alt { background: var(--paper-2); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage-deep); margin-bottom: 14px;
}
h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 4.5vw, 46px); line-height: 1.15; margin-bottom: 20px;
}
h3 { font-family: var(--serif); font-weight: 600; font-size: 25px; margin-bottom: 10px; }
.intro { max-width: 640px; color: var(--muted); }
.divider { width: 48px; height: 2px; background: var(--sage); margin: 0 0 28px; border: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-grid p + p { margin-top: 16px; }
.facts { list-style: none; border-top: 1px solid var(--line); }
.facts li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.facts span:first-child { color: var(--muted); }
.facts span:last-child { font-weight: 600; text-align: right; }

/* Education */
.edu-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; margin-top: 48px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 36px;
}
.card.primary { border-top: 3px solid var(--sage-deep); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sage-deep); background: #e6efe9;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.card p { color: var(--muted); margin-bottom: 20px; }
.subjects { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.subjects li { position: relative; padding-left: 18px; }
.subjects li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--sage);
}

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.principle .num {
  font-family: var(--serif); font-size: 40px; color: var(--sage); line-height: 1; margin-bottom: 14px;
}
.principle p { color: var(--muted); }

.notice {
  margin-top: 56px; padding: 28px 32px; border-left: 3px solid var(--sage-deep);
  background: var(--paper); border-radius: 0 12px 12px 0;
}
.notice strong { display: block; font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.notice p { color: var(--muted); }

/* Management */
.committees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.committee { border-top: 1px solid var(--ink); padding-top: 22px; }
.committee .ur { font-family: var(--arabic); font-size: 22px; color: var(--sage-deep); margin-bottom: 4px; direction: rtl; }
.committee p { color: var(--muted); }

/* Members */
.member-group { margin-top: 32px; }
.member-group-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
}
.member-group-head h3 { margin: 0; }
.member-group-head .ur { font-family: var(--arabic); font-size: 20px; color: var(--sage-deep); }
.member-group-head .count { margin-left: auto; font-size: 14px; color: var(--muted); }
summary.member-group-head { cursor: pointer; list-style: none; user-select: none; }
summary.member-group-head::-webkit-details-marker { display: none; }
summary.member-group-head::after {
  content: ""; width: 9px; height: 9px; margin-left: 4px; align-self: center;
  border-right: 2px solid var(--sage-deep); border-bottom: 2px solid var(--sage-deep);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
details[open] > summary.member-group-head::after { transform: translateY(2px) rotate(-135deg); }
summary.member-group-head:hover h3 { color: var(--sage-deep); }
summary.member-group-head:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
.member-group { scroll-margin-top: 90px; }
.members { list-style: none; display: grid; gap: 12px; margin-top: 20px; }
.members li {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px 24px; align-items: center;
  padding: 16px 24px 16px 18px; background: var(--paper);
  border: 1px solid var(--line); border-left: 3px solid var(--sage); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.members li:hover { border-color: var(--sage); border-left-color: var(--sage-deep); box-shadow: 0 4px 14px rgba(31,46,40,.06); }
.members li { grid-template-columns: 1.2fr 1fr 170px; }
.members.has-since li { grid-template-columns: 1.2fr 1fr 120px 170px; }
.m-phone { font-size: 15px; color: var(--ink); text-decoration: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-phone:hover { color: var(--sage-deep); text-decoration: underline; }
.m-name { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: center; }
.m-avatar { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.m-name .en { display: block; font-weight: 600; font-size: 18px; }
.m-name .ur { display: block; font-family: var(--arabic); font-size: 17px; color: var(--muted); line-height: 1.5; text-align: left; }
.m-role .role { display: block; color: var(--sage-deep); font-weight: 600; }
.m-role .role .ur { font-family: var(--arabic); font-weight: 400; margin-left: 6px; }
.m-role .m-note { display: block; font-size: 14px; color: var(--muted); }
.m-since { font-size: 14px; color: var(--muted); text-align: right; }
.m-since span { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-right: 4px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-list { list-style: none; }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list .label {
  display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.contact-list a, .contact-list .value { font-size: 19px; font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--sage-deep); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer .ar { font-family: var(--arabic); font-size: 20px; color: var(--sage-deep); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--sage-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  /* Nav moves to its own row under the logo */
  .site-header .wrap { flex-direction: column; align-items: stretch; height: auto; gap: 0; padding-top: 12px; }
  .nav { flex-wrap: wrap; gap: 4px 20px; padding: 8px 0 12px; }
  .page-hero { padding: 64px 0 48px; }
  .link-card { flex-basis: 100%; }
  .members li, .members.has-since li { grid-template-columns: 1fr; gap: 2px; padding: 16px; }
  .m-since, .m-phone { text-align: left; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .about-grid, .edu-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .principles, .committees { grid-template-columns: 1fr; gap: 32px; }
  section { padding: 72px 0; }
  .hero { padding: 80px 0 72px; }
  .photo-band { margin-bottom: 72px; }
  .photo-band img { aspect-ratio: 4 / 3; object-position: 50% center; border-radius: 12px; }
  .photo-inline img { aspect-ratio: 4 / 3; object-position: 40% center; border-radius: 12px; }
}
@media (max-width: 480px) {
  .subjects { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }
  .hero-arabic { font-size: 32px; }
}

/* ---------- WordPress ---------- */
/* Keep the sticky header below the admin bar when logged in */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.wp-content { max-width: 760px; }
.wp-content img { border-radius: 12px; }
.wp-content p { margin-bottom: 1em; }
