/*
Theme Name: RCFans
Theme URI: https://www.rcfans.net/
Author: RCFans
Description: Lightweight black-and-orange blog theme for RCFans.net, built on the RCFans brand pack.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: Proprietary
Text Domain: rcfans
*/

:root {
	--orange: #ff6600;
	--orange-dark: #d95500;
	--ink: #101417;
	--ink-2: #1b2227;
	--text: #1f262c;
	--muted: #66717b;
	--line: #e3e6ea;
	--bg: #f2f3f5;
	--card: #ffffff;
	--radius: 10px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-head: "Roboto Condensed", "Arial Narrow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.25; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }

/* Header */
.site-header { background: var(--ink); border-bottom: 3px solid var(--orange); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 22px; width: auto; display: block; }
.primary-nav { flex: 1; min-width: 0; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav a { display: block; padding: 8px 12px; color: #c9d0d6; font-family: var(--font-head); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 6px; }
.primary-nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.primary-nav .current-menu-item > a, .primary-nav .current-cat > a { color: #fff; box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.primary-nav .menu-ext a { color: var(--orange); }
.header-search input { width: 200px; background: var(--ink-2); border: 1px solid #2c353c; color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.header-search input::placeholder { color: #8a949c; }
.header-search input:focus { outline: none; border-color: var(--orange); }

/* Layout */
.site-content { padding-top: 28px; padding-bottom: 48px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.page-head h1 { margin: 0 0 18px; font-size: 26px; }

/* Cards */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.card, .card-box { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,20,23,0.06); }
.card { display: flex; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 6px 18px rgba(16,20,23,0.10); transform: translateY(-1px); }
.card-thumb { flex: 0 0 260px; height: 174px; background: var(--ink-2); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.card-body { padding: 18px 22px; min-width: 0; }
.card-title { margin: 6px 0 8px; font-size: 21px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--orange-dark); }
.card-excerpt { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.badge { background: var(--orange); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 4px; }
.badge:hover { color: #fff; background: var(--orange-dark); }

/* Pagination */
.pagination { margin-top: 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 8px 12px; background: var(--card); color: var(--text); border-radius: 8px; font-weight: 600; }
.pagination .page-numbers.current { background: var(--ink); color: #fff; }
.pagination a.page-numbers:hover { background: var(--orange); color: #fff; }

/* Single */
.entry { padding: 32px 40px; }
.entry-title { font-size: 34px; margin: 10px 0 0; }
.entry-hero { margin: 24px 0 0; }
.entry-hero img { border-radius: 8px; width: 100%; }
.entry-content { margin-top: 24px; font-size: 17px; overflow-wrap: break-word; }
.entry-content > * { max-width: 100%; }
.entry-content img { border-radius: 6px; }
.entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--orange); color: var(--muted); }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption, .wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px; }
.tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { background: var(--bg); color: var(--text); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.post-navigation { margin-top: 16px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; background: var(--card); border-radius: var(--radius); padding: 16px 20px; height: 100%; }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.nav-title { display: block; color: var(--ink); font-weight: 600; margin-top: 4px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--card); border-radius: var(--radius); padding: 20px 22px; }
.widget-title { margin: 0 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 10px; border-bottom: 2px solid var(--ink); position: relative; }
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 36px; height: 2px; background: var(--orange); }
.widget p { margin: 0; color: var(--muted); font-size: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.latest li { padding: 10px 0; border-top: 1px solid var(--line); }
.latest li:first-child { border-top: 0; padding-top: 0; }
.latest a { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.4; display: block; }
.latest a:hover { color: var(--orange-dark); }
.latest time { font-size: 12px; color: var(--muted); }
.sidebar-sticky { position: sticky; top: 90px; }
.ad-slot { background: var(--card); border-radius: var(--radius); padding: 12px; text-align: center; overflow: hidden; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }

/* Forms & buttons */
.search-form { display: flex; gap: 8px; margin: 16px 0; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.search-submit, .btn { background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 700; cursor: pointer; display: inline-block; }
.search-submit:hover, .btn:hover { background: var(--orange-dark); color: #fff; }
.empty, .notfound { padding: 32px 40px; }
.big-r { font-family: var(--font-head); font-size: 88px; font-weight: 800; color: var(--orange); line-height: 1; margin: 0; }

/* Footer */
.site-footer { background: var(--ink); color: #8a949c; border-top: 3px solid var(--orange); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; }
.brand-sm img { height: 18px; }
.tagline { margin: 6px 0 0; font-family: var(--font-head); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.footer-nav, .footer-nav ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: #c9d0d6; font-size: 14px; }
.footer-nav a:hover { color: var(--orange); }
.copyright { width: 100%; margin: 8px 0 0; font-size: 13px; border-top: 1px solid #222b31; padding-top: 16px; }

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky .card-title::before { content: "Featured · "; color: var(--orange); }

/* Responsive */
@media (max-width: 960px) {
	.layout { grid-template-columns: 1fr; }
	.sidebar-sticky { position: static; }
	.header-search { display: none; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 640px) {
	.header-inner { gap: 12px; flex-wrap: wrap; padding-top: 10px; }
	.brand img { height: 18px; }
	.primary-nav { width: 100%; flex-basis: 100%; overflow-x: auto; }
	.primary-nav a { padding: 8px 10px; font-size: 14px; }
	.site-content { padding-top: 16px; }
	.card { flex-direction: column; }
	.card-thumb { flex-basis: auto; height: auto; aspect-ratio: 16 / 9; }
	.card-body { padding: 14px 16px 18px; }
	.card-title { font-size: 19px; }
	.entry, .empty, .notfound { padding: 20px 16px; }
	.entry-title { font-size: 26px; }
	.entry-content { font-size: 16px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
}
