/*
Theme Name: OneClickMobi Editorial
Theme URI: https://oneclickmobi.com/articles/
Description: A responsive magazine theme for the OneClickMobi Article Directory with configurable AdSense placements.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.2
Text Domain: oneclickmobi-editorial
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@font-face {
    font-family: "Instrument Serif";
    src: url("assets/instrument-serif.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #181918;
    --muted: #5c605b;
    --paper: #f8f7f3;
    --surface: #fff;
    --line: #dcdcd5;
    --accent: #a93322;
    --dark: #20241f;
    --display: "Instrument Serif", Georgia, "Times New Roman", serif;
    --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 1rem/1.6 var(--body);
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img, video { display: block; max-width: 100%; height: auto; }
iframe { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.16; }
h1, h2, h3, p, figure { margin-top: 0; }
input, textarea, select, button { max-width: 100%; font: inherit; }

.shell { width: min(100% - 48px, 1200px); margin-inline: auto; }

.screen-reader-text, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    position: absolute;
    z-index: 20;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    background: var(--surface);
}

.masthead { color: var(--ink); background: var(--surface); }
.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 79px;
    padding-block: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: clamp(1.23rem, 2.5vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -.065em;
    text-decoration: none;
    white-space: nowrap;
}

.brand-accent { color: var(--accent); }
.brand-mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding-bottom: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.brand-mark span { width: 3px; height: 7px; border-radius: 2px; background: #fff; }
.brand-mark span:nth-child(2) { height: 11px; }
.brand-mark span:nth-child(3) { height: 15px; }
.custom-logo { width: auto; max-width: min(235px, 38vw); max-height: 54px; object-fit: contain; }

.site-search {
    display: flex;
    width: min(100%, 253px);
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
}

.site-search input {
    width: 100%;
    min-width: 0;
    padding: 8px 0 8px 15px;
    border: 0;
    border-radius: 24px 0 0 24px;
    color: var(--ink);
    background: transparent;
    font-size: .86rem;
}

.site-search button {
    display: grid;
    min-width: 42px;
    min-height: 40px;
    place-items: center;
    border: 0;
    border-radius: 0 24px 24px 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.search-icon {
    position: relative;
    width: 13px;
    height: 13px;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.search-icon::after {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 6px;
    height: 1.7px;
    background: currentColor;
    content: "";
    transform: rotate(48deg);
}

.topic-nav { border-block: 1px solid var(--line); }
.topic-inner { overflow-x: auto; }
.topic-nav ul, .site-footer ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.topic-nav a {
    display: block;
    padding: 12px 2px 10px;
    border-bottom: 2px solid transparent;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.topic-nav a:focus-visible { outline-offset: -2px; }
.topic-nav a:hover, .topic-nav [aria-current="page"], .topic-nav .current-menu-item > a {
    border-color: currentColor;
    color: var(--accent);
}

.directory { min-height: 59vh; padding-block: clamp(34px, 5vw, 66px) 68px; }
.directory-intro { margin-bottom: clamp(24px, 4vw, 42px); }
.directory-intro h1, .article-header h1 {
    margin: 0;
    overflow-wrap: anywhere;
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -.025em;
}

.directory-intro h1 { font-size: clamp(2.75rem, 7.6vw, 6.4rem); line-height: .98; }
.directory-intro p, .directory-description { margin: 14px 0 0; color: var(--muted); }
.directory-description p { margin: 0; }

.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow-wrap: anywhere;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.story-media { overflow: hidden; border-radius: 11px 11px 0 0; background: #dbdcd3; }
.story-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.story-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 24px; }
.eyebrow {
    display: inline-block;
    margin-bottom: 11px;
    color: var(--accent);
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .105em;
    text-decoration: none;
    text-transform: uppercase;
}

.eyebrow:hover { text-decoration: underline; }
.story-card h2 {
    margin: 0 0 10px;
    color: inherit;
    font: 400 clamp(1.65rem, 2.4vw, 2.3rem)/1.09 var(--display);
    letter-spacing: -.015em;
}

.story-card h2 a { color: inherit; text-decoration: none; }
.story-card h2 a:hover { text-decoration: underline; text-underline-offset: .13em; }
.story-summary { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.story-date { margin-top: auto; color: var(--muted); font-size: .79rem; }

.story-card--lead {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1.43fr 1fr;
    min-height: 420px;
    border-color: var(--dark);
    color: #fffdf7;
    background: var(--dark);
}

.story-card--lead .story-media { position: relative; border-radius: 11px 0 0 11px; }
.story-card--lead img { position: absolute; inset: 0; height: 100%; }
.story-card--lead .story-copy { justify-content: center; padding: clamp(28px, 4.6vw, 63px); }
.story-card--lead .story-copy:first-child { grid-column: 1 / -1; max-width: 840px; }
.story-card--lead .eyebrow { color: #ffc0a9; }
.story-card--lead h2 { font-size: clamp(2.05rem, 4vw, 4rem); }
.story-card--lead .story-summary, .story-card--lead .story-date { color: #e1e0d6; }
.story-card--lead .story-date { margin-top: 0; }

.pagination { margin-top: 38px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
    min-width: 40px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
}

.pagination .current, .pagination a:hover { border-color: var(--ink); color: var(--surface); background: var(--ink); }

.reading { min-height: 55vh; padding-block: clamp(38px, 7vw, 84px) 72px; }
.article-header, .prose, .article-tags, .post-navigation, .comments-area {
    width: min(100%, 740px);
    margin-inline: auto;
    overflow-wrap: anywhere;
}

.article-header h1 { font-size: clamp(2.55rem, 6.2vw, 5.45rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 16px; color: var(--muted); font-size: .88rem; }
.article-meta a { color: inherit; }
.article-cover { max-width: 1000px; margin: 32px auto; }
.article-cover img { width: 100%; border-radius: 12px; }
figcaption { margin-top: .5rem; color: var(--muted); font: .85rem/1.5 var(--body); }

.prose { margin-top: 32px; font: clamp(1.13rem, 2vw, 1.26rem)/1.76 Georgia, "Times New Roman", serif; }
.prose h2 { margin-top: 1.65em; }
.prose h3 { margin-top: 1.4em; }
.prose ol, .prose ul { padding-inline-start: 1.45em; }
.prose blockquote { margin-inline: 0; padding-inline-start: 1.25em; border-inline-start: 3px solid var(--accent); }
.prose pre, .wp-block-table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { padding: .4em; border: 1px solid var(--line); }
.prose .alignleft { float: left; margin: .4rem 1.25rem 1rem 0; }
.prose .alignright { float: right; margin: .4rem 0 1rem 1.25rem; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { display: table; clear: both; content: ""; }

.ad-placement {
    clear: both;
    min-width: 0;
    margin: 36px 0;
    padding-block: 12px;
    border-block: 1px solid var(--line);
}

.ad-placement--feed { grid-column: 1 / -1; margin: 4px 0; }
.ad-placement--end { margin-bottom: 44px; }
.ad-label {
    margin-bottom: 8px;
    color: var(--muted);
    font: 650 .68rem/1.5 var(--body);
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.article-tags, .post-navigation, .comments-area { margin-top: 36px; }
.article-tags a { display: inline-block; margin: 0 7px 7px 0; padding: 2px 9px; border: 1px solid var(--line); border-radius: 12px; }
.post-navigation, .comments-area { padding-top: 28px; border-top: 1px solid var(--line); }
.post-navigation .nav-links { gap: 18px 28px; }
.post-navigation .nav-links > div { flex: 1 1 210px; }
.comment-list { padding-left: 1.25rem; }
.comment-list li { margin-block: 1rem; }
.comment-author img { display: inline-block; border-radius: 50%; vertical-align: middle; }
.comment-form input:not([type="checkbox"]), .comment-form textarea, .post-password-form input {
    padding: .5em .7em;
    border: 1px solid #767970;
    color: var(--ink);
    background: var(--surface);
}

.comment-form textarea { display: block; }
.comment-form input[type="submit"], .post-password-form input[type="submit"] { color: #fff; background: var(--dark); cursor: pointer; }

.site-footer { padding-block: 27px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-inner a { color: var(--muted); font-size: .87rem; }
.footer-inner .footer-title { margin-right: auto; color: var(--ink); font-weight: 750; text-decoration: none; }
.site-footer ul { flex-wrap: wrap; gap: 10px 20px; }

@media (max-width: 850px) {
    .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story-card--lead { grid-template-columns: 1.15fr 1fr; min-height: 0; }
}

@media (max-width: 595px) {
    .shell { width: calc(100% - 32px); }
    .masthead-inner { min-height: 67px; gap: 12px; }
    .brand { gap: 6px; }
    .brand-mark { width: 26px; height: 26px; flex-basis: 26px; padding-bottom: 5px; }
    .site-search { width: min(47%, 180px); }
    .site-search input { padding-left: 10px; font-size: .78rem; }
    .site-search button { min-width: 36px; }
    .topic-nav ul { gap: 21px; }
    .story-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .story-card--lead { grid-template-columns: minmax(0, 1fr); }
    .story-card--lead .story-media { border-radius: 11px 11px 0 0; }
    .story-card--lead img { position: static; height: auto; }
    .story-card--lead .story-copy { padding: 24px; }
    .prose .alignleft, .prose .alignright { float: none; margin-inline: 0; }
}
