/*
Theme Name: Merah Warta
Theme URI: https://example.com/merah-warta
Author: OpenAI
Description: Tema portal berita modern dengan aksen merah elegan, slider berita utama, gambar unggulan, dan profil penulis.
Version: 1.2.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: merah-warta
*/

:root {
  --mw-red: #a90f20;
  --mw-red-dark: #720714;
  --mw-red-soft: #f9e9ec;
  --mw-ink: #17171a;
  --mw-muted: #6e6e76;
  --mw-line: #e8e5e6;
  --mw-paper: #ffffff;
  --mw-wash: #f6f5f5;
  --mw-gold: #d4a748;
  --mw-radius: 14px;
  --mw-shadow: 0 18px 45px rgba(35, 18, 20, .09);
  --mw-width: 1200px;
  --mw-body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mw-heading-font: Georgia, "Times New Roman", serif;
  --mw-body-size: 16px;
  --mw-card-title-size: 1.22rem;
  --mw-article-size: 1.12rem;
  --mw-slide-title-size: 3.5rem;
  --mw-slider-height: 490px;
  --mw-card-ratio: 16 / 9;
  --mw-logo-height: 58px;
  --mw-module-radius: 14px;
  --mw-section-gap: 38px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mw-ink);
  background: var(--mw-paper);
  font-family: var(--mw-body-font);
  font-size: var(--mw-body-size);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mw-red); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.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; }
.mw-shell { width: min(calc(100% - 32px), var(--mw-width)); margin-inline: auto; }

.mw-topbar { background: var(--mw-red-dark); color: #fff; font-size: .83rem; }
.mw-topbar__inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mw-topbar__date { opacity: .9; }
.mw-topbar__links { display: flex; gap: 18px; }
.mw-topbar a:hover { color: #ffd6dc; }

.mw-brandbar { padding: 22px 0; border-top: 2px solid var(--mw-gold); border-bottom: 1px solid var(--mw-line); background: linear-gradient(180deg, #fff, #fdfbfb); }
.mw-brandbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.mw-logo { display: inline-flex; align-items: center; gap: 12px; }
.mw-logo__mark { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--mw-red), var(--mw-red-dark)); border-radius: 12px 4px 12px 4px; font: 900 1.4rem/1 Georgia, serif; box-shadow: 0 8px 22px rgba(169,15,32,.25); }
.mw-logo__text { display: grid; line-height: 1; }
.mw-logo__name { font-family: var(--mw-heading-font); font-size: clamp(1.45rem, 3vw, 2.05rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.mw-logo__tagline { margin-top: 8px; color: var(--mw-muted); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.custom-logo { max-height: var(--mw-logo-height); width: auto; }
.mw-search { width: min(100%, 350px); display: flex; align-items: center; padding: 6px 7px 6px 16px; background: var(--mw-wash); border: 1px solid var(--mw-line); border-radius: 999px; }
.mw-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--mw-ink); }
.mw-search button { width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: var(--mw-red); }

.mw-nav { position: sticky; z-index: 50; top: 0; color: #fff; background: var(--mw-red); box-shadow: 0 8px 22px rgba(91, 5, 15, .14); }
.mw-nav__inner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; }
.mw-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mw-menu a { display: block; padding: 15px 14px; font-size: .88rem; font-weight: 750; letter-spacing: .02em; }
.mw-menu a:hover, .mw-menu .current-menu-item > a { color: #fff; background: rgba(82,0,10,.24); }
.mw-menu-toggle { display: none; border: 0; padding: 11px 0; color: #fff; background: transparent; font-weight: 800; cursor: pointer; }

.mw-ticker { border-bottom: 1px solid var(--mw-line); background: #fff; }
.mw-ticker__inner { min-height: 44px; display: flex; align-items: center; gap: 16px; overflow: hidden; }
.mw-ticker__label { flex: 0 0 auto; padding: 5px 10px; border-radius: 4px; color: #fff; background: var(--mw-red); font-size: .74rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mw-ticker__track { white-space: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
.mw-ticker__items { display: inline-flex; gap: 46px; animation: mwTicker 28s linear infinite; }
.mw-ticker__items a { font-size: .86rem; font-weight: 650; }
.mw-ticker__items a::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 9px; border-radius: 50%; background: var(--mw-red); vertical-align: middle; }
@keyframes mwTicker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mw-ticker__items { animation: none; } }

.mw-main { padding: 28px 0 64px; }
.mw-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: var(--mw-section-gap) 0 18px; border-bottom: 1px solid var(--mw-line); }
.mw-section-title { position: relative; margin: 0; padding: 0 0 11px; font-family: var(--mw-heading-font); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 800; line-height: 1.15; }
.mw-section-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 66px; height: 3px; background: linear-gradient(90deg, var(--mw-red), var(--mw-gold)); }
.mw-section-link { padding-bottom: 10px; color: var(--mw-red); font-size: .82rem; font-weight: 800; }

.mw-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; }
.mw-hero--single { grid-template-columns: 1fr; }
.mw-slider { position: relative; min-height: var(--mw-slider-height); overflow: hidden; color: #fff; background: #2a1115; border-radius: 4px 4px var(--mw-module-radius) var(--mw-module-radius); box-shadow: var(--mw-shadow); }
.mw-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
.mw-slide.is-active { opacity: 1; visibility: visible; }
.mw-slide__media, .mw-slide__media img { width: 100%; height: 100%; object-fit: cover; }
.mw-slide__media { position: absolute; inset: 0; background: radial-gradient(circle at 75% 25%, #d85764 0, #7e101d 28%, #281316 70%); }
.mw-slide__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,5,8,.06) 22%, rgba(19,5,8,.93) 100%); }
.mw-slide__content { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: clamp(24px, 5vw, 48px); }
.mw-kicker { display: inline-block; margin-bottom: 12px; padding: 5px 9px; color: #fff; background: var(--mw-red); border-radius: 3px; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mw-slide__title { max-width: 830px; margin: 0; font-family: var(--mw-heading-font); font-size: clamp(2rem, 4vw, var(--mw-slide-title-size)); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; text-wrap: balance; }
.mw-slide__meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: .82rem; opacity: .9; }
.mw-slider__nav { position: absolute; z-index: 4; right: 20px; bottom: 20px; display: flex; gap: 7px; }
.mw-slider__button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(25,8,11,.5); border-radius: 50%; cursor: pointer; backdrop-filter: blur(8px); }
.mw-slider__button:hover { background: var(--mw-red); }

.mw-side-leads { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.mw-side-lead { position: relative; min-height: calc((var(--mw-slider-height) - 18px) / 2); overflow: hidden; color: #fff; background: #51202a; border-radius: var(--mw-module-radius); box-shadow: 0 10px 28px rgba(35,18,20,.1); }
.mw-side-lead img { width: 100%; height: 100%; object-fit: cover; }
.mw-side-lead__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(24,5,8,.95)); }
.mw-side-lead__content { position: absolute; right: 0; bottom: 0; left: 0; padding: 22px; }
.mw-side-lead h2 { margin: 0; font-family: var(--mw-heading-font); font-size: 1.2rem; font-weight: 750; line-height: 1.25; }
.mw-side-lead time { display: block; margin-top: 10px; font-size: .76rem; opacity: .82; }

.mw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; }
.mw-layout--sidebar-only { grid-template-columns: minmax(280px, 420px); justify-content: end; }
.mw-news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
.mw-card { border-bottom: 1px solid var(--mw-line); padding-bottom: 22px; }
.mw-card__image { display: block; aspect-ratio: var(--mw-card-ratio); overflow: hidden; margin-bottom: 15px; background: linear-gradient(135deg, var(--mw-red-dark), #dc5a67); border-radius: calc(var(--mw-module-radius) * .65); }
.mw-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.mw-card:hover img { transform: scale(1.035); }
.mw-card__title { margin: 4px 0 8px; font-family: var(--mw-heading-font); font-size: var(--mw-card-title-size); font-weight: 750; line-height: 1.28; }
.mw-card__meta, .mw-entry-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--mw-muted); font-size: .78rem; }
.mw-card__excerpt { margin: 10px 0 0; color: #55545a; font-size: .91rem; line-height: 1.65; }

.mw-sidebar { padding-top: 38px; }
.mw-widget { margin-bottom: 28px; padding: 22px; border: 1px solid var(--mw-line); border-top: 3px solid var(--mw-red); border-radius: 0 0 var(--mw-module-radius) var(--mw-module-radius); background: #fff; box-shadow: 0 12px 28px rgba(35,18,20,.055); }
.mw-widget__title, .widget-title { margin: 0 0 16px; font-family: var(--mw-heading-font); font-size: 1.12rem; font-weight: 800; line-height: 1.2; }
.mw-popular { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; counter-reset: news; }
.mw-popular li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.mw-popular li::before { counter-increment: news; content: counter(news, decimal-leading-zero); color: var(--mw-red); font: 800 1.25rem/1 Georgia, serif; }
.mw-popular a { font-size: .9rem; font-weight: 720; line-height: 1.35; }
.mw-widget ul { margin: 0; padding-left: 18px; }
.mw-widget li + li { margin-top: 8px; }

.mw-calendar-wrap { position: relative; overflow: hidden; }
.mw-calendar-wrap::after { content: ""; position: absolute; top: 0; right: 0; width: 54px; height: 3px; background: var(--mw-gold); }
.mw-calendar-wrap table { width: 100%; border-collapse: separate; border-spacing: 4px; text-align: center; }
.mw-calendar-wrap caption { margin-bottom: 13px; color: var(--mw-red-dark); font-weight: 800; text-align: left; }
.mw-calendar-wrap th { padding: 6px 2px; color: var(--mw-muted); font-size: .74rem; font-weight: 800; }
.mw-calendar-wrap td { height: 34px; border-radius: 6px; font-size: .82rem; }
.mw-calendar-wrap td a { display: grid; width: 32px; height: 32px; margin: auto; place-items: center; color: #fff; background: var(--mw-red); border-radius: 50%; font-weight: 800; }
.mw-calendar-wrap #today { color: var(--mw-red); background: var(--mw-red-soft); outline: 1px solid var(--mw-red); font-weight: 800; }
.mw-calendar-wrap tfoot td { padding-top: 9px; text-align: left; }
.mw-calendar-wrap tfoot td:last-child { text-align: right; }
.mw-calendar-note { margin: 10px 0 0; color: var(--mw-muted); font-size: .78rem; }

.mw-editable-zone { margin: 26px 0; }

.mw-content { max-width: 820px; }
.mw-archive-title { margin: 0 0 24px; font-family: var(--mw-heading-font); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.08; }
.mw-entry-header { margin: 14px 0 24px; }
.mw-entry-title { margin: 7px 0 16px; font-family: var(--mw-heading-font); font-size: clamp(2.25rem, 5.5vw, 4.4rem); font-weight: 850; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.mw-entry-thumb { margin: 24px 0 30px; overflow: hidden; border-radius: var(--mw-radius); background: var(--mw-wash); }
.mw-entry-thumb img { width: 100%; max-height: 620px; object-fit: cover; }
.mw-entry-content { font-family: var(--mw-heading-font); font-size: var(--mw-article-size); line-height: 1.86; }
.mw-entry-content h2, .mw-entry-content h3 { line-height: 1.25; }
.mw-entry-content blockquote { margin: 28px 0; padding: 10px 0 10px 24px; border-left: 4px solid var(--mw-red); color: #3e3436; font-size: 1.22rem; }
.mw-entry-content a { color: var(--mw-red); text-decoration: underline; }
.mw-author-box { display: grid; grid-template-columns: 78px 1fr; gap: 20px; align-items: start; margin-top: 38px; padding: 24px; background: var(--mw-red-soft); border-radius: var(--mw-radius); }
.mw-author-box img { border-radius: 50%; }
.mw-author-box h3 { margin: 0 0 4px; font-family: var(--mw-heading-font); font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.mw-author-box__role { color: var(--mw-red); font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.mw-author-box p { margin: 8px 0 0; color: #52494a; font-size: .9rem; line-height: 1.55; }
.mw-comments { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--mw-line); }
.comment-list { padding-left: 24px; }
.comment-list li { margin: 18px 0; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--mw-line); border-radius: 7px; }
.comment-form input[type="submit"] { padding: 11px 18px; border: 0; color: #fff; background: var(--mw-red); border-radius: 6px; cursor: pointer; }
.mw-pagination { margin-top: 32px; }
.mw-pagination .page-numbers { display: inline-grid; min-width: 40px; height: 40px; place-items: center; margin-right: 5px; border: 1px solid var(--mw-line); border-radius: 6px; }
.mw-pagination .current { color: #fff; border-color: var(--mw-red); background: var(--mw-red); }

.mw-footer { margin-top: 56px; color: #ddd; background: #1c1113; }
.mw-footer__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 38px; padding: 50px 0 36px; }
.mw-footer h2 { color: #fff; font-family: var(--mw-heading-font); font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.mw-footer p, .mw-footer li { color: #bfb8ba; font-size: .9rem; }
.mw-footer ul { margin: 0; padding: 0; list-style: none; }
.mw-footer li + li { margin-top: 8px; }
.mw-footer__bottom { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.1); color: #9e9698; font-size: .78rem; }

.mw-empty { padding: 48px; text-align: center; background: var(--mw-wash); border-radius: var(--mw-radius); }

.mw-legal { margin-top: 48px; padding: clamp(28px, 4vw, 46px); color: #fff; background: linear-gradient(135deg, var(--mw-red-dark), var(--mw-red)); border-radius: var(--mw-module-radius); box-shadow: var(--mw-shadow); }
.mw-legal__head { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.7fr); gap: 40px; align-items: end; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.2); }
.mw-legal__eyebrow { display: block; margin-bottom: 9px; color: #f1d28b; font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.mw-legal__title { margin: 0; font-family: var(--mw-heading-font); font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.08; }
.mw-legal__intro { margin: 0; color: rgba(255,255,255,.82); }
.mw-legal__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mw-legal__item { min-height: 118px; padding: 19px 20px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.08); }
.mw-legal__label { display: block; margin-bottom: 8px; color: #f1d28b; font-size: .72rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.mw-legal__value { display: block; font-size: 1rem; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .mw-hero { grid-template-columns: 1fr; }
  .mw-side-leads { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .mw-layout { grid-template-columns: 1fr; }
  .mw-layout--sidebar-only { max-width: none; }
  .mw-sidebar { padding-top: 0; }
  .mw-legal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mw-shell { width: min(calc(100% - 24px), var(--mw-width)); }
  .mw-topbar__links, .mw-brandbar .mw-search { display: none; }
  .mw-brandbar { padding: 15px 0; }
  .mw-menu-toggle { display: block; }
  .mw-nav__inner { display: block; }
  .mw-menu { display: none; align-items: stretch; padding-bottom: 8px; }
  .mw-menu.is-open { display: block; }
  .mw-menu a { padding: 11px 0; border-top: 1px solid rgba(255,255,255,.13); }
  .mw-main { padding-top: 18px; }
  .mw-slider { min-height: min(430px, calc(100vh - 170px)); border-radius: 0 0 12px 12px; }
  .mw-slide__title { font-size: 2rem; }
  .mw-slide__content { padding: 22px 20px 66px; }
  .mw-slider__nav { right: 14px; bottom: 14px; }
  .mw-side-leads, .mw-news-grid { grid-template-columns: 1fr; }
  .mw-side-lead { min-height: 210px; }
  .mw-card__excerpt { font-size: .88rem; }
  .mw-calendar-wrap table { border-spacing: 2px; }
  .mw-calendar-wrap td { height: 38px; }
  .mw-calendar-wrap td a { width: 36px; height: 36px; }
  .mw-legal { margin-top: 34px; padding: 24px 18px; }
  .mw-legal__head, .mw-legal__grid { grid-template-columns: 1fr; gap: 14px; }
  .mw-legal__head { align-items: start; }
  .mw-legal__item { min-height: auto; }
  .mw-footer__top { grid-template-columns: 1fr; gap: 22px; }
  .mw-author-box { grid-template-columns: 58px 1fr; padding: 18px; }
}
