/*
Theme Name: Valley News
Theme URI: https://example.com/valley-news
Author: Custom Build
Author URI: https://example.com
Description: A local TV-news style WordPress theme with a utility bar, breaking-news ticker, featured hero, story grid, category sections, and a weather/trending sidebar. Inspired by the general layout of local broadcast news sites. Replace the logo, colors, and menus with your own branding.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: valley-news
*/

/* ---------- Design tokens ---------- */
:root {
  --vn-navy: #0b2545;
  --vn-navy-dark: #071a33;
  --vn-blue: #13437e;
  --vn-red: #c8102e;
  --vn-red-dark: #a20d25;
  --vn-ink: #1a1a1a;
  --vn-gray: #5b6470;
  --vn-line: #e3e6ea;
  --vn-bg: #f4f6f8;
  --vn-white: #ffffff;
  --vn-shadow: 0 1px 3px rgba(11,37,69,.12), 0 1px 2px rgba(11,37,69,.08);
  --vn-max: 1200px;
  --vn-font: "Helvetica Neue", Arial, "Segoe UI", Roboto, sans-serif;
  --vn-serif: Georgia, "Times New Roman", serif;
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--vn-font);
  color: var(--vn-ink);
  background: var(--vn-bg);
  line-height: 1.5;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vn-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.vn-wrap { max-width: var(--vn-max); margin: 0 auto; padding: 0 16px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); word-wrap: normal;
}

/* ---------- Utility bar ---------- */
.vn-utility {
  background: var(--vn-navy-dark);
  color: #cdd6e2;
  font-size: 13px;
}
.vn-utility .vn-wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px; gap: 16px;
}
.vn-utility a { color: #cdd6e2; }
.vn-utility a:hover { color: #fff; text-decoration: none; }
.vn-util-left { display: flex; gap: 18px; align-items: center; }
.vn-util-right { display: flex; gap: 14px; align-items: center; }
.vn-util-weather { font-weight: 700; color: #fff; }
.vn-util-weather .vn-temp { color: var(--vn-red); }

/* ---------- Masthead ---------- */
.vn-masthead { background: var(--vn-navy); color: #fff; }
.vn-masthead .vn-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px;
}
.vn-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.vn-brand:hover { text-decoration: none; }
.vn-callsign {
  background: var(--vn-red); color: #fff; font-weight: 800;
  letter-spacing: 1px; padding: 8px 12px; border-radius: 4px;
  font-size: 22px; line-height: 1;
}
.vn-brand-text { display: flex; flex-direction: column; }
.vn-brand-name { color: #fff; font-size: 26px; font-weight: 800; line-height: 1; }
.vn-brand-tag { color: #9fb3cc; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.vn-masthead-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--vn-red); color: #fff; font-weight: 700;
  padding: 10px 18px; border-radius: 4px; font-size: 14px;
  text-transform: uppercase; letter-spacing: .5px;
}
.vn-masthead-cta:hover { background: var(--vn-red-dark); text-decoration: none; }
.vn-live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: vn-pulse 1.6s infinite;
}
@keyframes vn-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ---------- Primary nav ---------- */
.vn-nav { background: var(--vn-blue); position: sticky; top: 0; z-index: 50; }
.vn-nav .vn-wrap { display: flex; align-items: center; gap: 4px; }
.vn-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.vn-menu li { position: relative; }
.vn-menu a {
  display: block; color: #fff; padding: 14px 16px; font-size: 14px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.vn-menu a:hover, .vn-menu .current-menu-item > a {
  background: var(--vn-navy); text-decoration: none;
}
.vn-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--vn-navy); min-width: 200px; padding: 6px 0;
  box-shadow: var(--vn-shadow); list-style: none; margin: 0; z-index: 60;
}
.vn-menu li:hover > .sub-menu { display: block; }
.vn-menu .sub-menu a { padding: 10px 16px; text-transform: none; font-weight: 600; }
.vn-menu-toggle {
  display: none; margin-left: auto; background: transparent; border: 0;
  color: #fff; font-size: 20px; padding: 12px; cursor: pointer;
}

/* ---------- Breaking ticker ---------- */
.vn-ticker {
  background: var(--vn-red); color: #fff; overflow: hidden;
  display: flex; align-items: stretch;
}
.vn-ticker-label {
  background: var(--vn-navy-dark); font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; padding: 10px 16px; font-size: 13px; white-space: nowrap;
  display: flex; align-items: center;
}
.vn-ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.vn-ticker-items {
  display: inline-flex; gap: 40px; white-space: nowrap; padding-left: 100%;
  animation: vn-marquee 28s linear infinite;
}
.vn-ticker-items a { color: #fff; font-weight: 600; font-size: 14px; }
.vn-ticker:hover .vn-ticker-items { animation-play-state: paused; }
@keyframes vn-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- Layout ---------- */
.vn-main { padding: 24px 0 40px; }
.vn-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px;
}

/* ---------- Featured hero ---------- */
.vn-hero {
  position: relative; border-radius: 8px; overflow: hidden;
  background: var(--vn-navy); box-shadow: var(--vn-shadow); margin-bottom: 24px;
}
.vn-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.vn-hero-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 24px 22px;
  background: linear-gradient(to top, rgba(7,26,51,.92), rgba(7,26,51,0));
  color: #fff;
}
.vn-kicker {
  display: inline-block; background: var(--vn-red); color: #fff;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 3px; margin-bottom: 10px;
}
.vn-hero-title { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; }
.vn-hero-title a { color: #fff; }
.vn-hero-title a:hover { text-decoration: none; color: #ffd7dd; }
.vn-hero-meta { margin-top: 10px; font-size: 13px; color: #cdd6e2; }

/* ---------- Section headers ---------- */
.vn-section-head {
  display: flex; align-items: center; gap: 12px; margin: 8px 0 16px;
  border-bottom: 3px solid var(--vn-navy); padding-bottom: 6px;
}
.vn-section-head h2 {
  margin: 0; font-size: 20px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--vn-navy);
}
.vn-section-head .vn-tag {
  background: var(--vn-red); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 3px; text-transform: uppercase;
}

/* ---------- Story cards ---------- */
.vn-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px;
  margin-bottom: 28px;
}
.vn-card {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: var(--vn-shadow); display: flex; flex-direction: column;
}
.vn-card-thumb { position: relative; }
.vn-card-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.vn-card-cat {
  position: absolute; top: 10px; left: 10px; background: var(--vn-navy);
  color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; padding: 3px 8px; border-radius: 3px;
}
.vn-card-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.vn-card-title { margin: 0 0 8px; font-size: 18px; line-height: 1.25; font-weight: 700; }
.vn-card-title a { color: var(--vn-ink); }
.vn-card-title a:hover { color: var(--vn-blue); text-decoration: none; }
.vn-card-excerpt { color: var(--vn-gray); font-size: 14px; margin: 0 0 12px; }
.vn-card-meta { margin-top: auto; font-size: 12px; color: var(--vn-gray); }

/* Compact list variant */
.vn-list { list-style: none; margin: 0; padding: 0; }
.vn-list li {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--vn-line);
}
.vn-list li:last-child { border-bottom: 0; }
.vn-list img { width: 110px; height: 62px; object-fit: cover; border-radius: 4px; flex: none; }
.vn-list .vn-list-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; line-height: 1.25; }
.vn-list .vn-list-title a { color: var(--vn-ink); }
.vn-list .vn-list-meta { font-size: 12px; color: var(--vn-gray); }

/* ---------- Sidebar ---------- */
.vn-sidebar .vn-widget {
  background: #fff; border-radius: 8px; box-shadow: var(--vn-shadow);
  margin-bottom: 22px; overflow: hidden;
}
.vn-widget-head {
  background: var(--vn-navy); color: #fff; padding: 12px 16px;
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
}
.vn-widget-body { padding: 14px 16px 18px; }
.vn-widget-body ul { list-style: none; margin: 0; padding: 0; }
.vn-widget-body li { padding: 9px 0; border-bottom: 1px solid var(--vn-line); }
.vn-widget-body li:last-child { border-bottom: 0; }
.vn-widget-body a { color: var(--vn-ink); font-weight: 600; font-size: 14px; }
.vn-widget-body a:hover { color: var(--vn-blue); }

/* Weather widget */
.vn-weather-card { text-align: center; }
.vn-weather-temp { font-size: 48px; font-weight: 800; color: var(--vn-navy); line-height: 1; }
.vn-weather-cond { color: var(--vn-gray); font-size: 14px; margin-top: 4px; }
.vn-weather-row {
  display: flex; justify-content: space-around; margin-top: 14px;
  border-top: 1px solid var(--vn-line); padding-top: 12px;
}
.vn-weather-day { font-size: 12px; color: var(--vn-gray); }
.vn-weather-day strong { display: block; color: var(--vn-ink); font-size: 15px; }

/* Trending numbered */
.vn-trending { counter-reset: vn-count; }
.vn-trending li { display: flex; gap: 12px; align-items: flex-start; }
.vn-trending li::before {
  counter-increment: vn-count; content: counter(vn-count);
  background: var(--vn-red); color: #fff; font-weight: 800; font-size: 13px;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Single / page content ---------- */
.vn-article {
  background: #fff; border-radius: 8px; box-shadow: var(--vn-shadow);
  padding: 28px 32px 36px;
}
.vn-article-header { margin-bottom: 18px; }
.vn-article-title { font-size: 34px; line-height: 1.15; margin: 8px 0 12px; font-weight: 800; }
.vn-article-meta { color: var(--vn-gray); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.vn-article-feature { margin: 0 -32px 24px; }
.vn-article-feature img { width: 100%; }
.vn-article-content { font-size: 18px; line-height: 1.7; font-family: var(--vn-serif); }
.vn-article-content p { margin: 0 0 20px; }
.vn-article-content h2, .vn-article-content h3 { font-family: var(--vn-font); }
.vn-article-content a { text-decoration: underline; }
.vn-article-content img { border-radius: 6px; margin: 10px 0; }
.vn-article-content blockquote {
  border-left: 4px solid var(--vn-red); margin: 20px 0; padding: 4px 0 4px 20px;
  color: var(--vn-gray); font-style: italic;
}
.vn-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--vn-line); }
.vn-tags a {
  display: inline-block; background: var(--vn-bg); color: var(--vn-gray);
  padding: 4px 12px; border-radius: 20px; font-size: 13px; margin: 0 6px 6px 0;
}

/* ---------- Pagination ---------- */
.vn-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.vn-pagination a, .vn-pagination span {
  padding: 8px 14px; border-radius: 4px; background: #fff; box-shadow: var(--vn-shadow);
  color: var(--vn-navy); font-weight: 700; font-size: 14px;
}
.vn-pagination .current { background: var(--vn-navy); color: #fff; }

/* ---------- Comments ---------- */
.vn-comments { background: #fff; border-radius: 8px; box-shadow: var(--vn-shadow); padding: 24px 32px; margin-top: 24px; }
.vn-comments .comment-list { list-style: none; padding: 0; margin: 0; }
.vn-comments .comment-list li { border-bottom: 1px solid var(--vn-line); padding: 14px 0; }
.vn-comments input[type=text], .vn-comments input[type=email], .vn-comments input[type=url], .vn-comments textarea {
  width: 100%; padding: 10px; border: 1px solid var(--vn-line); border-radius: 4px; margin-bottom: 12px; font-family: inherit;
}
.vn-btn {
  display: inline-block; background: var(--vn-red); color: #fff; border: 0;
  padding: 11px 22px; border-radius: 4px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: .5px; font-size: 14px;
}
.vn-btn:hover { background: var(--vn-red-dark); }

/* ---------- Footer ---------- */
.vn-footer { background: var(--vn-navy-dark); color: #b7c4d6; margin-top: 40px; }
.vn-footer a { color: #b7c4d6; }
.vn-footer a:hover { color: #fff; }
.vn-footer-top { padding: 36px 0; }
.vn-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.vn-footer-cols h3 {
  color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 14px; border-bottom: 2px solid var(--vn-red); padding-bottom: 8px; display: inline-block;
}
.vn-footer-cols ul { list-style: none; margin: 0; padding: 0; }
.vn-footer-cols li { padding: 5px 0; font-size: 14px; }
.vn-footer-brand .vn-callsign { display: inline-block; margin-bottom: 12px; }
.vn-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Widgetized fallbacks ---------- */
.widget { margin-bottom: 20px; }
.widget-title { font-size: 15px; text-transform: uppercase; margin: 0 0 10px; color: var(--vn-navy); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .vn-grid { grid-template-columns: 1fr; }
  .vn-footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .vn-masthead-cta { display: none; }
  .vn-menu {
    display: none; flex-direction: column; width: 100%;
    background: var(--vn-blue);
  }
  .vn-menu.vn-open { display: flex; }
  .vn-menu li { width: 100%; }
  .vn-menu .sub-menu { position: static; box-shadow: none; }
  .vn-menu-toggle { display: block; }
  .vn-nav .vn-wrap { flex-wrap: wrap; }
  .vn-cards { grid-template-columns: 1fr; }
  .vn-hero-title { font-size: 22px; }
  .vn-article { padding: 20px; }
  .vn-article-feature { margin: 0 -20px 18px; }
  .vn-article-title { font-size: 26px; }
  .vn-util-left .vn-util-hide { display: none; }
}
