/*
Theme Name: MDES Foundation
Theme URI: https://mdesfoundation.org
Author: MDES Foundation
Author URI: https://mdesfoundation.org
Description: Custom lightweight, Elementor-ready theme for MDES Foundation — a nonprofit dedicated to ending child labor and empowering children through education. Built for speed, clarity, and trust.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mdes
*/

/* =============================================================
   DESIGN TOKENS — set these once, use everywhere (incl. Elementor
   Site Settings > Global Colors / Global Fonts should match these)
   ============================================================= */
:root {
	/* Brand palette — deep teal (trust/growth) + warm gold (dignity/hope) */
	--mdes-primary: #0E4B44;       /* deep teal — headers, nav, primary buttons */
	--mdes-primary-dark: #093430;  /* hover / footer background */
	--mdes-accent: #C89B3C;        /* warm gold — CTAs, highlights, donate button */
	--mdes-accent-dark: #A87F2C;   /* accent hover */
	--mdes-cream: #FAF7F1;         /* section backgrounds */
	--mdes-white: #FFFFFF;
	--mdes-ink: #1E2422;           /* body text */
	--mdes-ink-soft: #4A5551;      /* secondary text */
	--mdes-border: #E4DED2;

	/* Type */
	--mdes-font-display: 'Fraunces', Georgia, serif;
	--mdes-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Spacing / shape */
	--mdes-radius: 10px;
	--mdes-radius-lg: 20px;
	--mdes-container: 1200px;
	--mdes-shadow: 0 10px 30px rgba(14, 75, 68, 0.08);
}

/* =============================================================
   RESET / BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--mdes-font-body);
	color: var(--mdes-ink);
	background: var(--mdes-white);
	line-height: 1.65;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mdes-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--mdes-accent); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--mdes-font-display);
	color: var(--mdes-primary);
	line-height: 1.2;
	margin: 0 0 .5em;
	font-weight: 600;
}
p { margin: 0 0 1.2em; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.mdes-container { max-width: var(--mdes-container); margin: 0 auto; padding: 0 24px; }

/* =============================================================
   BUTTONS — use .mdes-btn on Elementor buttons too (custom CSS class)
   ============================================================= */
.mdes-btn, .elementor-button {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 8px; padding: 14px 30px; border-radius: 999px;
	font-family: var(--mdes-font-body); font-weight: 600; font-size: 15px;
	background: var(--mdes-accent); color: var(--mdes-primary-dark) !important;
	border: none; cursor: pointer; transition: all .2s ease;
}
.mdes-btn:hover, .elementor-button:hover { background: var(--mdes-accent-dark); transform: translateY(-1px); color: var(--mdes-primary-dark) !important; }
.mdes-btn--outline {
	background: transparent; border: 1.5px solid var(--mdes-white); color: var(--mdes-white) !important;
}
.mdes-btn--outline:hover { background: var(--mdes-white); color: var(--mdes-primary) !important; }

/* =============================================================
   TOP BAR
   ============================================================= */
.mdes-topbar {
	background: var(--mdes-primary-dark); color: #E7ECEA;
	font-size: 13.5px; padding: 8px 0;
}
.mdes-topbar .mdes-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.mdes-topbar a { color: #E7ECEA; }
.mdes-topbar a:hover { color: var(--mdes-accent); }
.mdes-topbar__contact { display: flex; gap: 22px; flex-wrap: wrap; }
.mdes-topbar__social { display: flex; gap: 14px; }
.mdes-topbar__social a { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); }

/* =============================================================
   SITE HEADER
   ============================================================= */
.mdes-header {
	background: var(--mdes-white); border-bottom: 1px solid var(--mdes-border);
	position: sticky; top: 0; z-index: 999;
}
.mdes-header .mdes-container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 24px; }
.mdes-logo img { max-height: 52px; width: auto; }
.mdes-logo { font-family: var(--mdes-font-display); font-size: 22px; font-weight: 700; color: var(--mdes-primary); }
.mdes-nav { display: flex; align-items: center; gap: 30px; }
.mdes-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.mdes-nav a { color: var(--mdes-ink); font-weight: 500; font-size: 15px; }
.mdes-nav a:hover, .mdes-nav .current-menu-item > a { color: var(--mdes-primary); }
.mdes-header__cta { display: flex; align-items: center; gap: 14px; }
.mdes-menu-toggle {
	display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.mdes-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--mdes-primary); margin: 5px 0; transition: .2s; }

@media (max-width: 900px) {
	.mdes-nav { position: fixed; top: 0; right: -100%; width: 78%; max-width: 340px; height: 100vh;
		background: var(--mdes-white); flex-direction: column; align-items: flex-start;
		padding: 90px 28px 28px; box-shadow: var(--mdes-shadow); transition: right .3s ease; }
	.mdes-nav.is-open { right: 0; }
	.mdes-nav ul { flex-direction: column; gap: 18px; }
	.mdes-menu-toggle { display: block; }
	.mdes-topbar__contact span:last-child { display: none; }
}

/* =============================================================
   404 / SEARCH
   ============================================================= */
.mdes-error-page { padding: 120px 0; text-align: center; }
.mdes-error-page .code { font-family: var(--mdes-font-display); font-size: 96px; color: var(--mdes-accent); margin: 0; }

/* =============================================================
   BLOG / ARCHIVE / SINGLE (fallback templates outside Elementor)
   ============================================================= */
.mdes-content-wrap { padding: 60px 0; }
.mdes-post-card { border: 1px solid var(--mdes-border); border-radius: var(--mdes-radius-lg); overflow: hidden; margin-bottom: 32px; }
.mdes-post-card__body { padding: 24px; }
.mdes-post-card img { aspect-ratio: 16/10; object-fit: cover; }
.mdes-meta { color: var(--mdes-ink-soft); font-size: 14px; margin-bottom: 8px; }

/* =============================================================
   FOOTER
   ============================================================= */
.mdes-footer { background: var(--mdes-primary-dark); color: #D9E2DF; padding: 70px 0 0; }
.mdes-footer h4 { color: var(--mdes-white); font-family: var(--mdes-font-body); font-size: 16px; letter-spacing: .02em; margin-bottom: 18px; }
.mdes-footer a { color: #C7D3CF; }
.mdes-footer a:hover { color: var(--mdes-accent); }
.mdes-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.mdes-footer__grid ul { list-style: none; margin: 0; padding: 0; }
.mdes-footer__grid li { margin-bottom: 10px; }
.mdes-footer__social { display: flex; gap: 12px; margin-top: 16px; }
.mdes-footer__social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.mdes-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 780px) {
	.mdes-footer__grid { grid-template-columns: 1fr 1fr; }
}
