/*
Theme Name: Excellentia
Description: A classic, newspaper-style editorial theme: dense multi-column front page, serif typography, section navigation.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: excellentia-times
*/

:root {
  --ink: #121212;
  --muted: #5a5a5a;
  --rule: #dfdfdf;
  --paper: #ffffff;
  --accent: #326891;
  --serif: Georgia, "Times New Roman", Times, serif;
  --head: "Playfair Display", "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Top bar */
.topbar { font-family: var(--sans); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar form { display: flex; gap: 6px; }
.topbar input[type=search] { border: 1px solid var(--rule); padding: 4px 8px; font: inherit; }
.topbar button { background: var(--ink); color: #fff; border: 0; padding: 4px 10px; font: inherit; cursor: pointer; }

/* Masthead */
.masthead { text-align: center; padding: 22px 0 14px; }
.masthead .site-title { font-family: var(--head); font-weight: 700; font-size: clamp(34px, 7vw, 68px); letter-spacing: -0.5px; margin: 0; line-height: 1.05; }
.masthead .tagline { font-family: var(--sans); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* Section navigation */
.sections { border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.sections ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; }
.sections a { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 11px 0; }
.sections a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; }

/* Front page grid */
.front { display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: 0; margin-top: 24px; }
.front > div { padding: 0 20px; }
.front > div + div { border-left: 1px solid var(--rule); }
.front > div:first-child { padding-left: 0; }
.front > div:last-child { padding-right: 0; }
.kicker { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.byline { font-family: var(--sans); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.story { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.story:last-child { border-bottom: 0; }
.story h3 { font-size: 20px; line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
.story p { margin: 0 0 8px; color: #333; font-size: 15px; }
.story.lead h2 { font-family: var(--head); font-size: clamp(28px, 4vw, 42px); line-height: 1.1; margin: 0 0 12px; }
.story.lead p { font-size: 18px; }
.story .thumb { margin-bottom: 10px; }
.story .thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.opinion-col { background: #f7f7f5; padding: 14px; margin-bottom: 18px; }
.opinion-col h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0 0 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.opinion-col li { list-style: none; margin: 0 0 10px; font-size: 16px; line-height: 1.25; font-weight: 700; }
.opinion-col ul { margin: 0; padding: 0; }

.section-block { margin-top: 30px; border-top: 3px solid var(--ink); padding-top: 12px; }
.section-block > h2 { font-family: var(--sans); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 16px; }
.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cols4 .story { border-bottom: 0; margin: 0; padding: 0; }

/* Archive / search */
.page-head { border-bottom: 1px solid var(--ink); margin: 28px 0 20px; padding-bottom: 12px; }
.page-head h1 { font-family: var(--head); font-size: 40px; margin: 0; }
.list-story { display: grid; grid-template-columns: 1fr 220px; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.list-story h2 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; }
.pagination { font-family: var(--sans); padding: 24px 0; display: flex; gap: 10px; justify-content: center; }
.pagination .current { font-weight: 700; }

/* Single */
.article { max-width: 700px; margin: 34px auto 40px; }
.article .kicker { text-align: center; }
.article h1 { font-family: var(--head); font-size: clamp(30px, 5vw, 46px); line-height: 1.1; text-align: center; margin: 0 0 14px; }
.article .dek { font-size: 20px; color: var(--muted); text-align: center; margin: 0 0 18px; }
.article .meta { text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; margin-bottom: 24px; }
.article .entry { font-size: 20px; line-height: 1.6; }
.article .entry p { margin: 0 0 1.2em; }
.article .entry > p:first-of-type::first-letter { float: left; font-family: var(--head); font-size: 3.6em; line-height: .85; padding: 6px 8px 0 0; }
.article .entry h2, .article .entry h3 { font-family: var(--head); line-height: 1.2; }
.article .entry blockquote { border-left: 4px solid var(--ink); margin: 1.5em 0; padding-left: 20px; font-style: italic; font-size: 22px; }
.article .hero { margin: 0 -80px 24px; }
.tags { font-family: var(--sans); font-size: 12px; margin-top: 30px; }
.tags a { border: 1px solid var(--rule); padding: 3px 9px; margin-right: 6px; border-radius: 14px; display: inline-block; }
.related { border-top: 3px solid var(--ink); margin-top: 40px; padding-top: 14px; }
.comments-area { font-family: var(--sans); margin-top: 40px; }
.comments-area textarea, .comments-area input[type=text], .comments-area input[type=email], .comments-area input[type=url] { width: 100%; padding: 8px; border: 1px solid var(--rule); font: inherit; }
.comments-area .submit { background: var(--ink); color: #fff; border: 0; padding: 10px 18px; cursor: pointer; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { border-bottom: 1px solid var(--rule); padding: 12px 0; }

/* Figures, video, credits */
.article .hero { margin-bottom: 24px; }
.article .hero figcaption, .article .video figcaption { font-family: var(--sans); font-size: 12px; color: var(--muted); padding-top: 6px; }
.article .hero figcaption a, .source-note a { text-decoration: underline; }
.article .video { margin: 1.6em 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.source-note { font-family: var(--sans); font-size: 14px !important; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 12px; }

/* Watch strip */
.watch { background: #121212; color: #fff; margin: 30px -20px 0; padding: 18px 20px 24px; }
.watch > h2 { font-family: var(--sans); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 14px; }
.watch .cols4 .story h3 { font-size: 17px; }
.watch .vthumb { position: relative; display: block; margin-bottom: 10px; }
.watch .vthumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.watch .vthumb::after { content: "\25B6"; position: absolute; left: 10px; bottom: 10px; width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; background: rgba(0,0,0,.75); color: #fff; font-size: 13px; }
.watch .kicker { color: #8fc1e3; }
.watch a:hover { text-decoration: underline; }

/* Footer */
.site-footer { margin-top: 50px; border-top: 3px double var(--ink); padding: 26px 0 40px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.site-footer .foot-nav ul { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer .foot-nav a { font-weight: 700; color: var(--ink); }

@media (max-width: 900px) {
  .front { grid-template-columns: 1fr; }
  .front > div, .front > div:first-child, .front > div:last-child { padding: 0; border-left: 0; }
  .front > div + div { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 18px; }
  .front > div:nth-child(2) { order: -1; border-top: 0; margin-top: 0; padding-top: 0; }
  .cols4 { grid-template-columns: 1fr 1fr; }
  .list-story { grid-template-columns: 1fr; }
  .article .hero { margin: 0 0 24px; }
  .nav-toggle { display: block; width: 100%; background: none; border: 0; border-top: 1px solid var(--rule); font: 700 12px var(--sans); letter-spacing: 1.2px; text-transform: uppercase; padding: 10px; cursor: pointer; }
  .sections ul { display: none; flex-direction: column; text-align: center; }
  .sections.open ul { display: flex; }
}
@media (max-width: 520px) { .cols4 { grid-template-columns: 1fr; } }
@media print { .topbar, .sections, .site-footer, .comments-area, .related { display: none; } }
