/*
Theme Name: House Water HQ
Template: generatepress
Version: 1.0.0
Description: Child theme for housewaterhq.com — fast, answer-first, ad-friendly.
*/

/* ---------- Design tokens ---------- */
:root {
	--ink: #0F2A3A;          /* headings, header, dark tables */
	--text: #1F2F38;         /* body copy */
	--muted: #5A6F7B;        /* meta, captions */
	--teal: #0E7C86;         /* brand / links (4.9:1 on white) */
	--teal-dark: #0A5E66;    /* link hover */
	--teal-tint: #E7F3F4;    /* quick answer box */
	--aqua: #3FC1C9;         /* small accents on dark */
	--sand: #F6F4EF;         /* warm section background */
	--amber: #E8A33D;        /* highlight bar, badges (with dark text only) */
	--amber-tint: #FFF5E6;   /* warning callout */
	--rust: #B4472E;         /* danger text */
	--line: #E2E8EB;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(15,42,58,.06), 0 4px 16px rgba(15,42,58,.06);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
body { font-family: var(--font); color: var(--text); background: #fff; font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); font-weight: 800; margin-top: 2.2em; }
h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.6em; }
.entry-content > p, .entry-content > ul, .entry-content > ol { max-width: 72ch; }
.entry-content li { margin-bottom: .35em; }
img { border-radius: 10px; }
::selection { background: var(--teal-tint); }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.inside-header { padding-top: 14px; padding-bottom: 14px; }
.hw-logo { display: inline-flex; align-items: center; }
.hw-logo img { height: 40px; width: auto; border-radius: 0; display: block; }
.main-navigation, .main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a { color: var(--ink); font-weight: 600; font-size: 15.5px; padding-left: 14px; padding-right: 14px; line-height: 56px; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-category-ancestor > a,
.main-navigation .main-nav ul li.current-menu-parent > a { color: var(--teal); box-shadow: inset 0 -3px 0 var(--teal); }
.menu-toggle { color: var(--ink); }

/* ---------- Layout ---------- */
.site-content { padding-top: 28px; }
.one-container .site-content { padding-left: 24px; padding-right: 24px; }
.separate-containers .inside-article, .one-container .inside-article { padding: 0; }
.sidebar .widget { background: transparent; padding: 0; }
@media (min-width: 1025px) {
	.is-right-sidebar { position: sticky; top: 96px; align-self: flex-start; }
	.site-content { display: flex; align-items: flex-start; }
}

/* ---------- Breadcrumbs + post header ---------- */
.rank-math-breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.rank-math-breadcrumb a { color: var(--muted); text-decoration: none; }
.rank-math-breadcrumb a:hover { color: var(--teal); }
.hw-kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); text-decoration: none; margin-bottom: 8px; }
.hw-kicker::before { content: ""; display: inline-block; width: 22px; height: 3px; background: var(--amber); vertical-align: middle; margin-right: 8px; border-radius: 2px; }
.entry-header .entry-title { margin-bottom: 14px; }
.hw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14.5px; color: var(--muted); padding-bottom: 20px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.hw-meta strong { color: var(--ink); font-weight: 600; }
.hw-meta .hw-dot { width: 4px; height: 4px; border-radius: 50%; background: #B8C6CD; }
.hw-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-tint); color: var(--teal-dark); font-weight: 600; padding: 3px 10px; border-radius: 99px; font-size: 13px; }

/* ---------- Answer-first components ---------- */
.hw-answer { background: var(--teal-tint); border: 1px solid #CBE6E8; border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; }
.hw-answer__label { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 4px; }
.hw-answer p { margin: 0; font-size: 19px; color: var(--ink); }
.hw-answer p + p { margin-top: .6em; }

.hw-cost { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ink); color: #fff; border-radius: var(--radius); overflow: hidden; margin: 0 0 28px; }
.hw-cost__cell { padding: 18px 20px; border-right: 1px solid rgba(255,255,255,.12); }
.hw-cost__cell:last-child { border-right: 0; }
.hw-cost__k { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: #A9C3CE; font-weight: 700; }
.hw-cost__v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.hw-cost__cell--avg { background: var(--teal); }
.hw-cost__cell--avg .hw-cost__k { color: #D6F1F3; }
.hw-cost__note { grid-column: 1 / -1; font-size: 14px; color: #C9D8DF; padding: 10px 20px; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 600px) { .hw-cost { grid-template-columns: 1fr; } .hw-cost__cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); } }

.hw-callout { border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; border: 1px solid var(--line); background: var(--sand); }
.hw-callout__title { font-weight: 800; color: var(--ink); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.hw-callout p:last-child { margin-bottom: 0; }
.hw-callout--warn { background: var(--amber-tint); border-color: #F3D9AE; }
.hw-callout--warn .hw-callout__title { color: #8A4B0F; }
.hw-callout--danger { background: #FBEDEA; border-color: #EFC9BF; }
.hw-callout--danger .hw-callout__title { color: var(--rust); }
.hw-callout--pro { background: #fff; border: 2px solid var(--ink); }
.hw-callout--tip { background: var(--teal-tint); border-color: #CBE6E8; }

/* ---------- Tables ---------- */
.entry-content table, .wp-block-table table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 16px; margin: 0; }
.wp-block-table { margin: 24px 0; overflow-x: auto; }
.entry-content thead th { background: var(--ink); color: #fff; text-align: left; font-weight: 700; padding: 12px 14px; border: 0; }
.entry-content td { padding: 12px 14px; border: 0; border-top: 1px solid var(--line); vertical-align: top; }
.entry-content tbody tr:nth-child(even) td { background: #F8FAFB; }
.entry-content td:first-child { font-weight: 600; color: var(--ink); }

/* ---------- FAQ (details/summary) ---------- */
.entry-content details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin: 10px 0; background: #fff; }
.entry-content summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; position: relative; padding-right: 28px; }
.entry-content summary::-webkit-details-marker { display: none; }
.entry-content summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 22px; color: var(--teal); font-weight: 400; }
.entry-content details[open] summary::after { content: "–"; }
.entry-content details[open] { padding-bottom: 6px; }

/* ---------- Sidebar: TOC ---------- */
.hw-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 12px; margin-bottom: 24px; background: #fff; }
.hw-toc__title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.hw-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.hw-toc li { margin: 0; }
.hw-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.4; }
.hw-toc a:hover { color: var(--teal); }
.hw-toc a.is-active { border-left-color: var(--teal); color: var(--teal); font-weight: 600; }
.hw-toc--inline { display: none; }
@media (max-width: 1024px) { .hw-toc--inline { display: block; } .is-right-sidebar .hw-toc { display: none; } }
.hw-ad-slot { min-height: 250px; }

/* ---------- Author + related ---------- */
.hw-author { display: flex; gap: 16px; align-items: flex-start; background: var(--sand); border-radius: var(--radius); padding: 20px; margin: 40px 0 24px; }
.hw-author__mark { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.hw-author__mark img { width: 28px; height: 28px; border-radius: 0; }
.hw-author__name { font-weight: 800; color: var(--ink); }
.hw-author p { margin: 4px 0 0; font-size: 15.5px; color: var(--muted); }

.hw-related { margin: 36px 0 10px; }
.hw-related h2 { font-size: 1.35rem; margin: 0 0 14px; }
.hw-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .hw-cards { grid-template-columns: 1fr; } }
.hw-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hw-card:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-2px); }
.hw-card--img { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hw-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 0; }
.hw-card--img .hw-card__body { display: block; padding: 14px 18px 16px; }
.hw-card__cat { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--teal); }
.hw-card__title { display: block; font-weight: 700; color: var(--ink); font-size: 17.5px; line-height: 1.35; margin-top: 4px; }

.entry-content h2, .entry-content h3 { scroll-margin-top: 96px; }

/* ---------- Home ---------- */
.home #page { max-width: none; padding: 0; }
.home .site-content { display: block; padding: 0; }
.hw-hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hw-hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(63,193,201,.35), rgba(63,193,201,0) 65%); pointer-events: none; }
.hw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hw-hero .hw-wrap { padding-top: 72px; padding-bottom: 72px; position: relative; z-index: 1; }
.hw-hero h1 { color: #fff; max-width: 17ch; margin: 0 0 16px; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); }
.hw-hero h1 span { color: var(--aqua); }
.hw-hero p { color: #C9D8DF; font-size: 20px; max-width: 56ch; margin: 0 0 28px; }
.hw-search { display: flex; max-width: 560px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hw-search input[type=search] { flex: 1; border: 0; background: transparent; font-size: 17px; padding: 12px 14px; color: var(--text); min-width: 0; }
.hw-search input[type=search]:focus { outline: none; }
.hw-search button { background: var(--teal); color: #fff; border: 0; border-radius: 9px; padding: 0 22px; font-weight: 700; font-size: 16px; cursor: pointer; }
.hw-search button:hover { background: var(--teal-dark); }
.hw-hero__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hw-hero__pills a { color: #E3EEF2; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; padding: 6px 14px; font-size: 14.5px; text-decoration: none; }
.hw-hero__pills a:hover { border-color: var(--aqua); color: #fff; }

.hw-section { padding: 64px 0; }
.hw-section--sand { background: var(--sand); }
.hw-section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 26px; }
.hw-section__head h2 { margin: 0; }
.hw-section__head p { margin: 6px 0 0; color: var(--muted); }

.hw-faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; align-items: start; }
@media (max-width: 800px) { .hw-faq { grid-template-columns: 1fr; } }
.hw-faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.hw-faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 15px 28px 15px 0; list-style: none; position: relative; }
.hw-faq summary::-webkit-details-marker { display: none; }
.hw-faq summary::after { content: "+"; position: absolute; right: 0; top: 11px; font-size: 22px; color: var(--teal); }
.hw-faq details[open] summary::after { content: "–"; }
.hw-faq details p { margin: 0 0 16px; color: var(--text); font-size: 16.5px; }
.hw-silos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .hw-silos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hw-silos { grid-template-columns: 1fr; } }
.hw-silo { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hw-silo:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-3px); }
.hw-silo__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--teal-tint); display: grid; place-items: center; }
.hw-silo__icon svg { width: 26px; height: 26px; stroke: var(--teal); }
.hw-silo__title { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.hw-silo__desc { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.hw-silo__q { font-size: 14.5px; color: var(--text); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: auto; }
.hw-silo__q span { display: block; color: var(--teal); }

.hw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 800px) { .hw-steps { grid-template-columns: 1fr; } }
.hw-step__n { font-size: 14px; font-weight: 800; color: var(--ink); background: var(--amber); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 10px; }
.hw-step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.hw-step p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Images ---------- */
.hw-hero-img { margin: 0 0 28px; }
.hw-hero-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }
.hw-hero-img figcaption, .entry-content figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; text-align: left; }
.entry-content .wp-block-image { margin: 28px 0; }
.entry-content .wp-block-image img { border-radius: 12px; }
.single-post .featured-image { display: none; }

/* ---------- Archive (hub) ---------- */
.archive .site-main article .inside-article { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.archive .site-main article .post-image { grid-row: 1 / span 2; margin: 0; }
.archive .site-main article .post-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.archive .site-main article .entry-header, .archive .site-main article .entry-summary { grid-column: 2; }
.archive .entry-title a { color: var(--ink); text-decoration: none; }
.archive .entry-title a:hover { color: var(--teal); }
@media (max-width: 640px) { .archive .site-main article .inside-article { grid-template-columns: 1fr; } .archive .site-main article .post-image, .archive .site-main article .entry-header, .archive .site-main article .entry-summary { grid-column: auto; grid-row: auto; } }
.archive .page-header { background: var(--sand); border-radius: 16px; padding: 28px 30px; margin-bottom: 28px; }
.archive .page-header h1 { margin: 0 0 8px; }
.archive .taxonomy-description p { color: var(--text); max-width: 72ch; }
.archive .inside-article { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 24px; }
.archive .entry-title { font-size: 1.35rem; }
.archive .entry-summary p { color: var(--muted); }

/* ---------- Pages ---------- */
.page .entry-content > * { max-width: 760px; }
.hw-contact { background: var(--sand); border-radius: 16px; padding: 24px 28px; }
.hw-contact a.hw-btn { display: inline-block; background: var(--teal); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; margin-top: 6px; }
.hw-contact a.hw-btn:hover { background: var(--teal-dark); color: #fff; }

/* ---------- Footer ---------- */
.site-footer, .site-info { background: var(--ink); color: #A9C3CE; }
.hw-footer { padding: 48px 0 28px; }
.hw-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .hw-footer__grid { grid-template-columns: 1fr; } }
.hw-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.hw-footer ul { list-style: none; margin: 0; padding: 0; }
.hw-footer li { margin: 0 0 8px; }
.hw-footer a { color: #D6E3E9; text-decoration: none; font-size: 15.5px; }
.hw-footer a:hover { color: #fff; text-decoration: underline; }
.hw-footer p { font-size: 15px; color: #A9C3CE; max-width: 40ch; }
.hw-footer__logo img { height: 34px; border-radius: 0; filter: brightness(0) invert(1); }
.hw-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.site-info { display: none; }

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