/*
Theme Name:   The EV Desk (GeneratePress Child)
Theme URI:    https://theevdesk.com
Description:  Custom child theme for The EV Desk. Requires GeneratePress.
Author:       The EV Desk
Template:     generatepress
Version:      1.0.0
License:      GPL-2.0-or-later
Text Domain:  evdesk
*/

/* ===============================================================
   Tokens
   =============================================================== */
:root {
	--evd-bg: #ffffff;
	--evd-surface: #f1f5f9;
	--evd-card: #ffffff;
	--evd-text: #0f172a;
	--evd-muted: #55637a;
	--evd-border: #e2e8f0;
	--evd-teal: #0fa89a;
	--evd-teal-text: #0a857a;
	--evd-btn: #0d9a8d;
	--evd-btn-hover: #0b8579;
	--evd-navy: #15233b;
	--evd-navy-text: #c3cee0;
	--evd-pill-bg: #dcf5e9;
	--evd-pill-text: #17724d;
	--evd-stat-bg: #eef3f8;
	--evd-ph-a: #e6edf4;
	--evd-ph-b: #d3dde8;
	--evd-radius: 10px;
	--evd-wrap: 1200px;
	--evd-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
	--evd-bg: #0b1220;
	--evd-surface: #131f33;
	--evd-card: #101a2c;
	--evd-text: #e7eef8;
	--evd-muted: #9db0c9;
	--evd-border: #223249;
	--evd-teal: #2dd4bf;
	--evd-teal-text: #38e0cb;
	--evd-btn: #0d9a8d;
	--evd-navy: #0f1a2e;
	--evd-pill-bg: #11382b;
	--evd-pill-text: #6ee7b7;
	--evd-stat-bg: #0f1a2c;
	--evd-ph-a: #172338;
	--evd-ph-b: #1e2d46;
}

/* ===============================================================
   Base
   =============================================================== */
html body {
	background: var(--evd-bg);
	color: var(--evd-text);
	font-family: var(--evd-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.evd-home h1, .evd-home h2, .evd-home h3,
.evd-header, .evd-footer, .evd-newsletter, .evd-editor {
	font-family: var(--evd-font);
}

.evd-wrap {
	max-width: var(--evd-wrap);
	margin: 0 auto;
	padding: 0 24px;
}

.evd-icon { display: block; flex: none; }

.evd-skip {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: #fff; color: #000; padding: 10px 14px;
}
.evd-skip:focus { left: 8px; top: 8px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* Homepage content area is full-width */
.home .site-content,
.evd-site .site-content { display: block; }
.home .evd-site .site-content { max-width: none; padding: 0; margin: 0; }
.home .evd-site { max-width: none; padding: 0; margin: 0; }

/* Buttons */
.evd-btn,
.evd-newsletter .evd-btn {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--evd-btn); color: #fff !important;
	font: 600 14px/1 var(--evd-font);
	padding: 12px 18px; border: 0; border-radius: 8px;
	cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background .15s ease;
}
.evd-btn:hover { background: var(--evd-btn-hover); color: #fff; }

/* Placeholder (no featured image) */
.evd-ph {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--evd-ph-a), var(--evd-ph-b));
	color: var(--evd-muted);
}
.evd-ph--round { border-radius: 50%; }
.evd-ph--hero { min-height: 340px; }

/* ===============================================================
   Header
   =============================================================== */
.evd-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--evd-bg);
	border-bottom: 1px solid var(--evd-border);
}
.admin-bar .evd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .evd-header { top: 46px; } }

.evd-header__in {
	display: flex; align-items: center; gap: 36px;
	height: 66px;
}

.evd-brand {
	display: inline-flex; align-items: center; gap: 10px;
	color: var(--evd-text); text-decoration: none;
	font-weight: 800; font-size: 22px; letter-spacing: -0.02em;
}
.evd-brand:hover { color: var(--evd-text); }
.evd-brand__mark { color: var(--evd-teal); display: inline-flex; }
.evd-brand--light, .evd-brand--light:hover { color: #fff; }

.evd-nav { display: flex; align-items: center; flex: 1; }
.evd-menu {
	display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
}
.evd-menu a {
	color: var(--evd-text); text-decoration: none;
	font-size: 13.5px; font-weight: 500; padding: 6px 0;
}
.evd-menu a:hover,
.evd-menu .current-menu-item > a,
.evd-menu .current-cat > a { color: var(--evd-teal-text); }

.evd-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.evd-iconbtn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 8px;
	background: transparent; border: 0; color: var(--evd-text); cursor: pointer;
}
.evd-iconbtn:hover { background: var(--evd-surface); color: var(--evd-text); }
.evd-btn--nav { margin-left: 12px; padding: 11px 16px; font-size: 13px; }
.evd-btn--nav-mobile, .evd-menu-toggle { display: none; }

.evd-theme-sun { display: none; }
html[data-theme="dark"] .evd-theme-sun { display: inline-flex; }
html[data-theme="dark"] .evd-theme-moon { display: none; }
.evd-theme-moon { display: inline-flex; }

.evd-search { border-top: 1px solid var(--evd-border); background: var(--evd-surface); padding: 14px 0; }
.evd-search[hidden] { display: none; }
.evd-search form { display: flex; gap: 10px; }
.evd-search input[type="search"] {
	flex: 1; padding: 12px 14px; border: 1px solid var(--evd-border);
	border-radius: 8px; background: var(--evd-bg); color: var(--evd-text); font: 400 15px var(--evd-font);
}

/* ===============================================================
   Hero
   =============================================================== */
.evd-hero { position: relative; overflow: hidden; }
.evd-hero__in { position: relative; min-height: 340px; }
.evd-hero__text {
	position: relative; z-index: 2;
	max-width: 52%; padding: 50px 0 36px;
}
.evd-hero__text h1 {
	margin: 0 0 18px; font-size: clamp(38px, 5vw, 60px);
	line-height: 1.04; font-weight: 800; letter-spacing: -0.035em;
	color: var(--evd-text);
}
.evd-hero__text p {
	margin: 0; max-width: 440px; font-size: 18px; line-height: 1.5; color: var(--evd-muted);
}
.evd-hero__media {
	position: absolute; z-index: 1; top: 0; bottom: 0;
	left: 56%; right: calc(50% - 50vw);
	overflow: hidden;
}
.evd-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tool cards */
.evd-tools {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
	position: relative; z-index: 3; padding: 4px 0 40px;
}
.evd-tool {
	display: flex; align-items: center; gap: 16px;
	background: var(--evd-surface); border: 1px solid var(--evd-border);
	border-radius: var(--evd-radius); padding: 20px 22px;
	text-decoration: none; color: var(--evd-text);
	transition: transform .15s ease, box-shadow .15s ease;
}
.evd-tool:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); color: var(--evd-text); }
.evd-tool__icon { color: var(--evd-teal); display: inline-flex; }
.evd-tool__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.evd-tool__body strong { font-size: 16px; font-weight: 700; line-height: 1.25; }
.evd-tool__body small { font-size: 13.5px; color: var(--evd-muted); line-height: 1.4; margin-top: 3px; }
.evd-tool__arrow, .evd-start__arrow { color: var(--evd-text); }

/* ===============================================================
   Sections
   =============================================================== */
.evd-section { padding: 36px 0; border-top: 1px solid var(--evd-border); }
.evd-section:first-of-type { border-top: 0; }
.evd-h2 {
	margin: 0 0 22px; font-size: 28px; font-weight: 800;
	letter-spacing: -0.025em; line-height: 1.15; color: var(--evd-text);
}
.evd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.evd-empty { padding: 20px; border: 1px dashed var(--evd-border); border-radius: 8px; color: var(--evd-muted); }

/* Start here */
.evd-start__card {
	display: flex; align-items: center; gap: 16px;
	background: var(--evd-card); border: 1px solid var(--evd-border);
	border-radius: var(--evd-radius); padding: 18px 20px;
	text-decoration: none; color: var(--evd-text);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.evd-start__card:hover { border-color: var(--evd-teal); box-shadow: 0 6px 20px rgba(15, 23, 42, .06); color: var(--evd-text); }
.evd-start__icon { color: var(--evd-teal); display: inline-flex; }
.evd-start__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.evd-start__body strong { font-size: 15.5px; font-weight: 700; }
.evd-start__body small { font-size: 13px; color: var(--evd-muted); margin-top: 2px; line-height: 1.4; }

/* Latest guides cards */
.evd-card {
	background: var(--evd-card); border: 1px solid var(--evd-border);
	border-radius: var(--evd-radius); overflow: hidden;
	display: flex; flex-direction: column;
	transition: box-shadow .15s ease, transform .15s ease;
}
.evd-card:hover { box-shadow: 0 10px 28px rgba(15, 23, 42, .09); transform: translateY(-2px); }
.evd-card__img { display: block; aspect-ratio: 16 / 7.4; overflow: hidden; background: var(--evd-ph-a); }
.evd-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evd-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.evd-card__cat {
	font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--evd-teal-text); text-decoration: none; margin-bottom: 6px;
}
.evd-card__title { margin: 0 0 14px; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.evd-card__title a { color: var(--evd-text); text-decoration: none; }
.evd-card__title a:hover { color: var(--evd-teal-text); }
.evd-card__meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.evd-by { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--evd-muted); }
.evd-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.evd-pill {
	background: var(--evd-pill-bg); color: var(--evd-pill-text);
	font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}

/* This month in EVs */
.evd-month-wrap { border-top: 0; padding: 12px 0 32px; }
.evd-month {
	background: var(--evd-stat-bg); border: 1px solid var(--evd-border);
	border-radius: 14px; padding: 26px 24px 18px;
}
.evd-month__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.evd-month__head .evd-h2 { margin: 0; }
.evd-chip {
	background: var(--evd-bg); border: 1px solid var(--evd-border); color: var(--evd-muted);
	font-size: 12.5px; padding: 4px 11px; border-radius: 6px;
}
.evd-stat {
	background: var(--evd-card); border: 1px solid var(--evd-border);
	border-radius: var(--evd-radius); padding: 18px 20px 20px; text-align: center;
}
.evd-stat__label {
	display: flex; align-items: center; gap: 12px; text-align: left;
	font-size: 15px; font-weight: 600; color: var(--evd-text);
}
.evd-stat__label .evd-icon { color: var(--evd-teal); }
.evd-stat__value {
	margin: 4px 0 6px; font-size: 44px; font-weight: 800; letter-spacing: -0.03em;
	color: var(--evd-teal-text); line-height: 1.15;
}
.evd-stat__note { font-size: 13px; color: var(--evd-muted); }
.evd-month__foot { text-align: center; font-size: 12.5px; color: var(--evd-muted); margin: 14px 0 0; }

/* Ad slot */
.evd-ad { margin: 8px auto 28px; text-align: center; overflow: hidden; max-width: 728px; min-height: 90px; }
.evd-ad--ph {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: var(--evd-surface); border: 1px solid var(--evd-border); border-radius: 6px;
	color: var(--evd-muted); font-size: 12.5px; height: 90px;
}
.evd-ad--ph small { opacity: .8; }

/* Category rows */
.evd-rows { padding: 0 0 36px; border-top: 0; }
.evd-row { padding: 22px 0 8px; border-top: 1px solid var(--evd-border); }
.evd-row:first-child { border-top: 1px solid var(--evd-border); }
.evd-row__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.evd-row__head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.evd-row__head a {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 13.5px; font-weight: 600; color: var(--evd-teal-text); text-decoration: none;
}
.evd-row__head a:hover { text-decoration: underline; }
.evd-row__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 14px; }
.evd-mini { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--evd-text); }
.evd-mini__img {
	flex: none; width: 92px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--evd-ph-a);
}
.evd-mini__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evd-mini__img .evd-ph svg { width: 20px; height: 20px; }
.evd-mini__title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.evd-mini:hover .evd-mini__title { color: var(--evd-teal-text); }

/* ===============================================================
   Newsletter band
   =============================================================== */
.evd-newsletter { background: var(--evd-navy); color: #fff; padding: 28px 0; }
.evd-newsletter__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.evd-newsletter__text { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.45; color: #e6edf7; }
.evd-newsletter__text strong { color: #fff; font-weight: 700; }
.evd-newsletter__form { display: flex; gap: 14px; flex: 1; max-width: 560px; }
.evd-newsletter__form input[type="email"] {
	flex: 1; min-width: 0; padding: 13px 14px; border-radius: 8px; border: 0;
	background: #fff; color: #0f172a; font: 400 14px var(--evd-font);
}
.evd-newsletter__sc { flex: 1; max-width: 560px; }

/* ===============================================================
   Editor strip
   =============================================================== */
.evd-editor { background: var(--evd-bg); padding: 22px 0; }
.evd-editor__in { display: flex; align-items: center; gap: 20px; }
.evd-editor__photo { flex: none; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; }
.evd-editor__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evd-editor__name { font-weight: 800; font-size: 18px; line-height: 1.2; }
.evd-editor__role { font-size: 14px; color: var(--evd-muted); }
.evd-editor__blurb { margin: 4px 0 0; font-size: 13.5px; color: var(--evd-muted); }
.evd-editor__blurb a { color: var(--evd-teal-text); font-weight: 600; text-decoration: none; margin-left: 8px; }
.evd-editor__blurb a:hover { text-decoration: underline; }

/* ===============================================================
   Footer
   =============================================================== */
.evd-footer { background: var(--evd-navy); color: var(--evd-navy-text); padding: 44px 0 26px; border-top: 1px solid rgba(255, 255, 255, .06); }
.evd-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; }
.evd-footer__brand p { margin: 14px 0 18px; max-width: 280px; font-size: 14px; line-height: 1.55; }
.evd-social { display: flex; gap: 16px; }
.evd-social a { color: #fff; display: inline-flex; opacity: .92; }
.evd-social a:hover { opacity: 1; color: var(--evd-teal); }
.evd-fcol h3 { margin: 4px 0 14px; font-size: 14px; font-weight: 700; color: #fff; }
.evd-flinks { list-style: none; margin: 0; padding: 0; }
.evd-flinks li { margin: 0 0 9px; }
.evd-flinks a { color: var(--evd-navy-text); text-decoration: none; font-size: 13.5px; }
.evd-flinks a:hover { color: #fff; text-decoration: underline; }
.evd-footer__bottom {
	margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: 13px; color: var(--evd-navy-text);
}

/* ===============================================================
   Inner pages (posts, archives) – light touch on GeneratePress
   =============================================================== */
.evd-site .site-content { max-width: var(--evd-wrap); margin: 0 auto; padding: 36px 24px; }
.evd-site .inside-article,
.evd-site .sidebar .widget {
	background: var(--evd-card); color: var(--evd-text);
	border: 1px solid var(--evd-border); border-radius: var(--evd-radius);
}
.evd-site .entry-title, .evd-site h1, .evd-site h2, .evd-site h3 { letter-spacing: -0.02em; color: var(--evd-text); }
.evd-site .site-main .entry-title a { color: var(--evd-text); }
.evd-site .site-main a, .evd-site .sidebar a { color: var(--evd-teal-text); }
.evd-site .entry-meta, .evd-site .entry-meta a { color: var(--evd-muted); }
.evd-site .button, .evd-site input[type="submit"], .evd-site button[type="submit"] {
	background: var(--evd-btn); color: #fff; border-radius: 8px; font-weight: 600;
}
.evd-site input[type="text"], .evd-site input[type="email"], .evd-site input[type="search"], .evd-site textarea {
	background: var(--evd-bg); color: var(--evd-text); border: 1px solid var(--evd-border); border-radius: 8px;
}

/* ===============================================================
   Responsive
   =============================================================== */
@media (max-width: 1024px) {
	.evd-header__in { gap: 20px; }
	.evd-menu { gap: 20px; }
	.evd-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
	.evd-footer__brand { grid-column: 1 / -1; }
	.evd-footer__brand p { max-width: 460px; }
}

@media (max-width: 900px) {
	/* header → hamburger */
	.evd-menu-toggle { display: inline-flex; }
	.evd-btn--nav { display: none; }
	.evd-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 14px;
		background: var(--evd-bg); border-bottom: 1px solid var(--evd-border);
		padding: 16px 24px 22px; box-shadow: 0 14px 24px rgba(15, 23, 42, .08);
	}
	.evd-nav.is-open { display: flex; }
	.evd-menu { flex-direction: column; gap: 4px; }
	.evd-menu a { display: block; padding: 10px 0; font-size: 16px; }
	.evd-btn--nav-mobile { display: inline-flex; }

	/* hero stacks */
	.evd-hero__text { max-width: none; padding: 34px 0 22px; }
	.evd-hero__media {
		position: relative; left: auto; right: auto; width: auto; height: 240px;
		margin: 0 -24px; /* full-bleed on mobile */
	}
	.evd-hero__in { min-height: 0; display: flex; flex-direction: column; }
	.evd-ph--hero { min-height: 240px; }
	.evd-tools { padding-top: 22px; }

	.evd-tools, .evd-grid-3, .evd-row__items { grid-template-columns: 1fr 1fr; }
	.evd-newsletter__in { flex-direction: column; align-items: stretch; gap: 18px; }
	.evd-newsletter__form { max-width: none; }
}

@media (max-width: 600px) {
	.evd-wrap { padding: 0 16px; }
	.evd-hero__media { margin: 0 -16px; height: 200px; }
	.evd-tools, .evd-grid-3, .evd-row__items { grid-template-columns: 1fr; }
	.evd-h2 { font-size: 24px; }
	.evd-stat__value { font-size: 38px; }
	.evd-footer__grid { grid-template-columns: 1fr 1fr; }
	.evd-newsletter__form { flex-direction: column; }
	.evd-editor__in { align-items: flex-start; }
	.evd-nav { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
