/*
Theme Name: BasinVerdict
Theme URI: https://basinverdict.com/
Author: BasinVerdict
Description: Fast, clean theme for BasinVerdict.com. Sticky header with automatic menus, link-rich footer, readable page layout, and full support for the BasinVerdict Site Map Manager plugin. Mobile and tablet first.
Version: 1.0.9
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: basinverdict
*/

:root {
	--bv-ink: #13232E;
	--bv-muted: #5B6B75;
	--bv-line: #DCE4E9;
	--bv-soft: #F6F8F9;
	--bv-brand: #0E5A7A;
	--bv-brand-soft: #E5F0F5;
	--bv-deep: #0A2F40;
	--bv-cta: #E8A33D;
	--bv-cta-ink: #2A1B00;
	--bv-radius: 12px;
	--bv-content: 760px;
	--bv-wide: 1180px;
	--bv-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
html, body { overflow-x: clip; }
body { margin: 0; background: #fff; color: var(--bv-ink); font-family: var(--bv-font); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--bv-brand); text-underline-offset: 3px; }
a:hover { color: var(--bv-deep); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--bv-ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.8rem); margin: 1.9em 0 .6em; }
h3 { font-size: 1.22rem; margin: 1.5em 0 .5em; }
p, ul, ol { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--bv-cta); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: #fff; padding: 10px 14px; border-radius: 8px; clip: auto; width: auto; height: auto; }
.bv-container { max-width: var(--bv-wide); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--bv-line); backdrop-filter: saturate(160%) blur(8px); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bv-ink); flex: 0 0 auto; }
.site-brand svg { width: 34px; height: 34px; display: block; }
.site-brand .custom-logo { max-height: 40px; width: auto; }
.brand-word { font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; }
.brand-word span { color: var(--bv-brand); }
.primary-nav { margin-left: auto; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--bv-ink); cursor: pointer; }
.icon-btn:hover { background: var(--bv-brand-soft); color: var(--bv-brand); }
.icon-btn svg { width: 22px; height: 22px; }
.header-cta { display: none; font-weight: 700; font-size: .92rem; text-decoration: none; padding: 9px 14px; border-radius: 999px; border: 2px solid var(--bv-brand); color: var(--bv-brand); }
.header-cta:hover { background: var(--bv-brand); color: #fff; }

/* Mobile menu (default) */
.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--bv-line); box-shadow: 0 14px 30px rgba(10, 47, 64, .12); max-height: calc(100vh - 66px); overflow-y: auto; }
.primary-nav.is-open { display: block; }
.primary-nav .menu-list > li { border-top: 1px solid var(--bv-line); position: relative; }
.primary-nav .menu-list > li > a, .primary-nav .menu-label { display: block; padding: 14px 20px; font-weight: 700; color: var(--bv-ink); text-decoration: none; }
.primary-nav .menu-label { background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: left; width: 100%; }
.sub-toggle { position: absolute; right: 8px; top: 4px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; color: var(--bv-muted); }
.sub-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub-menu { display: none; list-style: none; margin: 0; padding: 0 0 10px; background: var(--bv-soft); }
.sub-menu.is-open { display: block; }
.sub-menu a { display: block; padding: 10px 20px 10px 34px; color: var(--bv-ink); text-decoration: none; font-size: .96rem; }
.sub-menu .view-all a { color: var(--bv-brand); font-weight: 700; }
.search-panel { display: none; border-top: 1px solid var(--bv-line); background: #fff; padding: 12px 0; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border: 1px solid var(--bv-line); border-radius: 999px; background: var(--bv-soft); }
.search-form button { font: inherit; font-weight: 700; padding: 11px 18px; border: 0; border-radius: 999px; background: var(--bv-brand); color: #fff; cursor: pointer; }

/* Desktop menu */
@media (min-width: 1024px) {
	.menu-toggle { display: none; }
	.header-cta { display: inline-block; }
	.header-actions { margin-left: 8px; }
	.primary-nav { display: block; position: static; box-shadow: none; border: 0; background: transparent; max-height: none; overflow: visible; }
	.primary-nav .menu-list { display: flex; gap: 2px; }
	.primary-nav .menu-list > li { border: 0; }
	.primary-nav .menu-list > li > a, .primary-nav .menu-label { padding: 10px 12px; border-radius: 8px; font-size: .95rem; width: auto; }
	.primary-nav .menu-label:hover { color: var(--bv-brand); background: var(--bv-brand-soft); }
	.primary-nav .menu-list > li > a:hover, .primary-nav .menu-list > li.current > a { color: var(--bv-brand); background: var(--bv-brand-soft); }
	.sub-toggle { display: none; }
	.sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 270px; background: #fff; border: 1px solid var(--bv-line); border-radius: 12px; padding: 8px; box-shadow: 0 18px 40px rgba(10, 47, 64, .14); }
	.sub-menu a { padding: 9px 12px; border-radius: 8px; font-size: .92rem; }
	.sub-menu a:hover { background: var(--bv-brand-soft); color: var(--bv-brand); }
	.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { display: block; }
}

/* ---------- Page layout ---------- */
.site-main { padding: 28px 0 56px; }
.bv-article { background: transparent; border: 0; border-radius: 0; padding: 4px 0 32px; }
@media (min-width: 720px) { .bv-article { padding: 8px 0 44px; } }
.entry-header, .entry-content { max-width: var(--bv-content); margin: 0 auto; }
.entry-header { margin-bottom: 18px; }
.entry-header .bv-breadcrumbs { font-size: .86rem; color: var(--bv-muted); margin: 0 0 8px; }
.entry-header .bv-breadcrumbs a { color: var(--bv-muted); text-decoration: none; }
.entry-header .bv-breadcrumbs a:hover { color: var(--bv-brand); }
.entry-meta { color: var(--bv-muted); font-size: .9rem; margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.entry-meta strong { color: var(--bv-ink); font-weight: 700; }
.entry-date { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--bv-brand-soft); color: var(--bv-deep); font-weight: 600; }
.entry-date svg { width: 15px; height: 15px; color: var(--bv-brand); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content table { border-collapse: collapse; }
.home .bv-article { background: transparent; border: 0; padding-left: 0; padding-right: 0; }
.home .entry-content { max-width: none; }

/* Wide components break out of the reading column on large screens */
@media (min-width: 1100px) {
	.entry-content > .bv-picks, .entry-content > .bv-table-wrap, .entry-content > .bv-cards {
		width: 960px; margin-left: calc(50% - 480px); margin-right: 0;
	}
	.home .entry-content > .bv-picks, .home .entry-content > .bv-table-wrap, .home .entry-content > .bv-cards { width: auto; margin-left: 0; }
}

/* Lists, archives, 404 */
.archive-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.archive-list a { display: block; padding: 16px 18px; background: #fff; border: 1px solid var(--bv-line); border-radius: 12px; text-decoration: none; color: var(--bv-ink); font-weight: 700; }
.archive-list a:hover { border-color: var(--bv-brand); }
.archive-list p { margin: 4px 0 0; color: var(--bv-muted); font-weight: 400; font-size: .94rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bv-deep); color: #C9D8E0; padding: 48px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-main { display: grid; gap: 28px; padding-bottom: 32px; }
.footer-about { display: grid; gap: 14px; justify-items: start; padding-bottom: 26px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-about .site-brand { color: #fff; }
.footer-about .brand-word span { color: #8FD0EA; }
.footer-tagline { max-width: 440px; margin: 0; line-height: 1.6; }
.footer-test { display: inline-block; font-weight: 700; padding: 10px 18px; border-radius: 999px; background: var(--bv-cta); color: var(--bv-cta-ink) !important; white-space: nowrap; }
.footer-test:hover { text-decoration: none !important; filter: brightness(.95); }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.footer-col h2 { color: #fff; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid rgba(143, 208, 234, .35); display: inline-block; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 10px; line-height: 1.4; }
.footer-col a { color: #C9D8E0; }
.footer-col a:hover { color: #fff; }
.footer-menu ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; font-size: .85rem; line-height: 1.6; display: grid; gap: 8px; }
.footer-bottom p { margin: 0; }
.footer-top-link { color: #8FD0EA !important; font-weight: 600; justify-self: start; }
@media (min-width: 720px) {
	.footer-about { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 32px; }
	.footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.footer-bottom { grid-template-columns: 1fr auto; align-items: end; }
	.footer-bottom p:first-child { grid-column: 1 / -1; }
	.footer-top-link { justify-self: end; }
}
@media (min-width: 1024px) {
	.footer-main { gap: 32px; }
	.footer-cols { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}


/* Pills (also used on the 404 page) */
.bv-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.bv-pills li { margin: 0; }
.bv-pills a { display: inline-block; padding: 8px 14px; border: 1px solid var(--bv-line); border-radius: 999px; background: #fff; color: var(--bv-ink); text-decoration: none; font-weight: 600; font-size: .92em; }
.bv-pills a:hover { border-color: var(--bv-brand); color: var(--bv-brand); }

/* Full-width colored sections: the background runs edge to edge, the content stays in the reading column.
   Add class="bv-band" to a section (the theme also detects big colored sections automatically).
   Add class="bv-no-band" to keep a colored box inside the column. */
.entry-content .bv-band {
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	width: auto !important;
	max-width: none !important;
	border-radius: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	box-shadow: none !important;
	padding-left: max(16px, calc(50vw - 50%)) !important;
	padding-right: max(16px, calc(50vw - 50%)) !important;
	box-sizing: border-box;
}
.entry-content .bv-band:first-child { margin-top: 0 !important; }

/* No gap between the header and a full-width hero, or between a last full-width section and the footer. */
.bv-flush-top .site-main, .bv-flush-top .bv-article { padding-top: 0; }
.bv-flush-top .entry-content .bv-band-first { margin-top: 0 !important; }
.bv-flush-bottom .site-main, .bv-flush-bottom .bv-article { padding-bottom: 0; }
.bv-flush-bottom .entry-content .bv-band-last { margin-bottom: 0 !important; }
.bv-flush-top .entry-content > .bv-page, .bv-flush-bottom .entry-content > .bv-page { margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
.bv-flush-bottom .site-footer { border-top: 1px solid rgba(255, 255, 255, .1); }

/* Header: About links (phone menu group) */
.primary-nav .menu-about-sub > a { font-weight: 600 !important; color: var(--bv-muted, #5B6B75) !important; padding-top: 11px !important; padding-bottom: 11px !important; }
.primary-nav .menu-about-sub.menu-about-first { border-top: 6px solid var(--bv-soft, #F6F8F9) !important; }
@media (min-width: 1024px) {
	.primary-nav .mobile-only { display: none; }
	.primary-nav .menu-about > a { color: var(--bv-ink) !important; font-weight: 700 !important; padding: 10px 12px !important; }
}

/* Author card */
.bv-author-card { display: flex; gap: 18px; align-items: flex-start; margin: 3em 0 0; padding: 22px; background: var(--bv-soft); border: 1px solid var(--bv-line); border-left: 4px solid var(--bv-brand); border-radius: 16px; }
.bv-ac-photo { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--bv-line); }
.bv-ac-initials { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bv-deep), var(--bv-brand)); color: #fff; font-weight: 800; font-size: 1.5rem; letter-spacing: .02em; }
.bv-ac-body { min-width: 0; flex: 1; }
.bv-author-card p { margin: 0; }
.bv-ac-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bv-muted); }
.bv-ac-name { font-size: 1.15rem; font-weight: 800; color: var(--bv-ink); line-height: 1.3; margin-top: 2px !important; }
.bv-ac-name a { color: inherit; text-decoration: none; }
.bv-ac-name a:hover { color: var(--bv-brand); }
.bv-ac-role { font-size: .9rem; font-weight: 600; color: var(--bv-brand); margin-top: 2px !important; }
.bv-ac-bio { font-size: .95rem; line-height: 1.6; color: var(--bv-ink); margin-top: 10px !important; }
@media (max-width: 560px) {
	.bv-author-card { padding: 18px; gap: 14px; }
	.bv-ac-photo { flex-basis: 56px; width: 56px; height: 56px; }
	.bv-ac-initials { font-size: 1.2rem; }
}
