/*
Theme Name: PledgeTime Simple
Theme URI: https://pledgetime.org
Author: PledgeTime
Description: Clean PledgeTime theme. Provides brand colours, fonts, header and footer. All page content built using the WordPress block editor.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: pledgetime
*/

/* ── Google Fonts loaded via functions.php ── */

/* ── Reset ───────────────────────────────── */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ── Brand variables ─────────────────────── */
:root {
	--pt-green:       #1B4332;
	--pt-green-mid:   #2D6A4F;
	--pt-green-light: #52B788;
	--pt-green-pale:  #D8F3DC;
	--pt-gold:        #D4A017;
	--pt-gold-light:  #FFF3CC;
	--pt-text:        #1a1a1a;
	--pt-muted:       #5a6472;
	--pt-bg:          #FAFAF8;
	--pt-white:       #ffffff;
	--pt-border:      #e2e8e0;
	--pt-radius:      10px;
}

/* ── Base typography ─────────────────────── */
body {
	font-family: 'DM Sans', sans-serif;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--pt-text);
	background: var(--pt-bg);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Playfair Display', serif;
	line-height: 1.2;
	color: var(--pt-green);
}

a {
	color: var(--pt-green-light);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

p {
	margin-bottom: 1rem;
	color: var(--pt-muted);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ── Skip link ───────────────────────────── */
.skip-link {
	position: absolute;
	top: -999px;
	left: 0;
	padding: 8px 16px;
	background: var(--pt-gold);
	color: var(--pt-green);
	font-weight: 600;
	z-index: 9999;
}
.skip-link:focus {
	top: 0;
}

/* ── Header ──────────────────────────────── */
.site-header {
	background: var(--pt-green);
	padding: 0 5%;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.site-logo-img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	padding: 4px;
	object-fit: contain;
}

.site-name {
	font-family: 'Playfair Display', serif;
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
}

.site-name span {
	color: var(--pt-gold);
}

/* ── Primary nav ─────────────────────────── */
.main-navigation ul {
	display: flex;
	gap: 4px;
	list-style: none;
}

.main-navigation ul li a {
	display: block;
	color: rgba(255,255,255,0.85);
	font-size: 0.9rem;
	font-weight: 500;
	padding: 8px 14px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
	background: rgba(255,255,255,0.15);
	color: #fff;
}

/* ── Mobile nav toggle ───────────────────── */
.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
}

.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
}

.mobile-nav {
	display: none;
	background: var(--pt-green);
	padding: 12px 5%;
}

.mobile-nav.open {
	display: block;
}

.mobile-nav ul {
	list-style: none;
}

.mobile-nav ul li a {
	display: block;
	color: rgba(255,255,255,0.9);
	font-size: 0.95rem;
	padding: 11px 12px;
	border-radius: 8px;
	text-decoration: none;
}

.mobile-nav ul li a:hover {
	background: rgba(255,255,255,0.1);
}

/* ── Main content area ───────────────────── */
.site-main {
	flex: 1;
}

/* ── WordPress block editor alignment ───── */
.entry-content,
.wp-block-group,
.wp-block-cover,
.wp-block-columns {
	max-width: 100%;
}

/* Constrain readable content width */
.entry-content > *,
.wp-block-post-content > * {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

/* Full-width blocks break out */
.entry-content > .alignfull,
.entry-content > .wp-block-cover,
.entry-content > .wp-block-group.alignfull {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Wide blocks */
.entry-content > .alignwide {
	max-width: 1100px;
}

/* ── Block editor colour palette ────────── */
.has-pt-green-color            { color: var(--pt-green) !important; }
.has-pt-green-mid-color        { color: var(--pt-green-mid) !important; }
.has-pt-green-light-color      { color: var(--pt-green-light) !important; }
.has-pt-gold-color             { color: var(--pt-gold) !important; }
.has-pt-text-color             { color: var(--pt-text) !important; }
.has-pt-muted-color            { color: var(--pt-muted) !important; }

.has-pt-green-background-color      { background-color: var(--pt-green) !important; }
.has-pt-green-pale-background-color { background-color: var(--pt-green-pale) !important; }
.has-pt-gold-light-background-color { background-color: var(--pt-gold-light) !important; }
.has-pt-white-background-color      { background-color: var(--pt-white) !important; }

/* ── Buttons (block editor button block) ── */
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
	border-radius: 10px !important;
	font-family: 'DM Sans', sans-serif !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	padding: 13px 26px !important;
	text-decoration: none !important;
	transition: opacity 0.2s, transform 0.2s !important;
}

.wp-block-button__link:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

/* Primary button style */
.wp-block-button.is-style-primary .wp-block-button__link,
.wp-block-button.is-style-fill .wp-block-button__link {
	background: var(--pt-gold) !important;
	color: var(--pt-green) !important;
}

/* Outline button style */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--pt-green) !important;
	color: var(--pt-green) !important;
	background: transparent !important;
}

/* ── Cover block defaults ────────────────── */
.wp-block-cover {
	padding: 80px 5%;
}

.wp-block-cover__inner-container {
	max-width: 800px;
	margin: 0 auto;
}

/* ── Separator ───────────────────────────── */
.wp-block-separator {
	border-color: var(--pt-border);
}

/* ── Quote block ─────────────────────────── */
.wp-block-quote {
	border-left: 4px solid var(--pt-green-light);
	padding-left: 1.2rem;
	color: var(--pt-muted);
	font-style: italic;
}

/* ── Table block ─────────────────────────── */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table td,
.wp-block-table th {
	border: 1px solid var(--pt-border);
	padding: 10px 14px;
	font-size: 0.9rem;
}

.wp-block-table th {
	background: var(--pt-green);
	color: #fff;
	font-weight: 600;
	text-align: left;
}

.wp-block-table tr:nth-child(even) td {
	background: var(--pt-green-pale);
}

/* ── Columns block ───────────────────────── */
.wp-block-columns {
	gap: 2rem;
}

/* ── Group block as card ─────────────────── */
.wp-block-group.is-style-card {
	background: #fff;
	border: 1px solid var(--pt-border);
	border-radius: var(--pt-radius);
	padding: 28px 24px;
}

/* ── Footer ──────────────────────────────── */
.site-footer {
	background: var(--pt-green);
	color: rgba(255,255,255,0.7);
	padding: 28px 5%;
	margin-top: auto;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.footer-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}

.footer-logo-img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff;
	padding: 3px;
	object-fit: contain;
}

.footer-site-name {
	font-family: 'Playfair Display', serif;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
}

.footer-site-name span {
	color: var(--pt-gold);
}

.footer-nav {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	list-style: none;
}

.footer-nav a {
	color: rgba(255,255,255,0.65);
	font-size: 0.85rem;
	text-decoration: none;
	transition: color 0.2s;
}

.footer-nav a:hover {
	color: #fff;
}

.footer-copy {
	font-size: 0.78rem;
	color: rgba(255,255,255,0.35);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
	.main-navigation {
		display: none;
	}

	.nav-toggle {
		display: flex;
	}

	.footer-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.site-header {
		padding: 0 4%;
	}

	.wp-block-cover {
		padding: 60px 4%;
	}
}
