/*
Theme Name: Farmers Mutual of Western Pennsylvania
Theme URI: https://fmmcins.com
Author: Ledger Marketing
Author URI: https://ledgermarketing.com
Description: Custom block theme for Farmers Mutual Insurance Company of Western Pennsylvania. Servicing the residents of Pennsylvania since 1876.
Version: 1.0.5
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fmwpa
*/

/* ------------------------------------------------------------------
   Block-gap strips: zero vertical margins between top-level blocks
   and between full-width sections, and INSIDE header/footer parts.
------------------------------------------------------------------ */
.wp-site-blocks > * { margin-block: 0; }
.wp-site-blocks main .alignfull { margin-block: 0; }
.fm-header > *, .fm-footer > * { margin-block: 0 !important; }

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

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.fm-topline { font-size: 0.88rem; }
.fm-topline a { color: #F6E8B6 !important; text-decoration: none; }
.fm-topline a:hover { color: #fff !important; text-decoration: underline; }
.fm-topline .fm-topline-sep { opacity: 0.45; }

.fm-logo-lockup { text-decoration: none !important; display: flex; align-items: center; gap: 14px; }
.fm-logo-lockup img { display: block; }
.fm-lockup-name {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 650; font-size: 1.32rem; line-height: 1.12;
	color: var(--wp--preset--color--ink); letter-spacing: 0.01em;
	white-space: nowrap;
}
.fm-lockup-sub {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-style: italic; font-weight: 450; font-size: 0.92rem;
	color: var(--wp--preset--color--brand-blue); margin-top: 2px;
	white-space: nowrap;
}

/* Header nav links: force navy on the white bar (beats core color inheritance) */
body .fm-header nav.wp-block-navigation a {
	color: var(--wp--preset--color--ink) !important;
	font-weight: 600; font-size: 0.95rem; text-decoration: none;
	white-space: nowrap;
}
body .fm-header nav.wp-block-navigation a:hover { color: var(--wp--preset--color--brand-blue) !important; }

/* Pay button in header */
.fm-pay-btn a, a.fm-pay-btn {
	display: inline-block; white-space: nowrap; background: var(--wp--preset--color--brand-blue);
	color: #fff !important; font-weight: 700; text-decoration: none !important;
	padding: 0.62em 1.35em; border-radius: 6px; line-height: 1.2;
	box-shadow: 0 1px 2px rgba(20, 38, 66, 0.25);
}
.fm-pay-btn a:hover, a.fm-pay-btn:hover { background: var(--wp--preset--color--ink); color: #fff !important; }

/* Mobile nav overlay: beat core specificity, keep items centered + legible */
body .fm-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--ink) !important;
	padding: 4.5rem 2rem 2rem !important;
}
body .fm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center; justify-content: flex-start;
}
body .fm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center !important;
}
body .fm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: center !important; margin: 0.35rem 0;
}
body .fm-header .wp-block-navigation__responsive-container.is-menu-open a {
	color: #fff !important; font-size: 1.35rem !important;
}
body .fm-header .wp-block-navigation__responsive-container.is-menu-open a:hover { color: var(--wp--preset--color--gold) !important; }
body .fm-header .wp-block-navigation__responsive-container-close,
body .fm-header .wp-block-navigation__responsive-container-close svg { color: #fff; fill: #fff; }

/* ------------------------------------------------------------------
   Hero / page-header bands: headings + text must stay light on dark
------------------------------------------------------------------ */
.fm-hero :where(h1, h2, h3, h4, p, li) { color: #fff; }
.fm-hero .fm-eyebrow { color: var(--wp--preset--color--pale-gold); }
.fm-pageband :where(h1, h2, h3, p) { color: #fff; }
.fm-pageband .fm-eyebrow { color: var(--wp--preset--color--pale-gold); }

.fm-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700; font-size: 0.85rem !important;
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

/* Buttons on the navy pay band: white with brand-color text */
.fm-payband .wp-block-button__link {
	background: #fff !important; color: var(--wp--preset--color--brand-blue) !important;
	font-weight: 700;
}
.fm-payband .wp-block-button__link:hover { background: var(--wp--preset--color--pale-gold) !important; color: var(--wp--preset--color--ink) !important; }
.fm-payband :where(h2, h3, p) { color: #fff; }

/* Gold button style (light gold = ink text is readable) */
.fm-btn-gold .wp-block-button__link {
	background: var(--wp--preset--color--gold) !important;
	color: var(--wp--preset--color--ink) !important; font-weight: 700;
}
.fm-btn-gold .wp-block-button__link:hover { background: #fff !important; color: var(--wp--preset--color--ink) !important; }
.fm-btn-outline-light .wp-block-button__link {
	background: transparent !important; color: #fff !important;
	border: 2px solid rgba(255, 255, 255, 0.85) !important; font-weight: 700;
}
.fm-btn-outline-light .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.14) !important; }

/* ------------------------------------------------------------------
   Card grids — real CSS grid (never wp-block-columns for many items)
------------------------------------------------------------------ */
.fm-grid {
	display: grid; gap: 22px;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}
.fm-card {
	background: #fff; border: 1px solid #E8DFCC; border-radius: 10px;
	padding: 26px 24px; box-shadow: 0 1px 3px rgba(20, 38, 66, 0.06);
}
.fm-card h3 {
	font-size: 1.12rem; margin: 0 0 6px;
	font-family: var(--wp--preset--font-family--display); font-weight: 600;
	color: var(--wp--preset--color--ink);
}
.fm-card p { margin: 0; font-size: 0.96rem; }
.fm-card .fm-card-icon { color: var(--wp--preset--color--gold); font-size: 1.5rem; line-height: 1; margin-bottom: 12px; }

/* Agent directory */
.fm-agent-search {
	width: 100%; max-width: 460px; padding: 0.7em 1em; font-size: 1.05rem;
	border: 2px solid #D8CDB4; border-radius: 8px; background: #fff;
	font-family: inherit; color: var(--wp--preset--color--slate);
}
.fm-agent-search:focus { outline: none; border-color: var(--wp--preset--color--brand-blue); }
.fm-agent-count { font-size: 0.92rem; color: #6B7280; }
.fm-agent-card h3 { font-size: 1.04rem; }
.fm-agent-card .fm-agent-town {
	font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--wp--preset--color--gold); margin-bottom: 6px;
}
.fm-agent-card a { color: var(--wp--preset--color--brand-blue); text-decoration: none; word-break: break-word; }
.fm-agent-card a:hover { text-decoration: underline; }
.fm-agent-card p { font-size: 0.92rem; line-height: 1.5; }

/* Affiliation chips (white chips so partner logos sit clean on any band) */
.fm-chips { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.fm-chip {
	background: #fff; border-radius: 8px; padding: 10px 16px;
	display: inline-flex; align-items: center; gap: 10px;
	border: 1px solid rgba(20, 38, 66, 0.12);
}
.fm-chip img { display: block; height: 44px; width: auto; }
.fm-chip-caption { font-size: 0.78rem; color: #6B7280; letter-spacing: 0.06em; text-transform: uppercase; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.fm-footer { font-size: 0.95rem; }
.fm-footer :where(p, li) { color: #C7D0DF; }
.fm-footer h3 {
	color: #fff; font-size: 0.85rem; letter-spacing: 0.13em; text-transform: uppercase;
	font-family: var(--wp--preset--font-family--body); font-weight: 700; margin-bottom: 10px;
}
body .fm-footer a { color: #E7DFC9; text-decoration: none; }
body .fm-footer a:hover { color: var(--wp--preset--color--gold); text-decoration: underline; }
.fm-footer .fm-credit, .fm-footer .fm-credit a { font-size: 0.85rem; color: #8FA0B8; }
.fm-footer .fm-credit a { text-decoration: underline; }

/* ------------------------------------------------------------------
   Misc
------------------------------------------------------------------ */
.fm-doc-list li { margin-bottom: 0.45em; }
.fm-tel { white-space: nowrap; }
.fm-anchor-offset { scroll-margin-top: 110px; }

/* Timeline on About */
.fm-timeline { border-left: 3px solid var(--wp--preset--color--gold); padding-left: 26px; }
.fm-timeline h3 { margin-top: 1.6em; }
.fm-timeline h3:first-child { margin-top: 0; }
.fm-timeline h3 .fm-year { color: var(--wp--preset--color--brand-blue); }

/* Equal-height cards inside wp columns (no height:100% — flex the column) */
.wp-block-column:has(> .fm-card:only-child) { display: flex; }
.wp-block-column:has(> .fm-card:only-child) > .fm-card { flex: 1 1 auto; height: auto; }

@media (max-width: 781px) {
	.fm-lockup-name { font-size: 1.02rem; }
	.fm-lockup-sub { font-size: 0.8rem; }
	.fm-topline-mail { display: none; }
	.fm-pay-btn a, a.fm-pay-btn { padding: 0.5em 0.9em; font-size: 0.9rem; }
	.fm-header .fm-logo-lockup { gap: 9px; }
}
@media (max-width: 600px) {
	.fm-lockup-sub { display: none; }
	.fm-logo-lockup img { height: 42px !important; }
	.fm-lockup-name { font-size: 0.84rem; }
	.fm-pay-btn a, a.fm-pay-btn { padding: 0.5em 0.6em; font-size: 0.76rem; }
	/* tighten the logo bar itself */
	.fm-header > .wp-block-group.alignfull:last-child {
		padding-left: 10px !important; padding-right: 10px !important;
	}
	.fm-header .wp-block-navigation__responsive-container-open { padding: 0; margin-left: 0; }
	.fm-header .wp-block-group { flex-wrap: nowrap; gap: 6px !important; }
	.fm-header .fm-topline .wp-block-group { flex-wrap: wrap; }
}
