/*
Theme Name: Spluk Revival
Theme URI: https://spluk.ph/
Author: Spluk Editorial
Description: Lightweight editorial theme preserving the historical Spluk.ph news architecture.
Version: 1.1.0
Text Domain: spluk-revival
*/

:root {
  --navy: #07154b;
  --navy-2: #102565;
  --gold: #ffd400;
  --red: #d9342b;
  --ink: #171b2f;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --wash: #f4f6fb;
  --max: 1180px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #174ea6; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { background: var(--navy); color: #fff; font-size: .78rem; letter-spacing: .02em; }
.topbar-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-note { color: #d7def8; }
.social-links { display: flex; gap: 14px; font-weight: 700; text-transform: uppercase; }

.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 116px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 10px; font: inherit; font-weight: 800; color: var(--navy); cursor: pointer; }
.brand { text-align: center; line-height: 1; }
.brand-logo { width: 260px; height: auto; }
.brand-mark { display: inline-flex; align-items: baseline; font-weight: 950; font-size: clamp(2.1rem, 6vw, 4.1rem); letter-spacing: -.065em; color: var(--navy); }
.brand-mark span { color: var(--gold); }
.brand-tagline { display: block; margin-top: 9px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.masthead-tools { justify-self: end; }
.search-link { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); font-size: 1.1rem; }

.primary-nav { background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(7,21,75,.14); }
.primary-nav ul { display: flex; justify-content: center; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: 15px 17px 14px; font-size: .82rem; font-weight: 850; letter-spacing: .015em; border-bottom: 3px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: #fff; border-bottom-color: var(--gold); background: rgba(255,255,255,.05); }

.ticker { background: #fff; border-bottom: 1px solid var(--line); }
.ticker-inner { min-height: 42px; display: flex; align-items: center; gap: 14px; overflow: hidden; }
.ticker-label { flex: 0 0 auto; padding: 5px 9px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; border-radius: 3px; }
.ticker-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; font-weight: 700; }

.site-main { padding: 30px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 8px; margin-bottom: 34px; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.story-card { position: relative; min-height: 220px; overflow: hidden; border-radius: var(--radius); background: var(--navy); color: #fff; isolation: isolate; }
.story-card.large { min-height: 492px; }
.story-card.small { min-height: 242px; }
.story-media { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.01); transition: transform .5s ease; }
.story-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,13,46,.04) 20%, rgba(5,13,46,.92) 100%); }
.story-card:hover .story-media { transform: scale(1.045); }
.story-media.placeholder { background-image: radial-gradient(circle at 78% 15%, rgba(255,212,0,.52), transparent 28%), linear-gradient(135deg, #1d3785, #07154b 66%, #020a29); }
.story-media.breaking-news { background-image: radial-gradient(circle at 20% 25%, rgba(255,110,92,.45), transparent 28%), linear-gradient(135deg, #681410, #07154b); }
.story-media.politics-governance { background-image: radial-gradient(circle at 80% 22%, rgba(255,212,0,.4), transparent 26%), linear-gradient(135deg, #263f88, #07154b); }
.story-media.business-economy { background-image: radial-gradient(circle at 25% 25%, rgba(64,210,170,.38), transparent 30%), linear-gradient(135deg, #0b5a57, #07154b); }
.story-media.science-technology { background-image: radial-gradient(circle at 75% 25%, rgba(90,182,255,.55), transparent 25%), linear-gradient(135deg, #294cc4, #08133f); }
.story-media.health-lifestyle { background-image: radial-gradient(circle at 25% 25%, rgba(255,129,170,.44), transparent 28%), linear-gradient(135deg, #7d2e72, #07154b); }
.story-media.arts-culture { background-image: radial-gradient(circle at 78% 25%, rgba(255,212,0,.52), transparent 28%), linear-gradient(135deg, #8e421a, #171035); }
.story-card-content { position: absolute; z-index: 2; inset: auto 0 0; padding: 24px; }
.story-card.small .story-card-content { padding: 17px; }
.eyebrow { display: inline-block; margin-bottom: 10px; padding: 4px 8px; border-radius: 3px; color: #fff; background: var(--red); font-size: .65rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.story-card h2, .story-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.story-card h2 { font-size: clamp(2rem, 4vw, 3.35rem); }
.story-card h3 { font-size: clamp(1.05rem, 2vw, 1.38rem); }
.story-meta { margin-top: 12px; color: #d7def8; font-size: .75rem; font-weight: 650; }

.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 38px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 18px; border-bottom: 3px solid var(--navy); }
.section-head h2 { margin: 0 0 -3px; padding: 0 0 10px; border-bottom: 3px solid var(--gold); font-size: 1.25rem; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; }
.section-head a { margin-bottom: 10px; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.post-list { display: grid; gap: 0; }
.post-row { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 0 0 22px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.post-thumb { min-height: 144px; border-radius: 6px; background: var(--navy); overflow: hidden; }
.post-thumb .story-media { position: relative; height: 100%; min-height: 144px; }
.post-row h3 { margin: 2px 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 2.4vw, 1.72rem); line-height: 1.2; }
.post-row p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: #7b8497; font-size: .73rem; font-weight: 700; }

.sidebar-card { padding: 22px; margin-bottom: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.sidebar-card.dark { color: #fff; border: 0; background: var(--navy); }
.sidebar-card h3 { margin: 0 0 14px; font-size: 1.05rem; text-transform: uppercase; }
.sidebar-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.sidebar-card.dark p { color: #d7def8; }
.newsletter-form { display: grid; gap: 9px; margin-top: 16px; }
.newsletter-form input { width: 100%; border: 1px solid #cfd5e2; border-radius: 4px; padding: 12px; font: inherit; }
.button { display: inline-flex; justify-content: center; border: 0; border-radius: 4px; padding: 12px 16px; background: var(--gold); color: var(--navy); font-weight: 900; cursor: pointer; }
.popular-list { list-style: none; margin: 0; padding: 0; counter-reset: popular; }
.popular-list li { counter-increment: popular; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 800; line-height: 1.35; }
.popular-list li::before { content: counter(popular, decimal-leading-zero); color: var(--gold); font-size: 1.15rem; font-weight: 950; }

.category-bands { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 42px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.mini-card .post-thumb { min-height: 126px; border-radius: 0; }
.mini-card-body { padding: 14px; }
.mini-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.3; }

.page-header { padding: 30px; margin-bottom: 28px; color: #fff; background: var(--navy); border-radius: var(--radius); }
.page-header .eyebrow { background: var(--gold); color: var(--navy); }
.page-header h1 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: 1.06; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.archive-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.archive-card .post-thumb { display: block; aspect-ratio: 16 / 9; min-height: 0; border-radius: 0; }
.archive-card .post-thumb .story-media { min-height: 100%; }
.archive-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px; }
.archive-card h2 { margin: 4px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; line-height: 1.24; }
.archive-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.archive-card .meta-line { margin-top: auto; padding-top: 14px; }
.archive-description { max-width: 760px; color: #d7def8; }
.archive-description p { margin: 10px 0 0; }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 38px; height: 38px; padding: 0 11px; justify-content: center; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 4px; font-weight: 800; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.single-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(270px, 1fr); gap: 42px; }
.article-shell, .page-shell { padding: clamp(24px, 5vw, 54px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.article-header h1, .page-shell h1 { margin: 8px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.article-deck { color: var(--muted); font-size: 1.15rem; }
.article-hero { min-height: 360px; margin: 28px 0; border-radius: 6px; overflow: hidden; }
.article-hero .story-media { position: relative; min-height: 360px; }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.11rem; color: #262a38; }
.article-content > p:first-child::first-letter { float: left; margin: 9px 9px 0 0; color: var(--navy); font-size: 4.2rem; line-height: .72; font-weight: 900; }
.article-content h2, .article-content h3 { margin-top: 1.7em; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--navy); }
.article-content blockquote { margin: 2em 0; padding: 18px 24px; border-left: 4px solid var(--gold); background: var(--wash); font-size: 1.15em; }
.article-content a { color: #174ea6; text-decoration: underline; }
.article-content img { width: auto; max-width: 100%; margin: 1.5rem auto; border-radius: 5px; }
.article-content figure { max-width: 100%; margin: 1.8rem 0; }
.article-content figcaption { margin-top: .55rem; color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .78rem; line-height: 1.45; }
.article-content iframe, .article-content video { max-width: 100%; }
.author-box { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--line); }
.author-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--navy); background: var(--gold); font-weight: 950; }

.site-footer { background: var(--navy); color: #fff; }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 54px; padding: 52px 0 34px; }
.footer-brand { font-size: 2.1rem; font-weight: 950; letter-spacing: -.05em; }
.footer-brand span { color: var(--gold); }
.footer-logo { width: 210px; height: auto; margin-bottom: 14px; }
.footer-copy { max-width: 460px; color: #cbd4f4; font-size: .88rem; }
.footer-heading { margin: 6px 0 14px; color: var(--gold); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 7px 0; color: #e8ecff; font-size: .86rem; }
.footer-bottom { padding: 18px 0 24px; border-top: 1px solid rgba(255,255,255,.12); color: #aeb9df; font-size: .72rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 18px; }

.notice { padding: 14px 18px; margin-bottom: 22px; color: #6e4b00; background: #fff7da; border: 1px solid #f0dd9a; border-radius: 5px; font-size: .83rem; }
.empty-state { padding: 50px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

@media (max-width: 980px) {
  .hero-grid, .content-grid, .single-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 10px; }
  .story-card.large { min-height: 430px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .topbar-note, .masthead-tools { display: none; }
  .topbar-inner { justify-content: center; }
  .masthead-inner { min-height: 92px; grid-template-columns: 46px 1fr 46px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .brand-mark { font-size: 2.25rem; }
  .brand-logo { width: 190px; }
  .brand-tagline { font-size: .55rem; letter-spacing: .13em; }
  .primary-nav { display: none; }
  .primary-nav.open { display: block; }
  .primary-nav ul { display: block; padding: 8px 12px; }
  .primary-nav a { padding: 12px; border-left: 3px solid transparent; border-bottom: 0; }
  .primary-nav a:hover, .primary-nav .current-menu-item > a { border-left-color: var(--gold); }
  .hero-side, .category-bands { grid-template-columns: 1fr; }
  .story-card.large { min-height: 410px; }
  .story-card.small { min-height: 220px; }
  .post-row { grid-template-columns: 112px 1fr; gap: 14px; }
  .post-thumb, .post-thumb .story-media { min-height: 96px; }
  .post-row p { display: none; }
  .archive-grid { grid-template-columns: 1fr; }
  .article-shell, .page-shell { padding: 23px; }
  .article-hero, .article-hero .story-media { min-height: 230px; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .footer-main > :first-child { grid-column: auto; }
  .footer-bottom-inner { display: block; }
}
