/*
Theme Name: SocialBettingGames
Theme URI: https://socialbettinggames.com
Author: SocialBettingGames.com
Description: Lightweight, mobile-first editorial theme for SocialBettingGames.com. Customizer-driven homepage, SEO-plugin compatible, accessible, no external requests.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sbg
*/

:root {
	--accent: #5b3df5;
	--accent-ink: #fff;
	--ink: #14161c;
	--muted: #5a6072;
	--bg: #fff;
	--surface: #f5f6fa;
	--line: #e3e6ee;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(20, 22, 28, .06), 0 6px 18px rgba(20, 22, 28, .06);
	--s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--max: 1180px;
}

@media (prefers-color-scheme: dark) {
	:root { --ink: #eceef5; --muted: #a2a8bb; --bg: #0f1117; --surface: #181b25; --line: #272b38; --shadow: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.65 var(--font); color: var(--ink); background: var(--bg); }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 var(--s2); }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 var(--s2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--bg); padding: .6rem 1rem; clip: auto; width: auto; height: auto; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 760px); margin-inline: auto; }
.section { padding-block: var(--s4); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: .6rem 1.2rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 1rem; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-ink); }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); z-index: 50; }
.site-header.is-sticky { position: sticky; top: 0; }
.admin-bar .site-header.is-sticky { top: 32px; }
.header-row { display: flex; align-items: center; gap: var(--s2); min-height: 68px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; margin-right: auto; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.brand-tag { font-size: .78rem; color: var(--muted); }
.custom-logo { max-height: 48px; width: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; }
.primary-nav a { display: block; padding: .5rem .8rem; color: var(--ink); text-decoration: none; border-radius: 8px; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--surface); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle { display: none; }
.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding: var(--s2) 0; }
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] { flex: 1; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--bg); color: var(--ink); }

@media (max-width: 900px) {
	.menu-toggle { display: inline-grid; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s2); }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; align-items: stretch; }
	.header-cta { display: none; }
	.site-header { position: relative; }
	.site-header.is-sticky { position: sticky; }
}

/* Hero */
.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg) 60%); padding-block: var(--s5); }
.hero-grid { display: grid; gap: var(--s4); align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--s3); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }

/* Cards */
.grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16 / 10; background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: var(--s2) var(--s2) var(--s3); display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { font-size: 1.12rem; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--muted); font-size: .95rem; margin: 0; }
.cat-label { align-self: flex-start; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; background: color-mix(in srgb, var(--accent) 14%, var(--bg)); color: var(--accent); padding: .2rem .6rem; border-radius: 999px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--muted); margin-top: auto; }
.entry-meta a { color: inherit; }
.card.is-spotlight .card-title { font-size: 1.4rem; }

/* Pills, lists, notices */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--s3); }
.pill { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.pill:hover, .pill.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rank-list { list-style: none; counter-reset: r; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.rank-list li { counter-increment: r; display: flex; gap: var(--s2); align-items: baseline; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--radius); }
.rank-list li::before { content: counter(r); font-weight: 800; font-size: 1.4rem; color: var(--accent); min-width: 1.5ch; }
.rank-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.band { background: var(--surface); }
.cta-band { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: var(--s4) var(--s3); }
.cta-band p { max-width: 62ch; }
.cta-band .btn-ghost { color: var(--bg); border-color: var(--bg); }
.cta-band .btn-ghost:hover { background: var(--bg); color: var(--ink); }
.cta-band .btn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fineprint { font-size: .85rem; opacity: .85; }
.notice { border-left: 4px solid var(--accent); background: var(--surface); padding: var(--s2); border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--muted); }

/* Single / page */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding-block: var(--s2); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; }
.breadcrumbs a { color: inherit; }
.entry-header { margin-bottom: var(--s3); }
.entry-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s3); }
.entry-content { font-size: 1.08rem; }
.entry-content h2, .entry-content h3 { margin-top: var(--s4); }
.entry-content img { border-radius: 10px; }
.entry-content table { border-collapse: collapse; width: 100%; overflow-x: auto; display: block; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .5rem .7rem; }
.tags a { display: inline-block; margin: 0 .4rem .4rem 0; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .85rem; }
.author-box { display: flex; gap: var(--s2); padding: var(--s3); background: var(--surface); border-radius: var(--radius); margin-block: var(--s4); }
.author-box img { border-radius: 50%; flex: none; }
.author-box p { margin: 0 0 .4rem; color: var(--muted); }
.page-head { padding-block: var(--s4) var(--s2); }
.page-head p { color: var(--muted); max-width: 60ch; }

/* Pagination */
.pagination { margin-top: var(--s4); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.pagination .current, .pagination a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: var(--s5); padding-block: var(--s4) var(--s3); }
.footer-grid { display: grid; gap: var(--s3); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-grid a, .social a { color: var(--ink); }
.footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.social { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: var(--s2) 0 0; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: var(--s3); padding-top: var(--s2); font-size: .85rem; color: var(--muted); }

/* Comments (minimal) */
.comment-list { padding-left: 0; list-style: none; }
.comment-body { border-top: 1px solid var(--line); padding-block: var(--s2); }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea { width: 100%; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation: none !important; transition: none !important; }
}
