/* ==========================================================================
   BookieFinder — Homepage sections, lists and shared card patterns
   ========================================================================== */
.bf-home-body { padding: 0 24px 48px; }

.bf-home-section { padding: 40px 0 8px; }
.bf-home-section + .bf-home-section { border-top: 1px solid var(--bf-border); }
.bf-section-foot { margin-top: 16px; }

/* Tier strip ------------------------------------------------------------- */
.bf-tiers {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border: 1px solid var(--bf-border);
	background: var(--bf-white);
	margin-top: -28px;
	position: relative;
	z-index: 2;
}
.bf-tier {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	color: var(--bf-ink);
	border-right: 1px solid var(--bf-border);
	min-width: 0;
}
.bf-tier:last-child { border-right: none; }
.bf-tier:hover { background: var(--bf-bg); }
.bf-tier-num { font-size: 12px; color: var(--bf-accent-dark); font-weight: 700; letter-spacing: 0.08em; }
.bf-tier-title { font-family: var(--bf-font-display); font-size: 19px; font-weight: 600; }
.bf-tier-desc { font-size: 13px; color: var(--bf-muted); line-height: 1.45; }

/* Browse by town / brand ------------------------------------------------- */
.bf-browse { padding: 40px 0 8px; border-top: 1px solid var(--bf-border); }
.bf-browse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.bf-browse-title { font-family: var(--bf-font); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bf-muted); margin-bottom: 8px; }
.bf-browse-list { columns: 2; column-gap: 24px; }
.bf-browse-list li { break-inside: avoid; }
.bf-browse-list a {
	display: flex; justify-content: space-between; gap: 12px;
	padding: 9px 0; border-bottom: 1px solid var(--bf-border-light);
	font-size: 15px; color: var(--bf-ink);
}
.bf-browse-list a:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.bf-browse-count { color: var(--bf-muted); font-size: 13px; }

/* Bookmaker table -------------------------------------------------------- */
.bf-bm-table { border-top: 1px solid var(--bf-border); }
.bf-bm-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 150px 190px;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--bf-border-light);
}
.bf-bm-row-main { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--bf-ink); }
.bf-bm-row-main:hover .bf-bm-row-name { text-decoration: underline; text-underline-offset: 3px; }
.bf-bm-row-logo { display: flex; align-items: center; width: 90px; flex: none; }
.bf-bm-row-name { font-weight: 600; font-size: 15px; }
.bf-bm-row-shops a { color: var(--bf-brand); font-weight: 600; font-size: 14px; }
.bf-bm-row-online { color: var(--bf-muted-light); font-size: 13px; }
.bf-bm-row-rating { display: flex; justify-content: flex-end; }

.bf-bm-logo { max-height: 26px; width: auto; }
.bf-bm-logo--text {
	display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: 0.02em;
	padding: 4px 8px; border: 1px solid var(--bf-border); color: var(--bf-brand);
	background: var(--bf-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* Legacy archive grid (bookmakers archive) */
.bf-bookmaker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bf-bookmaker-card {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 20px 14px; border: 1px solid var(--bf-border); background: var(--bf-white);
	border-radius: var(--bf-radius-md); color: var(--bf-ink); text-align: center;
}
.bf-bookmaker-card:hover { border-color: var(--bf-brand); }
.bf-bm-logo-wrap { display: flex; align-items: center; justify-content: center; height: 32px; width: 100%; min-width: 0; }
.bf-bookmaker-card { min-width: 0; overflow: hidden; }

/* Offers ------------------------------------------------------------------ */
.bf-offers-disclosure { margin-bottom: 14px; }
.bf-offer-list { border-top: 1px solid var(--bf-border); }
.bf-offer-row {
	display: grid;
	grid-template-columns: 90px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid var(--bf-border-light);
}
.bf-offer-logo { display: flex; align-items: center; }
.bf-offer-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bf-offer-title { font-family: var(--bf-font-display); font-size: 18px; font-weight: 600; color: var(--bf-ink); line-height: 1.25; }
.bf-offer-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.bf-offer-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--bf-muted); }
.bf-offer-meta span + span::before { content: "·"; margin: 0 8px; color: var(--bf-muted-light); }
.bf-offer-actions { display: flex; align-items: center; gap: 14px; }
.bf-offer-terms { font-size: 13px; color: var(--bf-muted); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Tools & guides ---------------------------------------------------------- */
.bf-home-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--bf-border); }
.bf-home-tools .bf-home-section { border-top: none; }

.bf-calculator-list { display: flex; flex-direction: column; }
.bf-calculator-list a {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 0; border-bottom: 1px solid var(--bf-border-light); color: var(--bf-ink);
}
.bf-calculator-list a:hover .bf-calc-title { text-decoration: underline; text-underline-offset: 3px; }
.bf-calc-icon { width: 22px; height: 22px; color: var(--bf-brand); flex: none; }
.bf-calc-body { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.bf-calc-title { font-size: 15px; font-weight: 600; }
.bf-calc-desc { font-size: 13px; color: var(--bf-muted); }
.bf-calc-arrow { color: var(--bf-muted-light); width: 16px; height: 16px; flex: none; }

.bf-guide-list { display: flex; flex-direction: column; }
.bf-guide-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--bf-border-light); color: var(--bf-ink); }
.bf-guide-item:hover .bf-guide-title { text-decoration: underline; text-underline-offset: 3px; }
.bf-guide-meta { font-size: 12px; color: var(--bf-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.bf-guide-cat { color: var(--bf-accent-dark); font-weight: 700; }
.bf-guide-title { font-family: var(--bf-font-display); font-size: 18px; font-weight: 600; line-height: 1.25; }
.bf-guide-desc { font-size: 14px; color: var(--bf-muted); line-height: 1.5; }

/* Legacy guide archive grid */
.bf-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bf-guide-card { display: flex; flex-direction: column; border: 1px solid var(--bf-border); background: var(--bf-white); color: var(--bf-ink); }
.bf-guide-card:hover .bf-guide-title { text-decoration: underline; text-underline-offset: 3px; }
.bf-guide-thumb { position: relative; display: block; height: 120px; background: var(--bf-brand-soft); }
.bf-guide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bf-guide-thumb-fallback { display: block; width: 100%; height: 100%; }
.bf-guide-card .bf-guide-cat { position: absolute; left: 12px; bottom: 12px; background: var(--bf-white); padding: 3px 8px; font-size: 11px; }
.bf-guide-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }

/* Trust / data quality ---------------------------------------------------- */
.bf-trust { padding: 40px 0 8px; border-top: 1px solid var(--bf-border); }
.bf-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.bf-trust-item { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 3px solid var(--bf-accent); }
.bf-trust-value { font-family: var(--bf-font-display); font-size: 36px; font-weight: 600; color: var(--bf-brand); line-height: 1; }
.bf-trust-label { font-size: 14px; font-weight: 600; color: var(--bf-ink); }
.bf-trust-desc { font-size: 13px; color: var(--bf-muted); line-height: 1.5; }

/* Responsible gambling strip --------------------------------------------- */
.bf-rg-strip {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	margin-top: 40px;
	padding: 18px 20px;
	border: 1px solid var(--bf-border);
	background: var(--bf-white);
}
.bf-rg-icon { width: 28px; height: 28px; color: var(--bf-brand); }
.bf-rg-body h2 { font-size: 18px; margin-bottom: 2px; }
.bf-rg-body p { font-size: 14px; color: var(--bf-muted); }
.bf-rg-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Breakpoints ------------------------------------------------------------- */
@media (max-width: 1080px) {
	.bf-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bf-tier:nth-child(2) { border-right: none; }
	.bf-tier:nth-child(-n+2) { border-bottom: 1px solid var(--bf-border); }
	.bf-bookmaker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bf-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bf-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.bf-home-tools { grid-template-columns: 1fr; gap: 0; }
	.bf-home-tools .bf-home-section + .bf-home-section { border-top: 1px solid var(--bf-border); }
	.bf-browse-grid { grid-template-columns: 1fr; gap: 24px; }
	.bf-bm-row { grid-template-columns: minmax(0, 1fr) auto; }
	.bf-bm-row-rating { grid-column: 1 / -1; justify-content: flex-start; padding-left: 104px; }
	.bf-rg-strip { grid-template-columns: auto minmax(0, 1fr); }
	.bf-rg-links { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.bf-home-body { padding: 0 16px 36px; }
	.bf-home-section, .bf-browse, .bf-trust { padding-top: 28px; }
	.bf-tiers { grid-template-columns: 1fr; margin-top: -16px; }
	.bf-tier { border-right: none; border-bottom: 1px solid var(--bf-border); padding: 14px 16px; }
	.bf-tier:last-child { border-bottom: none; }
	.bf-browse-list { columns: 1; }
	.bf-bm-row-logo { width: 64px; }
	.bf-bm-row-rating { padding-left: 78px; }
	.bf-bookmaker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bf-guide-grid { grid-template-columns: 1fr; }
	.bf-trust-grid { grid-template-columns: 1fr; }
	.bf-offer-row { grid-template-columns: 64px minmax(0, 1fr); }
	.bf-offer-actions { grid-column: 1 / -1; }
	.bf-offer-title { font-size: 16px; }
}

.bf-guide-card:hover, .bf-bookmaker-card:hover { text-decoration: none; }
.bf-guide-card:hover .bf-guide-card-title, .bf-guide-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
