/*
Theme Name: GlobalBeat
Theme URI: https://globalbeat.live
Description: Reuters-inspired worldwide news theme
Author: GlobalBeat
Version: 1.0
*/

/* ─── FONTS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  --orange: #FF8000;
  --black:  #1a1a1a;
  --dark:   #222222;
  --gray:   #757575;
  --light:  #f5f5f5;
  --border: #e0e0e0;
  --white:  #ffffff;
  --font:   'Inter', sans-serif;
  --serif:  'Playfair Display', serif;
  --max:    1240px;
}

/* dark mode */
[data-theme="dark"] {
  --black:  #f0f0f0;
  --dark:   #e0e0e0;
  --gray:   #aaaaaa;
  --light:  #1e1e1e;
  --border: #333333;
  --white:  #121212;
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ─── BREAKING NEWS TICKER ──────────────────────────────── */
.breaking-bar {
  background: var(--orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 34px;
}
.breaking-bar .label {
  background: #c05e00;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.breaking-bar .ticker-wrap {
  overflow: hidden;
  flex: 1;
  padding: 0 16px;
}
.breaking-bar .ticker {
  display: inline-flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.breaking-bar .ticker span::before { content: "• "; }
@keyframes ticker { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

/* ─── HEADER ────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--orange); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-family: var(--font);
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.dark-toggle:hover { border-color: var(--orange); color: var(--orange); }

/* ─── NAV ───────────────────────────────────────────────── */
.site-nav {
  border-top: 1px solid var(--border);
  background: var(--white);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-inner a:hover,
.nav-inner a.active {
  color: var(--black);
  border-bottom-color: var(--orange);
}

/* ─── SEARCH BAR ────────────────────────────────────────── */
.search-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: none;
}
.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  outline: none;
}
.search-bar input:focus { border-color: var(--orange); }

/* ─── CONTAINER ─────────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── DATE BAR ──────────────────────────────────────────── */
.date-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 0.78rem;
  color: var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

/* ─── HERO SECTION ──────────────────────────────────────── */
.hero-section {
  max-width: var(--max);
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: 20px;
}
.hero-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.hero-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.hero-main .hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 40px 24px 24px;
  color: #fff;
}
.hero-main .hero-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 8px;
}
.hero-main h1 {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-main .hero-meta {
  font-size: 0.78rem;
  opacity: 0.8;
}
.hero-side-top, .hero-side-bottom {
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.side-article { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.side-article:last-child { border-bottom: none; }
.side-article .cat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 5px;
}
.side-article h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 6px;
  transition: color 0.2s;
}
.side-article h3:hover { color: var(--orange); }
.side-article .meta { font-size: 0.72rem; color: var(--gray); }

/* ─── SECTION DIVIDER ───────────────────────────────────── */
.section-head {
  max-width: var(--max);
  margin: 32px auto 16px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-head h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  white-space: nowrap;
}
.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-head .orange-bar {
  width: 32px;
  height: 3px;
  background: var(--orange);
  flex-shrink: 0;
}

/* ─── NEWS GRID ─────────────────────────────────────────── */
.news-grid {
  max-width: var(--max);
  margin: 0 auto 32px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.news-card { cursor: pointer; }
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.news-card img:hover { opacity: 0.9; }
.news-card .cat-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 5px;
}
.news-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.news-card h3:hover { color: var(--orange); }
.news-card .excerpt {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.news-card .meta {
  font-size: 0.72rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-card .read-time {
  background: var(--light);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.68rem;
}

/* ─── TWO COLUMN LAYOUT ─────────────────────────────────── */
.two-col {
  max-width: var(--max);
  margin: 0 auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* ─── LIST ARTICLES ─────────────────────────────────────── */
.list-article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.list-article:first-child { padding-top: 0; }
.list-article img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
}
.list-article .cat-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 4px;
}
.list-article h3 {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 5px;
  transition: color 0.2s;
}
.list-article h3:hover { color: var(--orange); }
.list-article .meta { font-size: 0.72rem; color: var(--gray); }

/* ─── SIDEBAR ───────────────────────────────────────────── */
.sidebar-widget { margin-bottom: 28px; }
.sidebar-widget h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--orange);
  margin-bottom: 14px;
}
.trending-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.trending-item .num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--border);
  flex-shrink: 0;
  width: 24px;
  line-height: 1.2;
}
.trending-item h5 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  transition: color 0.2s;
}
.trending-item h5:hover { color: var(--orange); }

/* ─── SINGLE ARTICLE ────────────────────────────────────── */
.article-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
}
.article-body { max-width: 700px; }
.article-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin: 24px 0 10px;
}
.article-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 14px;
}
.article-deck {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 400;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: var(--gray);
  flex-wrap: wrap;
}
.article-meta-bar .author { font-weight: 600; color: var(--black); }
.article-meta-bar .read-time {
  background: var(--light);
  padding: 3px 9px;
  border-radius: 10px;
}
.share-btn {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.share-btn a {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--gray);
  transition: all 0.2s;
}
.share-btn a:hover { border-color: var(--orange); color: var(--orange); }
.article-hero-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 10px;
}
.article-img-cap {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 24px;
}
.article-content { font-size: 1rem; line-height: 1.75; color: var(--black); }
.article-content p { margin-bottom: 20px; }
.article-content h2 { font-size: 1.3rem; font-weight: 700; margin: 28px 0 12px; }
.article-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 10px 20px;
  margin: 20px 0;
  color: var(--gray);
  font-style: italic;
  background: var(--light);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: #aaa;
  padding: 40px 0 20px;
  margin-top: 48px;
  font-size: 0.82rem;
}
[data-theme="dark"] .site-footer { background: #0a0a0a; }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-logo span { color: var(--orange); }
.footer-tagline { font-size: 0.8rem; color: #666; margin-bottom: 28px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  margin-bottom: 16px;
}
.footer-links a { color: #aaa; transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #555;
  font-size: 0.75rem;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side-top, .hero-side-bottom { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-logo { font-size: 1.4rem; }
  .hero-main img { height: 260px; }
  .hero-main h1 { font-size: 1.2rem; }
  .news-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.5rem; }
  .list-article { grid-template-columns: 90px 1fr; }
  .list-article img { width: 90px; height: 60px; }
}
