/*
Theme Name: berandanegeri.id
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 8.2
License: GPL-2.0-or-later
*/

/* ---------- Tokens (Axios Colors & Typography) ---------- */
:root {
    --brand-blue: #2257da;   /* Axios Blue */
    --ink:        #111111;   /* Primary text */
    --ink-light:  #333333;   /* Secondary text */
    --paper:      #ffffff;   /* Main background */
    --paper-2:    #f8f9fa;   /* Very light gray for cards/sections */
    --rule:       #e2e8f0;   /* Light borders */
    --rule-strong:#cbd5e1;   /* Slightly darker borders */
    --muted:      #64748b;   /* Captions, meta */
    --maxw:       1200px;
    --font-sans:  "Inter", "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font-sans); font-size: 18px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
a { color: var(--brand-blue); text-decoration: none; transition: 0.2s; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Utility / Faces ---------- */
.kicker, .site-nav, .meta, .section-head, .tag { font-family: var(--font-sans); }

/* ---------- Masthead (Header Axios Style) ---------- */
.masthead {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 100;
}
.masthead__top { display: none; } /* Axios keeps header ultra clean, hide top bar */
.masthead__brand {
    padding: 15px 0;
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--maxw); margin: 0 auto; padding-inline: 20px;
}
.masthead__brand a { color: var(--ink); text-decoration: none; display: flex; align-items: center; }
.masthead__logo {
    font-weight: 900; font-size: 32px; letter-spacing: -0.04em; margin: 0; line-height: 1;
}
.masthead__logo .dot { color: var(--brand-blue); }
.masthead__tagline { display: none; } /* Clean look */

/* ---------- Primary nav ---------- */
.site-nav {
    border-top: 1px solid var(--rule);
    background: var(--paper);
}
.site-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; max-width: var(--maxw);
    margin-inline: auto; padding-inline: 10px;
}
.site-nav a {
    display: block; color: var(--ink-light); text-decoration: none;
    font-size: 15px; font-weight: 600; padding: 15px 12px;
}
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--brand-blue); }

/* ---------- Layout grid ---------- */
.layout {
    display: grid; grid-template-columns: 1fr 340px; gap: 0 48px;
    padding: 40px 0 60px;
}

/* ---------- Lead / hero story ---------- */
.lead { margin-bottom: 40px; border-bottom: 1px solid var(--rule); padding-bottom: 30px; }
.lead__media { margin-bottom: 16px; }
.lead__title {
    font-weight: 800; font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 12px;
}
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--brand-blue); text-decoration: none; }
.lead__standfirst { font-size: 20px; color: var(--ink-light); margin: 0 0 16px; font-weight: 500; }

/* ---------- Kicker ---------- */
.kicker {
    display: inline-block; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue);
}

/* ---------- Story grid ---------- */
.story-grid { display: flex; flex-direction: column; gap: 24px; }
.card { display: grid; grid-template-columns: 1fr 140px; gap: 20px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.card:last-child { border-bottom: none; }
.card__media { order: 2; margin: 0; }
.card__title {
    font-weight: 700; font-size: 20px; line-height: 1.3;
    letter-spacing: -0.01em; margin: 6px 0 8px;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--brand-blue); text-decoration: none; }
.card__excerpt { font-size: 16px; color: var(--ink-light); margin: 0; display: none; } /* Hide excerpt in feed for cleaner look */

/* ---------- Photo stand-ins ---------- */
.ph {
    position: relative; aspect-ratio: 16 / 9; border-radius: 8px;
    background: var(--rule); overflow: hidden;
}
.ph--tall { aspect-ratio: 4 / 5; }
.ph__label { display: none; } /* Remove label to match Axios minimalist images */

/* ---------- Meta line ---------- */
.meta { font-size: 14px; color: var(--muted); font-weight: 500; }
.meta a { color: var(--muted); }

/* ---------- Section heads ---------- */
.section-head { margin: 0 0 20px; }
.section-head h2 { font-weight: 800; font-size: 24px; margin: 0; color: var(--ink); }

/* ---------- Sidebar ---------- */
.sidebar { padding-top: 10px; }
.widget { margin-bottom: 40px; background: var(--paper-2); padding: 24px; border-radius: 12px; }
.widget__title {
    font-weight: 800; font-size: 18px; text-transform: uppercase;
    letter-spacing: 0.04em; margin: 0 0 20px; color: var(--ink);
}
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
    display: grid; grid-template-columns: 30px 1fr; gap: 10px;
    padding: 16px 0; border-bottom: 1px solid var(--rule-strong);
}
.most-read li:last-child { border-bottom: none; padding-bottom: 0; }
.most-read__rank {
    counter-increment: mr; font-weight: 800; font-size: 20px;
    color: var(--brand-blue); line-height: 1.2;
}
.most-read__rank::before { content: counter(mr); }
.most-read a { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }
.most-read a:hover { color: var(--brand-blue); text-decoration: none; }

/* ---------- Single article (Axios Smart Brevity Style) ---------- */
.article { max-width: 100%; margin: 0; padding: 10px 0 60px; }
.article__title {
    font-weight: 800; font-size: clamp(32px, 5vw, 44px); line-height: 1.15;
    letter-spacing: -0.02em; margin: 12px 0 16px;
}
.article__standfirst { font-size: 22px; color: var(--ink-light); font-weight: 500; margin: 0 0 24px; line-height: 1.4; }
.article__meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.article__body p { margin: 0 0 1.4em; font-size: 19px; color: #222; }
.article__body strong { font-weight: 800; color: var(--ink); } /* Emphasis for Smart Brevity */
.article__body ul { margin: 0 0 1.4em; padding-left: 20px; font-size: 19px; }
.article__body li { margin-bottom: 8px; }
.article__body h2, .article__body h3 { font-weight: 800; letter-spacing: -0.01em; margin-top: 1.5em; }
.article__body blockquote {
    margin: 1.5em 0; padding: 0 0 0 20px; border-left: 4px solid var(--brand-blue);
    font-size: 22px; font-weight: 600; color: var(--ink-light);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #ffffff; padding: 60px 0 40px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-brand .masthead__logo { color: #fff; font-size: 36px; }
.footer-brand p { color: #a1a1aa; font-size: 15px; margin-top: 15px; }
.footer-cols h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; margin: 0 0 16px; font-weight: 700; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 12px; }
.footer-cols a { color: #cbd5e1; font-size: 15px; font-weight: 500; }
.footer-cols a:hover { color: #fff; text-decoration: none; }
.site-footer__legal { border-top: 1px solid #334155; margin-top: 40px; padding-top: 24px; font-size: 14px; color: #94a3b8; }

/* ---------- Pagination ---------- */
.pagination { padding: 30px 0; display: flex; gap: 10px; }
.pagination a, .pagination .current {
    font-weight: 700; font-size: 15px; padding: 10px 16px;
    border-radius: 6px; background: var(--paper-2); color: var(--ink);
}
.pagination .current { background: var(--brand-blue); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; gap: 40px; }
    .widget { margin-bottom: 20px; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .card { grid-template-columns: 1fr; gap: 12px; }
    .card__media { order: -1; }
    .footer-cols { grid-template-columns: 1fr; }
    .masthead__logo { font-size: 28px; }
}
/* ---------- Masthead search ---------- */
.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;
}

.masthead__search {
    width: min(100%, 390px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 14px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.masthead__search:focus-within {
    background: var(--paper);
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(34, 87, 218, 0.12);
}

.masthead__search-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.masthead__search-icon svg,
.search-submit svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.masthead__search .search-field {
    min-width: 0;
    flex: 1;
    height: 38px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
}

.masthead__search .search-field::placeholder {
    color: var(--muted);
    opacity: 1;
}

.masthead__search .search-field::-webkit-search-cancel-button {
    cursor: pointer;
}

.search-submit {
    flex: 0 0 auto;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-blue);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 87, 218, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-submit svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.search-submit:hover {
    filter: brightness(0.96);
    box-shadow: 0 6px 16px rgba(34, 87, 218, 0.28);
    transform: translateY(-1px);
}

.search-submit:hover svg {
    transform: translateX(2px);
}

.search-submit:active {
    transform: translateY(0);
}

.search-submit:focus-visible {
    outline: 3px solid rgba(34, 87, 218, 0.25);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .masthead__brand {
        flex-wrap: wrap;
        gap: 14px;
    }

    .masthead__search {
        width: 100%;
        order: 2;
    }
}

@media (max-width: 420px) {
    .search-submit {
        width: 38px;
        padding: 0;
    }

    .search-submit span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}
