/* EME Durban – shared stylesheet. One file for every public page. */
:root {
  --ink: #171b2e;
  --blue: #416df2;
  --blue-deep: #1c2f8f;
  --yellow: #ffdd57;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #262b3a;
  --muted: #5b6275;
  --line: #dde3ee;
  --ok: #157f48;      --ok-bg: #e6f6ec;
  --danger: #b42335;  --danger-bg: #fdecee;
  --warn: #7a5600;    --warn-bg: #fff5cf;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(23, 27, 46, .08);
  --wrap: 1140px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); }
a:hover { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-left: auto; margin-right: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 200; }
.skip-link:focus { left: 8px; }
.icon { flex: none; vertical-align: -0.2em; }
[hidden] { display: none !important; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.5em; border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--blue-deep); color: #fff; transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--blue); color: #fff; }
.btn-accent { background: var(--yellow); color: var(--ink); }
.btn-accent:hover { background: #ffe680; color: var(--ink); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: inherit; }
.btn-light { background: #fff; color: var(--blue-deep); border-color: var(--line); }
.btn-light:hover { background: var(--bg); color: var(--blue-deep); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #cf3044; }
.btn-small { padding: .5em 1.1em; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row.center { justify-content: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: linear-gradient(120deg, #1a1a1a, var(--blue)); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand:hover { color: var(--yellow); }
.brand img { border-radius: 10px; background: #fff; }
.site-menu { display: flex; align-items: center; gap: .25rem; }
.site-menu a { color: #fff; text-decoration: none; padding: .5em .8em; border-radius: 8px; font-weight: 600; font-size: .97rem; }
.site-menu a:hover, .site-menu a[aria-current="page"] { color: var(--yellow); }
.site-menu .nav-cta { margin-left: .5rem; padding: .55em 1.4em; color: var(--ink); border-radius: 999px; }
.site-menu .nav-cta:hover, .site-menu .nav-cta[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 8px; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem; background: #1b2a66; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
  .site-menu.open { display: flex; }
  .site-menu a { padding: .85em .5em; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .site-menu .nav-cta { margin: .9rem 0 0; border-bottom: 0; text-align: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; place-items: center; text-align: center; color: #fff;
  min-height: min(78vh, 640px); padding: 4rem 1rem;
  background: linear-gradient(rgba(16, 20, 40, .78), rgba(28, 47, 143, .62)), #1c2f8f url("../../images/homeback.jpg") center / cover no-repeat;
}
@media (max-width: 800px) {
  .hero { background-image: linear-gradient(rgba(16, 20, 40, .78), rgba(28, 47, 143, .62)), url("../../images/homeback-800.jpg"); }
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 4.2rem); margin-bottom: .2em; letter-spacing: -.01em; }
.hero .tagline { color: var(--yellow); font-size: clamp(1.15rem, 3.4vw, 1.9rem); font-weight: 600; margin-bottom: 1.6rem; }
.hero .lead { max-width: 620px; margin: 0 auto 2rem; font-size: 1.08rem; }
.hero .btn-row { justify-content: center; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-white { background: var(--surface); }
.section-dark { background: linear-gradient(135deg, #171b2e, #1c2f8f); color: #e8ecfb; }
.section-dark h2 { color: var(--yellow); }
.section-head { max-width: 760px; margin: 0 auto 2.2rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p, .section-dark p { color: #d5dcf7; }
.about-text { max-width: 760px; font-size: 1.06rem; }
.about-text .btn { margin-top: .6rem; }
.photo-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.photo-grid img { width: 100%; height: 270px; object-fit: cover; border-radius: var(--radius); background: #cfd6e6; }
.photo-grid-five { grid-template-columns: repeat(5, 1fr); }
.photo-grid-five img { height: 230px; }
@media (max-width: 900px) { .photo-grid-five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .photo-grid, .photo-grid-five { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .photo-grid img, .photo-grid-five img { height: 170px; }
  .photo-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.two-col { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.25rem; color: var(--blue-deep); }
.card h3 { color: var(--blue-deep); }
.card > :last-child { margin-bottom: 0; }

.subject-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.subject-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.subject-card img { width: 100%; height: 150px; object-fit: cover; }
.subject-card div { padding: 1.1rem 1.3rem 1.3rem; }
.subject-card h3 { margin-bottom: .5rem; }
.subject-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.subject-card li { margin: .2rem 0; }

/* ---------- fees ---------- */
.fee-summary { max-width: 900px; margin: 0 auto; }
.fee-reg { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1rem 1.4rem; font-size: 1.05rem; }
.fee-reg strong { color: var(--yellow); font-size: 1.7rem; }
.fee-lists { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin: 1.2rem 0; align-items: start; }
.fee-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.fee-table caption { text-align: left; font-weight: 800; color: var(--blue-deep); padding: 0 0 .5rem; font-size: 1.05rem; }
.fee-table th, .fee-table td { padding: .7rem .9rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.fee-table th { font-weight: 600; white-space: nowrap; }
.fee-table td { font-weight: 700; color: var(--ink); }
.fee-note { color: var(--muted); text-align: center; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.tick-list li { display: flex; gap: .55rem; align-items: flex-start; }
.tick-list .icon { color: var(--ok); margin-top: .25em; }
.poster { max-width: 520px; margin: 2rem auto 0; }
.poster img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- location ---------- */
.map-frame { width: 100%; height: 360px; border: 0; border-radius: var(--radius); background: #dfe4ee; }
.map-placeholder { display: grid; place-items: center; text-align: center; padding: 1.5rem; color: var(--muted); border: 1px solid var(--line); }
.map-placeholder .icon { color: var(--blue-deep); margin: 0 auto .5rem; }
.map-placeholder p { max-width: 320px; margin: 0 auto 1rem; }
.location-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: center; }
@media (max-width: 760px) { .location-grid { grid-template-columns: 1fr; } }
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; margin-top: 1.4rem; }

/* ---------- footer ---------- */
.site-footer { background: #12162a; color: #c9d0e6; padding: 3rem 0 1.2rem; font-size: .96rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .9rem; }
.site-footer a, .site-footer .link-button { color: #dfe5f8; }
.site-footer a:hover, .site-footer .link-button:hover { color: var(--yellow); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.contact-list, .link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.contact-list li { display: flex; gap: .65rem; align-items: flex-start; }
.contact-list .icon { color: var(--blue-deep); margin-top: .25em; }
.site-footer .contact-list .icon { color: var(--yellow); }
.link-list a, .link-list .link-button { text-decoration: none; }
.social { display: flex; gap: .6rem; }
.social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: #9aa3c2; }
.whatsapp-fab { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1a8f47; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.whatsapp-fab:hover { background: #157a3c; color: #fff; }
/* On phones the floating button would cover the full-width Send button. WhatsApp is still in the footer. */
@media (max-width: 700px) { .page-apply .whatsapp-fab { display: none; } }

/* ---------- cookie bar and announcement ---------- */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 150; max-width: 720px; margin-left: auto; margin-right: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; background: var(--ink); color: #e8ecfb; padding: 1rem 1.2rem; border-radius: var(--radius); box-shadow: 0 10px 32px rgba(0, 0, 0, .35); font-size: .95rem; }
.cookie-bar p { margin: 0; flex: 1 1 280px; }
.cookie-bar a { color: var(--yellow); }
.cookie-actions { display: flex; gap: .6rem; }
.announce { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 160; display: grid; place-items: center; padding: 1rem; background: rgba(12, 15, 30, .72); }
.announce-card { position: relative; width: min(100%, 440px); background: linear-gradient(150deg, #171b2e, #1c2f8f); color: #fff; border-radius: 18px; padding: 2.4rem 1.6rem 1.8rem; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); border: 2px solid var(--yellow); }
.announce-card h2 { color: var(--yellow); font-size: 1.6rem; padding: 0 1.6rem; }
.announce-card p { color: #e3e8fb; }
.announce-card .btn-row { justify-content: center; margin-top: 1.3rem; }
.announce-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }

/* ---------- inner pages ---------- */
.page-head { background: linear-gradient(120deg, #171b2e, var(--blue-deep)); color: #fff; padding: 2.4rem 0; text-align: center; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { margin: 0 auto; max-width: 640px; color: #d5dcf7; }
.page-body { padding: 2rem 0 4rem; }
.narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: 1.4rem; }

.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.notice > div > :last-child { margin-bottom: 0; }
.notice .icon { margin-top: .2em; }
.notice-info { background: #eaf0ff; border-color: #c5d3fb; }
.notice-info .icon { color: var(--blue-deep); }
.notice-warn { background: var(--warn-bg); border-color: #ecd98a; color: #4b3600; }
.notice-warn .icon { color: var(--warn); }
.notice-error { background: var(--danger-bg); border-color: #f1b8bf; color: #6d1420; }
.notice-error .icon { color: var(--danger); }
.notice-ok { background: var(--ok-bg); border-color: #a9dcbd; color: #0c4f2c; }
.notice-ok .icon { color: var(--ok); }

/* ---------- forms ---------- */
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin: 0; min-width: 0; }
.form-section legend { float: left; width: 100%; padding: 0; margin: 0 0 1rem; font-size: 1.2rem; font-weight: 800; color: var(--blue-deep); }
.form-section legend + * { clear: both; }
.form-section .hint-top { color: var(--muted); margin-top: -.5rem; }
.field-grid { display: grid; gap: 1rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-wide { grid-column: 1 / -1; }
.field label, .label { font-weight: 600; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: var(--text);
  background: #fff; border: 1.5px solid #9aa5bd; border-radius: 10px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(65, 109, 242, .22); }
.field .hint { font-size: .88rem; color: var(--muted); }
.field .error { font-size: .9rem; color: var(--danger); font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.group-error { color: var(--danger); font-weight: 600; margin: .8rem 0 0; }

.choice-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; top: 0; left: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-body { display: block; height: 100%; padding: 1rem 1.1rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.choice-body strong { display: block; color: var(--ink); }
.choice-body span { color: var(--muted); font-size: .93rem; }
.choice input:checked + .choice-body { border-color: var(--blue); background: #eef3ff; box-shadow: 0 0 0 3px rgba(65, 109, 242, .16); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--yellow); outline-offset: 2px; }

.subject-picker { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.subject-item { border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: .75rem .9rem; }
.subject-item.selected { border-color: var(--blue); background: #eef3ff; }
.subject-item > label { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; }
.subject-item input[type="checkbox"], .check-line input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--blue-deep); }
.first-time { margin: .6rem 0 0 1.9rem; font-size: .93rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.first-time label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.first-time input { accent-color: var(--blue-deep); width: 18px; height: 18px; }
.subject-count { color: var(--muted); }

.upload { border: 2px dashed #9aa5bd; border-radius: 12px; background: #fafbff; padding: 1rem; }
.upload.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.upload.invalid { border-color: var(--danger); background: var(--danger-bg); }
.upload input[type="file"] { width: 100%; font: inherit; border: 0; padding: 0; background: none; }
.upload .file-status { margin: .5rem 0 0; font-size: .92rem; color: var(--muted); }
.upload.has-file .file-status { color: #0c4f2c; font-weight: 600; }
.check-line { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.check-line input { margin-top: .2em; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.progress { height: 12px; border-radius: 999px; background: #dfe4ee; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-deep), var(--blue)); transition: width .2s; }
.submit-row { display: flex; flex-direction: column; gap: .8rem; }
.submit-row .btn { width: 100%; padding: 1em; font-size: 1.08rem; }

/* ---------- payments and status ---------- */
.detail-list { margin: 0; }
.detail-list > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.detail-list > div:first-child { border-top: 0; padding-top: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 700; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.copy-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .35em .8em; font: inherit; font-size: .88rem; font-weight: 600; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-deep); cursor: pointer; }
.copy-btn:hover { border-color: var(--blue); }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .5rem; }
.badge { display: inline-block; padding: .3em .9em; border-radius: 999px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.reference { font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; color: var(--blue-deep); }

/* ---------- policies ---------- */
.prose { max-width: 780px; padding: 2.5rem 0 4rem; }
.prose h1 { margin-bottom: .2em; }
.prose .updated { color: var(--muted); margin-bottom: 2rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin: .3rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: #eef1f8; }
.table-scroll { overflow-x: auto; }
.prose address { font-style: normal; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .whatsapp-fab, .cookie-bar, .announce { display: none !important; }
  body { background: #fff; }
}
