/*
Theme Name: Love
Theme URI: https://ilovemonticello.com
Author: I Love Monticello
Author URI: https://ilovemonticello.com
Description: A Drudge-style local news aggregator theme for Monticello, Indiana. Clean, minimal, mobile-first, and fast. Built for ilovemonticello.com.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: monticello-daily
*/

/* -------------------------------------------------
   0. DESIGN TOKENS
------------------------------------------------- */
:root {
  --md-red: #EF4647;
  --md-red-dark: #C93536;
  --md-yellow: #FDDA3B;
  --md-cream: #FDF9E4;
  --md-dark: #1B1B1B;
  --md-dark-2: #262626;
  --md-text: #222222;
  --md-muted: #6B6B6B;
  --md-border: #E7E2CE;
  --md-white: #FFFFFF;

  --md-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --md-radius: 6px;
  --md-shadow: 0 2px 10px rgba(0,0,0,0.06);

  --md-max-width: 1180px;
  --md-gutter: 20px;
}

/* -------------------------------------------------
   1. RESET
------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--md-font);
  color: var(--md-text);
  background: var(--md-cream);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--md-font); margin: 0; font-weight: 600; }
p { margin: 0 0 12px; }
button { font-family: var(--md-font); cursor: pointer; }
:focus-visible { outline: 3px solid var(--md-yellow); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.md-container {
  max-width: var(--md-max-width);
  margin: 0 auto;
  padding: 0 var(--md-gutter);
}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* -------------------------------------------------
   2. TOP BAR (red, site name + date)
------------------------------------------------- */
.md-topbar {
  background: var(--md-red);
  color: var(--md-white);
}
.md-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--md-gutter);
  gap: 12px;
  flex-wrap: wrap;
}
.md-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.md-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--md-white);
}
.md-brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--md-white);
}
.md-brand-tag {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--md-yellow);
  margin-top: -2px;
}
.md-topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
}
.md-topbar-date { opacity: 0.95; }

.md-nav {
  background: var(--md-red-dark);
}
.md-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.md-nav a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--md-white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.md-nav a:hover, .md-nav a:focus-visible { background: rgba(0,0,0,0.18); }

/* -------------------------------------------------
   3. WEATHER STRIP (dark)
------------------------------------------------- */
.md-weather-strip {
  background: var(--md-dark);
  color: var(--md-white);
}
.md-weather-strip .md-container {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 10px;
  padding-bottom: 10px;
  overflow-x: auto;
  font-size: 13px;
}
.md-weather-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.md-weather-temp {
  font-weight: 700;
  color: var(--md-yellow);
  font-size: 15px;
}
.md-weather-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex: none;
}
.md-weather-sep {
  width: 1px;
  height: 16px;
  background: #3A3A3A;
  flex: none;
}

/* -------------------------------------------------
   4. LAYOUT GRID
------------------------------------------------- */
.md-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 24px var(--md-gutter) 60px;
  max-width: var(--md-max-width);
  margin: 0 auto;
}
.md-main { min-width: 0; }
.md-sidebar { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

@media (min-width: 900px) {
  .md-layout {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* -------------------------------------------------
   5. SECTION HEADER (dark bar, red dot)
------------------------------------------------- */
.md-section {
  margin-bottom: 30px;
}
.md-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--md-dark-2);
  color: var(--md-white);
  padding: 10px 14px;
  border-radius: var(--md-radius);
  margin-bottom: 14px;
}
.md-section-header::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--md-red);
  flex: none;
}
.md-section-header h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.md-section-header .md-section-link {
  margin-left: auto;
  font-size: 11px;
  color: var(--md-yellow);
  font-weight: 600;
  text-transform: uppercase;
}

/* -------------------------------------------------
   6. HERO STORY
------------------------------------------------- */
.md-hero {
  display: block;
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  overflow: hidden;
  box-shadow: var(--md-shadow);
  margin-bottom: 30px;
}
.md-hero-img { aspect-ratio: 16/9; overflow: hidden; background: var(--md-dark-2); }
.md-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.md-hero-body { padding: 18px 20px 22px; }
.md-hero-kicker {
  display: inline-block;
  background: var(--md-red);
  color: var(--md-white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.md-hero h1 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.2;
  margin-bottom: 10px;
}
.md-hero-excerpt { color: var(--md-muted); font-size: 15px; }
.md-hero-meta { margin-top: 10px; font-size: 12px; color: var(--md-muted); font-weight: 500; }

/* -------------------------------------------------
   7. HEADLINE LIST ITEMS
------------------------------------------------- */
.md-headline-list { display: flex; flex-direction: column; }
.md-headline-item {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--md-border);
}
.md-headline-item:first-child { padding-top: 0; }
.md-headline-item:last-child { border-bottom: none; }
.md-headline-thumb {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--md-radius);
  overflow: hidden;
  background: var(--md-border);
}
.md-headline-thumb img { width: 100%; height: 100%; object-fit: cover; }
.md-headline-content { min-width: 0; }
.md-headline-content h3 {
  font-size: 15.5px;
  line-height: 1.32;
  font-weight: 600;
  margin-bottom: 5px;
}
.md-headline-content a:hover, .md-headline-content a:focus-visible { color: var(--md-red); }
.md-headline-excerpt {
  font-size: 12.5px;
  color: var(--md-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.md-headline-source {
  font-size: 11px;
  color: var(--md-red-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.md-headline-time { color: var(--md-muted); font-weight: 400; text-transform: none; }

/* -------------------------------------------------
   8. SIDEBAR WIDGETS
------------------------------------------------- */
.widget {
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  padding: 16px;
}
.widget-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  color: var(--md-dark-2);
}
.sponsored-ad-widget {
  background: var(--md-cream);
  border: 1px dashed var(--md-red);
  text-align: center;
}
.sponsored-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--md-red);
  margin-bottom: 4px;
}

/* -------------------------------------------------
   9. REAL ESTATE GRID
------------------------------------------------- */
.md-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.md-listing-card {
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  overflow: hidden;
  display: block;
}
.md-listing-img { aspect-ratio: 4/3; background: var(--md-border); overflow: hidden; }
.md-listing-img img { width: 100%; height: 100%; object-fit: cover; }
.md-listing-body { padding: 10px; }
.md-listing-price { font-weight: 700; color: var(--md-red-dark); font-size: 14px; }
.md-listing-addr { font-size: 12px; color: var(--md-muted); margin-top: 2px; }

/* -------------------------------------------------
   10. SPONSORED TEXT AD
------------------------------------------------- */
.md-sponsored-strip {
  background: var(--md-yellow);
  border-radius: var(--md-radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.md-sponsored-strip strong { text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; }

/* -------------------------------------------------
   11. BUSINESS DIRECTORY
------------------------------------------------- */
.md-directory-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--md-border);
  font-size: 13px;
}
.md-directory-list li:last-child { border-bottom: none; }
.md-directory-list a { font-weight: 600; }
.md-directory-list span { display: block; color: var(--md-muted); font-size: 11px; }

/* -------------------------------------------------
   12. FOOTER (dark)
------------------------------------------------- */
.md-footer {
  background: var(--md-dark);
  color: #C9C9C9;
  margin-top: 30px;
}
.md-footer-inner {
  max-width: var(--md-max-width);
  margin: 0 auto;
  padding: 34px var(--md-gutter);
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .md-footer-inner { grid-template-columns: repeat(3, 1fr); }
}
.md-footer h4 {
  color: var(--md-white);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.md-footer a { color: #C9C9C9; font-size: 13px; }
.md-footer a:hover { color: var(--md-yellow); }
.md-footer-bottom {
  border-top: 1px solid #333;
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: #888;
}

/* -------------------------------------------------
   13. SINGLE POST (RSS-imported story)
------------------------------------------------- */
.md-single {
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  padding: 24px 22px;
  max-width: 760px;
  margin: 24px auto;
}
.md-single h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.25; margin-bottom: 10px; }
.md-single-meta { font-size: 12px; color: var(--md-muted); margin-bottom: 16px; }
.md-single-img { border-radius: var(--md-radius); overflow: hidden; margin-bottom: 18px; }
.md-source-link {
  display: inline-block;
  margin-top: 14px;
  background: var(--md-red);
  color: var(--md-white);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--md-radius);
}
.md-source-link:hover { background: var(--md-red-dark); }

/* -------------------------------------------------
   14. UTILITIES
------------------------------------------------- */
.md-empty { color: var(--md-muted); font-size: 13px; padding: 10px 0; }
