/* SANGWA theme, by Teradig.
   Palette from the logo: ochre square, brick red line and lowercase rounded wordmark, white background.
   Rounded corners echo the logo square. */
:root {
  --red: var(--wp--preset--color--red, #8A0C06);
  --red-dark: var(--wp--preset--color--red-dark, #6E0904);
  --ochre: var(--wp--preset--color--ochre, #F2B233);
  --ochre-soft: var(--wp--preset--color--ochre-soft, #FDF3DC);
  --cream: var(--wp--preset--color--cream, #FBF7EF);
  --text: var(--wp--preset--color--text, #2A2420);
  --muted: var(--wp--preset--color--muted, #6B625B);
  --line: var(--wp--preset--color--line, #EADFCC);
  --radius: 14px;
  --header-h: 96px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.site-footer :focus-visible, .feature :focus-visible { outline-color: var(--ochre); }

.lede, p.lede { font-size: 21px; line-height: 1.55; max-width: 36em; }
/* A narrow block placed directly in a 1180 px column stays on the column's left edge, not centred */
.is-layout-constrained > .lede { margin-left: max(0px, calc((100% - 1180px) / 2)) !important; margin-right: auto !important; }

/* WordPress puts a gap between top-level blocks; bands sit edge to edge here */
.wp-site-blocks > *, .site-main > *, .entry-content > .alignfull { margin-block: 0; }
.site-main > .wp-block-post-content { margin-top: 0; }

/* Placeholder for content SANGWA still has to send: visible on purpose */
mark.todo { background: var(--ochre-soft); color: var(--text); outline: 2px dashed var(--ochre); outline-offset: 1px; border-radius: 4px; padding: 1px 6px; font-style: normal; }
p.todo-block { background: var(--ochre-soft); color: var(--text); border: 2px dashed var(--ochre); border-radius: var(--radius); padding: 18px 22px; font-size: 16px; }

/* Buttons */
.wp-element-button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-ochre > .wp-block-button__link { background: var(--ochre); color: var(--text); border-color: var(--ochre); }
.btn-ochre > .wp-block-button__link:hover { background: #E09F1F; border-color: #E09F1F; color: var(--text); }
.btn-light > .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }
.btn-light > .wp-block-button__link:hover { background: #fff; color: var(--red); border-color: #fff; }

/* Preview notice (not in production) */
.concept-bar { background: var(--red-dark); color: #fff; font-size: 14px; line-height: 1.4; padding: 9px 20px; text-align: center; }

/* Header */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
/* No backdrop-filter here: it would trap the fixed menu overlay inside the header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { min-height: var(--header-h); gap: 24px !important; }
.site-header .brand { flex: none; margin: 0; }
.site-header .brand img { width: 110px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav .wp-block-navigation-item__content { padding: 8px 0; color: var(--text); text-decoration: none; }
.main-nav .wp-block-navigation-item__content:hover { color: var(--red); text-decoration: underline; text-underline-offset: 6px; }
.main-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--red); text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--ochre); text-underline-offset: 8px; }
.main-nav .wp-block-navigation__responsive-container-open { min-height: 44px; padding: 0 14px; gap: 8px; border: 2px solid var(--red); border-radius: 999px; color: var(--red); font-weight: 700; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.main-nav .is-menu-open .wp-block-navigation-item__content { font-size: 24px; font-weight: 800; padding: 10px 0; }
.header-cta { flex: none; }
.header-cta .wp-block-button__link { min-height: 44px; }
/* Full menu on wide screens, the menu button below 1101 px */
@media (min-width: 1101px) {
  .main-nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) { display: block; width: 100%; position: relative; z-index: auto; background-color: inherit; }
  .main-nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) .wp-block-navigation__responsive-container-close { display: none; }
  .main-nav .wp-block-navigation__responsive-container-open.always-shown { display: none; }
  .main-nav .wp-block-navigation__container { gap: 24px; }
}

/* Page title band */
.page-hero { background: var(--cream); padding-block: 72px 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 0; } /* No max-width: the constrained layout would centre it away from the lede */
.page-hero h1::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 20px; background: var(--ochre); border-radius: 3px; }
.page-hero .lede { margin-top: 20px; }
.page-hero .wp-block-post-excerpt__excerpt { margin: 0; }
.page-hero .wp-block-post-date { color: var(--muted); font-size: 16px; }
.page-404 .wp-block-buttons { margin-top: 28px; }

/* Sections */
.sec { padding-block: clamp(64px, 8vw, 96px); }
.sec-cream { background: var(--cream); }
.sec-ochre-soft { background: var(--ochre-soft); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head > * { margin: 0 !important; }
.section-head p { color: var(--muted); font-size: 16px; }
.kicker { font-size: 14px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px !important; }
.wp-block-columns.split { gap: 56px; }
.wp-block-columns.split:not([class*="are-vertically"]) { align-items: center; }
.photo { margin: 0; }
.photo img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.photo figcaption { font-size: 14px; color: var(--muted); text-align: left; }
.ratio-4-3 img { aspect-ratio: 4 / 3; }
.ratio-4-5 img { aspect-ratio: 4 / 5; }

/* Home hero: text and a photo framed by an ochre square, like the logo */
.hero { background: var(--cream); padding-block: clamp(56px, 7vw, 96px); }
.hero .wp-block-columns { gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(36px, 4.6vw, 58px); max-width: 12em; margin-top: 0; }
.hero .wp-block-buttons { margin-block: 28px 0; }
.hero-photo { position: relative; margin: 0 0 24px 24px; }
.hero-photo::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; background: var(--ochre); border: 4px solid var(--red); border-radius: 22px; }
.hero-photo img { position: relative; display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 22px; }

/* 2024 figures */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats > .stat { margin: 0; background: #fff; border-radius: var(--radius); padding: 26px 22px; border-top: 6px solid var(--ochre); }
.stat p { margin: 0; }
.stat .num { font-size: clamp(40px, 5vw, 60px); font-weight: 800; line-height: 1; color: var(--red); }
.stat .num + p { margin-top: 10px; font-size: 17px; }
.source { font-size: 14px; color: var(--muted); margin-top: 20px !important; }

/* Areas of action */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards > .card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 22px; overflow: hidden; }
.card > * { margin-inline: 22px; }
.card > .wp-block-image { margin: 0 0 18px; }
.card > .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.card > .wp-block-heading { margin-block: 18px 8px; }
.card > .wp-block-image + .wp-block-heading { margin-top: 0; }
.card p, .card li { font-size: 16px; line-height: 1.55; }
.card ul { padding-left: 1.1em; }
.card .tag { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--red); background: var(--ochre-soft); border-radius: 999px; padding: 3px 12px; margin-top: 18px; }

/* Flagship project: brick red band */
.feature { background: var(--red); color: #fbe9e7; }
.feature h2, .feature h3 { color: #fff; }
.feature a:not(.wp-element-button) { color: #fff; }
.feature .kicker { color: var(--ochre); }
.feature .facts { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .facts li { background: rgba(255, 255, 255, .08); border-left: 5px solid var(--ochre); border-radius: 6px; padding: 14px 16px; font-size: 16px; line-height: 1.4; }
.feature .facts strong { display: block; color: var(--ochre); font-size: 26px; line-height: 1.1; }
.feature .photo img { aspect-ratio: 4 / 5; }

/* France and Rwanda */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo > .side { margin: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 28px; }
.duo .flag { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.duo h3 { margin-top: 0; }
.duo dl, .people { margin: 0; }

/* Support band */
.support { background: var(--ochre); }
.support h2 { color: var(--red-dark); }
.ways { list-style: none; padding: 0; margin: 24px 0; }
.ways li { padding: 16px 0; border-top: 2px solid rgba(110, 9, 4, .35); font-size: 17px; line-height: 1.5; }
.ways strong { display: block; color: var(--red-dark); font-weight: 800; font-size: 19px; }
.donate-box { background: #fff; border-radius: var(--radius); padding: 28px; }
.donate-box iframe { width: 100%; min-height: 750px; border: 0; }

/* History timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 4px solid var(--ochre); }
.timeline li { position: relative; margin: 0 0 30px; padding-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -41px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--red); }
.timeline .year { display: block; font-weight: 800; font-size: 22px; color: var(--red); line-height: 1.2; }

/* Partners */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.partners > .partner { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.partner h3 { margin: 0 0 6px; font-size: 19px; }
.partner p { margin: 0; font-size: 16px; }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 16px 0; border-top: 1px solid var(--line); font-size: 18px; }
.contact-list li span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.contact-list a { font-weight: 700; }
.card-form { border: 1px solid var(--line); border-top: 6px solid var(--red); border-radius: var(--radius); background: #fff; padding: 28px; }
.card-form h3 { margin: 0 0 8px; }

/* Prose (legal notice) */
.prose > * { max-width: 44em; }
.prose h2 { font-size: 28px; margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }

/* Forms (Contact Form 7) */
.wpcf7 form { margin: 0; }
.cf7-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf7-grid > p { margin: 0; }
.cf7-grid .full { grid-column: 1 / -1; }
.wpcf7 label { display: block; font-size: 15px; font-weight: 700; }
.wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .wpcf7 select, .wpcf7 textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1.5px solid #8C8178; border-radius: 8px; box-sizing: border-box; }
.wpcf7 textarea { min-height: 120px; height: 150px; resize: vertical; }
.wpcf7 input[type="submit"] { min-height: 48px; padding: 0 24px; border: 2px solid var(--red); border-radius: 999px; background: var(--red); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--red-dark); border-color: var(--red-dark); }
.form-note { font-size: 14px; color: var(--muted); }
.wpcf7-not-valid-tip { font-size: 14px; margin-top: 4px; color: #b00020; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 16px; border-radius: 8px; border-width: 2px; }
.wpcf7-spinner { margin: 0 12px; }
.sangwa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* News */
.post-grid { gap: 32px; }
.post-grid .wp-block-post-featured-image img { border-radius: var(--radius); }
.card-title { font-size: 22px; }
.card-title a { color: var(--red); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.article .wp-block-post-featured-image img { border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--red-dark); color: #f3dcd8; padding-block: 64px 28px; font-size: 16px; }
.site-footer a { color: #fff; }
.site-footer h3 { color: var(--ochre); font-size: 17px; margin: 0 0 10px; }
.site-footer .addr { margin: 0 0 22px; }
.site-footer mark.todo { color: var(--text); }
.footer-grid { gap: 40px !important; }
.footer-motto { font-size: 24px; font-weight: 800; font-style: italic; line-height: 1.3; color: var(--ochre); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 3px 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { margin-top: 48px !important; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 14px; }
.footer-base p { margin: 0; }

/* Tablet */
@media (max-width: 1100px) {
  .header-cta { display: none !important; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .duo, .partners, .cards.three { grid-template-columns: 1fr 1fr; }
  .feature .facts { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .lede, p.lede { font-size: 19px; }
  :root { --header-h: 76px; }
  .header-row { gap: 12px !important; }
  .site-header .brand img { width: 84px; }
  .page-hero { padding-block: 48px 40px; }
  .hero-photo { margin: 0 16px 16px 0; }
  .hero-photo::before { inset: 16px -16px -16px 16px; }
  .cards, .cards.two, .cards.three, .stats, .duo, .partners { grid-template-columns: 1fr; }
  .duo > .side, .card-form, .donate-box { padding: 20px; }
  .cf7-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
