/*
 * Collection sites — archive, country archive and single site.
 * Ported from the page <style> in mockup/collection/collection-sites.html
 * (the page does not use shared.css). Colour aliases (--teal, --muted, ...) are
 * defined in components.css. Markup comes from carigen-core's
 * includes/collection-sites.php and the theme's collection templates/pattern.
 */

.stats-bar *, .sites-section *, .cta-bottom * { box-sizing: border-box; }

/* STATS BAR */
.stats-bar { background: var(--teal-l); border-top: 3px solid var(--teal); padding: 24px var(--gutter); display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
.stat-item { text-align: center; }
.stat-num { font-family: var(--wp--preset--font-family--heading); font-size: 1.9rem; font-weight: 800; color: var(--teal-d); }
.stat-label { font-size: .8rem; color: var(--mid); margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }
.stats-bar p.stat-label { margin-top: 2px; }

/* SECTION */
.sites-section { padding: 64px var(--gutter); background: var(--bg); }

/* FILTER BAR (links to the country archives; the mockup filters in place with JS) */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { display: inline-block; padding: 8px 18px; border-radius: 100px; font-size: .84rem; font-weight: 600; line-height: normal; border: 2px solid #c8edf2; background: var(--white); color: var(--mid); text-decoration: none; transition: all .2s; font-family: inherit; }
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.filter-btn:focus-visible, .site-card a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* COUNTRY GROUPS */
.country-group { margin-bottom: 52px; }
.country-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--teal-l); }
.country-flag { width: 38px; height: 38px; border-radius: 9px; background: var(--teal-l); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.country-heading h2 { font-size: 1.15rem; color: var(--dark); margin: 0; }

/* SITE CARDS */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.site-card { background: var(--white); border-radius: var(--radius); padding: 22px 20px; border: 1.5px solid #ddf0f4; transition: box-shadow .25s, border-color .2s; }
.site-card:hover { box-shadow: var(--shadow); border-color: var(--teal); }
.site-card-header { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; }
.site-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); margin-top: 5px; flex-shrink: 0; }
.site-note { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--gold); background: var(--gold-l); border-radius: 4px; padding: 2px 7px; margin-bottom: 4px; }
.site-note.is-preferred { color: var(--teal-d); background: var(--teal-l); }
.site-card h3 { font-size: .93rem; font-weight: 700; color: var(--dark); margin: 0 0 2px; }
.site-card h3 a { text-decoration: none; }
.site-card h3 a:hover { text-decoration: underline; }
.site-address { font-size: .82rem; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.sites-section p.site-address { margin-bottom: 10px; }
.site-phone { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--mid); font-weight: 500; }
.sites-section p.site-phone { margin-bottom: 14px; }
.site-phone svg { width: 14px; height: 14px; stroke: var(--teal); fill: none; stroke-width: 2; flex-shrink: 0; }
.btn-directions { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: .81rem; font-weight: 600; background: var(--teal-l); color: var(--teal-d); border: 1.5px solid #a8e0e8; text-decoration: none; transition: background .2s; }
.btn-directions:hover { background: #d0eee8; }
.btn-directions:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.btn-directions svg { width: 13px; height: 13px; stroke: var(--teal); fill: none; stroke-width: 2; flex-shrink: 0; }

/* SINGLE SITE */
.site-card.site-details { max-width: 640px; padding: 28px 26px; }
.site-details .site-note { margin-bottom: 14px; }
.site-details-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 20px; font-size: .9rem; line-height: 1.6; }
.site-details-list dt { font-weight: 700; color: var(--dark); }
.site-details-list dd { margin: 0; color: var(--muted); }
.site-details-list a { color: var(--teal-d); font-weight: 600; }
.site-details + .wp-block-post-content:not(:empty) { margin-top: 32px; max-width: 760px; }
.hero-badge a { text-decoration: none; }

/* CTA */
.cta-bottom { background: linear-gradient(135deg, var(--teal-d), var(--dark)); padding: 64px var(--gutter); text-align: center; color: #fff; }
.cta-bottom h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-bottom p { color: rgba(255,255,255,.7); margin-bottom: 26px; font-size: .97rem; }
.cta-bottom p.cta-actions { margin: 0; font-size: 1rem; color: inherit; }

@media (max-width: 640px) {
	.sites-grid { grid-template-columns: 1fr; }
	.site-details-list { grid-template-columns: 1fr; gap: 2px; }
	.site-details-list dd + dt { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.filter-btn, .site-card, .btn-directions { transition: none; }
}
