/*
 * ElderCare — listings archive/category page, matching the approved
 * "CareScout" mockup (home-care.html + styles.css) structurally, recolored
 * to the theme's own Customizer color via --listeo-primary-color /
 * --listeo-primary-color-light, same approach as single-listing.css.
 *
 * Two carry-overs from that file, for the same reasons:
 * 1. Fixed px sizes, not rem — Listeo loads Bootstrap's grid stylesheet,
 *    which sets `html { font-size: 10px; }`; rem values here would compute
 *    against that instead of the usual 16px and render at ~62% of size.
 *    Every size below is the mockup's own rem value × 16, converted once
 *    so it never needs re-deriving.
 * 2. No font-family is set anywhere — this follows Listeo's own Typography
 *    Customizer settings (body/heading fonts), same as the listing page.
 *
 * Neutral grays (borders, muted text, card surfaces) intentionally reuse
 * the exact values already established in single-listing.css, so this page
 * and the listing detail page read as the same site. Only the mockup's own
 * brand green is replaced by the theme color. WhatsApp green is left as a
 * real brand color, same reasoning as single-listing.css.
 *
 * The scroll fix below (found after a long debugging session, logged here
 * so it's never a mystery again): Listeo adds a body class —
 * `halfsidebar-archive-listings-layout` — to ANY listings archive page,
 * based on a site-wide "Archive Listings Layout" style setting, regardless
 * of which template file actually renders the page. Its own CSS
 * (parent theme style.css) sets `max-height: 100vh; overflow: hidden;` on
 * that class, assuming the page provides its own internally-scrolling
 * container (the "half sidebar" split layout). Our custom template doesn't
 * use that layout at all, so the whole page was clipped at one viewport
 * height with no way to reach anything below it. Overriding it here,
 * scoped to this page's own stylesheet, rather than touching the parent
 * theme file.
 */
body.halfsidebar-archive-listings-layout,
body.page-template-template-split-grid-sidebar,
body.page-template-template-split-map-sidebar {
	max-height: none !important;
	overflow: visible !important;
}

.al-wrap-in { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ===== Hero ===== */
.al-hero { background: var(--listeo-primary-color, #B04C2F); color: #E4EDE5; padding: 38px 0 32px; }
.al-hero h1 { color: #fff; font-size: clamp(26px, 3vw, 35px); font-weight: 700; }
.al-hero p { color: #A8C5AD; margin-top: 8px; font-size: 15px; max-width: 600px; }
.al-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.al-breadcrumb { font-size: 13px; color: #A8C5AD; margin-bottom: 10px; }
.al-breadcrumb a { color: #A8C5AD; cursor: pointer; text-decoration: none; }
.al-breadcrumb a:hover { color: #B8E0BE; }
.al-hero-city { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: 8px 14px; border-radius: 999px; margin-top: 16px; }
.al-hero-city select {
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
	border: none; background: transparent; color: #fff;
	font-weight: 600; font-size: 14px; line-height: 1;
	padding: 0; margin: 0; width: auto; height: auto;
	cursor: pointer;
}
.al-hero-city option { color: #1A1A1A; background: #fff; }

/* ===== Featured strip ===== */
.al-body { padding: 36px 0 60px; }
.al-featured-wrap { margin-bottom: 8px; }
.al-section-head { margin-bottom: 16px; }
.al-section-head h3 { font-size: 17px; color: var(--listeo-primary-color, #B04C2F); font-weight: 600; }
.al-featured-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
@media (max-width: 860px) { .al-featured-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .al-featured-strip { grid-template-columns: 1fr; } }
.al-featured-card { background: #fff; border: 2px solid var(--listeo-primary-color, #B04C2F); border-radius: 14px; padding: 18px 20px; position: relative; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: box-shadow .15s, transform .12s; }
.al-featured-card:hover { box-shadow: 0 8px 32px rgba(20,35,20,.12); transform: translateY(-2px); }
.al-featured-ribbon { position: absolute; top: -1px; left: 18px; background: var(--listeo-primary-color, #B04C2F); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 10px; border-radius: 0 0 6px 6px; display: flex; align-items: center; gap: 4px; }
.al-fc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 26px; }
.al-featured-card h3 { font-size: 16px; }
.al-featured-card h3 a { color: inherit; text-decoration: none; }

/* ===== Verified badge / rating / chips (shared by featured + list cards) ===== */
.al-badge-verified { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; background: var(--listeo-primary-color-light, #FDF1EE); color: var(--listeo-primary-color, #B04C2F); border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--listeo-primary-color-light, #F2D9CE); white-space: nowrap; }
.al-rating { display: inline-flex; align-items: center; gap: 5px; }
.al-stars { color: #D49B1A; font-size: 14px; letter-spacing: -0.5px; }
.al-rating-score { font-weight: 700; font-size: 15px; color: #1A1A1A; }
.al-rating-count { color: #888; font-size: 13px; }
.al-addr { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.al-tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.al-chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid #E8E8E8; background: #fff; color: #666; }
.al-chip-spec { background: var(--listeo-primary-color-light, #FDF1EE); border-color: var(--listeo-primary-color-light, #F2D9CE); color: var(--listeo-primary-color, #B04C2F); }
.al-view-details { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13px; color: #1A1A1A; text-decoration: none; margin-top: 6px; }
.al-view-details:hover { color: var(--listeo-primary-color, #B04C2F); }

/* ===== Sidebar + results layout ===== */
.al-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) {
	.al-layout { grid-template-columns: 1fr; }
	/* Filters below the results on small screens instead of above them —
	   .al-sidebar comes first in the markup (so it stays first, and gets
	   sticky positioning, on desktop's two-column layout), so reordering
	   only needs to happen here, at the breakpoint where it stacks. */
	.al-sidebar { order: 2; }
	.al-results { order: 1; }
}
.al-sidebar { background: #fff; border: 1px solid #E8E8E8; border-radius: 14px; padding: 20px; position: sticky; top: 84px; }
@media (max-width: 860px) { .al-sidebar { position: static; } }
.al-sidebar h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #F0F0F0; }
.al-filter-group { margin-bottom: 20px; }
.al-filter-group:last-child { margin-bottom: 0; }
.al-fg-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #888; margin-bottom: 9px; display: block; }
/*
 * !important below is deliberate, same reasoning as the enquiry form fix:
 * the parent theme's own generic label/checkbox styles (Bootstrap-based)
 * were winning the specificity fight on margin/alignment against these
 * plain single-class selectors.
 */
.al-check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0 !important; margin: 0 !important; cursor: pointer; color: #1A1A1A; line-height: 1.3; }
.al-check-row input[type="checkbox"] { accent-color: var(--listeo-primary-color, #B04C2F); width: 14px; height: 14px; margin: 0 !important; flex-shrink: 0; cursor: pointer; }
.al-filter-group select { width: 100%; border: 1px solid #E8E8E8; border-radius: 9px; padding: 9px 10px; background: #FAFAFA; color: #1A1A1A; }

.al-results-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.al-results-count { font-size: 13px; color: #888; }
.al-clear-link { font-size: 13px; color: var(--listeo-primary-color, #B04C2F); cursor: pointer; font-weight: 600; text-decoration: none; }
.al-clear-link:hover { text-decoration: underline; }
.al-listings-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
@media (max-width: 600px) { .al-listings-stack { grid-template-columns: 1fr; } }

/* ===== Listing card ===== */
.al-listing-card { background: #fff; border: 1px solid #E8E8E8; border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .12s; }
.al-listing-card:hover { border-color: var(--listeo-primary-color, #B04C2F); box-shadow: 0 4px 20px rgba(20,35,20,.08); }
.al-lc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.al-lc-name { font-size: 18px; font-weight: 600; color: var(--listeo-primary-color, #B04C2F); }
.al-lc-name a { color: inherit; text-decoration: none; }
.al-lc-svc { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #888; margin-top: 3px; }
.al-lc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.al-lc-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid #F0F0F0; }
.al-lc-actions .al-spacer { flex: 1; }

/* ===== Buttons ===== */
.al-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; border: 1.5px solid transparent; text-decoration: none; }
.al-btn-sm { padding: 7px 13px; font-size: 13px; }
.al-btn-call { background: var(--listeo-primary-color-light, #FDF1EE); border-color: var(--listeo-primary-color, #B04C2F); color: var(--listeo-primary-color, #B04C2F); }
.al-btn-call:hover { background: var(--listeo-primary-color, #B04C2F); color: #fff; }
.al-btn-wa { background: #25D36620; border-color: #25D366; color: #1A9649; }
.al-btn-wa:hover { background: #25D366; color: #fff; }
.al-btn-web { background: #F5F5F5; border-color: #E0E0E0; color: #333; }
.al-btn-web:hover { border-color: var(--listeo-primary-color, #B04C2F); color: var(--listeo-primary-color, #B04C2F); }
.al-btn-outline { background: #fff; border-color: #E8E8E8; color: #1A1A1A; }
.al-btn-outline:hover { border-color: var(--listeo-primary-color, #B04C2F); color: var(--listeo-primary-color, #B04C2F); }

/* ===== Empty state ===== */
.al-empty-state { text-align: center; padding: 52px 24px; border: 1px dashed #E8E8E8; border-radius: 14px; background: #FAFAFA; }
.al-empty-state h3 { font-size: 18px; }
.al-empty-state p { color: #666; margin-top: 8px; max-width: 380px; margin-left: auto; margin-right: auto; font-size: 14px; }
.al-empty-state .al-btn { margin-top: 14px; }

.al-pagination { margin-top: 28px; display: flex; justify-content: center; gap: 6px; }
.al-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid #E8E8E8; color: #1A1A1A; font-size: 13px; text-decoration: none; }
.al-pagination .page-numbers.current { background: var(--listeo-primary-color, #B04C2F); border-color: var(--listeo-primary-color, #B04C2F); color: #fff; }
.al-pagination .page-numbers:not(.current):hover { border-color: var(--listeo-primary-color, #B04C2F); color: var(--listeo-primary-color, #B04C2F); }
