/* BikerThoth Motorcycle Blog - Dark Industrial Theme */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1e1e1e;
  --text: #e8e8e8;
  --text-muted: #a0a0a0;
  --accent: #ff6b00;
  --accent-hover: #ff8c33;
  --border: #2a2a2a;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

.hero {
  height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.75)), url('images/D03wT.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  position: relative;
}

.hero-content h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-content p {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0.85rem 2rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  margin-left: 1rem;
}

.btn-outline:hover { background: var(--accent); color: #000; }

section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

.builds-grid, .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.card-body { padding: 1.5rem; }

.card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.ad-slot {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ad-slot:empty::before {
  content: "Ad Slot";
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

footer {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }

.socials { margin: 1rem 0; display: flex; justify-content: center; gap: 1.5rem; font-size: 1.4rem; }

@media (max-width: 768px) {
  .nav-links { 
    position: fixed; 
    top: 60px; 
    left: 0; 
    right: 0; 
    background: rgba(10,10,10,0.98); 
    flex-direction: column; 
    padding: 1.5rem; 
    gap: 1rem;
    transform: translateY(-120%);
    transition: transform 0.3s;
  }
  .nav-links.open { transform: translateY(0); }
  .menu-toggle { display: block; }
  .about { grid-template-columns: 1fr; }
  .btn-outline { margin-left: 0; margin-top: 1rem; display: block; }
  section { padding: 3.5rem 1.25rem; }
}

/* Cards link to articles */
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link .read-more { display: block; margin-top: 0.75rem; color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.card-link:hover .read-more { color: var(--accent-hover); }

/* Article page */
.article { max-width: 720px; margin: 0 auto; padding: 7rem 1.5rem 4rem; }
.back-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; }
.back-link:hover { color: var(--accent-hover); }
.back-link.bottom { display: inline-block; margin-top: 2.5rem; }
.article-title { font-family: 'Oswald', sans-serif; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; letter-spacing: 1px; text-transform: uppercase; margin: 1.25rem 0 0.75rem; }
.article-meta { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.75rem; display: flex; gap: 0.6rem; align-items: center; }
.article-hero { width: 100%; max-height: 520px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; margin-bottom: 2rem; }
.article-body p { font-size: 1.12rem; line-height: 1.8; margin-bottom: 1.4rem; color: var(--text); }
.article-body a, .article-video a { color: var(--accent); word-break: break-all; }
.article-figure { margin: 2rem 0; }
.article-figure img { width: 100%; max-height: 560px; object-fit: contain; background: var(--bg-elevated); border-radius: 6px; border: 1px solid var(--border); display: block; }
.article-video { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--accent); }
.video-wrap { position: relative; padding-top: 56.25%; margin-bottom: 1rem; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

.card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; transform: translateY(-8px); box-shadow: var(--shadow); }
.bike-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; }
.bike-filter[hidden] { display: none; }
.bike-filter h3 { margin: 0; }
.bike-filter .count { color: var(--text-muted); font-weight: 400; font-size: 0.9em; }
.clear-filter { color: var(--accent); font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; }
.clear-filter:hover, .clear-filter:focus-visible { color: var(--accent-hover); text-decoration: underline; }

.article-subhead { font-size: 1.4rem; margin: 2rem 0 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.article-list { margin: 0 0 1.25rem 1.25rem; padding: 0; }
.article-list li { margin-bottom: 0.4rem; }

.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text-muted); border: 1px solid var(--border); transition: color 0.2s, border-color 0.2s, transform 0.2s; }
.social-icon:hover, .social-icon:focus-visible { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.nav-social { display: flex; gap: 0.5rem; align-items: center; }
.nav-social .social-icon { width: 32px; height: 32px; }
.share-row { margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.share-x { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.1rem; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; }
.share-x:hover, .share-x:focus-visible { background: var(--accent); color: #000; }

.subscribe { max-width: 720px; margin: 3rem auto; padding: 2rem 1.5rem; text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 12px; }
.subscribe h2 { margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.subscribe p { color: var(--text-muted); margin-bottom: 1.25rem; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.subscribe-form input { flex: 1 1 240px; max-width: 360px; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; }
.subscribe-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.subscribe-form .btn { border: none; cursor: pointer; font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Post ad slots (see ADS config in script.js) */
.post-ad { margin: 2rem auto; text-align: center; }
.post-ad .ad-label { display: block; font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
.post-ad .ad-box { display: inline-block; width: 728px; height: 90px; max-width: 100%; }
.post-ad.preview .ad-box { display: inline-flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 6px; color: var(--text-muted); font-size: 0.8rem; background: rgba(255,255,255,0.02); }
@media (max-width: 760px) {
  .post-ad-top .ad-box { width: 320px; height: 100px; }
  .post-ad-bottom .ad-box { width: 300px; height: 250px; }
}
@media (min-width: 800px) {
  /* let the 728px leaderboard break out of the narrower article column */
  .post-ad { width: 728px; position: relative; left: 50%; transform: translateX(-50%); }
  .post-ad .ad-box { max-width: none; }
}

/* Home page ad slots: same ADS system */
.home-ad .post-ad { left: auto; transform: none; margin: 1.5rem auto; }
@media (max-width: 760px) {
  .post-ad-homeTop .ad-box { width: 320px; height: 100px; }
  .post-ad-homeBottom .ad-box { width: 300px; height: 250px; }
}

/* In-feed banner between card rows (spans the full grid) */
.posts-grid .feed-ad { grid-column: 1 / -1; width: auto; left: auto; transform: none; margin: 0.5rem auto; }
.post-ad-homeFeed .ad-box { width: 728px; height: 90px; max-width: 100%; }
.post-ad-homeFeed .ad-box.fluid { width: 100%; height: auto; }
@media (max-width: 760px) { .post-ad-homeFeed .ad-box { width: 320px; height: 100px; } }

/* ---- static build additions ---- */
picture { display: contents; }
.article-hero, .article-figure img { height: auto; }
.card-noimg { height: 220px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bg-elevated), #000); color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 1.6rem; letter-spacing: 2px; text-transform: uppercase; }
.card-date { color: var(--text-muted); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip { font: inherit; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted); cursor: pointer; }
.chip:hover, .chip:focus-visible { color: var(--accent); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #000; }
.load-more-wrap { text-align: center; margin-top: 2rem; min-height: 3rem; }
.load-more-wrap .btn { border: none; cursor: pointer; font: inherit; }
#load-more[hidden] { display: none; }
.footer-links { margin: 0.5rem 0 1rem; }
.footer-links a { margin: 0 0.35rem; }
.bike-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.article-body .article-video { margin: 2rem 0; }
.yt-lite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: #000; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85; }
.yt-lite:hover img, .yt-lite:focus-visible img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; background: var(--accent); border-radius: 12px; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #000; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.mini-card { display: flex; gap: 0.75rem; align-items: center; padding: 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.mini-card:hover, .mini-card:focus-visible { border-color: var(--accent); }
.mini-card img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; }
.mini-card span { display: flex; flex-direction: column; min-width: 0; }
.mini-card small { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.mini-card strong { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.related-title { font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px; margin: 2rem 0 1rem; }
.related-grid { display: grid; gap: 0.75rem; }
.page-body .btn { margin: 0.5rem 0.5rem 0 0; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
