/*
Theme Name: Tri State Heroes & Youth
Theme URI: https://example.org/
Author: Mohave IT
Description: Single-page block theme for Tri State Heroes & Youth, Inc., a 501(c)(3) honoring Tri-State first responders and supporting local youth. Every section is built from standard WordPress blocks, so text, images and donate buttons can be edited in the page editor.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 6.8
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: tri-state-heroes
*/

:root {
	--c-ink: var(--wp--preset--color--ink);
	--c-shield: var(--wp--preset--color--shield);
	--c-red: var(--wp--preset--color--red);
	--c-brass: var(--wp--preset--color--brass);
	--c-brass-2: var(--wp--preset--color--brass-light);
	--c-paper: var(--wp--preset--color--paper);
	--c-text: var(--wp--preset--color--charcoal);
	--c-muted: var(--wp--preset--color--muted);
	--c-line: var(--wp--preset--color--line);
	--l-red: #E03A3A; --l-green: #23A455; --l-gold: #E9B92C; --l-blue: #3E66DA;
	--f-display: var(--wp--preset--font-family--display);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { -webkit-font-smoothing: antialiased; }
[id] { scroll-margin-top: 80px; }
h1, h2, h3, h4 { text-wrap: balance; font-stretch: 92%; }

/* Full-width sections sit flush against each other */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; margin-block-end: 0; }

/* ---------- Header ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
.site-header { padding-block: .7rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header-inner { gap: 1rem; }
.site-header .brand { gap: .65rem; }
.site-header .wp-block-site-title { margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 90%; font-size: 1.05rem; line-height: 1.1; }
.site-header .wp-block-site-title a { color: #fff; text-decoration: none; }
.site-header .header-right { gap: 1.4rem; }
.site-header .wp-block-navigation { font-family: var(--f-display); font-weight: 600; font-size: .92rem; gap: 1.3rem; }
.site-header .wp-block-navigation a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-header .wp-block-navigation a:hover { color: #fff; }
.site-header .wp-block-button__link { padding: .7rem 1.05rem; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--c-shield) !important; color: #fff !important; }
.wp-block-navigation__responsive-container.is-menu-open a { font-size: 1.3rem; }
@media (max-width: 480px) {
	.site-header .wp-block-site-title { font-size: .85rem; max-width: 13ch; }
	.site-header .header-right { gap: .6rem; }
}

/* ---------- Shared bits ---------- */
.tshy-sec { padding-block: clamp(4rem, 9vw, 7rem); }
.eyebrow { font-family: var(--f-display); font-weight: 700; font-size: .85rem; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; color: var(--c-red); display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem !important; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; flex: none; }
.has-ink-background-color .eyebrow, .has-shield-background-color .eyebrow { color: var(--c-brass-2); }
.lede { font-size: 1.15rem; color: var(--c-muted); max-width: 62ch; }
.has-ink-background-color .lede, .has-shield-background-color .lede { color: rgba(255,255,255,.86); }
.tshy-sec h2 { margin-top: 0; }
.wp-block-columns.gap-lg { gap: clamp(2rem, 6vw, 5rem); }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; }
.has-ink-background-color .is-style-outline > .wp-block-button__link,
.has-shield-background-color .is-style-outline > .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.5); }
.has-ink-background-color .is-style-outline > .wp-block-button__link:hover { border-color: #fff; }

/* ---------- Hero ---------- */
.tshy-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.tshy-hero::before {
	content: ""; position: absolute; inset: -20% -10%; z-index: -2;
	background: repeating-linear-gradient(-8deg, rgba(179,23,44,.20) 0 38px, rgba(255,255,255,.035) 38px 76px);
	-webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%); mask-image: linear-gradient(100deg, transparent 20%, #000 75%);
}
.tshy-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.6px); background-size: 26px 26px;
	-webkit-mask-image: radial-gradient(ellipse 40% 60% at 0% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse 40% 60% at 0% 0%, #000, transparent 70%);
}
.tshy-hero .hero-cols { gap: clamp(2rem, 5vw, 4.5rem); }
.hero-title { font-weight: 900; font-stretch: 88%; letter-spacing: -.02em; margin-block: .2rem 1.2rem; }
.hero-title em { font-style: normal; color: var(--c-brass-2); }
.tshy-hero .wp-block-buttons { margin-top: 2rem; }
.towns { margin-top: 2.2rem !important; color: rgba(255,255,255,.75); font-size: 1rem; }
.towns strong { color: #fff; font-weight: 600; }
.hero-logo img { max-width: 380px; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.55)); }
@media (max-width: 781px) {
	.tshy-hero .hero-cols { flex-direction: column-reverse; }
	.hero-logo img { max-width: 240px; }
}

/* ---------- Events strip ---------- */
.tshy-strip { position: relative; padding-block: 0 5px; }
.tshy-strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
	background: linear-gradient(90deg, var(--l-red) 0 25%, var(--l-green) 25% 50%, var(--l-gold) 50% 75%, var(--l-blue) 75%); }
.tshy-strip .strip-cols { gap: 0; margin-block: 0; }
.tshy-strip .wp-block-column + .wp-block-column { border-left: 1px solid rgba(255,255,255,.12); padding-left: 1.5rem; }
.next { gap: 1.2rem; padding-block: 1.4rem; }
.cal { flex: none; width: 64px; text-align: center; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.cal > * { margin: 0 !important; }
.cal-m { background: var(--c-red); font-family: var(--f-display); font-weight: 700; font-size: .8rem; line-height: 1; letter-spacing: .08em; text-transform: uppercase; padding: .35rem 0; }
.cal-d { font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; line-height: 1; padding: .35rem 0 .45rem; }
.next-text > * { margin: 0 !important; }
.next-k { font-family: var(--f-display); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-brass-2); }
.next-t { font-size: 1.2rem !important; font-weight: 700; margin-top: .25rem !important; letter-spacing: 0; }
.next-s { font-size: .95rem; color: rgba(255,255,255,.8); }
@media (max-width: 781px) {
	.tshy-strip .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-left: 0; }
}

/* ---------- Mission ---------- */
.tshy-quote { border-left: 3px solid var(--c-red); padding-left: 1.4rem; margin: 1.6rem 0 0; }
.tshy-quote p { font-size: clamp(1.2rem, 2.3vw, 1.5rem); line-height: 1.45; font-weight: 500; }
.pillar { gap: 1rem; margin-bottom: 1.6rem; }
.pillar-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: var(--c-brass-2); font-family: var(--f-display); font-weight: 800; font-size: .95rem; margin: 0 !important; }
.pillar h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 .3rem; }
.pillar p { color: var(--c-muted); margin: 0; }

/* ---------- Programs ---------- */
#programs { border-block: 1px solid var(--c-line); }
.prog-cols { margin-top: 2.5rem; gap: clamp(1.25rem, 3vw, 2rem); }
.prog { border: 1px solid var(--c-line); border-radius: 6px; overflow: hidden; background: var(--c-paper); height: 100%; }
.prog > * { margin: 0 !important; }
.prog-top { padding: 1.6rem 1.6rem 1.4rem; }
.prog-top > * { margin: 0; }
.prog-when { font-family: var(--f-display); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-brass-2); }
.prog-top h3 { margin-top: .55rem; }
.prog-body { padding: 1.6rem; }
.prog-body > p:not(.status) { color: var(--c-muted); }
.status { display: inline-flex !important; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; line-height: 1; padding: .5rem .75rem; border-radius: 3px; background: #FBEFF1; color: var(--c-red); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.open { background: #E7F6EC; color: #18803F; }
.facts { padding-left: 0; list-style: none; font-size: .98rem; color: var(--c-muted); display: grid; gap: .45rem; }
.facts strong { color: var(--c-text); }
.grant { margin-top: 2rem !important; padding: 1.8rem; border: 1px dashed #B9C0CC; border-radius: 6px; }
.grant h3 { margin: 0; }
.grant p:not(.eyebrow) { color: var(--c-muted); margin: 0; }

/* ---------- Impact ---------- */
.stats { gap: 0; border-block: 1px solid rgba(255,255,255,.14); margin-block: 2.5rem 3.5rem; }
.stat { padding-block: 1.8rem; padding-right: 1.2rem; }
.stat + .stat { padding-left: 1.4rem; border-left: 1px solid rgba(255,255,255,.14); }
.stat > * { margin: 0 !important; }
.stat-n { font-family: var(--f-display); font-weight: 800; font-stretch: 90%; font-size: clamp(2.3rem, 4.6vw, 3.3rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat-l { margin-top: .6rem !important; color: rgba(255,255,255,.82); max-width: 22ch; }
@media (max-width: 781px) {
	.stats { flex-wrap: wrap !important; }
	.stats .stat { flex-basis: 50% !important; }
	.stat + .stat { border-left: 0; padding-left: 0; }
	.stat:nth-child(even) { padding-left: 1.2rem; border-left: 1px solid rgba(255,255,255,.14); }
	.stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.14); }
}
.budget-title { font-size: 1.5rem !important; margin-bottom: .3rem; }
.budget-note { color: rgba(255,255,255,.82); margin-top: 0; }
.budget-bar { display: flex; height: 54px; border-radius: 4px; overflow: hidden; gap: 3px; margin-top: 1.4rem; }
.budget-bar div { display: flex; align-items: center; padding-inline: .8rem; font-family: var(--f-display); font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; }
.b1 { background: var(--c-red); } .b2 { background: #3E66DA; } .b3 { background: #6B7890; } .b4 { background: var(--c-brass); }
.budget-bar .b4 { color: var(--c-shield); }
.budget-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.2rem; font-size: .95rem; }
.budget-legend > div { display: grid; grid-template-columns: 12px 1fr; gap: .6rem; align-items: start; }
.budget-legend i { width: 12px; height: 12px; border-radius: 2px; margin-top: .4rem; }
.budget-legend p { margin: 0; }
.budget-legend b { display: block; color: #fff; font-variant-numeric: tabular-nums; }
.budget-legend span { color: rgba(255,255,255,.8); }
@media (max-width: 720px) { .budget-legend { grid-template-columns: 1fr 1fr; } .budget-bar div { font-size: 0; padding: 0; } }

/* ---------- Give ---------- */
.tier { gap: 1.2rem; background: #fff; border: 1px solid var(--c-line); border-radius: 5px; padding: 1.05rem 1.3rem; margin-top: .7rem !important; }
.tier > * { margin: 0 !important; }
.tier-text { flex: 1; min-width: 0; }
.tier-text h4 { margin: 0; }
.tier-text p { margin: .1rem 0 0; font-size: .97rem; color: var(--c-muted); }
.medal { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: .72rem; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.m-plat { background: linear-gradient(135deg,#9AA6B8,#E6EAF0 50%,#8792A5); color: var(--c-ink); }
.m-gold { background: linear-gradient(135deg,#B8862C,#F2D27A 50%,#A87A24); color: var(--c-shield); }
.m-silv { background: linear-gradient(135deg,#8C939E,#DADDE2 50%,#7D8490); color: var(--c-shield); }
.m-brnz { background: linear-gradient(135deg,#8A5530,#D39A6A 50%,#7A4826); }
.m-frnd { background: var(--c-red); }
.tier-amt { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.small-note { color: var(--c-muted); font-size: .95rem; }
.panel { border-radius: 6px; padding: 1.8rem; position: sticky; top: 100px; }
.panel h3 { margin-top: 0; }
.panel p { color: rgba(255,255,255,.88); font-size: 1rem; }
.donate-buttons { flex-direction: column; align-items: stretch; gap: .7rem; }
.donate-buttons .wp-block-button { width: 100%; }
.donate-buttons .wp-block-button__link { width: 100%; font-size: 1.05rem; padding-block: 1.05rem; }
.panel-sep { border-color: rgba(255,255,255,.18) !important; opacity: 1; margin-block: 1.6rem !important; }
.addr { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: 1rem 1.1rem; font-weight: 600; color: #fff !important; }
.fine { font-size: .9rem !important; color: rgba(255,255,255,.72) !important; }
@media (max-width: 781px) { .panel { position: static; } .tier-amt { font-size: 1.3rem; } }

/* ---------- Sponsor wall ---------- */
#supporters { border-block: 1px solid var(--c-line); }
.sponsor-wall { margin-top: 2.5rem !important; --wp--style--unstable-gallery-gap: 1rem; gap: 1.6rem 1rem !important; }
.sponsor-wall.wp-block-gallery.has-nested-images figure.wp-block-image { flex-direction: column; justify-content: flex-start; align-self: flex-start; }
.sponsor-wall.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img,
.sponsor-wall.wp-block-gallery.has-nested-images figure.wp-block-image img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; flex: none; border-radius: 4px; box-shadow: 0 1px 2px rgba(13,24,40,.08), 0 10px 24px -12px rgba(13,24,40,.35); transition: transform .2s ease; }
.sponsor-wall figure.wp-block-image:hover img { transform: translateY(-4px) rotate(-.6deg); }
.sponsor-wall.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position: static; background: none; color: var(--c-text); text-shadow: none; padding: .7rem 0 0; margin: 0; text-align: left; max-height: none; overflow: visible; font-size: .98rem; line-height: 1.35; }
.sponsor-wall figcaption strong { font-weight: 700; }
.sponsor-wall.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }

/* ---------- Get involved ---------- */
.inv-cols { margin-top: 2.5rem; gap: 1.25rem; }
.inv { border-top: 3px solid var(--c-text); padding-top: 1.8rem; }
.inv-red { border-color: var(--l-red); } .inv-gold { border-color: var(--l-gold); } .inv-blue { border-color: var(--l-blue); }
.inv-k { font-family: var(--f-display); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin: 0; }
.inv h3 { margin-top: .5rem; }
.inv p:not(.inv-k), .inv ul { color: var(--c-muted); }
.inv ul { padding-left: 1.1rem; display: grid; gap: .3rem; }

/* ---------- Transparency ---------- */
.star-list { list-style: none; padding: 0; display: grid; gap: .8rem; margin-top: 1.6rem; }
.star-list li { display: grid; grid-template-columns: 20px 1fr; gap: .7rem; color: rgba(255,255,255,.86); }
.star-list li::before { content: "★"; color: var(--c-brass); font-size: .9rem; line-height: 1.8; }
.wp-block-table.ledger { margin: 0; }
.wp-block-table.ledger table { border: 1px solid rgba(255,255,255,.16); border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; }
.wp-block-table.ledger td { border: 0; border-bottom: 1px solid rgba(255,255,255,.1); padding: 1rem 1.3rem; color: rgba(255,255,255,.75); }
.wp-block-table.ledger td:last-child { text-align: right; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.wp-block-table.ledger tr:last-child td { border-bottom: 0; }
.wp-block-table.ledger tr:first-child td { background: rgba(201,160,74,.12); }
.wp-block-table.ledger tr:first-child td:last-child, .wp-block-table.ledger tr:first-child strong { color: var(--c-brass-2); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.2rem; border-top: 1px solid rgba(255,255,255,.1); }
.site-footer .wp-block-group { gap: 1rem 3rem; align-items: center; }
.site-footer p { margin: 0; }
.motto { font-family: var(--f-display); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: 1rem; }
.motto .star { color: var(--c-brass); margin-inline: .35em; }
.footer-small { font-size: .88rem; color: rgba(255,255,255,.75); }

/* ---------- Regular pages and posts ---------- */
.tshy-page { padding-block: clamp(3rem, 7vw, 5rem); }

/* Keep intro paragraphs left-aligned inside centered sections */
.is-layout-constrained > .lede { box-sizing: border-box; max-width: var(--wp--style--global--content-size) !important; padding-right: max(0px, calc(min(100%, var(--wp--style--global--content-size)) - 62ch)); }

/* ---------- Gallery style: Scrolling row ---------- */
.wp-block-gallery.has-nested-images.is-style-scroll-row {
	flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
	padding-block: 8px 14px; scrollbar-width: thin; scrollbar-color: var(--c-line) transparent;
	--scroll-per-view: 5;
}
.wp-block-gallery.has-nested-images.is-style-scroll-row figure.wp-block-image:not(#individual-image) {
	flex: 0 0 calc((100% - (var(--scroll-per-view) - 1) * 1rem) / var(--scroll-per-view)) !important;
	width: auto !important; scroll-snap-align: start;
}
@media (max-width: 1000px) { .wp-block-gallery.has-nested-images.is-style-scroll-row { --scroll-per-view: 3; } }
@media (max-width: 600px)  { .wp-block-gallery.has-nested-images.is-style-scroll-row { --scroll-per-view: 1.6; } }
.scroll-row-nav { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .6rem; }
.scroll-row-nav[hidden] { display: none; }
.scroll-row-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--c-ink); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
.scroll-row-btn:hover { background: var(--c-red); }
.scroll-row-btn:disabled { opacity: .3; cursor: default; background: var(--c-ink); }
.scroll-row-btn:focus-visible { outline: 3px solid var(--c-brass); outline-offset: 3px; }
