/* Tehran Dispatch - Main Stylesheet */

:root {
  --primary: #1a1a2e;
  --accent: #c0392b;
  --accent-light: #e74c3c;
  --gold: #d4a017;
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e0e0e0;
  --header-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ── HEADER ── */
header {
  background: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--header-height);
  max-width: 1280px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo .flag {
  font-size: 28px;
}

.flag-img {
  width: 42px;
  height: 28px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}

.site-logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
}

.site-logo span {
  color: var(--gold);
}

.header-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,.55);
  text-align: right;
}

nav {
  background: var(--accent);
}

.nav-inner {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  gap: 0;
}

.nav-inner a {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.9);
  padding: 10px 16px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: white;
  border-bottom-color: var(--gold);
  background: rgba(0,0,0,.15);
}

/* ── BREAKING TICKER ── */
.ticker-wrap {
  background: #111;
  color: var(--gold);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 32px;
}

.ticker-label {
  background: var(--accent);
  color: white;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-content {
  overflow: hidden;
  flex: 1;
  padding: 0 16px;
}

.ticker-content marquee {
  letter-spacing: 0.02em;
}

/* ── MAIN LAYOUT ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HERO ── */
.hero {
  background: white;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}

.hero-feature {
  position: relative;
  border-right: 1px solid var(--border);
  padding-right: 32px;
}

.hero-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  margin-bottom: 16px;
}

.hero-image-placeholder {
  width: 100%;
  height: 380px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 16px;
}

.category-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.hero-feature h2 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.hero-feature h2 a:hover { color: var(--accent); }

.hero-feature .standfirst {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.byline {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.byline strong { color: var(--text); }

/* Hero sidebar */
.hero-sidebar h3 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.sidebar-articles { display: flex; flex-direction: column; gap: 0; }

.sidebar-article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article:last-child { border-bottom: none; }

.sidebar-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-thumb-placeholder {
  width: 80px;
  height: 60px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.sidebar-article-meta { flex: 1; }

.sidebar-article .category-tag {
  font-size: 0.65rem;
  padding: 2px 7px;
  margin-bottom: 5px;
}

.sidebar-article h4 {
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 700;
}

.sidebar-article h4 a:hover { color: var(--accent); }

.sidebar-article .byline { margin-top: 4px; font-size: 0.72rem; }

/* ── CONTENT GRID ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.section-header h2 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-header a {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-bottom: 48px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.card-thumb-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.card-body { padding: 16px; }

.card-body .category-tag { margin-bottom: 8px; }

.card-body h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 8px;
  font-weight: 700;
}

.card-body h3 a:hover { color: var(--accent); }

.card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar { }

.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}

.widget-header {
  background: var(--primary);
  color: white;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
}

.widget-body { padding: 16px; }

.widget-list { list-style: none; }

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.4;
}

.widget-list li:last-child { border-bottom: none; }

.widget-list li a:hover { color: var(--accent); }

.widget-list .date {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

.context-box {
  background: #f0ebe0;
  border-left: 4px solid var(--gold);
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--text);
}

.context-box strong {
  display: block;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  color: var(--gold);
}

/* ── ARTICLE PAGE ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}

.article-main {}

.article-header { margin-bottom: 24px; }

.article-header .category-tag { margin-bottom: 12px; }

.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.article-header .standfirst {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.article-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.article-hero-placeholder {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 24px;
}

.article-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-bottom: 24px;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body p { margin-bottom: 1.4em; }

.article-body h2 {
  font-size: 1.4rem;
  margin: 1.8em 0 0.7em;
  font-weight: 700;
  color: var(--primary);
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 1.4em 0 0.5em;
  font-weight: 700;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.6em 0;
  padding: 12px 20px;
  background: #fafaf8;
  font-style: italic;
  color: var(--text-muted);
}

.article-body blockquote cite {
  display: block;
  font-style: normal;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  margin-top: 8px;
  color: var(--text);
}

.article-tags {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
}

.article-tags span {
  color: var(--text-muted);
  margin-right: 8px;
}

.tag {
  display: inline-block;
  background: #eee;
  padding: 3px 10px;
  margin: 3px 3px 3px 0;
  font-size: 0.75rem;
  border-radius: 2px;
  color: var(--text);
  transition: background 0.15s;
}

.tag:hover { background: var(--accent); color: white; }

/* ── CATEGORY COLORS ── */
.cat-politics { background: #8b0000; }
.cat-nuclear { background: #1a4a6b; }
.cat-economy { background: #2d6a2d; }
.cat-society { background: #6b3a8b; }
.cat-regional { background: #8b5a00; }
.cat-energy { background: #1a5a3a; }
.cat-international { background: #2a2a8b; }

/* ── FOOTER ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.footer-brand h3 span { color: var(--gold); }

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-col ul li a:hover { color: white; }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,.4);
  display: flex;
  justify-content: space-between;
}

/* ── UTILITIES ── */
.full-width-section {
  margin-bottom: 48px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-feature { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
  .main-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .header-top { padding: 0 16px; }
  .site-logo h1 { font-size: 1.2rem; }
  .hero-feature h2 { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
