/*
Theme Name: Portal Berita Starter
Theme URI: https://example.com
Author: Custom Dev
Description: Starter theme WordPress bergaya portal berita modern dengan grid headline, trending, dan polling.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: portal-berita-starter
*/

:root {
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --text-main: #18191b;
  --text-muted: #6b7280;
  --accent: #e11d48;
  --accent-soft: #ffe4e6;
  --border: #e5e7eb;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.search-box {
  flex: 1;
  max-width: 460px;
}

.search-box input[type="search"] {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.main-nav {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  border-top: 1px solid #f0f1f3;
  font-size: 0.9rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--accent);
}

/* Sub-bar / Topic Pills */
.topic-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
}

.topic-pill {
  background: #fff;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Banner Promo */
.promo-banner {
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 8px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Story / Category Circles */
.story-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 16px;
}

.story-item {
  text-align: center;
  min-width: 72px;
  font-size: 0.78rem;
}

.story-avatar {
  width: 58px;
  height: 58px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  padding: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
}

/* Hero Grid + Trending Sidebar */
.hero-section {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.headline-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.headline-main {
  grid-column: 1 / -1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 290px;
  background: #1f2937;
}

.headline-sub {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 155px;
  background: #1f2937;
}

.headline-main img,
.headline-sub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.82;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.08));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.card-overlay h2,
.card-overlay h3 {
  margin: 0 0 6px;
  line-height: 1.3;
}

.card-overlay h2 {
  font-size: 1.25rem;
}

.card-overlay h3 {
  font-size: 0.95rem;
}

.meta-text {
  font-size: 0.75rem;
  color: #d1d5db;
}

/* Trending Box */
.trending-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.section-heading span.bar {
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

.trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trending-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f1f3;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.trending-thumb {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e7eb;
}

/* Polling Section */
.polling-section {
  margin: 24px 0;
}

.polling-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 14px;
}

.poll-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.poll-option {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  background: #fafafa;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero-section,
  .polling-grid {
    grid-template-columns: 1fr;
  }

  .headline-stack {
    grid-template-columns: 1fr;
  }
}
