/*
Theme Name: Rumah Olahraga
Theme URI: https://rumaholahraga.com/
Author: Rumah Olahraga
Author URI: https://rumaholahraga.com/
Description: Tema portal berita olahraga Indonesia yang ringan, responsif, dan siap digunakan bersama Cloudflare.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rumah-olahraga
Tags: news, blog, sports, custom-logo, featured-images, responsive-layout
*/

:root {
  --ro-bg: #020d1b;
  --ro-bg-soft: #07182b;
  --ro-panel: #09233c;
  --ro-panel-2: #0b2b49;
  --ro-line: rgba(105, 166, 221, .25);
  --ro-text: #f7f9fc;
  --ro-muted: #aebdd0;
  --ro-blue: #1187ff;
  --ro-blue-dark: #0757c7;
  --ro-gold: #f2bd45;
  --ro-red: #ee171d;
  --ro-radius: 12px;
  --ro-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  --ro-shell: 1640px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ro-text);
  background: radial-gradient(circle at 55% -20%, #0b3155 0, transparent 32rem), var(--ro-bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ro-blue); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  z-index: 100000; top: 6px; left: 6px; width: auto; height: auto;
  padding: 12px 16px; clip: auto; background: #fff; color: #111;
}
.ro-shell { width: min(calc(100% - 40px), var(--ro-shell)); margin-inline: auto; }
.ro-main { min-height: 55vh; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(2, 13, 27, .96);
  border-bottom: 1px solid rgba(41, 115, 181, .35);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 36px; }
.site-branding { flex: 0 0 auto; }
.brand-link, .custom-logo-link { display: inline-flex; align-items: center; gap: 12px; }
.custom-logo { width: auto; max-height: 50px; }
.brand-mark { width: 50px; height: 50px; object-fit: contain; }
.brand-name {
  color: #fff; font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(1.15rem, 1.5vw, 1.65rem); letter-spacing: .035em; text-transform: uppercase;
}
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  position: relative; display: flex; align-items: center; min-height: 74px;
  padding: 0 17px; color: #fff; font-weight: 700; font-size: .94rem;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 17px; right: 17px; bottom: 0;
  height: 3px; background: var(--ro-blue); transform: scaleX(0); transition: transform .2s ease;
}
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 14px; margin-left: 4px; }
.icon-button, .menu-toggle {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  padding: 0; border: 0; border-radius: 10px; color: #fff; background: transparent;
}
.icon-button:hover, .menu-toggle:hover { background: rgba(255,255,255,.08); }
.icon-button svg, .menu-toggle svg { width: 25px; height: 25px; }
.live-button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 9px; color: #fff; background: linear-gradient(135deg, #f3161d, #c60005);
  font-weight: 900; font-size: .9rem; letter-spacing: .02em; box-shadow: 0 6px 20px rgba(238,23,29,.25);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.menu-toggle { display: none; }
.search-panel { display: none; padding: 14px 0 18px; border-top: 1px solid rgba(255,255,255,.07); }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 10px; max-width: 720px; margin-inline: auto; }
.search-field {
  width: 100%; min-height: 48px; padding: 10px 14px; color: #fff;
  background: #0a2036; border: 1px solid var(--ro-line); border-radius: 9px; outline: none;
}
.search-field:focus { border-color: var(--ro-blue); box-shadow: 0 0 0 3px rgba(17,135,255,.15); }
.search-submit { padding: 10px 22px; border: 0; border-radius: 9px; color: #fff; background: var(--ro-blue); font-weight: 800; }

/* Homepage */
.home-stage { padding: 0 0 20px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(310px, 1.05fr); gap: 10px; }
.hero-feature {
  position: relative; min-height: 390px; overflow: hidden;
  border: 1px solid var(--ro-line); border-radius: 0 0 var(--ro-radius) var(--ro-radius);
  background: #031323 center/cover no-repeat; box-shadow: var(--ro-shadow);
}
.hero-feature::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(1,10,20,.98) 0%, rgba(1,12,24,.87) 33%, rgba(1,12,24,.28) 67%, rgba(1,12,24,.15) 100%),
              linear-gradient(0deg, rgba(1,12,24,.84), transparent 55%);
}
.hero-content { position: relative; z-index: 1; max-width: 640px; padding: clamp(40px, 5.2vw, 82px) clamp(30px, 4vw, 70px) 48px; }
.hero-kicker, .section-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  color: var(--ro-gold); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.hero-title {
  margin: 0 0 12px; max-width: 620px; color: #fff;
  font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2.25rem, 4.2vw, 4.4rem);
  line-height: .98; letter-spacing: .012em; text-wrap: balance;
}
.hero-excerpt { max-width: 520px; margin: 0 0 24px; color: #eef5fb; font-size: clamp(1rem, 1.15vw, 1.18rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ro-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 10px 24px; border: 1px solid transparent; border-radius: 9px;
  font-weight: 900; transition: transform .18s ease, background .18s ease;
}
.ro-button:hover { color: #fff; transform: translateY(-2px); }
.ro-button-primary { background: linear-gradient(135deg, #1493ff, #0068e8); box-shadow: 0 8px 25px rgba(17,135,255,.28); }
.ro-button-outline { border-color: rgba(242,189,69,.75); background: rgba(0,0,0,.36); }
.hero-dots { position: absolute; z-index: 2; left: 50%; bottom: 16px; display: flex; gap: 8px; transform: translateX(-50%); }
.hero-dots span { width: 34px; height: 4px; border-radius: 20px; background: rgba(255,255,255,.35); }
.hero-dots span:first-child { background: var(--ro-blue); }
.home-sidebar { display: grid; gap: 10px; align-content: start; }
.sidebar-panel { overflow: hidden; border: 1px solid var(--ro-line); border-radius: var(--ro-radius); background: linear-gradient(145deg, #082139, #04172a); }
.panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--ro-line); font-size: 1.05rem;
}
.panel-title span { color: var(--ro-gold); }
.popular-list { margin: 0; padding: 0 18px; list-style: none; }
.popular-item { display: grid; grid-template-columns: 38px 112px 1fr; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(137,180,218,.18); }
.popular-item:last-child { border-bottom: 0; }
.popular-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: linear-gradient(135deg, #136fe4, #073f9c); font-size: 1.1rem; font-weight: 900; }
.popular-thumb { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: #0e3658; }
.popular-title { margin: 0; font-size: .83rem; line-height: 1.32; font-weight: 800; }
.popular-title a:hover { color: var(--ro-gold); }

.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.story-card {
  position: relative; min-height: 260px; overflow: hidden; border: 1px solid var(--ro-line);
  border-radius: var(--ro-radius); background: #08213a; box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.story-card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.story-card:hover .story-card-image { transform: scale(1.035); }
.story-card::after { content: ""; position: absolute; inset: 25% 0 0; background: linear-gradient(transparent, rgba(1,12,23,.96)); }
.story-card-content { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 22px; }
.story-card-title { margin: 0 0 9px; font-size: clamp(1.05rem, 1.45vw, 1.4rem); line-height: 1.08; font-weight: 900; }
.story-card-meta, .entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ro-muted); font-size: .78rem; }
.story-card-meta a, .entry-meta a { color: #27a4ff; }

.category-rail {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px;
  overflow: hidden; border: 1px solid var(--ro-line); border-radius: 10px; background: #061b31;
}
.category-rail a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border-right: 1px solid var(--ro-line); color: #dce7f2; font-weight: 800; }
.category-rail a:last-child { border-right: 0; }
.category-rail a:first-child { color: #fff; background: linear-gradient(135deg, #075bd5, #0a3c8f); }
.category-rail a:hover { color: #fff; background: rgba(17,135,255,.2); }
.category-icon { font-size: 1.25rem; }

/* Match panel */
.match-list { padding: 0 18px; }
.match-row { padding: 10px 0; border-bottom: 1px solid rgba(137,180,218,.18); }
.match-row:last-child { border-bottom: 0; }
.match-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #55adff; font-size: .72rem; }
.match-teams { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: center; gap: 7px; }
.match-team { display: flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 800; }
.match-team:last-child { justify-content: flex-end; text-align: right; }
.team-badge { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.75); border-radius: 50%; color: #fff; background: #0a68dc; font-size: .62rem; }
.match-vs { color: var(--ro-muted); font-size: 1rem; font-weight: 900; text-align: center; }
.panel-footer-link { display: block; padding: 10px 18px; border-top: 1px solid var(--ro-line); color: #71b9ff; font-size: .8rem; text-align: center; }
.empty-panel { padding: 22px; color: var(--ro-muted); font-size: .86rem; text-align: center; }

/* Promo strip */
.promo-strip {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  margin: 14px 0 8px; padding: 11px 24px; overflow: hidden; border: 1px solid var(--ro-gold);
  border-radius: 10px; background: linear-gradient(105deg, #073b88 0, #092148 48%, #063c8f 100%);
}
.promo-strip::before, .promo-strip::after { content: ""; position: absolute; width: 40px; height: 140px; border: 2px solid var(--ro-gold); transform: rotate(40deg); }
.promo-strip::before { left: -25px; }
.promo-strip::after { right: -25px; }
.promo-brand { display: flex; align-items: center; gap: 14px; min-width: 350px; }
.promo-badge { display: grid; place-items: center; width: 50px; height: 50px; border: 2px solid var(--ro-gold); border-radius: 12px; color: var(--ro-gold); background: #062149; font-weight: 900; }
.promo-title { font-size: 1.18rem; font-weight: 900; }
.promo-copy { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.3); color: #d9e2ec; font-size: .85rem; font-style: italic; }
.promo-button { position: relative; z-index: 2; min-width: 190px; padding: 10px 18px; border: 0; border-radius: 7px; color: #171107; background: linear-gradient(#f9d46f, #dcae35); font-weight: 900; text-align: center; }
.promo-button:hover { color: #171107; filter: brightness(1.05); }

/* Standard content */
.content-wrap { padding: 36px 0 60px; }
.page-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--ro-line); }
.page-title { margin: 0; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: .015em; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.archive-card { overflow: hidden; border: 1px solid var(--ro-line); border-radius: var(--ro-radius); background: var(--ro-bg-soft); }
.archive-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #0c2c48; }
.archive-card-body { padding: 18px; }
.archive-card-title { margin: 5px 0 10px; font-size: 1.2rem; line-height: 1.2; }
.archive-card-excerpt { margin: 10px 0 0; color: var(--ro-muted); font-size: .9rem; }
.pagination { margin-top: 34px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--ro-line); border-radius: 7px; background: var(--ro-bg-soft); }
.page-numbers.current { border-color: var(--ro-blue); background: var(--ro-blue); }
.article-layout { display: grid; grid-template-columns: minmax(0, 860px) minmax(260px, 340px); justify-content: center; gap: 36px; }
.article-card { overflow: hidden; border: 1px solid var(--ro-line); border-radius: var(--ro-radius); background: #fff; color: #152232; box-shadow: var(--ro-shadow); }
.article-header { padding: clamp(24px, 4vw, 48px); }
.article-title { margin: 0 0 14px; color: #07182b; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2.15rem, 4vw, 4rem); line-height: 1.04; }
.article-featured { width: 100%; max-height: 560px; object-fit: cover; }
.article-content { padding: clamp(24px, 4vw, 48px); font-size: 1.05rem; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3 { color: #07182b; line-height: 1.2; }
.article-content a { color: #006cd8; text-decoration: underline; }
.article-content blockquote { margin: 24px 0; padding: 12px 20px; border-left: 4px solid var(--ro-blue); background: #eef6ff; }
.article-content img { border-radius: 8px; }
.article-side { display: grid; align-content: start; gap: 16px; }
.side-card { padding: 20px; border: 1px solid var(--ro-line); border-radius: var(--ro-radius); background: var(--ro-bg-soft); }
.side-card h2 { margin: 0 0 14px; font-size: 1.05rem; }
.side-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.side-list li { padding-bottom: 12px; border-bottom: 1px solid var(--ro-line); font-size: .88rem; font-weight: 800; }
.side-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.breadcrumbs { margin-bottom: 14px; color: var(--ro-muted); font-size: .8rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.post-tags a { padding: 6px 10px; border-radius: 20px; color: #075bb4; background: #eaf4ff; font-size: .8rem; text-decoration: none; }
.comments-area { margin-top: 24px; padding: 24px; border: 1px solid var(--ro-line); border-radius: var(--ro-radius); background: var(--ro-bg-soft); }
.comment-list { padding-left: 22px; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--ro-line); border-radius: 7px; }
.comment-form input[type="submit"] { padding: 11px 20px; border: 0; border-radius: 7px; color: #fff; background: var(--ro-blue); font-weight: 800; }

/* Footer */
.site-footer { border-top: 1px solid rgba(70,136,195,.28); background: #020a14; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; min-height: 86px; }
.footer-brand { font-size: 1.2rem; font-weight: 900; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 26px; margin: 0; padding: 0; list-style: none; color: var(--ro-muted); font-size: .82rem; }
.footer-bottom { padding: 12px 0; border-top: 1px solid rgba(70,136,195,.14); color: #7f91a6; font-size: .76rem; }

/* WordPress alignment */
.alignwide { width: min(1200px, calc(100vw - 40px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

@media (max-width: 1180px) {
  .primary-nav a { padding-inline: 10px; font-size: .84rem; }
  .primary-nav a::after { left: 10px; right: 10px; }
  .home-layout { grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); }
  .promo-brand { min-width: 285px; }
  .promo-copy { display: none; }
  .promo-strip { grid-template-columns: 1fr auto; }
}

@media (max-width: 960px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 66px; }
  .brand-mark { width: 44px; height: 44px; }
  .menu-toggle { display: inline-grid; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    padding: 10px 20px 18px; background: #031323; border-bottom: 1px solid var(--ro-line);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 0; }
  .primary-nav a { min-height: 44px; padding: 8px 10px; }
  .primary-nav a::after { display: none; }
  .header-tools { margin-left: auto; }
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { grid-template-columns: 1fr 1fr; }
  .hero-feature { border-radius: 0 0 var(--ro-radius) var(--ro-radius); }
  .story-grid, .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-card:last-child { grid-column: span 2; }
  .category-rail { grid-template-columns: repeat(2, 1fr); }
  .category-rail a:nth-child(2) { border-right: 0; }
  .category-rail a:nth-child(-n+2) { border-bottom: 1px solid var(--ro-line); }
  .article-layout { grid-template-columns: 1fr; }
  .article-side { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .ro-shell { width: min(calc(100% - 24px), var(--ro-shell)); }
  .header-inner { gap: 10px; }
  .brand-name { font-size: 1.04rem; }
  .brand-mark { width: 38px; height: 38px; }
  .live-button { padding: 9px; font-size: 0; }
  .live-button .live-dot { margin: 0; }
  .hero-feature { min-height: 530px; background-position: 67% center !important; }
  .hero-feature::before { background: linear-gradient(0deg, rgba(1,10,20,.99) 0%, rgba(1,10,20,.82) 52%, rgba(1,10,20,.25) 100%); }
  .hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 22px 50px; }
  .hero-title { font-size: clamp(2.2rem, 12vw, 3.25rem); }
  .hero-excerpt { font-size: .95rem; }
  .hero-actions .ro-button { width: 100%; }
  .home-sidebar { grid-template-columns: 1fr; }
  .popular-item { grid-template-columns: 34px 92px 1fr; }
  .popular-thumb { width: 92px; }
  .story-grid, .archive-grid { grid-template-columns: 1fr; }
  .story-card:last-child { grid-column: auto; }
  .story-card { min-height: 250px; }
  .category-rail { grid-template-columns: 1fr 1fr; }
  .category-rail a { padding: 0 8px; font-size: .8rem; }
  .promo-strip { grid-template-columns: 1fr; padding: 14px 18px; }
  .promo-brand { min-width: 0; }
  .promo-title { font-size: 1rem; }
  .promo-button { width: 100%; }
  .article-side { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding: 24px 0; text-align: center; }
  .footer-nav ul { justify-content: center; gap: 14px 20px; }
  .footer-bottom { text-align: center; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
}
