/*
Theme Name: SRD Status Guide
Theme URI: https://example.com/srd-status-guide
Author: Independent Guide
Author URI: https://example.com
Description: A clean, fast, Elementor-friendly WordPress theme for an independent SASSA and SRD grant information website. Includes a homepage with payment dates, status-check guides, eligibility information, status meanings, FAQs and update posts. This theme is not affiliated with SASSA or the South African government.
Version: 7.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: srd-status-guide
Tags: custom-menu, featured-images, blog, full-width-template
*/

/* ============================================================
   SRD Status Guide — main stylesheet
   Design system:
   --green  #0B6B3A | --green-dark #084D2A | --gold #E8A317
   --bg     #F7F8F5 | --ink  #1A2E22 | radius 16px
   System font stack only (no external fonts, keeps it fast).
   ============================================================ */

:root {
	--green: #0b6b3a;
	--green-dark: #084d2a;
	--green-soft: #e6f2ea;
	--green-soft-2: #d2e7d8;
	--gold: #e8a317;
	--gold-dark: #b97e08;
	--bg: #f7f8f5;
	--ink: #1a2e22;
	--ink-soft: #4a5a50;
	--line: #dde5dc;
	--white: #ffffff;
	--red: #b42318;
	--red-soft: #fdecea;
	--radius: 16px;
	--shadow: 0 6px 24px rgba(8, 77, 42, .08);
	--shadow-lift: 0 14px 32px rgba(8, 77, 42, .14);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
	line-height: 1.25;
	margin: 0 0 .6em;
	color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(11, 107, 58, .3); }
.btn-primary:hover { background: var(--green-dark); }
.btn-gold { background: var(--gold); color: #1a2e22; box-shadow: 0 8px 20px rgba(232, 163, 23, .35); }
.btn-gold:hover { background: #f2b63a; }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green-soft); }
.btn-white { background: #fff; color: var(--green-dark); }
.btn-white:hover { background: var(--green-soft); }

/* ---------- Section scaffolding ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-kicker {
	display: inline-block;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--green);
	margin-bottom: 10px;
}
.section-sub { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Disclaimer strip ---------- */
.disclaimer-strip {
	background: var(--green-dark);
	color: #d7e8dc;
	font-size: .85rem;
	padding: 9px 0;
	text-align: center;
}
.disclaimer-strip a { color: #ffd978; }

/* ---------- Header ---------- */
.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 0;
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; flex-shrink: 0; }
.site-logo-mark {
	width: 46px; height: 46px; border-radius: 12px;
	background: var(--green); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 900; font-size: 1.3rem; flex-shrink: 0;
}
.site-logo-mark.gold { background: var(--gold); color: #1a2e22; }
.site-title { font-size: 1.25rem; font-weight: 800; color: var(--ink); line-height: 1.15; }
.site-tagline { font-size: .8rem; color: var(--ink-soft); line-height: 1.2; }
.main-nav { margin-left: auto; min-width: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: nowrap; }
.main-nav a {
	display: block; padding: 9px 11px; border-radius: 999px; white-space: nowrap;
	color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none !important;
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--green-soft); color: var(--green-dark); }
.header-cta { flex-shrink: 0; }
.menu-toggle {
	display: none; margin-left: auto; background: var(--green); color: #fff;
	border: 0; border-radius: 10px; padding: 10px 16px; font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 62%, #12824a 100%);
	color: #fff;
	padding: 68px 0 60px;
	position: relative;
	overflow: hidden;
}
.hero::after {
	content: ""; position: absolute; right: -90px; top: -90px;
	width: 320px; height: 320px; border-radius: 50%;
	border: 42px solid rgba(232, 163, 23, .25);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero-badge {
	display: inline-block; background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .35);
	color: #fff; font-size: .85rem; font-weight: 700;
	padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { color: #fff; }
.hero-sub { color: #d7e8dc; font-size: 1.15rem; max-width: 680px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 30px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; color: #d7e8dc; font-size: .95rem; }
.hero-trust span::before { content: "✓ "; color: var(--gold); font-weight: 800; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
	background: var(--white); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-icon {
	width: 52px; height: 52px; border-radius: 14px;
	background: var(--green-soft); color: var(--green-dark);
	display: flex; align-items: center; justify-content: center;
	font-size: 1.5rem; font-weight: 800; margin-bottom: 14px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: .5em; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Payment dates strip ---------- */
.dates-strip { margin-top: -34px; position: relative; z-index: 2; }
.dates-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.date-card {
	background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--green);
	border-radius: var(--radius); padding: 20px 18px; text-align: center; box-shadow: var(--shadow);
}
.date-card.srd { border-top-color: var(--gold); background: #fffdf4; }
.date-card .grant-name { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.date-card .day-num { font-size: 2rem; font-weight: 900; color: var(--green-dark); line-height: 1.1; margin: 6px 0 2px; }
.date-card .day-name { font-weight: 700; }
.date-card .day-note { font-size: .85rem; color: var(--ink-soft); }
.dates-note { text-align: center; color: var(--ink-soft); font-size: .92rem; margin-top: 16px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
	display: flex; gap: 18px; background: var(--white);
	border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.step-num {
	counter-increment: step; flex-shrink: 0;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--green); color: #fff; font-weight: 900; font-size: 1.15rem;
	display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: .25em; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.data th {
	background: var(--green-dark); color: #fff; text-align: left;
	padding: 13px 16px; font-weight: 700; white-space: nowrap;
}
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: #f2f6f3; }
.status-pill {
	display: inline-block; padding: 3px 12px; border-radius: 999px;
	font-size: .85rem; font-weight: 800; white-space: nowrap;
}
.pill-ok { background: var(--green-soft); color: var(--green-dark); }
.pill-wait { background: #fef3c7; color: #92400e; }
.pill-no { background: var(--red-soft); color: var(--red); }

/* ---------- Warning box ---------- */
.warn-box {
	background: var(--red-soft); border: 1px solid #f5c6c2; border-left: 6px solid var(--red);
	border-radius: var(--radius); padding: 26px 28px;
}
.warn-box h2, .warn-box h3 { color: var(--red); }
.warn-box ul { margin: .4em 0 0 1.2em; padding: 0; }
.warn-box li { margin-bottom: .35em; }

/* ---------- Posts grid ---------- */
.post-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.post-card .thumb { aspect-ratio: 16/9; background: var(--green-soft); display: flex; align-items: center; justify-content: center; color: var(--green-dark); font-weight: 800; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { font-size: .85rem; color: var(--ink-soft); }
.post-card h3 { margin: 0; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--green); }

/* ---------- FAQ accordion ---------- */
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q {
	width: 100%; background: none; border: 0; cursor: pointer;
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 19px 24px; font-family: inherit; font-size: 1.02rem; font-weight: 700; color: var(--ink); text-align: left;
}
.faq-q .faq-icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; transition: transform .2s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 24px 22px; color: var(--ink-soft); }
.faq-item.open .faq-a { display: block; }

/* ---------- Assistance CTA ---------- */
.cta-band {
	background: linear-gradient(135deg, var(--green-dark), var(--green));
	color: #fff; border-radius: 22px; padding: 44px 40px;
	display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #d7e8dc; margin: 0; }
.cta-band .cta-actions { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Page hero / breadcrumbs ---------- */
.page-hero { background: var(--green-dark); color: #fff; padding: 44px 0 40px; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.breadcrumbs { font-size: .88rem; color: #bcd6c4; margin-bottom: 10px; }
.breadcrumbs a { color: #ffd978; }
.page-content { padding: 52px 0 64px; }
.content-narrow { max-width: 780px; margin: 0 auto; }
.content-area { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 38px; box-shadow: var(--shadow); }
.with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.sidebar .widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.sidebar .widget-title { font-size: 1.05rem; margin-bottom: .7em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea, select {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
	font-family: inherit; font-size: 1rem; background: #fff;
}
label { font-weight: 700; display: block; margin-bottom: 6px; }
.form-row { margin-bottom: 16px; }
.form-note { font-size: .9rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: #cfe3d5; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding: 54px 0 34px; }
.site-footer h3, .site-footer h4 { color: #fff; font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cfe3d5; }
.site-footer a:hover { color: #ffd978; }
.footer-disclaimer { border-top: 1px solid rgba(255, 255, 255, .18); padding: 22px 0; font-size: .86rem; color: #a9c6b2; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }
.back-to-top { background: var(--gold); color: #1a2e22; border: 0; border-radius: 999px; padding: 8px 18px; font-weight: 800; cursor: pointer; }

/* ---------- Misc: pagination, comments, 404 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; }
.pagination .current, .pagination .page-numbers:hover { background: var(--green); color: #fff; border-color: var(--green); }
.error-404 { text-align: center; padding: 40px 0; }
.error-404 .big { font-size: 5rem; font-weight: 900; color: var(--green); line-height: 1; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: #000; padding: 10px 16px; z-index: 100; font-weight: 800; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.dates-grid { grid-template-columns: repeat(2, 1fr); }
	.dates-grid .date-card:last-child { grid-column: 1 / -1; }
	.with-sidebar { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.main-nav { display: none; width: 100%; order: 4; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; }
	.menu-toggle { display: block; }
	.header-cta { display: none; }
	.header-inner { flex-wrap: wrap; }
}
@media (max-width: 600px) {
	.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
	.dates-grid { grid-template-columns: 1fr 1fr; }
	.dates-grid .date-card:last-child { grid-column: 1 / -1; }
	.section { padding: 44px 0; }
	.content-area { padding: 24px 20px; }
	.cta-band { padding: 30px 24px; }
	.footer-grid { grid-template-columns: 1fr; }
	.hero { padding: 48px 0 44px; }
}

/* ============================================================
   Elementor auto-created pages (v2)
   Cards, tables, notes and post cards used by the auto-setup
   Elementor designs. Elementor itself handles layout, colours
   and spacing; this only adds radius, shadow and table styling.
   ============================================================ */
.srdsg-card {
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(8, 77, 42, 0.08);
}
.srdsg-note {
	border-radius: 16px;
}
.srdsg-table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 4px;
	font-size: 15px;
}
.srdsg-table th {
	background: #0b6b3a;
	color: #fff;
	text-align: left;
	padding: 12px 14px;
}
.srdsg-table td {
	padding: 11px 14px;
	border-bottom: 1px solid #e3e8e4;
	vertical-align: top;
}
.srdsg-table tr:nth-child(even) td {
	background: #f7f8f5;
}
.srdsg-posts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.srdsg-post-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(8, 77, 42, 0.08);
	padding: 22px;
}
.srdsg-post-date {
	color: #5a6b60;
	font-size: 14px;
	margin: 0 0 8px;
}
@media (max-width: 900px) {
	.srdsg-posts {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   Elementor content theming (v4)
   Forces Elementor widget output inside page content to use the
   theme design system, overriding Elementor's default colours
   (notably its light-blue heading/title defaults, which showed up
   on inner pages when the builder set no colour). Scoped to
   main#main-content, so Elementor's editor panel is untouched.
   Dark sections keep white titles via the exception at the end
   (ID scope beats Elementor's class-only generated styles).
   ============================================================ */
main#main-content .elementor-widget-heading .elementor-heading-title {
	color: var(--ink);
}
main#main-content .elementor-icon-box-title {
	color: var(--ink);
}
main#main-content .elementor-icon-box-description {
	color: var(--ink-soft);
}
main#main-content .elementor a:not(.elementor-button) {
	color: var(--green);
}
main#main-content .elementor a:not(.elementor-button):hover {
	color: var(--green-dark);
}
main#main-content .elementor-icon-box-title a,
main#main-content .elementor-heading-title a {
	color: var(--ink);
}
main#main-content .elementor-accordion .elementor-tab-title {
	color: var(--ink);
}
main#main-content .elementor-accordion .elementor-tab-title.elementor-active {
	color: var(--green-dark);
}
main#main-content .elementor-accordion .elementor-tab-title a {
	color: var(--ink);
}
main#main-content .elementor-accordion .elementor-tab-title.elementor-active a {
	color: var(--green-dark);
}
main#main-content .elementor-accordion .elementor-tab-content {
	color: var(--ink-soft);
}
main#main-content .elementor-button {
	border-radius: 999px;
}
main#main-content .srdsg-card {
	border: 1px solid var(--line);
}
/* Dark sections (homepage hero/CTA, inner hero/band) keep white
   titles even though the general heading rule above outranks
   Elementor's own generated styles: same specificity, later wins. */
main#main-content .srdsg-hero .elementor-heading-title,
main#main-content .srdsg-band .elementor-heading-title,
main#main-content .srdsg-dark .elementor-heading-title,
main#main-content .srdsg-hero .elementor-icon-box-title,
main#main-content .srdsg-band .elementor-icon-box-title,
main#main-content .srdsg-dark .elementor-icon-box-title {
	color: #ffffff;
}
main#main-content .srdsg-warn {
	border-left: 6px solid var(--red);
	border-radius: 16px;
}

/* ---------- v5 homepage (Elementor HTML sections) ---------- */
/* Safety net: homepage section containers must span the viewport
   edge to edge like the built-in sections, whatever Elementor's
   container defaults do. */
.srdsg-home-section {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}
.srdsg-home-section .e-con-inner {
	max-width: none !important;
	padding: 0 !important;
}

/* ---------- v6 responsive top-up ---------- */
@media (max-width: 600px) {
	.hero h1 { font-size: 1.9rem; }
	.hero-sub { font-size: 1.02rem; }
	.section-head h2, .cta-band h2 { font-size: 1.55rem; }
	.step { flex-direction: column; padding: 20px; gap: 12px; }
	.step-num { width: 40px; height: 40px; font-size: 1.15rem; }
	.date-card { padding: 16px 10px; }
	.date-card .day-num { font-size: 1.5rem; }
}

/* ---------- v7: native-widget homepage helpers ---------- */
/* Gold-top SRD date card (pale background + gold top border). */
.srdsg-card-gold {
	border-top: 4px solid var(--gold) !important;
	background-color: #fffdf4 !important;
}
/* FAQ accordion as cards (preview style). */
.srdsg-faq .elementor-accordion-item {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 16px;
	margin-bottom: 12px;
	overflow: hidden;
}
.srdsg-faq .elementor-accordion .elementor-tab-title {
	font-weight: 700;
}
.srdsg-faq .elementor-accordion-icon {
	background: #e6f2ea;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
