/*
Theme Name: horse
Theme URI: https://internationaltoolkit.com
Author: Partners International
Author URI: https://internationaltoolkit.com
Description: A modern, sleek custom theme for the International Toolkit podcast site (internal codename "horse" — same theme, renamed so it can be installed without conflicting with the old copy). Episodes sync automatically from Podomatic.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolkit
*/

/* ---------- Variables ---------- */
:root {
	--ink: #0E1830;
	--ink-2: #16233F;
	--paper: #F7F8FC;
	--card: #FFFFFF;
	--muted: #5B6478;
	--line: #E6E9F2;
	--accent: #F2A93B;
	--accent-2: #2EC4B6;
	--radius: 16px;
	--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--maxw: 1160px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: #fff; padding: 10px 16px; z-index: 999; position: fixed; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	border: 2px solid transparent;
}
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(242,169,59,.35); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }

.link-arrow { font-weight: 700; color: var(--ink-2); }
.link-arrow:hover { color: var(--accent-2); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(247,248,252,.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 14px;
	padding-bottom: 14px;
}
.site-brand { display: flex; align-items: center; gap: 10px; }
.site-brand img { max-height: 48px; width: auto; border-radius: 10px; }
.site-title-text { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.nav-menu a:hover { color: var(--accent-2); }
.nav-cta { white-space: nowrap; }

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
	background: radial-gradient(120% 140% at 10% 0%, #1B2A4A 0%, var(--ink) 55%, #0A1226 100%);
	color: #fff;
	padding: 96px 0 88px;
}
.hero-inner { max-width: 780px; }
.eyebrow {
	text-transform: uppercase;
	letter-spacing: .16em;
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 14px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); color: #fff; }
.hero-sub { font-size: 19px; color: rgba(255,255,255,.78); max-width: 640px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 34px; }

.toolkit-social-links { display: flex; flex-wrap: wrap; gap: 12px; }
.toolkit-social-links a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.18);
	font-weight: 600;
	font-size: 14px;
	color: #fff;
}
.toolkit-social-links a:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink); }
.social-icon { width: 16px; height: 16px; display: inline-block; border-radius: 4px; background: currentColor; opacity: .9; -webkit-mask-size: contain; mask-size: contain; }

/* Footer variant of social links (light bg) */
.footer-col .toolkit-social-links a { background: rgba(14,24,48,.06); border-color: rgba(14,24,48,.12); color: var(--ink-2); }
.footer-col .toolkit-social-links a:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 10px; }
.section h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-sub { color: var(--muted); max-width: 600px; }

.latest-episodes { background: var(--paper); }

/* Episode grid + cards */
.episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.episode-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease;
}
.episode-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(14,24,48,.08); }
.episode-card-media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--ink-2), var(--ink)); }
.episode-card-media img { width: 100%; height: 100%; object-fit: cover; }
.episode-card-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.icon-mic { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--accent); display: inline-block; }
.episode-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.episode-date { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 8px; }
.episode-card-body h3 { font-size: 19px; margin-bottom: 10px; }
.episode-card-body h3 a:hover { color: var(--accent-2); }
.episode-excerpt { color: var(--muted); font-size: 15px; flex: 1; }

.empty-state { padding: 40px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Platforms */
.platforms { text-align: center; }
.platforms .toolkit-social-links { justify-content: center; }
.platforms .toolkit-social-links a { background: rgba(14,24,48,.05); border-color: var(--line); color: var(--ink-2); }
.platforms .toolkit-social-links a:hover { background: var(--accent-2); color: var(--ink); border-color: var(--accent-2); }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0; max-width: 560px; }

/* ---------- Page header (episodes archive, contact, generic pages) ---------- */
.page-header { background: var(--ink); color: #fff; padding: 64px 0 48px; }
.page-header h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); }
.hero-sub-dark { color: rgba(255,255,255,.75); max-width: 640px; }
.eyebrow-link { color: var(--accent); }

/* ---------- Single episode ---------- */
.episode-single-wrap { max-width: 820px; }
.episode-single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.episode-player { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 28px; }
.episode-player audio { width: 100%; }
.episode-content { font-size: 17px; color: var(--ink-2); }
.episode-content p { margin-bottom: 1.2em; }
.episode-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Contact page ---------- */
.contact-section .wrap { max-width: 920px; }
.contact-email-card {
	background: linear-gradient(135deg, var(--ink-2), var(--ink));
	color: #fff;
	border-radius: var(--radius);
	padding: 32px;
	margin-bottom: 40px;
}
.contact-email-card h2 { color: var(--accent); font-size: 16px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.contact-email-link { font-size: 24px; font-weight: 800; }
.contact-email-link:hover { color: var(--accent-2); }
.contact-follow-heading { margin-bottom: 20px; }
.contact-links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.contact-link-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.contact-link-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(14,24,48,.08); }
.contact-link-card .social-icon { background: var(--accent-2); width: 22px; height: 22px; border-radius: 6px; }
.contact-link-label { font-weight: 800; font-size: 17px; }
.contact-link-desc { color: var(--muted); font-size: 14px; }
.contact-extra-menu-list { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.contact-extra-menu-list a { font-weight: 600; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 16px; }
.footer-brand img { max-height: 44px; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; }
.footer-produced-by { font-size: 13px; color: var(--muted); }
.footer-menu li, .footer-col ul li { margin-bottom: 10px; }
.footer-menu a { color: var(--ink-2); font-weight: 600; }
.footer-menu a:hover { color: var(--accent-2); }
.footer-email { font-weight: 700; color: var(--ink-2); }
.footer-email:hover { color: var(--accent-2); }
.footer-col .btn-outline { margin-top: 12px; padding: 10px 18px; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 13px; }

/* ---------- Misc pages / blog fallback ---------- */
.page-content { max-width: 780px; font-size: 17px; }
.pagination { margin-top: 32px; display: flex; gap: 10px; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.episode-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-inner { grid-template-columns: 1fr 1fr; }
	.contact-links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	.menu-toggle { display: flex; }
	.primary-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 20px 24px 26px;
		display: none;
	}
	.primary-nav.is-open { display: flex; }
	.nav-menu { flex-direction: column; align-items: flex-start; gap: 14px; }
	.episode-grid { grid-template-columns: 1fr; }
	.footer-inner { grid-template-columns: 1fr; }
	.contact-links-grid { grid-template-columns: 1fr; }
	.cta-band-inner { flex-direction: column; align-items: flex-start; }
	.hero { padding: 72px 0 60px; }
}
