/*
Theme Name: The Georgia Chronicle
Description: Custom newspaper theme for thegeorgiachronicle.com, ported from the approved static design. Classic PHP theme, no build step, no options panel.
Version: 1.0.0
Author: The Georgia Chronicle
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: georgiachronicle
*/

:root {
  --paper: #faf9f6;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #1a1a1a;
  --accent: #8b1a1a;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
}

.bg-paper { background: var(--paper) !important; }

h1, h2, h3, .h1, .h2, .h3, .h4, .h5 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }

.topbar { font-size: .8rem; color: var(--muted); }

.masthead { max-height: 160px; }
.masthead-sm { max-height: 80px; }

.navbar .nav-link {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  font-weight: 600;
  padding: .6rem 1rem !important;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--accent); }
.navbar-toggler {
  border: 1px solid var(--ink);
  font-size: .85rem;
  text-transform: uppercase;
}

.section-head {
  border-bottom: 2px solid var(--rule);
  padding-bottom: .35rem;
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.story-card img, .lead-story img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e6e3dc;
}
.story-card h3 { font-size: 1.2rem; margin: .5rem 0 .3rem; }
.story-card h3 a, .lead-story h2 a { text-decoration: none; }

.kicker {
  color: var(--accent);
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.kicker a { color: inherit; text-decoration: none; }
.byline { color: var(--muted); font-size: .85rem; }
.byline a { color: inherit; }
.lead-story { border-bottom: 1px solid var(--rule); padding-bottom: 1.25rem; }
.lead-story h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; }

/* Article page */
.story h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; }
.story .body { font-size: 1.15rem; line-height: 1.75; }
.story .body > p:first-of-type::first-letter {
  float: left;
  font-family: "Playfair Display", serif;
  font-size: 3.6rem;
  line-height: .9;
  padding: .25rem .5rem 0 0;
}
.story .body img { max-width: 100%; height: auto; }
.story .body figure { margin: 1.5rem 0; }
.story .body figcaption, .wp-caption-text { color: var(--muted); font-size: .85rem; }
.story .body h2, .story .body h3 { margin-top: 1.75rem; }
.story .body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
}

.sidebar-box { border: 1px solid var(--rule); }

.featured-list { list-style: none; padding: 0; margin: 0; }
.featured-list li { padding: .5rem 0; border-bottom: 1px solid #e6e3dc; }
.featured-list li:last-child { border-bottom: 0; }
.featured-list a { text-decoration: none; font-family: "Playfair Display", Georgia, serif; font-weight: 700; }

/* Local conditions (inc/conditions.php) */
.wx-alert {
  border-left: 3px solid var(--accent);
  background: rgba(139, 26, 26, .06);
  color: var(--accent);
  padding: .4rem .6rem;
  font-size: .9rem;
}
.wx-alert span { color: var(--ink); font-size: .85rem; }
.wx-alert-detail summary { cursor: pointer; list-style: none; }
.wx-alert-detail summary::-webkit-details-marker { display: none; }
.wx-alert-detail summary::after { content: " +"; color: var(--muted); }
.wx-alert-detail[open] summary::after { content: " \2212"; }
.wx-alert-detail p { color: var(--ink); }
.wx-strip {
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  padding: .45rem 0;
  font-size: .9rem;
}
.wx-strip a { color: var(--accent); margin-left: .5rem; }
.wx-now { display: flex; align-items: center; gap: .75rem; }
.wx-temp {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
}
.wx-temp-lg { font-size: 3.2rem; }
.wx-now-text { font-size: .95rem; line-height: 1.3; }
.wx-foot { color: var(--muted); font-size: .75rem; }
.wx-foot a { color: var(--muted); }
.wx-full { border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0 1.25rem; }
.wx-panel { border: 1px solid #e6e3dc; padding: .75rem; background: rgba(255, 255, 255, .35); }
.wx-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .4rem;
}
.wx-tide-table { width: 100%; font-size: .9rem; }
.wx-tide-table td { padding: .1rem 0; border-bottom: 1px solid #e6e3dc; }
.wx-tide-table tr:last-child td { border-bottom: 0; }
.wx-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7.5rem, 1fr);
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scroll-snap-type: x proximity;
}
.wx-day { border: 1px solid #e6e3dc; padding: .5rem; scroll-snap-align: start; }
.wx-day-name { font-weight: 600; font-size: .85rem; }
.wx-day-temps { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.2rem; display: flex; gap: .5rem; }
.wx-day-text { font-size: .8rem; line-height: 1.25; }
.wx-day-pop { font-size: .75rem; color: var(--accent); }

.fb-box .fb-page { display: block; }

.headline-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.headline-list li { padding: .45rem 0; border-bottom: 1px solid #e6e3dc; }
.headline-list li:last-child { border-bottom: 0; }
.headline-list a { text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.3; display: block; }
.headline-src { display: block; color: var(--muted); font-size: .75rem; margin-top: .1rem; }
.wx-kv { font-size: .9rem; line-height: 1.5; margin: 0; }
.wx-kv span { color: var(--muted); }

.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }
.search-form input[type="search"] { width: 100%; border: 1px solid var(--rule); padding: .35rem .5rem; background: #fff; }
.search-form input[type="submit"] { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: .35rem .75rem; }

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.navigation.pagination .page-numbers {
  padding: .4rem .75rem;
  border: 1px solid var(--rule);
  text-decoration: none;
  font-size: .9rem;
}
.navigation.pagination .page-numbers.current { background: var(--ink); color: var(--paper); }

/* Ad slots render nothing until configured in functions.php. */
.ad-slot:empty { display: none; }
.ad-slot { margin: 1.5rem 0; }

footer a { text-decoration: none; }

.page-plain {
  min-height: 60vh;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.page-plain h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}
.page-plain p,
.page-plain li {
  font-size: 1.08rem;
  line-height: 1.7;
}
.page-plain .card {
  border: 1px solid var(--rule);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.2);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}
