/*
Theme Name:  LawyersFund Modern
Theme URI:   https://lawyersfund.com
Author:      Kervin Law LLC
Description: Block theme for LawyersFund. White, high contrast, green accent. Header search, standardised navigation and a full site footer, all editable in Appearance > Editor. Data lives in the LawyersFund Core plugin, not here.
Version:     1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License:     GPL-2.0-or-later
Text Domain: lawyersfund-modern
Tags:        block-theme, full-site-editing, directory, one-column
*/

/* theme.json carries the tokens. Only what blocks cannot express lives here. */

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a):focus-visible, :where(button):focus-visible, :where(input):focus-visible, :where(summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--green); outline-offset: 2px; border-radius: 2px;
}

/* ---------- header ---------- */
.lf-head { border-bottom: 1px solid var(--wp--preset--color--rule); background: #fff; }
.lf-head-in {
	max-width: 1200px; margin: 0 auto; padding: .85rem 1.25rem;
	display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
}
/* core blocks inside the header row */
.lf-head-in > .wp-block-site-title { margin: 0; }
.lf-head-in > .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--ink); letter-spacing: -.03em; }
.lf-head-in > .wp-block-navigation { margin-left: auto; }
.lf-head-in .wp-block-navigation a { text-decoration: none; }
.lf-head-in .wp-block-navigation a:hover { color: var(--wp--preset--color--green); }
.lf-head-cta .wp-block-button__link { text-decoration: none; }
.lf-brand {
	font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em;
	color: var(--wp--preset--color--ink); text-decoration: none; white-space: nowrap;
}
.lf-brand em { font-style: normal; color: var(--wp--preset--color--green); }
.lf-nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; }
.lf-nav a {
	font-size: .94rem; font-weight: 500; text-decoration: none;
	color: var(--wp--preset--color--body); white-space: nowrap;
}
.lf-nav a:hover { color: var(--wp--preset--color--green); }
.lf-cta {
	font-size: .9rem; font-weight: 600; text-decoration: none;
	background: var(--wp--preset--color--green); color: #fff !important;
	padding: .55rem 1.05rem; border-radius: 6px; white-space: nowrap;
}
.lf-cta:hover { background: var(--wp--preset--color--green-dark); }

/* header search — the Avvo-style bar */
.lf-hsearch { display: flex; flex: 1 1 320px; min-width: 240px; max-width: 520px; }
.lf-hsearch input {
	flex: 1; font: inherit; font-size: .95rem; padding: .6rem .85rem;
	border: 1px solid var(--wp--preset--color--rule); border-right: 0;
	border-radius: 6px 0 0 6px; background: #fff; color: var(--wp--preset--color--ink);
}
.lf-hsearch input::placeholder { color: var(--wp--preset--color--muted); }
.lf-hsearch input:focus { outline: none; border-color: var(--wp--preset--color--green); }
.lf-hsearch button {
	font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
	padding: .6rem 1.1rem; border: 1px solid var(--wp--preset--color--green);
	background: var(--wp--preset--color--green); color: #fff; border-radius: 0 6px 6px 0;
}
.lf-hsearch button:hover { background: var(--wp--preset--color--green-dark); }

@media (max-width: 860px) {
	.lf-head-in { gap: .8rem; }
	.lf-hsearch { order: 3; flex-basis: 100%; max-width: none; }
	.lf-nav { margin-left: auto; gap: 1rem; }
	.lf-nav a { font-size: .88rem; }
}

/* ---------- footer ---------- */
.lf-foot { border-top: 1px solid var(--wp--preset--color--rule); background: var(--wp--preset--color--panel); margin-top: 4rem; }
.lf-foot-in { max-width: 1200px; margin: 0 auto; padding: 3rem 1.25rem 1.5rem; }
.lf-foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem 2.5rem; }
.lf-foot h3 {
	font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--wp--preset--color--ink); margin: 0 0 .85rem;
}
.lf-foot ul { list-style: none; margin: 0; padding: 0; }
.lf-foot li { margin-bottom: .5rem; }
.lf-foot li a { font-size: .92rem; color: var(--wp--preset--color--muted); text-decoration: none; }
.lf-foot li a:hover { color: var(--wp--preset--color--green); text-decoration: underline; }
.lf-foot-note {
	margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--wp--preset--color--rule);
	font-size: .84rem; color: var(--wp--preset--color--muted); line-height: 1.65; max-width: 80ch;
}
.lf-foot-bar {
	margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--wp--preset--color--rule);
	display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center;
	font-size: .84rem; color: var(--wp--preset--color--muted);
}
.lf-foot-bar a { color: var(--wp--preset--color--muted); text-decoration: none; }
.lf-foot-bar a:hover { color: var(--wp--preset--color--green); text-decoration: underline; }
.lf-foot-bar .sep { margin-left: auto; }

/* ---------- listings ---------- */
.lf-card { border-top: 1px solid var(--wp--preset--color--rule); padding: 1.35rem 0 1.5rem; }
.lf-card.is-paid { border-top: 2px solid var(--wp--preset--color--green); }

.lf-free, .lf-paid {
	display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em;
	text-transform: uppercase; margin-bottom: .55rem; padding: .18rem .5rem; border-radius: 3px;
}
.lf-free { color: var(--wp--preset--color--green-dark); background: var(--wp--preset--color--green-tint); }
.lf-paid { color: #7A3A12; background: #FBF0E4; }

.lf-contact { margin: .55rem 0 0; }
.lf-contact .lf-line { display: block; font-size: .92rem; margin-top: .25rem; }
.lf-contact .lf-label {
	display: inline-block; min-width: 3.6em; font-size: .72rem; font-weight: 700;
	color: var(--wp--preset--color--muted); text-transform: uppercase; letter-spacing: .03em;
}
.lf-contact a { text-decoration: none; }
.lf-contact .lf-tel { font-weight: 600; color: var(--wp--preset--color--ink); }
.lf-contact .lf-tel:hover { color: var(--wp--preset--color--green); }
.lf-contact .lf-web { color: var(--wp--preset--color--muted); font-size: .86rem; word-break: break-word; }
.lf-contact .lf-web:hover { color: var(--wp--preset--color--green); }

.lf-shot {
	width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex: 0 0 88px;
	background: var(--wp--preset--color--panel); border: 1px solid var(--wp--preset--color--rule);
	display: flex; align-items: center; justify-content: center;
}
.lf-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.lf-shot .lf-ini { font-size: 1.6rem; font-weight: 700; color: var(--wp--preset--color--muted); }

.lf-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem 1.3rem; margin: .9rem 0; }
.lf-kv div span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--wp--preset--color--muted); margin-bottom: .1rem; }
.lf-kv div b { font-size: .95rem; font-weight: 600; color: var(--wp--preset--color--ink); }

.lf-area { font-size: .84rem; color: var(--wp--preset--color--muted); margin: .5rem 0 0; }

/* ---------- state index ---------- */
.lf-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 1px; background: var(--wp--preset--color--rule); border: 1px solid var(--wp--preset--color--rule); border-radius: 8px; overflow: hidden; margin: 1.5rem 0; }
.lf-states .lf-state { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .7rem .9rem; background: #fff; text-decoration: none; font-size: .93rem; color: var(--wp--preset--color--ink); }
.lf-states .lf-state:hover { background: var(--wp--preset--color--green-tint); }
.lf-states .lf-state-n { font-size: .8rem; color: var(--wp--preset--color--muted); font-variant-numeric: tabular-nums; }
.lf-states .lf-state.is-empty .lf-state-name { color: var(--wp--preset--color--muted); }
.lf-empty { font-size: .92rem; color: var(--wp--preset--color--muted); }

/* ---------- state page ---------- */
.lf-answer { font-size: 1.12rem; line-height: 1.7; max-width: 70ch; margin: 0 0 1.5rem; color: var(--wp--preset--color--body); }
.lf-faqs { max-width: 72ch; margin-top: 3rem; }
.lf-faq-h { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wp--preset--color--muted); margin: 0 0 .5rem; padding-bottom: .55rem; border-bottom: 1px solid var(--wp--preset--color--rule); }
.lf-fq { border-bottom: 1px solid var(--wp--preset--color--rule); padding: .85rem 0; }
.lf-fq summary { cursor: pointer; font-size: .98rem; font-weight: 600; color: var(--wp--preset--color--ink); }
.lf-fq p { margin: .65rem 0 .2rem; color: var(--wp--preset--color--muted); max-width: 68ch; }

/* ---------- inline search ---------- */
.lf-search { display: flex; gap: .5rem; flex-wrap: wrap; }
.lf-search input[type="text"], .lf-search input[type="search"] {
	font: inherit; font-size: 1rem; padding: .72rem .9rem; flex: 1 1 280px;
	border: 1px solid var(--wp--preset--color--rule); border-radius: 6px; background: #fff; color: var(--wp--preset--color--ink);
}
.lf-search input:focus { outline: none; border-color: var(--wp--preset--color--green); box-shadow: 0 0 0 3px var(--wp--preset--color--green-tint); }
.lf-search button {
	font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; padding: .72rem 1.4rem;
	border: 1px solid var(--wp--preset--color--green); background: var(--wp--preset--color--green); color: #fff; border-radius: 6px;
}
.lf-search button:hover { background: var(--wp--preset--color--green-dark); }

/* long-form article body gets the serif */
.lf-article .wp-block-post-content { font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; line-height: 1.75; }

@media (max-width: 520px) { .lf-shot { width: 68px; height: 68px; flex: 0 0 68px; } .lf-shot .lf-ini { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
