/* =====================================================================
   ZAAD ACADEMY — home page (Nov 2026): calm, ordered sections like a
   university front page. Navy (Melbourne) · royal green · purple · gold.
   ===================================================================== */
.home2 { background: var(--ivory); }
.home2 .h-sec { padding: 54px 0; }
.home2 .h-sec:nth-of-type(even) { background: #fff; }
.h-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 24px; }
.h-head h2 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 2rem); color: var(--blue-900); position: relative; padding-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.h-head h2::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--green-700)); }
.h-head h2 i { color: var(--green-700); font-size: .8em; }
.h-head p { margin: 0 0 4px; color: var(--muted); flex: 1 1 260px; }
.h-head .sec-more { margin-inline-start: auto; font-weight: 700; color: var(--blue-700); display: inline-flex; gap: 6px; align-items: center; }
.is-rtl .h-head .sec-more i.fa-arrow-right { transform: scaleX(-1); }
.h-head.light h2 { color: #fff; } .h-head.light p { color: #c9d3ee; }
.home2 .widget { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); margin: 0; }

/* hero: a little shorter, then the finder bar sits on its lower edge */
.home2 .hero { min-height: 520px; }
.h-finder { position: relative; z-index: 3; margin-top: -58px; }
.hf-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 48px rgba(0, 15, 70, .22); border-top: 4px solid var(--gold); }
.hf-form label { color: var(--blue-900); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hf-form label i { color: var(--green-700); }
.hf-form select, .hf-form input { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--ivory); min-width: 0; }
.hf-form input { flex: 1 1 220px; }
.hf-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 16px; background: var(--blue-900); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-2); }
.hs { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 8px; color: #dfe6fb; text-align: center; position: relative; }
.hs + .hs::before { content: ""; position: absolute; inset-inline-start: 0; top: 22%; bottom: 22%; width: 1px; background: rgba(255, 255, 255, .14); }
.hs i { color: var(--gold); font-size: 1.15rem; }
.hs b { font: 700 1.7rem/1.2 "Cormorant Garamond", Georgia, serif; color: #fff; }
.hs:nth-child(2) { background: rgba(11, 107, 69, .35); } .hs:nth-child(4) { background: rgba(90, 42, 143, .38); }

/* today */
.td-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 18px; align-items: start; }
.td-col { display: grid; gap: 18px; }
.h-today .w-weather .clock { font-size: 2.4rem; }
.h-today .w-notice p { max-height: 9.5em; overflow: hidden; }

/* gateway */
.gw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gw { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 20px; border-radius: 18px; color: #fff; min-height: 150px; overflow: hidden; box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s; isolation: isolate; }
.gw::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Crect x='15' y='15' width='30' height='30'/%3E%3Crect x='15' y='15' width='30' height='30' transform='rotate(45 30 30)'/%3E%3C/g%3E%3C/svg%3E"); }
.gw:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.gw i { font-size: 1.9rem; color: var(--gold-200); margin-bottom: 4px; }
.gw b { font-size: 1.2rem; } .gw span { opacity: .88; font-size: .92rem; line-height: 1.7; }
.gw.big { grid-row: span 2; min-height: 316px; justify-content: flex-end; }
.gw.big i { font-size: 3.2rem; }
.gw.t-navy { background: linear-gradient(140deg, #000f46, #094183); }
.gw.t-green { background: linear-gradient(140deg, #05402b, #0b6b45 60%, #179060); }
.gw.t-purple { background: linear-gradient(140deg, #2a0f4a, #5a2a8f); }
.gw.t-gold { background: linear-gradient(140deg, #f7f0e2, #d3bc8d 60%, #b0945c); color: var(--blue-950); }
.gw.t-gold i { color: var(--blue-900); }
.gw-grid { grid-template-areas: "a b c d" "e b c f"; }
.gw-grid > :nth-child(1) { grid-area: a; } .gw-grid > :nth-child(2) { grid-area: b; } .gw-grid > :nth-child(3) { grid-area: c; } .gw-grid > :nth-child(4) { grid-area: d; } .gw-grid > :nth-child(5) { grid-area: e; } .gw-grid > :nth-child(6) { grid-area: f; }

/* programmes */
.home2 .prog-grid.home { margin-top: 14px; }

/* news */
.nw-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.nw-side { display: grid; gap: 18px; }

/* portals */
.h-portals { background: linear-gradient(135deg, #000a33, #000f46 55%, #2a0f4a) !important; position: relative; }
.h-portals::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--green-700), var(--gold), var(--purple-600)); }
.pt-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.pt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(176, 148, 92, .35); color: #fff; transition: background .2s, transform .2s; }
.pt:hover { background: rgba(255, 255, 255, .13); transform: translateY(-3px); }
.pt i { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--gold-grad); color: var(--blue-950); box-shadow: 0 0 0 4px rgba(176, 148, 92, .25); }
.pt b { margin-top: 4px; } .pt span { font-size: .84rem; color: #c3cce6; line-height: 1.6; }

/* suite */
.su-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.su-tabs button { border: 1.5px solid var(--line); background: #fff; color: var(--blue-900); border-radius: 999px; padding: 6px 16px; font-weight: 600; }
.su-tabs button bdi { opacity: .6; font-size: .85em; }
.su-tabs button.on { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.su-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.su-card { display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s; }
.su-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--gold), var(--shadow-2); }
.su-img { position: relative; display: block; aspect-ratio: 1200 / 630; background: #05402b; }
.su-img img { width: 100%; height: 100%; object-fit: cover; }
.su-ic { position: absolute; bottom: -18px; inset-inline-end: 16px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--blue-950); box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, .25); }
.su-body { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.su-badge { align-self: flex-start; font-size: .76rem; background: var(--gold-50); color: var(--gold-700); border: 1px solid var(--gold-200); border-radius: 999px; padding: 1px 10px; }
.su-body h3 { margin: 4px 0 0; font-size: 1.08rem; color: var(--blue-900); line-height: 1.5; }
.su-body small { color: var(--green-700); font-weight: 600; }
.su-body p { margin: 4px 0 10px; color: var(--ink-2); font-size: .88rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.su-btns { margin-top: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.su-btns .ib { margin-inline-start: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--blue-700); }
.su-foot { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .84rem; }

/* about */
.ab-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.ab-side { background: linear-gradient(160deg, #05402b, #0b6b45); color: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-2); }
.ab-h { margin: 0 0 12px; color: var(--gold-200); }
.ab-side .testi-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ab-side blockquote { margin: 0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; border-radius: 14px; padding: 14px; }
.ab-side blockquote i { color: var(--gold); }
.ab-side cite { color: var(--gold-200); }

/* knowledge corner */
.h-know .h-head .tabs { margin-inline-start: auto; }
.kn-pane > .sec-more { display: inline-flex; gap: 6px; margin-top: 14px; font-weight: 700; }
.kn-les { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kn-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.h-know .gallery-grid { grid-template-columns: repeat(4, 1fr); }

/* links */
.lk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.lk-grid > [data-links] > .widget { height: 100%; }

@media (max-width: 1200px) {
  .td-grid { grid-template-columns: 1fr 1fr; }
  .pt-grid { grid-template-columns: repeat(3, 1fr); }
  .kn-mini { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hf-stats { grid-template-columns: repeat(3, 1fr); }
  .gw-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "b c" "a d" "e f"; }
  .gw.big { grid-row: auto; min-height: 220px; }
  .nw-grid, .ab-grid, .kn-les { grid-template-columns: 1fr; }
  .lk-grid { grid-template-columns: 1fr; }
  .home2 .h-sec { padding: 38px 0; }
}
@media (max-width: 600px) {
  .td-grid, .pt-grid { grid-template-columns: 1fr 1fr; }
  .td-grid > * { grid-column: span 2; }
  .hf-stats { grid-template-columns: repeat(2, 1fr); }
  .h-finder { margin-top: -30px; }
  .kn-mini { grid-template-columns: 1fr; }
}
.su-grid { grid-template-columns: repeat(auto-fill, minmax(222px, 1fr)); }
.su-body p { -webkit-line-clamp: 2; }
.ab-side blockquote p, .ab-side blockquote { color: #f2f6f3 !important; }
.ab-side blockquote p { margin: 6px 0; }
.su-btns { flex-wrap: nowrap; }
.su-btns .btn.sm { padding: .5em .9em; font-size: .84rem; }
.su-btns .ib { flex: 0 0 34px; }
/* MQA-approved programmes */
.mq-home { margin-top: 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-1); }
.mq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.mq-head h3 { margin: 0; color: var(--blue-900); } .mq-head h3 i { color: var(--green-700); } .mq-head h3 bdi { background: var(--gold-50); color: var(--gold-700); border-radius: 999px; padding: 0 10px; font-size: .8em; }
.mq-head a { margin-inline-start: auto; font-weight: 600; font-size: .9rem; }
.mq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.mq-col h4 { margin: 0 0 6px; color: var(--green-700); font-size: 1rem; } .mq-col h4 span { background: var(--blue-900); color: #fff; border-radius: 6px; padding: 0 8px; font: 700 .72rem/1.7 Inter, sans-serif; }
.mq-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mq-col li { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; line-height: 1.6; } .mq-col li i { color: var(--gold); font-size: .8rem; }
.mq-col li small { color: var(--muted); margin-inline-start: auto; font-size: .72rem; }

/* ---------- Balanced, even layout (Nov 2026) ---------- */
/* today: four columns of equal height */
.td-grid { align-items: stretch; }
.td-grid > .widget { height: 100%; margin: 0; display: flex; flex-direction: column; }
.td-col { display: flex; flex-direction: column; gap: 18px; }
.td-col > .widget { margin: 0; }
.td-col > .w-notice { flex: 1; }
.w-prayer .w-note { margin-top: auto; }
.w-acal .acal-more { margin-top: auto; }
/* gateway: seven doors, no lone tile */
.gw-grid { grid-template-areas: "a b c d" "e b c f" "g g g g"; }
.gw-grid > :nth-child(7) { grid-area: g; flex-direction: row; align-items: center; gap: 16px; min-height: 96px; }
.gw-grid > :nth-child(7) i { margin: 0; }
/* RASFAHI suite: rows that end centred */
.su-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.su-grid > .su-card { flex: 0 1 calc((100% - 4 * 18px) / 5); }
/* links, knowledge mini-cards: equal heights */
.lk-grid { align-items: stretch; }
.lk-grid > * { height: 100%; } .lk-grid > * > .widget, .lk-grid > .widget { height: 100%; margin: 0; }
.kn-mini { align-items: stretch; } .kn-mini > * { height: 100%; margin: 0; }
@media (max-width: 1200px) { .su-grid > .su-card { flex-basis: calc((100% - 3 * 18px) / 4); } }
@media (max-width: 1100px) { .gw-grid { grid-template-areas: "b c" "a d" "e f" "g g"; } }
@media (max-width: 900px) { .su-grid > .su-card { flex-basis: calc((100% - 2 * 18px) / 3); } .td-grid > .widget { height: auto; } }
@media (max-width: 640px) { .su-grid > .su-card { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 420px) { .su-grid > .su-card { flex-basis: 100%; } }

/* RASFAHI Suite — every app with its own icon (mushaf for the Qur'an software) */
.su-img.su-noimg { background: radial-gradient(circle at 30% 20%, #16306b, #071a45 70%); display: grid; place-items: center; }
.su-big { display: grid; place-items: center; height: 100%; } .su-big img { width: 46%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 22%; box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.su-ic.su-ic-img { background: none; padding: 0; overflow: hidden; width: 52px; height: 52px; bottom: -22px; border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.3); } .su-ic.su-ic-img img { width: 100%; height: 100%; display: block; }
.su-inst { font-size: .8rem; color: var(--green-700, #1f6f4a); margin: 0 0 8px; } .su-inst i { margin-inline-end: 4px; }
.h-suite { background: linear-gradient(180deg, var(--ivory, #f7f6fb), #fff); }
.su-btns { flex-wrap: wrap; row-gap: 6px; } .su-btns .btn.sm { padding-inline: 10px; }

/* courses open for applications — right under the photo slides */
.h-open { padding-top: 26px; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.oc-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius, 14px); background: #fff; border: 1px solid rgba(201,162,39,.35); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.oc-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--gold-grad, linear-gradient(#e9c873, #c9a227)); }
.oc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.oc-ic { width: 54px; height: 54px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--royal-grad); color: var(--gold-200, #f2e3b3); font-size: 1.4rem; }
.oc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .oc-t b { font-family: var(--f-head); font-size: 1.05rem; color: var(--blue-900); } .oc-t small { color: var(--muted); }
.oc-f { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--ink-2); } .oc-f i { font-style: normal; } .oc-f .oc-mqa { background: var(--green-700); color: #fff; border-radius: 6px; padding: 0 6px; font-weight: 700; }
.oc-go { flex: none; background: var(--gold-grad); color: var(--ink); font-weight: 800; padding: 8px 12px; border-radius: 999px; font-size: .85rem; white-space: nowrap; }
@media (max-width: 560px) { .oc-card { flex-wrap: wrap; } .oc-go { width: 100%; text-align: center; } }
.oc-f i { white-space: nowrap; } .oc-card { align-items: flex-start; } .oc-go { align-self: center; }
