/*
Theme Name: Portal Nasional (Guardian Edition)
Theme URI: https://news-network.local/themes/portal-nasional
Author: News Network
Description: Tema portal berita bergaya The Guardian dengan warna Navy Blue khas, aksen kuning, dan garis batas tebal. Dilengkapi demo content.
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: portal-nasional
*/

/* ---------- Tokens (Guardian Colors) ---------- */
:root {
    --brand-navy: #052962;   /* Guardian Header/Footer */
    --brand-yellow: #ffe500; /* Guardian Accent */
    --ink:        #121212;   /* Text body */
    --paper:      #ffffff;   /* Page background */
    --paper-2:    #f6f6f6;   /* Card surface background */
    --accent:     #c70000;   /* News Red */
    --accent-ink: #052962;   /* Darker links */
    --rule:       #dcdcdc;   /* Hairlines */
    --rule-strong:#dfdfdf;   /* Heavy lines */
    --muted:      #767676;   /* Captions, meta */
    --maxw:       1300px;
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; transition: .2s; }
a:hover { color: var(--accent); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 15px; }

/* ---------- Utility / kicker faces ---------- */
.kicker, .site-nav, .meta, .section-head, .most-read__rank, .tag {
    font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Masthead (Guardian Style) ---------- */
.masthead {
    background: var(--brand-navy); color: #ffffff;
}
.masthead__top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.2);
}
.masthead__date {
    font-size: 13px; letter-spacing: .02em; color: #ffffff;
}
.masthead__brand { text-align: right; padding: 25px 0 15px; } /* Guardian logo di kanan */
.masthead__brand a { color: #ffffff; text-decoration: none; display: inline-block; }
.masthead__logo {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 900; font-size: clamp(34px, 6vw, 54px);
    line-height: .95; letter-spacing: -0.02em; margin: 0;
}
.masthead__logo .dot { color: var(--brand-yellow); }
.masthead__tagline {
    font-size: 13px; color: rgba(255,255,255,0.7); margin: 6px 0 0;
}
.masthead__cta {
    font-size: 13px; font-weight: 700; background: var(--brand-yellow);
    color: var(--brand-navy); padding: 8px 18px; border-radius: 20px;
}
.masthead__cta:hover { background: #ffffff; color: var(--brand-navy); }

/* ---------- Primary nav ---------- */
.site-nav { background: var(--brand-navy); padding-bottom: 10px; }
.site-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; max-width: var(--maxw);
    margin-inline: auto;
}
.site-nav a {
    display: block; color: #ffffff; text-decoration: none;
    font-size: 16px; font-weight: 700; padding: 10px 15px;
    border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav .current-menu-item > a {
    color: var(--brand-yellow); border-bottom: 3px solid var(--brand-yellow);
}

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

/* ---------- Lead / hero story ---------- */
.lead {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    padding-bottom: 25px; border-bottom: 1px solid var(--rule); margin-bottom: 25px;
}
.lead__media { order: 2; }
.lead__body { order: 1; align-self: start; background: var(--paper-2); padding: 20px; border-top: 4px solid var(--accent); }
.lead__title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 800; font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1; margin: 10px 0 15px;
}
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--accent); }
.lead__standfirst { font-size: 16px; color: #333; margin: 0 0 15px; }

/* ---------- Kicker ---------- */
.kicker {
    display: inline-block; font-size: 13px; font-weight: 800;
    color: var(--accent); margin-bottom: 5px;
}

/* ---------- Story grid ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
    background: var(--paper-2); padding: 15px;
    border-top: 4px solid var(--accent); display: flex; flex-direction: column;
}
.card__title {
    font-family: "Playfair Display", Georgia, serif; font-weight: 700;
    font-size: 20px; line-height: 1.2; margin: 10px 0;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__excerpt { font-size: 14px; color: #444; margin-bottom: 15px; flex-grow: 1; }
.card__media { margin-bottom: 10px; order: -1; }

/* ---------- Photo stand-ins ---------- */
.ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eaeaea; }
.ph--tall { aspect-ratio: 4 / 5; }
.ph__label {
    position: absolute; left: 10px; bottom: 10px; font-weight: 700;
    font-size: 12px; color: #fff; background: var(--accent); padding: 3px 8px;
}
.cat-nasional  { --c1:#c70000; }
.cat-politik   { --c1:#e05e00; }
.cat-ekonomi   { --c1:#052962; }
.cat-teknologi { --c1:#6b5840; }

/* ---------- Meta line ---------- */
.meta { font-size: 13px; color: var(--muted); }

/* ---------- Section heads ---------- */
.section-head { margin: 30px 0 20px; border-top: 1px solid var(--rule); padding-top: 10px; }
.section-head h2 { font-weight: 800; font-size: 22px; color: var(--accent); margin: 0; }

/* ---------- Sidebar ---------- */
.sidebar { border-left: 1px solid var(--rule); padding-left: 20px; }
.widget__title { font-weight: 800; font-size: 18px; color: var(--ink); border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 20px; }
.most-read li { display: grid; grid-template-columns: 40px 1fr; border-top: 1px solid var(--rule); padding: 15px 0; }
.most-read__rank { color: var(--accent); font-weight: 800; font-size: 24px; }
.most-read a { color: var(--ink); font-family: "Playfair Display", serif; font-weight: 700; font-size: 16px; }
.most-read a:hover { color: var(--accent); }

/* ---------- Single article ---------- */
.article { max-width: 100%; margin: 0; padding: 10px 0 60px; }
.article__title { font-family: "Playfair Display", serif; font-weight: 800; font-size: 42px; line-height: 1.1; margin: 15px 0; }
.article__standfirst { font-size: 20px; color: #333; font-weight: 600; margin-bottom: 25px; }
.article__meta { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 15px 0; margin-bottom: 30px; display: flex; gap: 15px; font-size: 14px; }
.article__body p { margin-bottom: 1.5em; font-size: 18px; color: #222; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-navy); color: #ffffff; padding: 50px 0; margin-top: 40px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand .masthead__logo { color: #ffffff; font-size: 36px; }
.footer-cols h4 { color: #ffffff; font-size: 16px; font-weight: 800; margin-bottom: 15px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 10px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 10px; }
.footer-cols a { color: #dcdcdc; font-size: 15px; }
.footer-cols a:hover { color: var(--brand-yellow); }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,0.2); margin-top: 40px; padding-top: 20px; font-size: 13px; color: #aaa; }

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { border-left: none; padding-left: 0; }
    .story-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .lead { grid-template-columns: 1fr; }
    .masthead__brand { text-align: left; }
}

/* ---------- Header Search Form ---------- */
.masthead__search {
    display: flex;
    align-items: center;
}

.masthead__search .search-field {
    font-family: var(--font-ui);
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink);
    border-radius: 2px 0 0 2px;
    outline: none;
    transition: border-color 0.2s;
}

.masthead__search .search-field:focus {
    border-color: var(--ft-claret);
}

.masthead__search .search-submit {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--ft-claret);
    color: #ffffff;
    padding: 7px 16px;
    border: 1px solid var(--ft-claret);
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.masthead__search .search-submit:hover {
    background: var(--ink);
    border-color: var(--ink);
}