/*
Theme Name: Papua
Version: 11.0.0
Requires at least: 6.0
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: portal-nasional
*/

/* ---------- Tokens (NatGeo Style) ---------- */
:root {
    --natgeo-yellow: #ffcc00; /* Iconic Yellow */
    --natgeo-yellow-dark: #d69e00; /* Darker yellow for text legibility */
    --natgeo-black:  #000000;
    --ink:           #222222;
    --ink-light:     #555555;
    --paper:         #ffffff;
    --paper-2:       #f4f4f4; /* Light gray for sidebar/widgets */
    --rule:          #e0e0e0;
    --rule-strong:   #000000;
    --muted:         #777777;
    --maxw:          1240px;
    --font-heading:  "Merriweather", Georgia, serif;
    --font-body:     "Merriweather", Georgia, serif;
    --font-ui:       "Montserrat", "Helvetica Neue", 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-body); font-size: 18px; line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    border-top: 6px solid var(--natgeo-yellow); /* THE YELLOW BORDER */
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: var(--ink); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--natgeo-yellow-dark); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Utility / Faces ---------- */
.kicker, .site-nav, .meta, .widget__title, .masthead__date { font-family: var(--font-ui); }

/* ---------- Masthead ---------- */
.masthead {
    background: var(--natgeo-black);
    color: var(--paper);
}
.masthead__top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #333;
}
.masthead__date { font-size: 12px; color: #aaa; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

.masthead__brand { padding: 30px 0; display: flex; justify-content: center; }
.masthead__brand a { color: var(--paper); text-decoration: none; }

/* The Iconic Logo Wrapper */
.masthead__logo-wrapper { display: flex; align-items: center; gap: 15px; }
.yellow-box { width: 34px; height: 46px; border: 5px solid var(--natgeo-yellow); display: inline-block; }
.logo-text { font-family: var(--font-ui); font-size: 26px; font-weight: 900; line-height: 0.9; letter-spacing: -0.03em; }

/* ---------- Header Search Form ---------- */
.masthead__search { display: flex; align-items: center; }
.masthead__search .search-field {
    font-family: var(--font-ui); font-size: 13px; padding: 7px 12px;
    border: 1px solid #444; background: #222; color: #fff;
    border-radius: 0; outline: none; border-right: none; transition: border 0.2s;
}
.masthead__search .search-field:focus { border-color: var(--natgeo-yellow); background: #333; }
.masthead__search .search-submit {
    font-family: var(--font-ui); font-size: 12px; font-weight: 700; text-transform: uppercase;
    background: var(--natgeo-yellow); color: var(--natgeo-black); letter-spacing: 0.05em;
    padding: 8px 16px; border: 1px solid var(--natgeo-yellow); border-radius: 0; cursor: pointer; transition: 0.2s;
}
.masthead__search .search-submit:hover { background: #fff; border-color: #fff; }

/* ---------- Primary nav ---------- */
.site-nav { border-top: 1px solid #333; background: var(--natgeo-black); }
.site-nav ul {
    list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap;
}
.site-nav a {
    display: block; color: #fff; font-size: 14px; font-weight: 700; padding: 18px 22px;
    text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.2s;
}
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--natgeo-yellow); }

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

/* ---------- Lead / hero story ---------- */
.lead { margin-bottom: 50px; display: flex; flex-direction: column; gap: 20px; border-bottom: 1px solid var(--rule); padding-bottom: 40px; }
.lead__media { width: 100%; }
.lead__title {
    font-family: var(--font-heading); font-weight: 700; font-size: clamp(26px, 4vw, 36px); /* Ukuran maksimal kini hanya 36px */
    line-height: 1.3; 
    margin: 15px 0 20px;
}
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--natgeo-yellow-dark); }
.lead__standfirst { font-size: 20px; color: var(--ink-light); margin: 0 0 20px; line-height: 1.5; }

/* ---------- Kicker ---------- */
.kicker {
    display: inline-block; font-size: 13px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--natgeo-yellow-dark);
    margin-bottom: 5px;
}

/* ---------- Story grid ---------- */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.card { display: flex; flex-direction: column; }
.card__media { margin-bottom: 15px; order: -1; aspect-ratio: 4/3; overflow: hidden;}
.card__title {
    font-family: var(--font-heading); font-weight: 700; font-size: 24px; line-height: 1.3;
    margin: 5px 0 10px;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--natgeo-yellow-dark); }
.card__excerpt { font-size: 15px; color: var(--ink-light); margin-bottom: 15px; flex-grow: 1; }

/* ---------- Photo stand-ins ---------- */
.ph { position: relative; aspect-ratio: 4 / 3; background: var(--rule); overflow: hidden; width: 100%; height: 100%; }
.ph--tall { aspect-ratio: 4 / 5; }

/* ---------- Meta line ---------- */
.meta { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Section heads ---------- */
.section-head { margin: 0 0 30px; border-bottom: 2px solid var(--rule-strong); padding-bottom: 10px; }
.section-head h2 { font-family: var(--font-ui); font-weight: 800; font-size: 24px; margin: 0; color: var(--ink); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Sidebar ---------- */
.sidebar { padding-top: 0; }
.widget { margin-bottom: 50px; }
.widget__title {
    font-family: var(--font-ui); font-weight: 800; font-size: 16px; text-transform: uppercase;
    letter-spacing: 0.1em; margin: 0 0 20px; color: var(--ink); border-left: 4px solid var(--natgeo-yellow); padding-left: 15px;
}
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
    display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.most-read__rank {
    counter-increment: mr; font-family: var(--font-ui); font-weight: 800; font-size: 24px; color: var(--rule); line-height: 1;
}
.most-read__rank::before { content: counter(mr); }
.most-read a { font-family: var(--font-heading); font-weight: 700; font-size: 17px; line-height: 1.4; color: var(--ink); }
.most-read a:hover { color: var(--natgeo-yellow-dark); }

/* ---------- Single article ---------- */
.article { max-width: 100%; margin: 0; padding: 10px 0 60px; }
.article__title {
    font-family: var(--font-heading); font-weight: 700; font-size: clamp(36px, 5vw, 56px); line-height: 1.2;
    margin: 15px 0 20px;
}
.article__standfirst { font-size: 22px; color: var(--ink-light); margin: 0 0 30px; line-height: 1.6; }
.article__meta {
    display: flex; gap: 15px; align-items: center; flex-wrap: wrap;
    margin-bottom: 30px; padding: 15px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.article__meta span { font-family: var(--font-ui); font-size: 13px; color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.article__body p { margin: 0 0 1.6em; font-size: 19px; color: var(--ink); line-height: 1.8; }
.article__body h2, .article__body h3 { font-family: var(--font-ui); font-weight: 800; margin-top: 2em; margin-bottom: 0.8em; font-size: 26px; text-transform: uppercase;}
.article__body blockquote {
    margin: 2.5em 0; padding: 0 0 0 25px; border-left: 5px solid var(--natgeo-yellow);
    font-size: 24px; font-weight: 400; font-style: italic; color: var(--ink-light); font-family: var(--font-heading);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--natgeo-black); color: #ffffff; padding: 60px 0 40px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; border-bottom: 1px solid #333; padding-bottom: 40px;}
.footer-cols h4 { font-family: var(--font-ui); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--natgeo-yellow); margin: 0 0 20px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 12px; }
.footer-cols a { color: #cccccc; font-family: var(--font-ui); font-size: 14px; font-weight: 600; transition: color 0.2s; text-transform: uppercase; }
.footer-cols a:hover { color: #ffffff; }
.site-footer__legal { margin-top: 30px; font-family: var(--font-ui); font-size: 12px; color: #777; text-align: center; text-transform: uppercase; letter-spacing: 0.05em;}

/* ---------- Pagination ---------- */
.pagination { padding: 40px 0; border-top: 1px solid var(--rule); display: flex; gap: 10px; }
.pagination a, .pagination .current {
    font-family: var(--font-ui); font-weight: 700; font-size: 14px; padding: 10px 16px;
    border: 1px solid var(--rule); color: var(--ink); border-radius: 2px; text-transform: uppercase;
}
.pagination .current { background: var(--natgeo-black); color: #fff; border-color: var(--natgeo-black); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; gap: 50px; }
    .sidebar { padding-left: 0; border-top: 4px solid var(--rule-strong); padding-top: 40px; }
    .story-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .masthead__logo-wrapper { transform: scale(0.85); }
    .footer-cols { grid-template-columns: 1fr; }
}