/*
Theme Name: Douglas County Voting
Theme URI: https://douglascountyvoting.org/
Author: Douglas County Voting
Description: A neutral, accessible civic-information theme designed for DouglasCountyVoting.org and the Douglas County Voting Data plugin.
Version: 1.0.4
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dcv-theme
*/

:root {
	--dcv-navy: #123b5d;
	--dcv-navy-dark: #09283f;
	--dcv-teal: #16766f;
	--dcv-gold: #e2a72e;
	--dcv-ink: #17212b;
	--dcv-muted: #526272;
	--dcv-line: #d8e0e7;
	--dcv-surface: #f3f7f9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { color: var(--dcv-ink); }
a { text-underline-offset: .18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--dcv-gold); outline-offset: 3px; }

.dcv-site-header { border-bottom: 1px solid var(--dcv-line); background: #fff; }
.dcv-header-inner { min-height: 78px; }
.dcv-brand a { color: var(--dcv-navy-dark); text-decoration: none; }
.dcv-main-nav { display: flex; flex-wrap: wrap; gap: 1.35rem; align-items: center; }
.dcv-main-nav a { color: var(--dcv-ink); font-weight: 650; text-decoration: none; }
.dcv-main-nav a:hover { color: var(--dcv-teal); text-decoration: underline; }

.dcv-hero { position: relative; overflow: hidden; border-radius: 0 0 28px 28px; }
.dcv-hero:after { content: ""; position: absolute; width: 360px; height: 360px; border: 70px solid rgba(255,255,255,.08); border-radius: 50%; right: -120px; top: -175px; pointer-events: none; }
.dcv-eyebrow { letter-spacing: .09em; text-transform: uppercase; font-size: .82rem; font-weight: 750; }
.dcv-hero .wp-block-button__link { box-shadow: none; }
.dcv-button-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border: 2px solid rgba(255,255,255,.85); }

.dcv-election-strip { margin-top: -1.7rem !important; position: relative; z-index: 2; box-shadow: 0 12px 30px rgba(9,40,63,.12); }
.dcv-section { padding-top: clamp(3rem,6vw,5.5rem); padding-bottom: clamp(3rem,6vw,5.5rem); }
.dcv-section-heading { max-width: 730px; }
.dcv-resource-card { height: 100%; border: 1px solid var(--dcv-line); border-radius: 16px; background: #fff; padding: 1.5rem; box-shadow: 0 8px 22px rgba(9,40,63,.06); }
.dcv-resource-card h3 { margin-top: 0; }
.dcv-resource-card a { font-weight: 700; color: var(--dcv-navy); }
.dcv-notice { border-left: 5px solid var(--dcv-gold); }

.dcv-content-shell { padding-top: clamp(2.5rem,5vw,4.5rem); padding-bottom: clamp(3rem,6vw,6rem); }
.dcv-page-title { color: var(--dcv-navy-dark); }
.dcv-site-footer { border-top: 1px solid var(--dcv-line); }
.dcv-footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.dcv-footer-links a { color: inherit; }

/* Coordinate the data plugin with the theme, including template shortcodes. */
.dcv-directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.dcv-card { border: 1px solid var(--dcv-line); border-radius: 16px !important; padding: 1.35rem; background: #fff; box-shadow: 0 8px 22px rgba(9,40,63,.06); }
.dcv-card h3 { margin: .2rem 0 .45rem; }
.dcv-card h3 a { color: var(--dcv-navy-dark); }
.dcv-card img { width: 100%; height: auto; border-radius: 10px; margin-bottom: .75rem; }
.dcv-meta { color: var(--dcv-muted); font-size: .95rem; }
.dcv-profile { max-width: none !important; }
.dcv-profile-summary { border-color: var(--dcv-teal) !important; background: var(--dcv-surface) !important; }
.dcv-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.dcv-source-link { display: inline-flex; align-items: center; padding: .58rem .75rem; border: 2px solid var(--dcv-navy) !important; border-radius: 8px; color: var(--dcv-navy) !important; text-decoration: none; font-size: .9rem; font-weight: 700; line-height: 1.2; }
.dcv-source-link:hover, .dcv-source-link:focus { background: var(--dcv-navy) !important; color: #fff !important; }
.dcv-verified { color: var(--dcv-muted); font-size: .82rem; margin-top: .8rem; }

@media (max-width: 760px) {
	html,
	body {
		max-width: 100%;
		overflow-x: hidden;
	}
	.dcv-site-header {
		padding-left: max(1.125rem, env(safe-area-inset-left));
		padding-right: max(1.125rem, env(safe-area-inset-right));
	}
	.dcv-header-inner {
		width: 100%;
		max-width: 100%;
		align-items: flex-start !important;
		flex-direction: column;
		gap: 1rem;
		padding: 1rem 0 !important;
	}
	.dcv-brand,
	.dcv-brand a {
		max-width: 100%;
		font-size: clamp(1.65rem, 7vw, 2.15rem) !important;
		line-height: 1.15;
		overflow-wrap: anywhere;
	}
	.dcv-main-nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		gap: .7rem 1rem;
		white-space: normal;
	}
	.dcv-main-nav a {
		min-width: 0;
		overflow-wrap: anywhere;
	}
	.dcv-content-shell {
		width: auto !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: max(1.125rem, env(safe-area-inset-left)) !important;
		padding-right: max(1.125rem, env(safe-area-inset-right)) !important;
	}
	.dcv-section {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: max(1.125rem, env(safe-area-inset-left)) !important;
		padding-right: max(1.125rem, env(safe-area-inset-right)) !important;
	}
	.dcv-section-heading {
		width: 100%;
		max-width: 100%;
	}
	.dcv-page-title {
		font-size: clamp(2.15rem, 10vw, 3rem) !important;
		line-height: 1.08 !important;
		overflow-wrap: anywhere;
	}
	.dcv-content-shell > .has-large-font-size {
		font-size: clamp(1.15rem, 5.4vw, 1.4rem) !important;
		line-height: 1.45;
	}
	.dcv-browser,
	.dcv-level-section,
	.dcv-office-group,
	.dcv-card {
		max-width: 100%;
	}
	.dcv-candidate-search,
	.dcv-office-summary {
		min-width: 0;
	}
	.dcv-candidate-search {
		font-size: 1rem;
	}
	.dcv-election-strip { margin-left: 1rem !important; margin-right: 1rem !important; }
}
