/* ============================================================
   WAUKESHA CITY NEWS — Main Stylesheet
   Colors: Blue #2B7AB8, Red #CC2936, Dark #1a1a1a
   ============================================================ */

:root {
  --blue: #2B7AB8;
  --blue-dark: #1e5a8a;
  --red: #CC2936;
  --red-dark: #a31f2a;
  --dark: #1a1a1a;
  --gray-dark: #333;
  --gray-mid: #666;
  --gray-light: #aaa;
  --gray-bg: #f4f4f4;
  --border: #ddd;
  --white: #fff;
  --max-width: 1200px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', system-ui, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- TOP BAR ---- */
.top-bar {
  background: var(--dark);
  color: #ccc;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  padding: 6px 0;
  border-bottom: 2px solid var(--red);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-bar-tagline {
  text-align: center;
  flex: 1;
  font-style: italic;
  color: #999;
}
.top-bar-social a {
  color: #ccc;
  display: inline-flex;
  align-items: center;
}
.top-bar-social a:hover { color: var(--blue); }

/* ---- HEADER ---- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--dark);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.header-title {
  flex: 1;
  text-align: center;
}
.site-name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
  letter-spacing: -0.5px;
  display: block;
}
.site-name:hover { color: var(--red); }
.site-subtitle {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--gray-mid);
  margin-top: 4px;
  font-style: italic;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.header-ad {
  flex-shrink: 0;
}

/* ---- NAV ---- */
.main-nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  padding: 12px 16px;
  cursor: pointer;
}
.nav-links {
  display: flex;
  flex: 1;
}
.nav-links li a {
  display: block;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-links li a:hover,
.nav-links li a.active {
  background: var(--red);
  color: var(--white);
}
.nav-search {
  padding: 8px 12px;
  flex-shrink: 0;
}
.nav-search input {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 6px 12px;
  color: var(--white);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  width: 160px;
  outline: none;
  transition: background 0.2s;
}
.nav-search input::placeholder { color: rgba(255,255,255,0.6); }
.nav-search input:focus { background: rgba(255,255,255,0.25); }

/* ---- BREAKING TICKER ---- */
.breaking-bar {
  background: var(--red);
  color: var(--white);
  overflow: hidden;
  padding: 7px 0;
}
.breaking-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.breaking-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: var(--white);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap {
  overflow: hidden;
  flex: 1;
}
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
.ticker span {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  padding-right: 0;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- MAIN LAYOUT ---- */
.site-main {
  padding: 28px 0 40px;
  background: var(--gray-bg);
}
.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* ---- HERO STORY ---- */
.hero-story {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}
.hero-image-wrap {
  position: relative;
  background: linear-gradient(135deg, #1e5a8a 0%, #2B7AB8 50%, #1a3a5a 100%);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image-wrap.no-img {
  background: linear-gradient(135deg, #1e5a8a 0%, #2B7AB8 50%, #1a3a5a 100%);
}
.hero-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.hero-body {
  padding: 24px 28px 28px;
}
.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero-headline a:hover { color: var(--red); }
.hero-deck {
  font-size: 1.05rem;
  color: var(--gray-dark);
  margin-bottom: 14px;
  font-style: italic;
  line-height: 1.5;
}
.hero-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray-dark);
  margin-bottom: 20px;
}
.story-meta {
  display: flex;
  gap: 14px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.byline { font-weight: 600; color: var(--gray-dark); }
.read-more-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}
.read-more-btn:hover { background: var(--red-dark); color: var(--white); }

/* ---- STORY CATEGORY BADGES ---- */
.story-category {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--blue);
  color: var(--white);
  margin-bottom: 8px;
}
.hero-image-wrap .story-category {
  position: absolute;
  bottom: 14px;
  left: 14px;
}
.cat-crime { background: #7b2d2d; }
.cat-sports { background: #1a6b2a; }
.cat-community { background: #5a3d7a; }
.cat-politics { background: #1e4a7a; }
.cat-business { background: #6b5a1e; }
.cat-opinion { background: var(--gray-dark); }

/* ---- SECTION HEADS ---- */
.section-head {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: 3px solid var(--dark);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.section-head-alt {
  border-color: var(--red);
}

/* ---- STORY GRID ---- */
.story-grid {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}
.story-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.story-card {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.story-card:last-child,
.story-card:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}
.story-card-img-wrap {
  position: relative;
  background: linear-gradient(135deg, #e8eef4, #c8d8e8);
  height: 160px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.story-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-card-img-wrap .story-category {
  position: absolute;
  bottom: 8px;
  left: 8px;
  margin-bottom: 0;
}
.story-card h3 {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.story-card h3 a:hover { color: var(--red); }
.story-excerpt {
  font-size: 0.85rem;
  color: var(--gray-mid);
  line-height: 1.5;
  margin-bottom: 10px;
}
.story-card .story-meta { margin-bottom: 0; }

/* ---- OPINION ---- */
.opinion-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}
.opinion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.opinion-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.opinion-body h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.opinion-body h3 a:hover { color: var(--red); }
.byline-full {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--gray-mid);
  font-style: italic;
}

/* ---- AD SLOTS ---- */
.ad-slot { margin-bottom: 24px; }
.ad-placeholder {
  background: #f0f0f0;
  border: 1px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #999;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-style: italic;
  border-radius: 3px;
}
.ad-leaderboard .ad-placeholder { height: 90px; }
.ad-banner .ad-placeholder { width: 200px; height: 60px; }
.ad-sidebar .ad-placeholder { height: 250px; }

/* ---- SIDEBAR ---- */
.sidebar {
  position: sticky;
  top: 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

/* Newsletter */
.widget-newsletter p {
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin-bottom: 12px;
  line-height: 1.5;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.newsletter-form input {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.15s;
}
.newsletter-form input:focus { border-color: var(--blue); }
.newsletter-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 3px;
  padding: 9px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.newsletter-form button:hover { background: var(--red-dark); }

/* Most Read */
.most-read-list {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.most-read-list li a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--dark);
}
.most-read-list li a:hover { color: var(--red); }

/* About Widget */
.about-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 12px;
}
.widget-about p {
  font-size: 0.82rem;
  color: var(--gray-mid);
  line-height: 1.5;
  margin-bottom: 14px;
  text-align: center;
}
.fb-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1877f2;
  color: var(--white);
  border-radius: 4px;
  padding: 9px 16px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}
.fb-follow-btn:hover { background: #1461c7; color: var(--white); }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--dark);
  color: #ccc;
  padding: 40px 0 0;
  margin-top: 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}
.footer-brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.footer-brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-brand strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
}
.footer-brand p {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col ul li a {
  font-size: 0.85rem;
  color: #aaa;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--white); }
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.social-link:hover { color: var(--white); }
.footer-bottom {
  padding: 14px 0;
  text-align: center;
}
.footer-bottom p {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: #666;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .story-grid-inner { grid-template-columns: 1fr; }
  .opinion-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; justify-content: center; }
  .header-ad { display: none; }
  .top-bar-tagline { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--blue-dark);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .main-nav { position: relative; }
  .nav-search { display: none; }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .hero-body { padding: 16px; }
  .story-grid { padding: 16px; }
}
