/*
Theme Name: CECOE Sub-Granting Resource Center
Theme URI: https://www.cecoe.org
Author: CECOE
Description: Resource center theme for the Coalition of Ethiopian Civil Society Organizations for Elections (CECOE) sub-granting programme. Provides a downloads hub for application, contracting, implementation and reporting templates, inspired by donor funding download pages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cecoe-resource-center
*/

:root {
  --navy: #006837;
  --navy-dark: #013b1f;
  --green: #008a46;
  --green-light: #e6f3ec;
  --amber: #f2a900;
  --ink: #21272f;
  --muted: #5c6670;
  --line: #dfe4ea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 4px solid var(--navy);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 6px rgba(0, 40, 20, 0.10);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { flex: none; display: flex; align-items: center; }
.brand-mark img { width: 54px; height: auto; display: block; }
.brand-text { line-height: 1.25; }
.brand-text strong { display: block; color: var(--navy); font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 12.5px; }
.main-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--navy); font-weight: 600; font-size: 14.5px; border-radius: 6px;
}
.main-nav a:hover { background: var(--green-light); color: var(--green); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 55%, #00250f 100%);
  color: #fff; padding: 64px 0 72px;
}
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.15; max-width: 720px; }
.hero p.lead { margin-top: 18px; max-width: 660px; font-size: 18px; color: #d9eadf; }
.hero .cta-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 8px; text-decoration: none;
  font-weight: 700; font-size: 15px; border: 2px solid transparent;
}
.btn-primary { background: var(--amber); color: #1d1503; }
.btn-primary:hover { background: #ffbe1f; }
.btn-ghost { border-color: #ffffff66; color: #fff; }
.btn-ghost:hover { background: #ffffff1a; }
.hero .badge-row { margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap; }
.hero-flex { display: flex; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 auto; }
.hero-logo { flex: none; }
.hero-logo img { width: 230px; height: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
@media (max-width: 900px) { .hero-logo { display: none; } }
.hero .badge { font-size: 13.5px; color: #bfd8c9; }
.hero .badge b { display: block; color: #ffd34d; font-size: 22px; }

/* ---------- Process strip ---------- */
.process { background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0; }
.process ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.process li {
  counter-increment: step; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 14px 14px; font-size: 13.5px; color: var(--muted);
  position: relative;
}
.process li strong { display: block; color: var(--navy); font-size: 14.5px; margin-bottom: 4px; }
.process li::before {
  content: counter(step);
  position: absolute; top: -12px; left: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 900px) { .process ol { grid-template-columns: repeat(2, 1fr); row-gap: 22px; } }

/* ---------- Sections ---------- */
.section { padding: 54px 0 10px; }
.section > .wrap > h2 {
  color: var(--navy); font-size: 26px; margin-bottom: 6px;
  padding-left: 14px; border-left: 5px solid var(--amber);
}
.section .section-sub { color: var(--muted); margin-bottom: 26px; max-width: 780px; }

/* ---------- Download cards ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 820px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 16px; display: flex; gap: 16px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.dl-card:hover { box-shadow: 0 6px 18px rgba(0, 40, 20, .12); transform: translateY(-2px); }
.file-ico {
  flex: none; width: 52px; height: 60px; border-radius: 6px; position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff; padding-bottom: 8px;
}
.file-ico::before {
  content: ""; position: absolute; top: 0; right: 0;
  border-style: solid; border-width: 0 14px 14px 0;
  border-color: transparent var(--bg) transparent transparent;
}
.file-ico.docx { background: #2b579a; }
.file-ico.xlsx { background: #217346; }
.file-ico.pdf  { background: #b30b00; }
.dl-body h3 { color: var(--navy); font-size: 16.5px; line-height: 1.3; }
.dl-body p { font-size: 13.8px; color: var(--muted); margin: 6px 0 10px; }
.dl-meta { font-size: 12.5px; color: #7c8a80; margin-right: 12px; text-transform: uppercase; letter-spacing: .4px; }
.dl-link {
  font-weight: 700; font-size: 14px; text-decoration: none; color: var(--green);
}
.dl-link:hover { text-decoration: underline; }
.dl-link::before { content: "⭳ "; font-size: 15px; }

/* ---------- Info / about ---------- */
.about { background: #fff; border-top: 1px solid var(--line); margin-top: 44px; padding: 54px 0; }
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about h2 { color: var(--navy); font-size: 24px; margin-bottom: 12px; }
.about p { color: var(--muted); margin-bottom: 12px; }
.info-box {
  background: var(--green-light); border: 1px solid #bfdccb; border-radius: var(--radius);
  padding: 22px;
}
.info-box h3 { color: var(--green); font-size: 17px; margin-bottom: 10px; }
.info-box ul { list-style: none; }
.info-box li { padding: 7px 0; border-bottom: 1px dashed #b0d4bf; font-size: 14.5px; }
.info-box li:last-child { border-bottom: 0; }

/* ---------- Grant updates page ---------- */
.hero-slim { padding: 46px 0 50px; }
.gu-content { padding-bottom: 54px; }
.gu-content h2 {
  color: var(--navy); font-size: 24px; margin: 40px 0 10px;
  padding-left: 14px; border-left: 5px solid var(--amber);
}
.gu-content h2:first-child { margin-top: 0; }
.gu-content > .wrap > p, .gu-content p { margin-bottom: 14px; color: var(--muted); }
.gu-content .stat-grid { margin-bottom: 10px; }
.gu-content .notice { margin: 10px 0 20px; }
.gu-content ul, .gu-content ol { padding-left: 22px; margin-bottom: 14px; }
.gu-content .submit-card ul, .gu-content .info-box ul { padding-left: 0; }
.updated-on { margin-top: 14px; font-size: 13.5px; color: #ffd34d; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy);
  border-radius: var(--radius); padding: 18px 18px 14px; text-align: center;
}
.stat-tile b { display: block; color: var(--navy); font-size: 24px; line-height: 1.2; }
.stat-tile span { font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.gu-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.gu-table th {
  background: var(--navy); color: #fff; text-align: left; padding: 12px 14px;
  font-size: 13px; text-transform: uppercase; letter-spacing: .4px;
}
.gu-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gu-table tr:last-child td { border-bottom: 0; }
.gu-table small { color: var(--muted); }
.chip {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.chip-active { background: var(--green-light); color: var(--navy); border: 1px solid #bfdccb; }
.chip-closed { background: #eef0f3; color: #5c6670; border: 1px solid #d7dce2; }
.chip-pipeline { background: #fff8e6; color: #6b5618; border: 1px solid #f0dfae; }
.submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .submit-grid { grid-template-columns: 1fr; } }
.submit-card {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy);
  border-radius: var(--radius); padding: 20px 22px;
}
.submit-card h3 { color: var(--navy); font-size: 16.5px; margin-bottom: 10px; }
.submit-card ul { list-style: none; }
.submit-card li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.submit-card li:last-child { border-bottom: 0; }
.submit-card a { font-weight: 700; }

/* ---------- Notice ---------- */
.notice {
  background: #fff8e6; border: 1px solid #f0dfae; border-radius: var(--radius);
  padding: 16px 20px; font-size: 14px; color: #6b5618; margin: 0 0 26px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b6cdbe; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding: 46px 0 30px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .6px; }
.site-footer p, .site-footer li { font-size: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: #cbe7d6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid #ffffff22; padding: 16px 0; font-size: 13px; text-align: center; color: #86a892; }

/* ---------- Generic content (pages/posts) ---------- */
.content-area { padding: 50px 0; }
.content-area article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.content-area h1 { color: var(--navy); margin-bottom: 16px; }
.content-area h2, .content-area h3 { color: var(--navy); margin: 22px 0 10px; }
.content-area p, .content-area ul, .content-area ol { margin-bottom: 14px; }
.content-area ul, .content-area ol { padding-left: 24px; }

/* screen-reader helper used by WordPress */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px); position: absolute !important;
  height: 1px; width: 1px; overflow: hidden; word-wrap: normal !important;
}
