/*
  The public website's look: deep green, cream and gold, with wide-set
  capital headings between thin rules. Every colour, size and font comes
  from the list below, so the whole site can be restyled from this one block.
*/
:root {
    --green: #004a3b;
    --green-deep: #1d372b;
    --green-soft: #005745;
    --cream: #fff5e5;
    --paper: #f8f5ef;
    --white: #ffffff;
    --gold: #c9a66b;
    --gold-deep: #7a5f2e;
    --ink: #212529;
    --ink-soft: #5d6660;
    --line: #dccfb8;
    --bad: #a3291f;
    --radius: 10px;
    --width: 72rem;
    --font: 'Lato', 'Tajawal', 'Gill Sans', 'Gill Sans MT', 'Segoe UI', Tahoma, sans-serif;
    --spread: 0.18em; /* how far apart capital headings are set */
}

/* Arabic letters join, so they are never spread apart, and Tajawal leads. */
[dir='rtl'] { --spread: 0; --font: 'Tajawal', 'Lato', 'Segoe UI', Tahoma, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 17px/1.7 var(--font); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 500; line-height: 1.3; margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--green); text-transform: uppercase; letter-spacing: var(--spread); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }
time, .muted { color: var(--ink-soft); font-size: 0.9rem; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }
.block { padding-top: 3.5rem; padding-bottom: 1.5rem; }
.tint { background: var(--paper); }
.row { display: flex; align-items: baseline; justify-content: center; gap: 1rem; margin-top: 1.75rem; }

/* A heading between two thin rules. */
.title { display: flex; align-items: center; gap: 1.25rem; justify-content: center; text-align: center; font-size: 1.35rem; color: var(--green); text-transform: uppercase; letter-spacing: var(--spread); margin-bottom: 2rem; }
.title::before, .title::after { content: ''; flex: 1; max-width: 9rem; height: 1px; background: var(--gold); }

/* ---- Top: a cream strip of quick links above the green header */
.strip { background: var(--cream); font-size: 0.82rem; }
.strip-in { display: flex; justify-content: flex-end; align-items: stretch; flex-wrap: wrap; }
.strip a { color: var(--green-deep); font-weight: 700; text-transform: uppercase; padding: 0.7rem 0.9rem; border-inline-start: 1px solid var(--line); }
.strip a:hover { background: var(--white); text-decoration: none; }

.bar { background: linear-gradient(var(--green-soft), var(--green)); color: var(--cream); }
.bar-in { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding-top: 1.4rem; padding-bottom: 1rem; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--cream); text-align: center; text-transform: uppercase; letter-spacing: var(--spread); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 84px; height: 84px; }
.bar nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.6rem; font-size: 0.92rem; text-transform: uppercase; letter-spacing: calc(var(--spread) / 2); }
.bar nav a { color: var(--cream); padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.bar nav a:hover { text-decoration: none; border-color: var(--gold); }
.bar nav a[aria-current='page'] { border-color: var(--gold); color: var(--gold); }

/* ---- Hero: a wide photograph with the school's name over it */
.hero { position: relative; min-height: min(72vh, 34rem); display: grid; place-items: center; text-align: center; color: var(--white); background: var(--green-deep) center / cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgb(0 40 30 / 0.1), rgb(0 40 30 / 0.55)); }
.hero .wrap { position: relative; padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { color: var(--white); font-size: clamp(1.5rem, 4vw, 2.3rem); margin: 0; text-shadow: 0 1px 12px rgb(0 0 0 / 0.5); }
.mark { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin: 1.1rem 0; }
.mark::before, .mark::after { content: ''; width: 3.5rem; height: 1px; background: var(--gold); }
.mark span { width: 0.6rem; height: 0.6rem; background: var(--gold); transform: rotate(45deg); }
.lead { font-size: clamp(1.15rem, 2.6vw, 1.55rem); max-width: 40rem; margin: 0 auto 1.9rem; text-shadow: 0 1px 10px rgb(0 0 0 / 0.5); }
.actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin: 0; }

.button { display: inline-block; background: var(--green); color: var(--white); border: 1px solid var(--green); border-radius: var(--radius); padding: 0.8rem 1.6rem; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: calc(var(--spread) / 2); cursor: pointer; }
.button:hover { text-decoration: none; background: var(--green-soft); }
.button.ghost { background: transparent; color: var(--green); }
.hero .button.ghost, .panel .button.ghost { color: var(--white); border-color: var(--white); border-radius: 999px; }
.hero .button.ghost:hover, .panel .button.ghost:hover { background: rgb(255 255 255 / 0.15); }

.prose { font-size: 1.05rem; }
.intro { text-align: center; max-width: 44rem; margin: 0 auto; color: var(--green-deep); font-size: 1.15rem; }

/* ---- Stage cards: a picture under a green veil, text in white */
.panels { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.panel { position: relative; min-height: 17rem; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; gap: 0.5rem; padding: 1.5rem 1.25rem; color: var(--white); border-radius: var(--radius); overflow: hidden; background: var(--green) center / cover no-repeat; }
.panel::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgb(0 74 59 / 0), rgb(0 74 59 / 0.9) 68%); }
.panel > * { position: relative; }
.panel h3 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: var(--spread); font-weight: 700; }
.panel p { margin: 0; font-size: 0.95rem; }
.panel .emblem { width: 3.2rem; height: 3.2rem; margin-bottom: auto; opacity: 0.9; }

/* ---- At a glance */
.facts-row { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); text-align: center; }
.facts-row strong { display: block; font-size: 2.6rem; font-weight: 500; color: var(--green); line-height: 1.1; }
.facts-row span { color: var(--gold-deep); text-transform: uppercase; letter-spacing: calc(var(--spread) / 2); font-size: 0.9rem; font-weight: 700; }

/* ---- Cards: news and albums */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: block; transition: box-shadow 0.2s; }
.card:hover { text-decoration: none; box-shadow: 0 8px 24px rgb(0 74 59 / 0.14); }
.card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card h3 { color: var(--green); margin-top: 0.25rem; }
.pad { padding: 1rem 1.25rem 1.3rem; border-top: 3px solid var(--gold); }
.photo { display: block; width: 100%; border-radius: var(--radius); margin-top: 1.25rem; }
.pager { display: flex; gap: 0.75rem; justify-content: center; margin-top: 2rem; }

.year { margin: 2.25rem 0 1rem; color: var(--gold-deep); letter-spacing: var(--spread); }
.photos { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin-top: 1.5rem; }
.photos a { display: block; background: var(--paper); border-radius: var(--radius); overflow: hidden; color: var(--ink-soft); font-size: 0.85rem; }
.photos a:hover { text-decoration: none; }
.photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photos span { display: block; padding: 0.4rem 0.6rem; }

.facts { list-style: none; padding: 0; margin: 0 0 2rem; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--gold-deep); font-weight: 700; }

/* ---- Forms */
.form { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); padding: 1.6rem; display: grid; gap: 1rem; margin-top: 1.75rem; }
.form h2 { color: var(--green); font-size: 1.3rem; text-transform: uppercase; letter-spacing: var(--spread); }
.form label { display: grid; gap: 0.35rem; font-size: 0.95rem; color: var(--green-deep); font-weight: 700; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 0.65rem 0.8rem; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.form .button { justify-self: start; }
.two { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.trap { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }
.notice { background: #e6f1ec; color: var(--green); border-inline-start: 4px solid var(--green); border-radius: 6px; padding: 0.8rem 1rem; margin: 1.25rem 0 0; }
.notice.bad { background: #f8e7e5; color: var(--bad); border-color: var(--bad); }

/* ---- Footer */
.foot { margin-top: 4.5rem; background: linear-gradient(var(--green), var(--green-deep)); color: var(--cream); font-size: 0.95rem; }
.foot a { color: var(--cream); }
.foot-in { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding-top: 2.75rem; padding-bottom: 2rem; }
.foot h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: var(--spread); color: var(--gold); margin-bottom: 0.6rem; font-weight: 700; }
.foot p { margin: 0.25rem 0; }
.foot .brand { align-items: flex-start; text-align: start; font-size: 0.95rem; }
.foot .brand img { width: 64px; height: 64px; }
.social { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal { border-top: 1px solid rgb(255 245 229 / 0.25); text-align: center; padding: 1rem 1.25rem; font-size: 0.85rem; }

/* ---- Always within reach: the enquiry tab and WhatsApp */
/* Physical sides here: the tab's own sideways writing would turn the logical ones. */
.tab { position: fixed; top: 42%; right: 0; z-index: 6; background: var(--green); color: var(--cream); padding: 0.9rem 0.45rem; border-radius: var(--radius) 0 0 var(--radius); writing-mode: vertical-rl; font-size: 0.85rem; box-shadow: 0 4px 16px rgb(0 0 0 / 0.25); border: 1px solid var(--gold); border-right: 0; }
[dir='rtl'] .tab { right: auto; left: 0; border-radius: 0 var(--radius) var(--radius) 0; border-right: 1px solid var(--gold); border-left: 0; }
.tab:hover { text-decoration: none; background: var(--green-soft); }
.whatsapp { position: fixed; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; z-index: 6; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); }
.whatsapp:hover { transform: scale(1.05); }

@media (max-width: 40rem) {
    body { font-size: 16px; }
    .title::before, .title::after { max-width: 2.5rem; }
    .strip a { padding: 0.6rem 0.65rem; font-size: 0.75rem; }
    .bar nav { gap: 0.1rem 1rem; font-size: 0.85rem; }
    .brand img { width: 64px; height: 64px; }
}

@media print {
    .strip, .bar nav, .tab, .whatsapp { display: none; }
}
