/*
Theme Name: OneClick Newsroom
Description: A responsive news and magazine theme with a red masthead, story cards, and dedicated advertising areas.
Version: 1.0.3
Requires at least: 6.4
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adsense-theme
*/

:root {
    --paper: #f6f4ef;
    --surface: #fffefa;
    --ink: #1b1b19;
    --muted: #56554e;
    --rule: #ded9cf;
    --red: #9e2428;
    --red-dark: #7f1b1e;
    --yellow: #ffd080;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.shell { width: min(100% - 72px, 1240px); margin-inline: auto; }

.screen-reader-text {
    border: 0; clip-path: inset(50%); width: 1px; height: 1px;
    overflow: hidden; padding: 0; position: absolute; white-space: nowrap;
}
.skip-link:focus {
    clip-path: none; width: auto; height: auto; top: 12px; inset-inline-start: 12px;
    padding: 8px 14px; z-index: 20; color: var(--ink); background: var(--surface);
}

.site-header { color: white; background: var(--red); }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 30px; min-height: 122px; }
.site-brand { min-width: 0; overflow-wrap: anywhere; }
.site-name, .footer-brand { font: bold clamp(2.1rem, 4vw, 3.75rem)/.98 var(--serif); letter-spacing: -.06em; text-decoration: none; }
.site-name span, .footer-brand span { color: var(--yellow); }
.custom-logo { display: block; max-height: 86px; width: auto; }
.site-description { margin: 9px 0 0; color: #ffe9df; font-size: .81rem; }
.nav-bar { background: var(--red-dark); border-top: 1px solid #ffffff28; box-shadow: 0 3px 0 var(--ink); }
.nav-list, .footer-links { margin: 0; padding: 0; list-style: none; }
.nav-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #e1a095 var(--red-dark); }
.nav-list { display: flex; gap: 27px; width: max-content; min-width: 100%; }
.nav-list > li { flex: none; }
.nav-list a { display: block; padding: 12px 3px 10px; border-bottom: 2px solid transparent; font-size: .77rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.nav-list a:focus-visible { outline-offset: -2px; }
.nav-list a:hover, .nav-list [aria-current="page"], .nav-list .current-cat > a, .nav-list .current-menu-ancestor > a { color: var(--yellow); border-bottom-color: currentColor; }

.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 28%); gap: clamp(24px, 3vw, 44px); padding-block: 38px 65px; min-height: 62vh; }
.site-layout > * { min-width: 0; }
.section-heading { border-bottom: 1px solid var(--rule); margin-bottom: 24px; padding-bottom: 13px; }
.section-heading h1 { margin: 0; display: flex; align-items: baseline; gap: 12px; font: bold clamp(2rem, 4vw, 3.35rem)/1.05 var(--serif); letter-spacing: -.045em; }
.section-heading h1::before { content: ''; display: inline-block; width: 8px; height: .66em; background: var(--red); flex: none; }
.archive-description { margin-top: 10px; color: var(--muted); }
.archive-description p { margin: 0; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.story-card { min-width: 0; background: var(--surface); border: 1px solid var(--rule); }
.story-media { display: block; overflow: hidden; background: #e8e1d7; aspect-ratio: 1.58; }
.story-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.story-card:hover .story-media img { transform: scale(1.035); }
.story-copy { padding: clamp(15px, 2vw, 24px); }
.story-meta { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 4px; color: var(--muted); font-size: .74rem; }
.story-category { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .085em; text-decoration: none; }
.story-category:hover { text-decoration: underline; }
.story-copy h2 { margin: 8px 0 0; font: bold clamp(1.38rem, 2.5vw, 2rem)/1.13 var(--serif); letter-spacing: -.028em; overflow-wrap: anywhere; }
.story-copy h2 a, .sidebar-stories a { text-decoration: none; }
.story-copy h2 a:hover, .sidebar-stories a:hover { color: var(--red); text-decoration: underline; }
.story-copy p { margin: 10px 0 0; color: var(--muted); font-size: .89rem; }

.news-sidebar { display: flex; flex-direction: column; gap: 19px; }
.news-search { display: flex; width: 100%; max-width: 32rem; background: var(--surface); border: 1px solid #c4bdb1; }
.news-search input { flex: 1; width: 0; border: 0; background: transparent; padding: 10px 12px; }
.news-search button { display: grid; place-items: center; border: 0; background: var(--ink); color: white; width: 47px; }
.news-search button:hover { background: var(--red); }
.news-search button:focus-visible { outline-color: var(--red); }
.ad-slot { text-align: center; min-width: 0; background: #eeeae2; padding: 6px 8px 10px; }
.ad-slot .widget { min-width: 0; margin: 0; }
.ad-label { display: block; font-size: .625rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.masthead-ad { width: min(65%, 744px); flex: 0 1 744px; color: var(--ink); background: var(--paper); }
.article-ad { margin-top: 26px; }
.sidebar-stories, .news-sidebar > .widget { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--red); padding: 17px; overflow-wrap: anywhere; }
.sidebar-stories h2, .widget-title { margin: 0 0 8px; font: bold 1.52rem/1.15 var(--serif); letter-spacing: -.025em; }
.sidebar-stories ol { list-style: none; counter-reset: story; margin: 0; padding: 0; }
.sidebar-stories li { counter-increment: story; display: grid; grid-template-columns: 26px 1fr; gap: 8px; border-top: 1px solid var(--rule); padding: 12px 0; }
.sidebar-stories li:last-child { padding-bottom: 0; }
.sidebar-stories li::before { content: counter(story, decimal-leading-zero); font: bold 1.05rem/1.4 var(--serif); color: var(--red); }
.sidebar-stories a { display: block; font-weight: 700; font-size: .91rem; line-height: 1.4; }
.sidebar-stories time { display: block; color: var(--muted); font-size: .72rem; margin-top: 4px; }

.single-story { background: var(--surface); border: 1px solid var(--rule); }
.single-heading, .article-content, .post-tags { padding-inline: clamp(16px, 4vw, 45px); }
.single-heading { padding-block: clamp(20px, 4vw, 42px) 22px; }
.single-heading h1 { font: bold clamp(2rem, 5vw, 4.25rem)/1.02 var(--serif); letter-spacing: -.045em; margin: 8px 0 0; overflow-wrap: anywhere; }
.byline { color: var(--muted); margin: 13px 0 0; font-size: .86rem; }
.single-image { display: block; width: 100%; }
.article-content { display: flow-root; padding-block: 10px 25px; overflow-wrap: anywhere; }
.article-content p { max-width: 74ch; }
.article-content h2, .article-content h3 { font-family: var(--serif); line-height: 1.2; }
.article-content a, .comments-area a { color: var(--red); }
.article-content iframe, .article-content video { max-width: 100%; }
.article-content .alignwide { margin-inline: 0; }
.article-content .alignfull { margin-inline: calc(-1 * clamp(16px, 4vw, 45px)); }
.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.wp-caption { max-width: 100%; }
.post-tags { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 22px; }
.post-tags a, .page-numbers { border: 1px solid var(--rule); padding: 4px 8px; font-size: .85rem; text-decoration: none; }
.page-numbers.current { background: var(--red); color: white; border-color: var(--red); }
.pagination, .post-navigation, .comments-area { margin-top: 24px; }
.post-navigation .nav-links, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.pagination .nav-links { justify-content: flex-start; }
.comments-area input:not([type="checkbox"]), .comments-area textarea { width: 100%; max-width: 100%; border: 1px solid var(--rule); padding: 9px; }
.comments-area label { display: block; }
.comments-area input[type="submit"] { width: auto; background: var(--red); color: white; font-weight: 700; }
.site-footer { background: var(--ink); color: white; border-top: 3px solid var(--red); }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 36px; padding-block: 28px; }
.footer-brand { font-size: 1.75rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a, .footer-inner small { font-size: .8rem; }
.footer-inner small { margin-inline-start: auto; color: #e0dbd2; }

@media (max-width: 880px) {
    .shell { width: calc(100% - 40px); }
    .site-layout { grid-template-columns: minmax(0, 1fr); }
    .news-sidebar { width: 100%; max-width: 36rem; }
}
@media (max-width: 650px) {
    .masthead { flex-direction: column; align-items: stretch; gap: 18px; padding-block: 22px; min-height: 0; }
    .masthead-ad { width: 100%; flex: auto; }
    .nav-list { gap: 20px; }
    .site-layout { padding-top: 24px; }
    .footer-inner small { margin-inline-start: 0; }
}
@media (max-width: 580px) {
    .story-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .story-media img { transition: none; }
}
