/*
Theme Name: NYIP Portal Theme
Theme URI: https://nigeriayouthsinpolitics.org
Author: NYIP Tech Team
Description: Lightweight companion theme for the NYIP Student Leadership Portal plugin. Clean, fast, full-width page templates so plugin shortcodes ([nyip_landing], [nyip_register], [nyip_login], [nyip_dashboard]) render edge-to-edge without fighting a page-builder theme's own boxes and sidebars. Shares the exact NYIP green & gold palette used by the plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nyip-portal-theme
*/

:root {
	--nyip-green: #0b6e4f;
	--nyip-green-dark: #084c37;
	--nyip-gold: #d4af37;
	--nyip-gold-light: #f1dc9c;
	--nyip-bg: #f7f9f8;
	--nyip-card-bg: #ffffff;
	--nyip-text: #16241f;
	--nyip-muted: #5f6f68;
	--nyip-border: #e2e8e4;
	--nyip-danger: #c0392b;
	--nyip-success: #1e8a4c;
	--nyip-radius: 14px;
	--nyip-shadow: 0 2px 10px rgba(15, 40, 30, 0.08);
	--nyip-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root:not(.nyip-light) {
		--nyip-bg: #0f1613;
		--nyip-card-bg: #17211d;
		--nyip-text: #eaf3ee;
		--nyip-muted: #9db3aa;
		--nyip-border: #26332c;
		--nyip-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--nyip-bg);
	color: var(--nyip-text);
	font-family: var(--nyip-font);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden; /* required so full-bleed (100vw) sections never trigger a horizontal scrollbar */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Sticky footer: main content grows to push the footer to the bottom of
   the viewport on short pages, while the footer always stretches to the
   full device width (flex column default cross-axis stretch). */
#main-content {
	flex: 1 0 auto;
	width: 100%;
}
.nyip-site-footer {
	flex-shrink: 0;
	width: 100%;
	box-sizing: border-box;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--nyip-green); }
a:hover { color: var(--nyip-green-dark); }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------------- Site header ---------------- */
.nyip-site-header {
	background: var(--nyip-card-bg);
	border-bottom: 1px solid var(--nyip-border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.nyip-site-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.nyip-site-branding {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--nyip-text);
	font-weight: 800;
	font-size: 19px;
}
.nyip-site-branding img { height: 36px; width: auto; }
.nyip-site-branding .nyip-brand-mark {
	width: 36px; height: 36px;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--nyip-green), var(--nyip-green-dark));
	color: var(--nyip-gold-light);
	display: flex; align-items: center; justify-content: center;
	font-size: 15px; font-weight: 800; letter-spacing: .02em;
}

.nyip-primary-nav ul {
	list-style: none;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
}
.nyip-primary-nav a {
	display: block;
	padding: 9px 14px;
	border-radius: 8px;
	color: var(--nyip-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 14.5px;
}
.nyip-primary-nav a:hover,
.nyip-primary-nav .current-menu-item > a {
	background: var(--nyip-bg);
	color: var(--nyip-green);
}

.nyip-menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--nyip-border);
	border-radius: 8px;
	padding: 8px 10px;
	cursor: pointer;
}

@media (max-width: 860px) {
	.nyip-menu-toggle { display: block; }
	.nyip-primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.nyip-primary-nav.is-open { display: block; }
	.nyip-primary-nav ul { flex-direction: column; padding: 8px 0; }
	.nyip-site-header-inner { flex-wrap: wrap; }
}

/* ---------------- Page content wrapper ---------------- */
.nyip-page-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}
.nyip-page-wrap.nyip-page-wrap-narrow { max-width: 860px; }
.nyip-page-content { padding: 48px 0; }

.nyip-page-title {
	font-size: 30px;
	margin: 0 0 24px;
}

/* Full-bleed template: shortcodes like [nyip_landing] already provide their
   own hero/section backgrounds and spacing, so this template removes the
   theme's own padding/box so nothing doubles up. */
.nyip-template-full-bleed .nyip-page-content { padding: 0; }
.nyip-template-full-bleed .nyip-page-wrap { max-width: none; padding: 0; }

/* ---------------- Blog / single post ---------------- */
.nyip-post-card {
	background: var(--nyip-card-bg);
	border: 1px solid var(--nyip-border);
	border-radius: var(--nyip-radius);
	box-shadow: var(--nyip-shadow);
	padding: 28px;
	margin-bottom: 20px;
}
.nyip-post-card h2 a { color: var(--nyip-text); text-decoration: none; }
.nyip-post-card h2 a:hover { color: var(--nyip-green); }
.nyip-post-meta { color: var(--nyip-muted); font-size: 13.5px; margin: 4px 0 12px; }

.nyip-pagination { display: flex; gap: 8px; justify-content: center; margin: 24px 0; }
.nyip-pagination a, .nyip-pagination span {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--nyip-border);
	text-decoration: none;
	color: var(--nyip-text);
}
.nyip-pagination .current { background: var(--nyip-green); color: #fff; border-color: var(--nyip-green); }

/* ---------------- Footer ---------------- */
.nyip-site-footer {
	background: var(--nyip-green-dark);
	color: #eaf3ee;
	margin-top: 48px;
	width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
}
.nyip-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 32px;
	box-sizing: border-box;
}
.nyip-footer-inner h3 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.nyip-footer-inner a { color: #cfe3d8; text-decoration: none; transition: color 0.15s ease; }
.nyip-footer-inner a:hover { color: var(--nyip-gold-light); }
.nyip-footer-inner ul { list-style: none; margin: 0; padding: 0; }
.nyip-footer-inner li { margin-bottom: 8px; }
.nyip-footer-inner p { margin: 0; color: #cfe3d8; font-size: 14px; line-height: 1.5; word-break: break-word; }
.nyip-footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.nyip-footer-widgets li { margin-bottom: 6px; }

.nyip-footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.12);
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 20px;
	text-align: center;
	font-size: 13px;
	color: #a9c4b7;
	box-sizing: border-box;
}
.nyip-footer-bottom a { color: #cfe3d8; text-decoration: none; font-weight: 600; }
.nyip-footer-bottom a:hover { color: var(--nyip-gold-light); }

/* Tablet: drop to 2 columns before things get cramped. */
@media (max-width: 900px) {
	.nyip-footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Mobile: single column, tighter padding, everything full width. */
@media (max-width: 600px) {
	.nyip-footer-inner {
		grid-template-columns: 1fr;
		padding: 32px 20px;
		gap: 28px;
		text-align: center;
	}
	.nyip-footer-bottom { padding: 14px 20px; font-size: 12.5px; }
}

/* 404 */
.nyip-404 { text-align: center; padding: 90px 24px; }
.nyip-404 h1 { font-size: 84px; margin: 0; color: var(--nyip-green); }

/* ---------------- Preloader ---------------- */
#nyip-preloader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	background: linear-gradient(135deg, var(--nyip-green), var(--nyip-green-dark));
	transition: opacity 0.45s ease, visibility 0.45s ease;
}
#nyip-preloader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.nyip-preloader-mark {
	color: #fff;
	font-weight: 800;
	font-size: 22px;
	letter-spacing: 0.14em;
	opacity: 0.95;
}
.nyip-preloader-ring {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--nyip-gold);
	animation: nyipPreloaderSpin 0.85s linear infinite;
}
@keyframes nyipPreloaderSpin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.nyip-preloader-ring { animation: none; border-top-color: rgba(255,255,255,0.25); }
}
