/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #1a5fa8;
  --brand-dark: #114080;
  --accent: #c0392b;
  --dark: #0f1923;
  --mid: #2c3e50;
  --muted: #64748b;
  --light: #f1f5f9;
  --border: #e2e8f0;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: var(--mid);
  color: var(--mid);
}
.btn-outline:hover { background: var(--mid); color: var(--white); }

.full-width { width: 100%; text-align: center; }

/* ─── Breaking News Ticker ─────────────────────────────────── */
.ticker-bar {
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  height: 36px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

.ticker-track {
  overflow: hidden;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
  animation: ticker 40s linear infinite;
  padding-left: 100%;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ─── Header ───────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.logo-icon { font-size: 1.3rem; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.logo-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nav {
  display: flex;
  gap: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nav a {
  text-decoration: none;
  color: var(--mid);
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color var(--transition);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }

.subscribe-btn {
  background: var(--brand);
  color: var(--white);
  border: none;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background var(--transition);
}
.subscribe-btn:hover { background: var(--brand-dark); }

/* ─── Hero (Featured Article) ──────────────────────────────── */
.hero {
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.hero-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
}

.hero-img-wrap {
  position: relative;
  overflow: hidden;
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.hero-article:hover .hero-img-wrap img { transform: scale(1.03); }

.hero-content {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

.hero-category {
  display: inline-block;
  background: var(--brand);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: fit-content;
}

.hero-title {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--dark);
}

.hero-excerpt {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.hero-meta .author { font-weight: 600; color: var(--mid); }
.hero-meta .dot { color: var(--border); }

.read-btn {
  padding: 11px 28px;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background var(--transition);
  width: fit-content;
}
.read-btn:hover { background: var(--brand); }

/* Hero Skeleton */
.hero-placeholder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
}
.skeleton-hero-img {
  height: 100%;
  min-height: 460px;
}
.hero-skeleton-body {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  background: var(--white);
}

/* ─── Articles Section ─────────────────────────────────────── */
.articles-section { padding: 72px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--dark);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* ─── Article Card ─────────────────────────────────────────── */
.card {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 58%;
  overflow: hidden;
  background: var(--light);
}
.card-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-img-wrap img { transform: scale(1.04); }

.card-category {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--dark);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex: 1;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.card-author { font-weight: 600; color: var(--mid); }
.card-read-time { display: flex; align-items: center; gap: 4px; }

.read-more {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background var(--transition), color var(--transition);
}
.read-more:hover {
  background: var(--brand);
  color: var(--white);
}

/* ─── Subscribe Modal ──────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.modal-overlay.open { display: block; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 460px;
  max-width: calc(100vw - 48px);
  background: var(--white);
  border-radius: 14px;
  padding: 48px 44px;
  z-index: 201;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.modal-icon { font-size: 2.5rem; margin-bottom: 16px; }
.modal h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; }
.modal p { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; }

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}
.modal-input:focus { border-color: var(--brand); }

.modal .close-btn {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  transition: color var(--transition);
}
.modal .close-btn:hover { color: var(--dark); }

/* ─── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: white;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 36px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer .logo { color: var(--white); font-size: 1rem; }
.footer .logo-sub { color: #64748b; }
.footer p { font-size: 0.85rem; }

/* ─── Skeleton Loader ──────────────────────────────────────── */
.skeleton-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-img { height: 200px; }
.skeleton-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.skeleton-line { height: 14px; border-radius: 6px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w30 { width: 30%; }
.skeleton-btn { height: 38px; border-radius: 6px; margin-top: 8px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-article, .hero-placeholder { grid-template-columns: 1fr; }
  .hero-img-wrap { min-height: 240px; }
  .hero-content { padding: 32px 28px; }
  .hero-skeleton-body { padding: 32px 28px; }
  .skeleton-hero-img { min-height: 240px; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
