/*
Theme Name: Velocity News
Theme URI: https://velocitytech.example.com
Author: Velocity Tech
Author URI: https://velocitytech.example.com
Description: A classic newspaper-style news agency theme. SEO-optimized, fast, with NewsArticle schema, breaking news ticker, and role-based publishing workflow. Designed to pair with Rank Math SEO.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: velocity-news
Tags: news, blog, two-columns, right-sidebar, custom-menu, featured-images
*/

/* ==========================================================================
   1. Base / Reset
   ========================================================================== */
:root {
  --vn-accent: #b80000;
  --vn-ink: #111111;
  --vn-gray: #555555;
  --vn-light: #f4f1ec;
  --vn-border: #d9d4cb;
  --vn-serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --vn-sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

body {
  font-family: var(--vn-serif);
  color: var(--vn-ink);
  background: #fdfcfa;
  line-height: 1.7;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--vn-ink); text-decoration: none; }
a:hover { color: var(--vn-accent); }

.vn-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   2. Top bar + Masthead
   ========================================================================== */
.vn-topbar {
  background: var(--vn-ink);
  color: #ccc;
  font-family: var(--vn-sans);
  font-size: 12px;
  padding: 6px 0;
}
.vn-topbar .vn-container { display: flex; justify-content: space-between; align-items: center; }
.vn-topbar a { color: #ccc; margin-left: 14px; }
.vn-topbar a:hover { color: #fff; }

.vn-masthead { text-align: center; padding: 28px 0 18px; border-bottom: 3px double var(--vn-ink); }
.vn-masthead .site-title {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
}
.vn-masthead .site-title a { color: var(--vn-ink); }
.vn-masthead .site-description {
  font-family: var(--vn-sans);
  font-size: 13px;
  color: var(--vn-gray);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ==========================================================================
   3. Navigation
   ========================================================================== */
.vn-nav {
  border-bottom: 1px solid var(--vn-ink);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.vn-nav .vn-container { display: flex; align-items: center; justify-content: space-between; }
.vn-nav ul { list-style: none; display: flex; flex-wrap: wrap; }
.vn-nav ul li a {
  display: block;
  padding: 13px 16px;
  font-family: var(--vn-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vn-nav ul li.current-menu-item > a,
.vn-nav ul li a:hover { color: var(--vn-accent); box-shadow: inset 0 -3px 0 var(--vn-accent); }
.vn-nav ul ul { display: none; position: absolute; background: #fff; border: 1px solid var(--vn-border); min-width: 200px; }
.vn-nav ul li { position: relative; }
.vn-nav ul li:hover > ul { display: block; }
.vn-nav ul ul li a { padding: 10px 16px; box-shadow: none; }
.vn-search-toggle, .vn-menu-toggle { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 10px; }
.vn-menu-toggle { display: none; }

/* ==========================================================================
   4. Breaking news ticker
   ========================================================================== */
.vn-ticker {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--vn-border);
  overflow: hidden;
  font-family: var(--vn-sans);
  font-size: 14px;
}
.vn-ticker-label {
  background: var(--vn-accent);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.vn-ticker-track { overflow: hidden; flex: 1; }
.vn-ticker-items { display: inline-flex; white-space: nowrap; animation: vn-scroll 40s linear infinite; }
.vn-ticker-items a { padding: 8px 30px 8px 0; color: var(--vn-ink); }
.vn-ticker-items a::before { content: "\25CF"; color: var(--vn-accent); margin-right: 8px; font-size: 9px; vertical-align: 2px; }
@keyframes vn-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ==========================================================================
   5. Homepage layout
   ========================================================================== */
.vn-home { padding: 30px 0; }
.vn-hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--vn-border); }

.vn-lead .vn-cat { margin-bottom: 8px; }
.vn-lead h2 { font-size: 38px; line-height: 1.15; font-weight: 900; }
.vn-lead h2 a:hover { color: var(--vn-accent); }
.vn-lead .vn-excerpt { color: var(--vn-gray); margin-top: 12px; font-size: 17px; }
.vn-lead img { margin-bottom: 16px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }

.vn-side-stories { display: flex; flex-direction: column; gap: 18px; }
.vn-side-stories article { display: flex; gap: 14px; padding-bottom: 18px; border-bottom: 1px dotted var(--vn-border); }
.vn-side-stories article:last-child { border-bottom: 0; }
.vn-side-stories img { width: 110px; height: 78px; object-fit: cover; flex-shrink: 0; }
.vn-side-stories h3 { font-size: 17px; line-height: 1.3; font-weight: 700; }

.vn-cat {
  font-family: var(--vn-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--vn-accent);
  display: inline-block;
}
.vn-meta { font-family: var(--vn-sans); font-size: 12px; color: #999; margin-top: 6px; }

/* Section blocks */
.vn-section { margin-top: 36px; }
.vn-section-title {
  font-family: var(--vn-sans);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 3px solid var(--vn-ink);
  padding-bottom: 8px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.vn-section-title .vn-more { font-size: 11px; font-weight: 600; color: var(--vn-accent); }
.vn-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.vn-card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; margin-bottom: 10px; }
.vn-card h3 { font-size: 17px; line-height: 1.35; font-weight: 700; }

/* Two-column main + sidebar */
.vn-main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; margin-top: 36px; }

/* List posts */
.vn-post-list article { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--vn-border); }
.vn-post-list img { width: 240px; height: 150px; object-fit: cover; flex-shrink: 0; }
.vn-post-list h2 { font-size: 23px; line-height: 1.25; font-weight: 800; }
.vn-post-list .vn-excerpt { color: var(--vn-gray); font-size: 15px; margin-top: 8px; }

/* Sidebar */
.vn-sidebar .widget { margin-bottom: 34px; }
.vn-sidebar .widget-title {
  font-family: var(--vn-sans);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 3px solid var(--vn-ink);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.vn-sidebar ul { list-style: none; }
.vn-sidebar ul li { padding: 9px 0; border-bottom: 1px dotted var(--vn-border); font-size: 15px; }
.vn-trending { counter-reset: trend; }
.vn-trending li { display: flex; gap: 14px; align-items: baseline; }
.vn-trending li::before {
  counter-increment: trend;
  content: counter(trend);
  font-family: var(--vn-sans);
  font-size: 26px;
  font-weight: 900;
  color: var(--vn-border);
  line-height: 1;
}

/* ==========================================================================
   6. Single post
   ========================================================================== */
.vn-single { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.vn-single .entry-title { font-size: 40px; line-height: 1.15; font-weight: 900; margin: 10px 0 14px; }
.vn-single .vn-byline {
  font-family: var(--vn-sans);
  font-size: 13px;
  color: var(--vn-gray);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--vn-border);
  border-bottom: 1px solid var(--vn-border);
  margin-bottom: 24px;
}
.vn-single .vn-byline strong { color: var(--vn-ink); }
.vn-single .entry-content p { margin-bottom: 1.4em; font-size: 18px; }
.vn-single .entry-content h2 { font-size: 28px; margin: 1.4em 0 0.6em; }
.vn-single .entry-content h3 { font-size: 22px; margin: 1.2em 0 0.5em; }
.vn-single .entry-content ul, .vn-single .entry-content ol { margin: 0 0 1.4em 1.4em; }
.vn-single .entry-content blockquote {
  border-left: 4px solid var(--vn-accent);
  padding: 10px 22px;
  margin: 1.5em 0;
  font-style: italic;
  background: var(--vn-light);
}
.vn-single .wp-post-image { margin-bottom: 8px; }
.vn-caption { font-family: var(--vn-sans); font-size: 12px; color: #999; margin-bottom: 24px; }
.vn-tags { margin: 30px 0; }
.vn-tags a {
  display: inline-block;
  font-family: var(--vn-sans);
  font-size: 12px;
  background: var(--vn-light);
  border: 1px solid var(--vn-border);
  padding: 5px 12px;
  margin: 0 6px 8px 0;
  border-radius: 2px;
}
.vn-tags a:hover { background: var(--vn-accent); color: #fff; border-color: var(--vn-accent); }
.vn-author-box {
  display: flex;
  gap: 18px;
  background: var(--vn-light);
  border: 1px solid var(--vn-border);
  padding: 22px;
  margin: 30px 0;
}
.vn-author-box img { border-radius: 50%; width: 70px; height: 70px; }
.vn-author-box h4 { font-family: var(--vn-sans); font-size: 15px; }
.vn-author-box p { font-size: 14px; color: var(--vn-gray); margin-top: 6px; }
.vn-related { margin-top: 40px; }

/* Breadcrumbs */
.vn-breadcrumbs { font-family: var(--vn-sans); font-size: 12px; color: #999; margin-bottom: 8px; }
.vn-breadcrumbs a { color: #999; }
.vn-breadcrumbs a:hover { color: var(--vn-accent); }

/* ==========================================================================
   7. Archive / pagination / footer
   ========================================================================== */
.vn-archive-header { padding: 34px 0 6px; }
.vn-archive-header h1 { font-size: 34px; font-weight: 900; }
.vn-archive-header .archive-description { color: var(--vn-gray); font-size: 15px; margin-top: 6px; }

.vn-pagination { display: flex; gap: 8px; justify-content: center; padding: 34px 0; font-family: var(--vn-sans); }
.vn-pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid var(--vn-border);
  font-size: 14px;
  font-weight: 700;
}
.vn-pagination .current { background: var(--vn-ink); color: #fff; border-color: var(--vn-ink); }

.vn-footer { background: var(--vn-ink); color: #bbb; margin-top: 50px; font-family: var(--vn-sans); font-size: 14px; }
.vn-footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 44px 0; }
.vn-footer .widget-title { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px; }
.vn-footer a { color: #bbb; }
.vn-footer a:hover { color: #fff; }
.vn-footer ul { list-style: none; }
.vn-footer ul li { padding: 5px 0; }
.vn-footer-bottom { border-top: 1px solid #333; padding: 16px 0; font-size: 12px; text-align: center; color: #888; }

/* Comments, forms */
.comment-list { list-style: none; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--vn-border); font-size: 15px; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--vn-border);
  font-family: var(--vn-sans);
  font-size: 14px;
}
button, input[type="submit"] {
  background: var(--vn-accent);
  color: #fff;
  border: 0;
  padding: 11px 24px;
  font-family: var(--vn-sans);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: #900000; }

/* Screen reader */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .vn-hero-grid, .vn-main-grid { grid-template-columns: 1fr; }
  .vn-card-grid { grid-template-columns: repeat(2, 1fr); }
  .vn-footer-widgets { grid-template-columns: repeat(2, 1fr); }
  .vn-masthead .site-title { font-size: 36px; }
  .vn-menu-toggle { display: block; }
  .vn-nav ul.vn-menu { display: none; flex-direction: column; width: 100%; }
  .vn-nav ul.vn-menu.open { display: flex; }
  .vn-nav .vn-container { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .vn-card-grid { grid-template-columns: 1fr; }
  .vn-post-list article { flex-direction: column; }
  .vn-post-list img { width: 100%; height: auto; }
  .vn-single .entry-title { font-size: 30px; }
  .vn-lead h2 { font-size: 28px; }
}
