/*
Theme Name: Heritage Mutual
Theme URI: https://heritagemutual.net
Author: Ledger Marketing
Author URI: https://ledgermarketing.com
Description: Custom block theme for Heritage Mutual Insurance Association — policyholder-owned Iowa mutual insurance since 1874.
Version: 1.0.5
Requires at least: 6.4
Tested up to: 6.7
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: heritage-mutual
*/

/* ==========================================================================
   Global structure — kill block-gap strips between full-width sections
   ========================================================================== */

.wp-site-blocks > * { margin-block: 0; }
.wp-site-blocks main .alignfull { margin-block: 0; }
.hmi-header > *, .hmi-footer > * { margin-block: 0 !important; }

body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ==========================================================================
   Header
   ========================================================================== */

.hmi-topline { font-size: 0.82rem; letter-spacing: 0.02em; }
.hmi-topline a { color: #fff !important; text-decoration: none; }
.hmi-topline a:hover { color: #FDE134 !important; }

.hmi-logo-bar { background: #fff; }
.hmi-logo-img { display: block; height: 72px; width: auto; }

/* Header nav — force ink links on the white bar */
body .hmi-header nav.wp-block-navigation a {
	color: #111A3E !important;
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: none;
}
body .hmi-header nav.wp-block-navigation a:hover { color: #263D96 !important; }

/* …but the OPEN mobile overlay must win over the rule above (dark bg) */
/* !important needed: core (WP 6.7+) ships `.wp-block-navigation:not(.has-background) …
   .is-menu-open { background-color:#fff }` at higher specificity */
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open {
	background: #111A3E !important;
	color: #fff !important;
	padding: 5rem 2rem 2rem !important;
}
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open a {
	color: #fff !important;
	font-size: 1.3rem;
	padding: 0.55rem 0;
}
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open a:hover { color: #FDE134 !important; }
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center;
}
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: center;
}
body .hmi-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center;
	gap: 0.4rem;
}
/* close + open toggles */
body .hmi-header .wp-block-navigation__responsive-container-close { color: #fff; }
body .hmi-header .wp-block-navigation__responsive-container-open { color: #111A3E; }

/* Pay button in header */
.hmi-pay-btn a {
	display: inline-block;
	background: #263D96;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0.62rem 1.5rem;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}
.hmi-pay-btn a:hover { background: #111A3E; color: #fff !important; }

/* keep pay button visible on mobile beside the hamburger */
@media (max-width: 599px) {
	.hmi-logo-img { height: 52px; }
	.hmi-pay-btn a { padding: 0.5rem 1rem; font-size: 0.85rem; }
	.hmi-topline-claims { display: none; }
}

/* ==========================================================================
   Hero + bands — force legible headings on dark overlays
   ========================================================================== */

.hmi-hero :where(h1, h2, h3, h4, p, li) { color: #fff; }
.hmi-hero .hmi-eyebrow { color: #FDE134; }
.hmi-band-dark :where(h1, h2, h3, h4, p, li) { color: #fff; }
.hmi-band-dark a:not(.wp-block-button__link) { color: #FDE134; }

.hmi-eyebrow {
	/* block, not inline-block — otherwise text-align-center can't center it */
	display: block;
	font-family: "Public Sans", sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #263D96;
}

/* White button for use ON brand-blue bands (invisible-button trap) */
.hmi-btn-white a.wp-block-button__link,
.hmi-payband .wp-block-button__link {
	background: #fff !important;
	color: #263D96 !important;
}
.hmi-btn-white a.wp-block-button__link:hover,
.hmi-payband .wp-block-button__link:hover {
	background: #FDE134 !important;
	color: #111A3E !important;
}
/* Outline (ghost) button on dark photos */
.hmi-btn-ghost a.wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	border: 2px solid rgba(255, 255, 255, 0.85);
}
.hmi-btn-ghost a.wp-block-button__link:hover {
	background: #fff !important;
	color: #111A3E !important;
	border-color: #fff;
}
/* Gold button (hero focal) */
.hmi-btn-gold a.wp-block-button__link {
	background: #FDE134 !important;
	color: #111A3E !important;
}
.hmi-btn-gold a.wp-block-button__link:hover { background: #fff !important; color: #111A3E !important; }

/* ==========================================================================
   Cards & grids (never wp-block-columns for many-item grids)
   ========================================================================== */

.hmi-card {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(17, 26, 62, 0.10);
}
.hmi-card .wp-block-image img { width: 100%; height: auto; display: block; }

/* equal-height product cards inside wp:columns without the height:100% trap */
.wp-block-column:has(> .hmi-card:only-child) { display: flex; }
.wp-block-column > .hmi-card:only-child { flex: 1 1 auto; height: auto; display: flex; flex-direction: column; }

.hmi-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.hmi-card-body h3 { margin: 0 0 0.5rem; font-size: 1.28rem; }
.hmi-card-body p { margin: 0; font-size: 0.97rem; }
.hmi-card-body .hmi-card-link { display: inline-block; margin-top: 0.85rem; font-weight: 700; font-size: 0.92rem; }

/* Agent directory grid — real CSS grid, auto-fill */
.hmi-agent-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 2rem 0 0;
}
.hmi-agent-card {
	background: #fff;
	border: 1px solid #E4DECF;
	border-radius: 12px;
	padding: 1.1rem 1.2rem;
	font-size: 0.92rem;
	line-height: 1.5;
}
.hmi-agent-card strong { display: block; color: #111A3E; font-size: 1rem; margin-bottom: 0.3rem; }
.hmi-agent-card a { word-break: break-word; }
.hmi-agent-search {
	width: 100%;
	max-width: 460px;
	padding: 0.8rem 1.2rem;
	font-size: 1rem;
	font-family: inherit;
	border: 2px solid #C9C2AE;
	border-radius: 999px;
	background: #fff;
	color: #111A3E;
}
.hmi-agent-search:focus { outline: 2px solid #263D96; border-color: #263D96; }
.hmi-agent-count { font-size: 0.9rem; color: #6A7086; }

/* Staff lists */
.hmi-staff-list { list-style: none; padding: 0; margin: 0.75rem 0 0; font-size: 0.95rem; }
.hmi-staff-list li { padding: 0.45rem 0; border-bottom: 1px solid #ECE6D6; }
.hmi-staff-list li:last-child { border-bottom: 0; }
.hmi-staff-list .hmi-role { color: #6A7086; font-size: 0.87rem; display: block; }

/* Office cards */
.hmi-office-card {
	background: #fff;
	border-radius: 14px;
	padding: 1.6rem 1.7rem;
	box-shadow: 0 10px 30px rgba(17, 26, 62, 0.08);
	font-size: 0.97rem;
}
.hmi-office-card h3 { margin-top: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.hmi-footer { font-size: 0.93rem; color: #E2E6F3; }
.hmi-footer strong { color: #fff; }
.hmi-footer a { color: #fff; text-decoration: none; }
.hmi-footer a:hover { color: #FDE134; }
.hmi-footer-heading {
	color: #FDE134 !important;
	font-family: "Public Sans", sans-serif !important;
	font-size: 0.8rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.hmi-footer p { color: #E2E6F3; }
.hmi-footer ul { list-style: none; padding: 0; margin: 0; }
.hmi-footer li { padding: 0.22rem 0; }
.hmi-grinnell-chip {
	display: inline-block;
	background: #fff;
	border-radius: 12px;
	padding: 0.9rem 1rem 0.6rem;
	text-align: center;
}
.hmi-grinnell-chip img { width: 108px; height: auto; display: block; margin: 0 auto; }
.hmi-footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; }
.hmi-footer-legal p { margin: 0; color: #9BA2C0; }
.hmi-footer-legal a { color: #C6CBE0; }

/* ==========================================================================
   Interior page headers
   ========================================================================== */

.hmi-page-header { position: relative; }
.hmi-page-header :where(h1, p) { color: #fff; }
.hmi-page-header .hmi-eyebrow { color: #FDE134; }

/* Payment page focal band */
.hmi-payband .hmi-pay-note { font-size: 0.9rem; opacity: 0.85; }

/* Details/summary FAQ-ish rows */
.hmi-info-row { border-bottom: 1px solid #E4DECF; padding: 1rem 0; }

/* Coverage map figure */
.hmi-map-figure img { max-width: 100%; height: auto; }
.hmi-map-caption { font-size: 0.85rem; color: #6A7086; }

/* Generic helpers */
.hmi-shadow-img img { border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 26, 62, 0.14); }
.hmi-tel { white-space: nowrap; }

/* Make interior entry content full-width capable */
.hmi-content > .alignfull { margin-block: 0; }

/* Skip link visibility */
.skip-link.screen-reader-text:focus {
	background: #fff;
	color: #111A3E;
	padding: 0.75rem 1.25rem;
	position: absolute;
	z-index: 100000;
	top: 0;
	left: 0;
	clip: auto !important;
	clip-path: none;
}
