/*
Theme Name: Hurst Home
Theme URI: https://ledgermarketing.com
Author: Ledger Marketing
Author URI: https://ledgermarketing.com
Description: Custom block theme for Hurst Home Insurance Company of Lexington, Kentucky. Serving Kentucky policyholders since 1891.
Version: 1.0.4
Requires at least: 6.5
Tested up to: 7.0
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: hurst-home
*/

/* ==========================================================================
   Base / block-gap resets (prevents body-color strips between full bands)
   ========================================================================== */
.wp-site-blocks > * { margin-block: 0; }
.wp-site-blocks main .alignfull { margin-block: 0; }
.hh-header > *, .hh-footer > * { margin-block: 0 !important; }

body { -webkit-font-smoothing: antialiased; }

/* Raw-HTML images (patterns use wp:html) miss core's image reset — constrain them all. */
main img, .hh-footer img { max-width: 100%; height: auto; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.wp-block-button__link { transition: background-color .18s ease, color .18s ease; }

.hh-btn-pay a.wp-element-button,
a.hh-btn-pay {
	background: var(--wp--preset--color--brand);
	color: #fff !important;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
}
.hh-btn-pay a.wp-element-button:hover,
a.hh-btn-pay:hover { background: var(--wp--preset--color--brand-dark); color: #fff !important; }

/* White button reserved for colored bands (orange pay band, ink bands) */
.hh-btn-white a.wp-element-button {
	background: #fff;
	color: var(--wp--preset--color--ink) !important;
	border-radius: 8px;
	font-weight: 700;
}
.hh-btn-white a.wp-element-button:hover { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--ink) !important; }

/* Outline-on-dark button */
.hh-btn-ghost a.wp-element-button {
	background: transparent;
	color: #fff !important;
	border: 2px solid rgba(255,255,255,.85);
	border-radius: 8px;
}
.hh-btn-ghost a.wp-element-button:hover { background: rgba(255,255,255,.14); color: #fff !important; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.hh-topbar { font-size: 0.84rem; letter-spacing: .01em; }
.hh-topbar p { margin: 0; }
.hh-topbar a { color: #fff; text-decoration: none; }
.hh-topbar a:hover { color: var(--wp--preset--color--sky-light); }
.hh-topbar .hh-topbar-note { color: rgba(255,255,255,.85); }

/* ==========================================================================
   Header (white)
   ========================================================================== */
.hh-header { background: #fff; box-shadow: 0 1px 0 rgba(28,51,64,.12); }
.hh-logo img { max-height: 64px; width: auto; display: block; }

/* Force header nav link color (core otherwise inherits theme text color) */
body .hh-header nav.wp-block-navigation a {
	color: var(--wp--preset--color--ink) !important;
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: none;
}
body .hh-header nav.wp-block-navigation a:hover { color: var(--wp--preset--color--brand-dark) !important; }
body .hh-header nav.wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--brand-dark) !important; }

/* Open mobile overlay: must out-specify the desktop rule above */
body .hh-header .wp-block-navigation__responsive-container.is-menu-open {
	/* !important: WP 7.0 core paints the overlay white with a 5-class selector */
	background: var(--wp--preset--color--ink) !important;
	padding: 4.5rem 2rem 2rem;
}
body .hh-header .wp-block-navigation__responsive-container.is-menu-open a {
	color: #fff !important;
	font-size: 1.35rem;
	padding: .55rem 0;
}
body .hh-header .wp-block-navigation__responsive-container.is-menu-open a:hover { color: var(--wp--preset--color--sky-light) !important; }
body .hh-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
body .hh-header .wp-block-navigation__responsive-container.is-menu-open ul.wp-block-navigation__container {
	display: flex; flex-direction: column; align-items: center; gap: .25rem;
}
body .hh-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: center;
}
body .hh-header .wp-block-navigation__responsive-container-close { color: #fff; }
body .hh-header .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--ink); }

/* ==========================================================================
   Hero + dark bands: keep every heading/paragraph white
   ========================================================================== */
.hh-hero :where(h1,h2,h3,h4,p,li) { color: #fff; }
.hh-dark :where(h1,h2,h3,h4,p,li) { color: #fff; }
.hh-dark a:not(.wp-element-button) { color: var(--wp--preset--color--sky-light); }
.hh-dark a:not(.wp-element-button):hover { color: #fff; }
.hh-hero .hh-eyebrow, .hh-dark .hh-eyebrow { color: var(--wp--preset--color--sky-light); }

.hh-eyebrow {
	text-transform: uppercase;
	letter-spacing: .14em;
	font-weight: 700;
	font-size: .82rem;
	color: var(--wp--preset--color--brand-dark);
}

/* Page-header band (interior pages) */
.hh-pageband { position: relative; }
.hh-pageband :where(h1,p) { color: #fff; }

/* ==========================================================================
   Pay band (orange): white button with ink text, white headings
   ========================================================================== */
.hh-payband :where(h2,h3,p) { color: #fff; }
.hh-payband .hh-paynote { color: rgba(255,255,255,.92); }
.hh-payband .hh-paynote a { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Cards & grids (never core columns for many-item grids; no height:100%)
   ========================================================================== */
.hh-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
}
.hh-card {
	background: #fff;
	border: 1px solid rgba(28,51,64,.10);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(28,51,64,.06);
	display: flex;
	flex-direction: column;
}
.hh-card img { width: 100%; height: auto; display: block; }
.hh-card .hh-card-body { padding: 1.35rem 1.5rem 1.6rem; }
.hh-card h3 { margin: 0 0 .5rem; font-size: 1.3rem; }
.hh-card p { margin: 0; font-size: .98rem; }

/* Equal-height product cards inside core columns (guarded :only-child flex) */
.wp-block-column:has(> .hh-card:only-child) { display: flex; }
.wp-block-column > .hh-card:only-child { flex: 1 1 auto; height: auto; }

/* Quick-action tiles */
.hh-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25rem;
}
.hh-tile {
	display: block;
	background: #fff;
	border: 1px solid rgba(28,51,64,.10);
	border-left: 4px solid var(--wp--preset--color--brand);
	border-radius: 10px;
	padding: 1.3rem 1.4rem;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	box-shadow: 0 2px 8px rgba(28,51,64,.05);
	transition: transform .16s ease, box-shadow .16s ease;
}
.hh-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28,51,64,.12); }
.hh-tile strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 1.12rem; margin-bottom: .3rem; color: var(--wp--preset--color--ink); }
.hh-tile span { font-size: .9rem; color: #51616C; }

/* ==========================================================================
   Agent directory
   ========================================================================== */
.hh-agent-search {
	width: 100%;
	max-width: 460px;
	padding: .8rem 1.1rem;
	border: 2px solid rgba(28,51,64,.25);
	border-radius: 10px;
	font-size: 1rem;
	font-family: inherit;
}
.hh-agent-search:focus { outline: 2px solid var(--wp--preset--color--sky); border-color: var(--wp--preset--color--sky); }
.hh-agent-card { padding: 1.1rem 1.25rem; }
.hh-agent-card .hh-county {
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .74rem;
	font-weight: 700;
	color: var(--wp--preset--color--brand-dark);
	display: block;
	margin-bottom: .25rem;
}
.hh-agent-card strong { font-size: 1.05rem; color: var(--wp--preset--color--ink); display: block; margin-bottom: .3rem; line-height: 1.3; }
.hh-agent-card a { font-size: .98rem; text-decoration: none; font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.hh-footer { font-size: .95rem; }
.hh-footer :where(h2,h3,h4) { color: #fff; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; font-family: var(--wp--preset--font-family--sans); font-weight: 700; }
.hh-footer p, .hh-footer li { color: rgba(255,255,255,.88); }
.hh-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.hh-footer a:hover { color: var(--wp--preset--color--sky-light); }
.hh-footer .hh-footer-logo img { max-height: 56px; width: auto; }
.hh-footer ul { list-style: none; padding: 0; margin: 0; }
.hh-footer ul li { margin-bottom: .4rem; }
.hh-footer-legal { border-top: 1px solid rgba(255,255,255,.16); font-size: .84rem; }
.hh-footer-legal p { color: rgba(255,255,255,.65); margin: 0; }
.hh-footer-legal a { color: rgba(255,255,255,.8); text-decoration: underline; }

/* Ready reinsurer chip (white card on dark footer) — enable when artwork is confirmed */
.hh-reinsurer-chip {
	background: #fff;
	border-radius: 10px;
	padding: .8rem 1.1rem;
	display: inline-flex;
	align-items: center;
	gap: .75rem;
}
.hh-reinsurer-chip img { max-height: 44px; width: auto; }
.hh-reinsurer-chip .hh-chip-caption { color: var(--wp--preset--color--ink); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* ==========================================================================
   Misc
   ========================================================================== */
.hh-check-list { list-style: none; padding-left: 0; }
.hh-check-list li { padding-left: 1.7rem; position: relative; margin-bottom: .6rem; }
.hh-check-list li::before {
	content: "";
	position: absolute; left: 0; top: .42em;
	width: .85em; height: .5em;
	border-left: 3px solid var(--wp--preset--color--brand);
	border-bottom: 3px solid var(--wp--preset--color--brand);
	transform: rotate(-45deg);
}

.hh-contact-card { background: #fff; border-radius: 12px; border: 1px solid rgba(28,51,64,.1); padding: 1.8rem 2rem; box-shadow: 0 2px 10px rgba(28,51,64,.06); }
.hh-contact-card p { margin: 0 0 .65rem; }

.hh-rounded img { border-radius: 14px; }

@media (max-width: 781px) {
	.hh-logo img { max-height: 48px; }
	.hh-topbar .hh-topbar-note { display: none; }
	.hh-header .hh-btn-pay a.wp-element-button { padding: .5em 1em; font-size: .9rem; }
}
