/*
Theme Name: Taawun Education Trust
Description: The Taawun Education Trust website design for WordPress.
Version: 1.1.1
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: taawun-education
*/
:root {
  color-scheme: light;
  --forest: #123b31;
  --green: #214f41;
  --muted: #4d6057;
  --gold: #e5c680;
  --paper: #f7f6ee;
  --white: #fffefa;
  --line: #dbe2d7;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--white); color: var(--forest); font: 16px/1.6 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1, h2 { text-wrap: balance; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ad7820; outline-offset: 4px; }
.wrap { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
.section { padding-block: 83px; }
.skip { position: absolute; z-index: 5; left: 16px; top: 9px; padding: 8px 15px; background: #fff; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }

.header { position: relative; z-index: 2; background: var(--white); border-bottom: 1px solid #e9eae3; }
.header-inner { min-height: 85px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand img { flex: none; object-fit: contain; }
.brand strong { display: block; font: 400 28px/.96 var(--serif); letter-spacing: -.055em; }
.brand small { display: block; margin-top: 5px; font-size: 8.5px; font-weight: 750; letter-spacing: .15em; }
.navigation { display: flex; align-items: center; gap: clamp(17px, 2.4vw, 39px); }
.navigation a { padding-block: 27px 24px; border-bottom: 3px solid transparent; text-decoration: none; color: #44584f; font-size: 13px; white-space: nowrap; font-weight: 650; }
.navigation a:hover, .navigation a[aria-current] { color: var(--forest); border-color: #c6a253; }
.menu-toggle { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; border: 1px solid transparent; border-radius: 7px; padding: 12px 17px; min-height: 47px; font-size: 13px; font-weight: 720; line-height: 1.3; text-decoration: none; transition: background .18s, color .18s, border-color .18s; }
.button svg { flex: none; }
.primary { background: var(--forest); color: white; }
.primary:hover { background: #27624f; }
.outline { color: var(--forest); border-color: #86a094; background: transparent; }
.outline:hover { background: #e8efe5; }
.back-home-row { padding-block: 12px; }
.back-home { min-height: 44px; padding: 8px 14px; gap: 8px; }
.light { background: #faf2db; color: var(--forest); }
.light:hover { background: #eed299; }

.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 10% 30%, #fbf7e9, transparent 54%), linear-gradient(114deg, #f7f4e8 30%, #e5ece1); }
.hero::after { content: ''; pointer-events: none; position: absolute; inset: auto -135px -205px auto; width: 450px; aspect-ratio: 1; border: 1px solid #aabdab55; border-radius: 50%; box-shadow: 0 0 0 32px #b3c1af26, 0 0 0 63px #c0ccbc2b, 0 0 0 100px #b3c1af1c; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 55px); align-items: start; padding-block: clamp(18px, 2.5vw, 34px) clamp(38px, 5vw, 70px); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; line-height: 1.4; }
.eyebrow span { width: 8px; height: 8px; display: block; flex: none; background: #c4a050; transform: rotate(45deg); }
h1 { font-size: clamp(45px, 5.45vw, 81px); line-height: 1.015; letter-spacing: -.059em; }
.hero h1 { font-size: clamp(39px, 4.45vw, 64px); }
.lead { max-width: 510px; color: var(--muted); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.65; }
.hero .lead { margin-top: clamp(15px, 2vw, 24px); }
.hero-visual { grid-column: 1 / -1; border-radius: 14px; overflow: hidden; background: var(--paper); }
.hero-visual img { width: 100%; height: auto; }
.hero-mission { border-left: 1px solid #b8c7b6; padding-left: clamp(24px, 3.2vw, 44px); }
.hero-mission h2 { font-size: clamp(28px, 3vw, 39px); }
.hero-mission p { margin-top: 12px; color: var(--muted); }
.hero .hero-link { margin-top: 16px; }

.events-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 68px); align-items: center; margin-bottom: clamp(52px, 7vw, 83px); scroll-margin-top: 24px; }
.event-copy h2 { margin-top: 12px; }
.event-copy > p:not(.eyebrow) { margin-top: 14px; color: var(--muted); max-width: 58ch; }
.event-photo { overflow: hidden; border-radius: 14px; background: var(--paper); }
.event-photo img { width: 100%; height: auto; }

h2 { font-size: clamp(33px, 3.72vw, 55px); letter-spacing: -.048em; line-height: 1.07; }
.section-intro { display: grid; grid-template-columns: 1fr .56fr; align-items: end; gap: 40px; margin-bottom: 36px; }
.section-intro h2 { margin-top: 13px; text-wrap: initial; }
.section-intro > p { max-width: 365px; justify-self: end; color: var(--muted); padding-bottom: 5px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.card { display: block; min-height: 189px; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 21px 23px 23px; background: #fff; transition: border-color .18s; }
.card:hover { border-color: #8da896; }
.card-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; color: #245544; background: #e9efe3; border-radius: 9px; }
.card h3 { margin-bottom: 12px; font-size: clamp(21px, 2.2vw, 27px); line-height: 1.16; letter-spacing: -.035em; }
.card p { margin-top: 15px; max-width: 34ch; font-size: 14px; color: var(--muted); }
.programme-picture { position: relative; overflow: hidden; width: min(100%, 275px); aspect-ratio: 4 / 3; border-radius: 10px; background: #fff; }
.programme-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.programme-image[src$="/islamic-studies.png"] { object-position: center bottom; clip-path: inset(0 0 1px); }
.programme-thumbnail { position: absolute; top: 50%; width: 100%; aspect-ratio: 1; transform: translateY(-50%); background: url('assets/programme-thumbnails.webp') top left / 200% 200% no-repeat; }
.programme-thumbnail[data-programme="community"] { background-position: top right; }
.programme-thumbnail[data-programme="marriage"] { background-position: bottom left; }
.programme-thumbnail[data-programme="membership"] { background-position: bottom right; }

.calls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 82px; }
.call { border-radius: 14px; padding: clamp(25px, 3.4vw, 49px); }
.call h2 { font-size: clamp(30px, 3.1vw, 44px); text-wrap: initial; margin-top: 10px; }
.call p { margin-top: 10px; max-width: 43ch; }
.call .button { margin-top: 23px; }
.call-green { background: var(--forest); color: #fffef8; }
.call-green p { color: #e1e9df; }
.call-sand { background: #f3ebd5; }
.call-icon { display: flex; color: #9c762a; }
.call-green .call-icon { color: #e3c47a; }

.page-banner { background: linear-gradient(120deg, #faf6e9, #e8efe4); padding: 67px 0 70px; }
.page-banner h1 { font-size: clamp(42px, 5.25vw, 74px); margin: 16px 0; }
.about-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.17fr); align-items: start; gap: clamp(25px, 5vw, 72px); }
.about-copy { display: grid; justify-items: start; gap: 25px; }
.about-copy h2 { font-size: clamp(27px, 3.3vw, 43px); text-wrap: initial; }
.about-copy p { color: var(--muted); margin-top: 10px; }
.about-photo { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.about-photo img { width: 100%; height: auto; }
.about-photo figcaption { padding: 12px 15px; color: var(--muted); font-size: 14px; }
.contact-address { color: var(--muted); font-style: normal; margin: 12px 0 16px; }
.contact-email { display: inline-block; overflow-wrap: anywhere; }
.madrasah-overview { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(28px, 5vw, 70px); }
.madrasah-intro > p + p { margin-top: 14px; color: var(--muted); max-width: 55ch; }
.madrasah-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.madrasah-actions .text-link { margin-top: 0; }
.madrasah-curriculum { scroll-margin-top: 20px; }
.madrasah-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 25px 0 0; padding: 0; }
.madrasah-topics li { padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf7; }
.madrasah-topics h3 { font-size: 25px; line-height: 1.15; }
.madrasah-topics p { margin-top: 8px; color: var(--muted); }
.service-list { display: grid; gap: 58px; }
.service-group h2 { margin-bottom: 24px; font-size: clamp(32px, 3.5vw, 48px); }
.service-stack { display: grid; gap: 12px; }
.service { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(165px, 25%); gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf7; scroll-margin-top: 18px; }
.service-image { justify-self: end; }
.service:target { border-color: #a7883e; }
.service h3 { font-size: 27px; line-height: 1.14; }
.service p { margin-top: 7px; color: var(--muted); max-width: 72ch; }
.text-link { color: var(--green); display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; margin-top: 11px; text-underline-offset: 3px; }
.text-link:hover { color: #76601d; }
.madrasah-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.madrasah-card-actions .text-link { margin-top: 0; }
.madrasah-apply { min-height: 44px; padding: 9px 14px; border-color: #a98538; white-space: nowrap; }
.card-read-more { text-decoration: underline; }
.service-details { margin-top: 11px; }
.service-details summary { width: fit-content; color: var(--green); cursor: pointer; font-size: 14px; font-weight: 700; }
.service-details summary:hover { color: #76601d; }
.service-details h4 { margin: 12px 0 0; font-size: 16px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 345px); gap: 20px; align-items: start; padding-top: 55px; }
.form-card, .form-aside { border: 1px solid var(--line); border-radius: 13px; padding: clamp(20px, 3.5vw, 43px); background: #fff; }
.form-aside { background: #f0f3e9; }
.form-card h2, .form-aside h2 { text-wrap: initial; font-size: clamp(27px, 3vw, 39px); }
.form-aside h2, .confirmation h2 { margin-top: 13px; }
.form-card p, .form-aside p { margin-top: 11px; color: var(--muted); }
.form-fields { display: grid; gap: 15px; margin-top: 24px; }
.form-set { min-inline-size: 0; border: 0; border-top: 1px solid var(--line); margin: 25px 0 0; padding: 0; }
.form-set legend { padding: 0 9px 0 0; font: 20px/1.3 var(--serif); }
.form-set .form-fields { margin-top: 13px; }
.form-set > p { font-size: 14px; }
.form-fields label { font-size: 14px; font-weight: 700; }
.form-fields label span { font-weight: 400; color: var(--muted); }
.form-fields input, .form-fields select, .form-fields textarea { width: 100%; display: block; margin-top: 5px; padding: 9px 11px; min-height: 44px; border: 1px solid #a4b0a5; border-radius: 6px; font: 400 16px/1.4 var(--sans); color: var(--forest); background: white; }
.form-fields textarea { resize: vertical; }
.field-hint { display: block; color: var(--muted); font-size: 13px; }
.registration-address { white-space: pre-line; overflow-wrap: anywhere; }
.form-card .form-note { margin-top: 20px; font-size: 14px; }
.form-card .button { margin-top: 15px; }
.error { margin-top: 15px; border: 1px solid #a94630; border-radius: 6px; background: #fff1ee; color: #842e1e; padding: 10px 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
th, td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf2e9; }

.footer { color: #f9fbf4; background: var(--forest); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 13px 25px; }
.footer nav a { color: #e6efe6; font-size: 13px; text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }
.footer-bottom { padding-block: 14px 19px; border-top: 1px solid #ffffff33; color: #c9dcce; font-size: 12px; }

@media (max-width: 1070px) {
  .wrap { width: calc(100% - 72px); }
}
@media (max-width: 780px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { min-height: 70px; }
  .navigation { gap: 16px; }
  .navigation a { padding-block: 22px 19px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-mission { border-left: 0; border-top: 1px solid #b8c7b6; padding: 22px 0 0; }
  .hero h1 { font-size: clamp(31px, 5.55vw, 49px); }
  .section { padding-block: 55px; }
  .section-intro { gap: 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .calls { margin-bottom: 54px; }
}
@media (max-width: 900px) {
  .header-inner { min-height: 70px; flex-wrap: wrap; gap: 0 12px; }
  .brand img { width: 44px; height: 39px; }
  .brand strong { font-size: 25px; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 9px; background: transparent; border: 1px solid #b0bfb1; border-radius: 6px; padding: 6px 11px; color: var(--forest); font-weight: 700; font-size: 13px; }
  .navigation { display: none; width: 100%; padding-block: 5px 13px; }
  .navigation.open { display: grid; gap: 3px; }
  .navigation a { padding: 7px 0; justify-self: start; }
}
@media (max-width: 700px) {
  .service { grid-template-columns: auto minmax(0, 1fr); }
  .service-image { grid-column: 2; justify-self: start; }
  .about-story, .events-section { grid-template-columns: 1fr; }
  .madrasah-overview, .madrasah-topics { grid-template-columns: 1fr; }
}
@media (max-width: 625px) {
  .hero h1 { font-size: clamp(35px, 8vw, 50px); }
  .section-intro { display: grid; gap: 12px; margin-bottom: 23px; }
  .section-intro > p { justify-self: start; }
  .card { padding: 15px; min-height: 166px; }
  .card p { font-size: 13px; }
  .calls, .form-layout { grid-template-columns: 1fr; }
  .page-banner { padding-block: 43px 47px; }
  .footer-top { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 340px) {
  .wrap { width: calc(100% - 32px); }
  .hero h1 { font-size: 36px; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


.wp-generic { max-width: 820px; }
.wp-generic > * + * { margin-top: 16px; }
.tt-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-note a { text-underline-offset: 3px; }
