/* ==========================================================================
   OTBbets QA — Bold & Modern (negro/amarillo) frontend v1
   Source of truth: DESIGN_SPEC.md (confirmed in writing by ChatGPT/OTB).
   Do not change these tokens ad-hoc; revisit deliberately after review.
   ========================================================================== */

:root {
	--otb-bg-primary: #080808;
	--otb-bg-secondary: #1A1A1A;
	--otb-surface-secondary: #2A2A2A;
	--otb-text-primary: #FFFFFF;
	--otb-off-white: #F5F5F5;
	--otb-text-secondary: #B6B6B6;
	--otb-yellow: #FFD600;
	--otb-yellow-hover: #FFC107;
	--otb-yellow-pressed: #D9B300;
	--otb-border: #2A2A2A;
	--otb-border-hover: #3A3A3A;
	--otb-success: #22C55E;
	--otb-error: #EF4444;

	--otb-radius-card: 8px;
	--otb-radius-image: 8px;
	--otb-radius-button: 4px;
	--otb-radius-badge: 4px;
	--otb-radius-input: 4px;

	--otb-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
	--otb-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.40);

	--otb-space-4: 4px;
	--otb-space-8: 8px;
	--otb-space-12: 12px;
	--otb-space-16: 16px;
	--otb-space-24: 24px;
	--otb-space-32: 32px;
	--otb-space-48: 48px;
	--otb-space-64: 64px;
	--otb-space-96: 96px;

	--otb-section-gap: var(--otb-space-64);
	--otb-font-heading: "Montserrat", Arial, sans-serif;
	--otb-font-body: "Inter", Arial, sans-serif;
}

/* Base ------------------------------------------------------------------ */

body {
	background-color: var(--otb-bg-primary);
	color: var(--otb-text-primary);
	font-family: var(--otb-font-body);
}

a {
	color: var(--otb-yellow);
	text-decoration: none;
}
a:hover {
	color: var(--otb-yellow-hover);
}

::selection {
	background: var(--otb-yellow);
	color: var(--otb-bg-primary);
}

:focus-visible {
	outline-color: var(--otb-yellow);
	box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.28);
}

img {
	display: block;
	max-width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.otb-site-header {
	background-color: var(--otb-bg-secondary);
	border-bottom: 1px solid var(--otb-border);
	padding: var(--otb-space-16) var(--otb-space-24);
}

.otb-topbar {
	padding-bottom: var(--otb-space-12);
}

.otb-branding {
	align-items: baseline;
	gap: var(--otb-space-12);
}

.otb-site-title a,
.otb-site-title {
	font-family: var(--otb-font-heading);
	font-weight: 800;
	font-size: 24px;
	color: var(--otb-yellow);
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.otb-tagline {
	font-family: var(--otb-font-body);
	font-weight: 500;
	font-size: 12px;
	color: var(--otb-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0;
}

.otb-navbar {
	border-top: 1px solid var(--otb-border);
	padding-top: var(--otb-space-12);
}

.otb-nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--otb-space-24);
	list-style: none;
	margin: 0;
	padding: 0;
}

.otb-nav-list a {
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 14px;
	color: var(--otb-text-primary);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.otb-nav-list a:hover {
	color: var(--otb-yellow);
}

.otb-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 22px;
	height: 15px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.otb-nav-toggle span {
	display: block;
	height: 2px;
	width: 100%;
	background-color: var(--otb-text-primary);
	border-radius: 2px;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.otb-nav-toggle:hover span {
	background-color: var(--otb-yellow);
}

/* ==========================================================================
   Badges / tags (post-terms)
   ========================================================================== */

.otb-article-badge,
.wp-block-post-terms.otb-article-badge {
	display: inline-block;
	font-family: var(--otb-font-body);
	font-weight: 600;
	font-size: 12px;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--otb-bg-primary);
	background-color: var(--otb-yellow);
	border-radius: var(--otb-radius-badge);
	padding: var(--otb-space-4) var(--otb-space-8);
	margin-bottom: var(--otb-space-8);
}

.otb-article-badge a {
	color: var(--otb-bg-primary);
}

/* ==========================================================================
   Article template
   ========================================================================== */

.otb-article-shell {
	padding: var(--otb-space-32) var(--otb-space-24) var(--otb-space-64);
}

.otb-article-hero {
	margin: 0 auto var(--otb-space-24);
}

.otb-article-title,
.otb-article-title.wp-block-post-title {
	font-family: var(--otb-font-heading);
	font-weight: 800;
	font-size: 48px;
	line-height: 1.08;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-16);
}

.otb-article-meta {
	gap: var(--otb-space-16);
	align-items: center;
}

.otb-meta-item,
.otb-meta-item a {
	font-family: var(--otb-font-body);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.45;
	color: var(--otb-text-secondary);
	margin: 0;
}

.otb-article-hero-image,
.wp-block-post-featured-image.otb-article-hero-image {
	max-width: 1120px;
	margin: 0 auto var(--otb-space-32);
	border-radius: var(--otb-radius-image);
	overflow: hidden;
}

.otb-article-hero-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--otb-radius-image);
}

.otb-article-columns {
	gap: var(--otb-space-32);
}

.otb-article-main {
	font-family: var(--otb-font-body);
	font-weight: 400;
	font-size: 18px;
	line-height: 1.65;
	color: var(--otb-text-primary);
}

.otb-article-main p {
	margin: 0 0 var(--otb-space-16);
}

.otb-article-main h2 {
	margin-top: var(--otb-space-32);
}
.otb-article-main h3 {
	margin-top: var(--otb-space-24);
}

/* ==========================================================================
   Sidebar (related stories + newsletter)
   ========================================================================== */

.otb-article-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--otb-space-24);
}

.otb-sidebar-box {
	background-color: var(--otb-bg-secondary);
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-card);
	padding: 20px;
}

.otb-newsletter {
	border-top: 3px solid var(--otb-yellow);
}

.otb-newsletter .otb-sidebar-heading {
	color: var(--otb-yellow);
}

.otb-sidebar-heading {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 18px;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-16);
}

.otb-related-item {
	margin-bottom: var(--otb-space-16);
	padding-bottom: var(--otb-space-16);
	border-bottom: 1px solid var(--otb-border);
}

.otb-related-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.otb-related-thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--otb-radius-image);
	margin-bottom: var(--otb-space-8);
}

.otb-related-title,
.otb-related-title a {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.35;
	color: var(--otb-text-primary);
}

.otb-related-title a:hover {
	color: var(--otb-yellow);
}

.otb-related-date {
	font-family: var(--otb-font-body);
	font-size: 12px;
	color: var(--otb-text-secondary);
	margin: var(--otb-space-4) 0 0;
}

.otb-newsletter-copy {
	font-size: 14px;
	color: var(--otb-text-secondary);
	margin: 0 0 var(--otb-space-16);
}

.otb-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: var(--otb-space-8);
}

.otb-newsletter-input {
	background-color: var(--otb-bg-primary);
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-input);
	color: var(--otb-text-primary);
	font-family: var(--otb-font-body);
	font-size: 14px;
	padding: var(--otb-space-12);
}

.otb-newsletter-input:focus {
	outline-color: var(--otb-yellow);
	border-color: var(--otb-yellow);
}

.otb-newsletter-submit {
	background-color: var(--otb-yellow);
	color: var(--otb-bg-primary);
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 14px;
	border: none;
	border-radius: var(--otb-radius-button);
	padding: var(--otb-space-12);
	cursor: pointer;
}

.otb-newsletter-submit:hover {
	background-color: var(--otb-yellow-hover);
}
.otb-newsletter-submit:active {
	background-color: var(--otb-yellow-pressed);
}

/* ==========================================================================
   BUSR CTA slots — fail-safe: nothing renders while otb_get_busr_cta()
   returns null, so keep these empty/hidden by default.
   ========================================================================== */

.otb-cta:empty {
	display: none;
}

.otb-cta-link {
	display: inline-block;
	background-color: var(--otb-yellow);
	color: var(--otb-bg-primary);
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 14px;
	border-radius: var(--otb-radius-button);
	padding: var(--otb-space-12) var(--otb-space-24);
}
.otb-cta-link:hover {
	background-color: var(--otb-yellow-hover);
	color: var(--otb-bg-primary);
}

.otb-cta-inline,
.otb-cta-final {
	margin: var(--otb-space-24) 0;
	text-align: center;
}

/* Mobile sticky CTA: reserved slot, off by default via otb_busr_sticky_cta_enabled
   filter (functions.php). Kept hidden here too as a second, independent safeguard. */
.otb-cta-sticky {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	padding: var(--otb-space-12) var(--otb-space-16);
	background-color: var(--otb-bg-secondary);
	border-top: 1px solid var(--otb-border);
	text-align: center;
}

/* ==========================================================================
   Homepage
   ========================================================================== */

.otb-home-shell {
	padding: var(--otb-space-32) var(--otb-space-24) var(--otb-space-96);
}

.otb-home-shell > * + * {
	margin-top: var(--otb-section-gap);
}

.otb-hero-card {
	position: relative;
	border-radius: var(--otb-radius-image);
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.otb-hero-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.otb-hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.otb-hero-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: var(--otb-space-32);
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.82) 0%,
		rgba(0, 0, 0, 0.48) 52%,
		rgba(0, 0, 0, 0.10) 100%
	);
}

.otb-hero-title,
.otb-hero-title a {
	font-family: var(--otb-font-heading);
	font-weight: 800;
	font-size: 56px;
	line-height: 1.05;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-16);
}

.otb-hero-excerpt {
	font-size: 18px;
	color: var(--otb-off-white);
	max-width: 640px;
	margin: 0 0 var(--otb-space-16);
}

.otb-hero-readmore a,
.otb-hero-readmore {
	display: inline-block;
	background-color: var(--otb-yellow);
	color: var(--otb-bg-primary);
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 14px;
	border-radius: var(--otb-radius-button);
	padding: var(--otb-space-12) var(--otb-space-24);
}

.otb-card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--otb-space-24);
}

.otb-card {
	background-color: var(--otb-bg-secondary);
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-card);
	padding: 20px;
	box-shadow: var(--otb-shadow);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.otb-card:hover {
	border-color: var(--otb-border-hover);
	box-shadow: var(--otb-shadow-hover);
}

.otb-card-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--otb-radius-image);
	margin-bottom: var(--otb-space-12);
}

.otb-card-title,
.otb-card-title a {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-8);
}

.otb-card-title a:hover {
	color: var(--otb-yellow);
}

.otb-card-date {
	font-size: 13px;
	color: var(--otb-text-secondary);
	margin: 0;
}

.otb-section-heading {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 32px;
	line-height: 1.18;
	color: var(--otb-text-primary);
}

.otb-pagination a,
.otb-pagination span {
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 14px;
	color: var(--otb-text-primary);
}
.otb-pagination a:hover {
	color: var(--otb-yellow);
}

/* ==========================================================================
   Race Hub landing pages (Triple Crown evergreen architecture)
   ========================================================================== */

.otb-racehub-shell {
	padding: 0 var(--otb-space-24) var(--otb-space-96);
}

.otb-racehub-shell > * + * {
	margin-top: var(--otb-section-gap);
}

/* Hero -------------------------------------------------------------------- */

.otb-racehub-hero {
	position: relative;
	border-radius: var(--otb-radius-image);
	overflow: hidden;
	aspect-ratio: 21 / 9;
	margin: var(--otb-space-32) 0 0;
}

.otb-racehub-hero-image {
	position: absolute;
	inset: 0;
	margin: 0;
	width: 100%;
	height: 100%;
}

.otb-racehub-hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.otb-racehub-hero-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: var(--otb-space-32);
	background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.90) 100%);
}

.otb-racehub-eyebrow {
	display: inline-block;
	width: fit-content;
	font-family: var(--otb-font-body);
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--otb-bg-primary);
	background-color: var(--otb-yellow);
	border-radius: var(--otb-radius-badge);
	padding: var(--otb-space-4) var(--otb-space-8);
	margin: 0 0 var(--otb-space-12);
}

.otb-racehub-title {
	font-family: var(--otb-font-heading);
	font-weight: 800;
	font-size: 56px;
	line-height: 1.05;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-8);
}

.otb-racehub-subtitle {
	font-family: var(--otb-font-body);
	font-size: 18px;
	color: var(--otb-off-white);
	margin: 0;
	max-width: 680px;
}

/* Quick Facts strip --------------------------------------------------------- */

.otb-quickfacts {
	/* !important needed: Gutenberg's block-supports layout CSS (an
	   inline .wp-container-core-group-is-layout-… rule printed after this
	   stylesheet) sets display:flex on this same element, which otherwise
	   wins the cascade and leaves 5 items wrapping unevenly (4 + 1). */
	display: grid !important;
	grid-template-columns: repeat(5, 1fr) !important;
	gap: 1px;
	background-color: var(--otb-border);
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-card);
	overflow: hidden;
}

.otb-quickfact {
	background-color: var(--otb-bg-secondary);
	padding: var(--otb-space-16);
	text-align: center;
}

.otb-quickfact-label {
	display: block;
	font-family: var(--otb-font-body);
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--otb-text-secondary);
	margin: 0 0 var(--otb-space-4);
}

.otb-quickfact-value {
	display: block;
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 18px;
	color: var(--otb-yellow);
}

/* Section heading + copy ----------------------------------------------------- */

.otb-racehub-section-heading {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	color: var(--otb-text-primary);
	margin: 0 0 var(--otb-space-16);
	padding-bottom: var(--otb-space-12);
	border-bottom: 2px solid var(--otb-yellow);
}

.otb-racehub-copy {
	font-family: var(--otb-font-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--otb-text-primary);
}

.otb-racehub-copy p {
	margin: 0 0 var(--otb-space-16);
}

/* Data tables (odds / schedule / results) ------------------------------------ */

.otb-race-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-card);
}

.otb-race-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--otb-font-body);
	font-size: 14px;
	white-space: nowrap;
}

.otb-race-table thead th {
	background-color: var(--otb-bg-secondary);
	color: var(--otb-yellow);
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: left;
	padding: var(--otb-space-12) var(--otb-space-16);
	border-bottom: 2px solid var(--otb-surface-secondary);
}

.otb-race-table tbody td {
	padding: var(--otb-space-12) var(--otb-space-16);
	border-bottom: 1px solid var(--otb-surface-secondary);
	color: var(--otb-text-primary);
}

.otb-race-table tbody tr:last-child td {
	border-bottom: none;
}

.otb-race-table tbody tr:hover td {
	background-color: var(--otb-bg-secondary);
}

.otb-race-table-results td:first-child,
.otb-race-table-odds td:first-child {
	color: var(--otb-yellow);
	font-weight: 700;
}

/* FAQs (core/details accordion) ---------------------------------------------- */

.otb-racehub-faqs details {
	background-color: var(--otb-bg-secondary);
	border: 1px solid var(--otb-border);
	border-radius: var(--otb-radius-card);
	padding: var(--otb-space-16);
	margin-bottom: var(--otb-space-12);
}

.otb-racehub-faqs summary {
	font-family: var(--otb-font-heading);
	font-weight: 700;
	font-size: 16px;
	color: var(--otb-text-primary);
	cursor: pointer;
}

.otb-racehub-faqs details[open] summary {
	color: var(--otb-yellow);
	margin-bottom: var(--otb-space-8);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.otb-site-footer {
	background-color: var(--otb-bg-secondary);
	border-top: 1px solid var(--otb-border);
	padding: var(--otb-space-32) var(--otb-space-24);
	margin-top: var(--otb-space-64);
}

.otb-footer-title,
.otb-footer-title a {
	font-family: var(--otb-font-heading);
	font-weight: 800;
	font-size: 20px;
	color: var(--otb-yellow);
	text-transform: uppercase;
}

.otb-footer-tagline {
	font-size: 12px;
	color: var(--otb-text-secondary);
	margin: 0;
}

.otb-footer-copy {
	font-size: 13px;
	color: var(--otb-text-secondary);
	margin: 0;
}

/* ==========================================================================
   Mobile (per spec: mobile type scale + tighter section spacing)
   ========================================================================== */

@media (max-width: 767px) {

	.otb-article-title,
	.otb-article-title.wp-block-post-title {
		font-size: 34px;
		line-height: 1.10;
	}

	.otb-section-heading {
		font-size: 27px;
		line-height: 1.18;
	}

	.otb-sidebar-heading,
	.otb-card-title,
	.otb-card-title a {
		font-size: 21px;
		line-height: 1.25;
	}

	.otb-article-main,
	.otb-article-main p {
		font-size: 17px;
		line-height: 1.60;
	}

	.otb-meta-item,
	.otb-meta-item a {
		font-size: 13px;
	}

	.otb-hero-title,
	.otb-hero-title a {
		font-size: 34px;
		line-height: 1.10;
	}

	.otb-hero-card {
		aspect-ratio: unset;
		min-height: 480px;
	}

	.otb-hero-overlay {
		background: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.10) 0%,
			rgba(0, 0, 0, 0.55) 55%,
			rgba(0, 0, 0, 0.85) 100%
		);
		justify-content: flex-end;
	}

	.otb-card-grid {
		grid-template-columns: 1fr;
	}

	.otb-article-columns {
		flex-direction: column;
	}

	.otb-article-main,
	.otb-article-sidebar {
		flex-basis: 100% !important;
	}

	.otb-home-shell,
	.otb-article-shell {
		padding-left: var(--otb-space-16);
		padding-right: var(--otb-space-16);
	}

	.otb-home-shell > * + * {
		margin-top: var(--otb-space-32);
	}

	.otb-site-header {
		padding: var(--otb-space-12) var(--otb-space-16);
		position: relative;
	}

	.otb-topbar {
		padding-bottom: 0;
	}

	.otb-site-title,
	.otb-site-title a {
		font-size: 18px;
	}

	.otb-tagline {
		display: none;
	}

	.otb-nav-toggle {
		display: flex;
	}

	.otb-nav-toggle.is-open span:nth-child(1) {
		transform: translateY(6.5px) rotate(45deg);
	}
	.otb-nav-toggle.is-open span:nth-child(2) {
		opacity: 0;
	}
	.otb-nav-toggle.is-open span:nth-child(3) {
		transform: translateY(-6.5px) rotate(-45deg);
	}

	.otb-navbar {
		border-top: none;
		padding-top: 0;
	}

	.otb-nav-list {
		display: none;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--otb-space-16);
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background-color: var(--otb-bg-secondary);
		border-top: 1px solid var(--otb-border);
		border-bottom: 1px solid var(--otb-border);
		padding: var(--otb-space-16);
		z-index: 100;
	}

	.otb-nav-list.is-open {
		display: flex;
	}

	.otb-racehub-shell {
		padding-left: var(--otb-space-16);
		padding-right: var(--otb-space-16);
	}

	.otb-racehub-shell > * + * {
		margin-top: var(--otb-space-32);
	}

	.otb-racehub-hero {
		aspect-ratio: unset;
		min-height: 360px;
	}

	.otb-racehub-title {
		font-size: 32px;
		line-height: 1.10;
	}

	.otb-racehub-subtitle {
		font-size: 15px;
	}

	.otb-quickfacts {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.otb-racehub-section-heading {
		font-size: 22px;
	}

	.otb-racehub-copy {
		font-size: 16px;
	}
}
