/* ==========================================================================
   TF NEWS - Modern Editorial & Magazine CSS Stylesheet
   ========================================================================== */

:root {
  --primary-color: #0f172a;
  --accent-color: #dc2626;
  --accent-hover: #b91c1c;
  --bg-color: #ffffff;
  --surface-color: #f8fafc;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --header-height: 72px;
  --font-heading: 'Merriweather', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --primary-color: #f8fafc;
  --accent-color: #ef4444;
  --accent-hover: #dc2626;
  --bg-color: #090d16;
  --surface-color: #111827;
  --border-color: #1f2937;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --card-bg: #111827;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.top-bar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.brand-title {
  font-family: 'Cinzel', var(--font-heading);
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.brand-title span {
  color: var(--accent-color);
}

.brand-badge {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  background-color: var(--accent-color);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 700;
  vertical-align: middle;
}

.navbar-nav .nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--accent-color);
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */

.breaking-bar {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
}

.breaking-label {
  background: var(--accent-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 35s linear infinite;
}

.ticker-wrap:hover .ticker-move {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  padding: 0 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ticker-item:hover {
  color: var(--accent-color);
}

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

/* ==========================================================================
   Featured Hero Grid
   ========================================================================== */

.hero-main-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 460px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.85) 75%, rgba(15, 23, 42, 0.98) 100%);
  transition: opacity 0.3s ease;
}

.hero-main-card:hover .hero-overlay {
  opacity: 0.92;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2rem;
  line-height: 1.25;
  color: #ffffff;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-sub-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero-sub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

.hero-sub-img-wrap {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.hero-sub-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-sub-card:hover .hero-sub-img-wrap img {
  transform: scale(1.05);
}

/* ==========================================================================
   Category Badges & Metadata
   ========================================================================== */

.category-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  color: #ffffff;
  line-height: 1;
}

.meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-text i {
  font-size: 0.75rem;
}

/* ==========================================================================
   Article News Cards
   ========================================================================== */

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

.news-card-img-wrap {
  height: 210px;
  position: relative;
  overflow: hidden;
}

.news-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-img-wrap img {
  transform: scale(1.06);
}

.news-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 1.2rem;
  line-height: 1.35;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.news-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

/* Horizontal Compact News Item (Sidebar & Lists) */
.news-item-compact {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.news-item-compact-img {
  width: 95px;
  height: 75px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-item-compact-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

/* ==========================================================================
   Single Article Detail Page
   ========================================================================== */

.article-hero-header {
  max-width: 860px;
  margin: 0 auto;
}

.article-title-main {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.article-main-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.article-body-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-primary);
  max-width: 820px;
  margin: 0 auto;
}

.article-body-content p.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
}

.article-body-content blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.6;
  border-left: 4px solid var(--accent-color);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-primary);
  background: var(--surface-color);
  border-radius: 0 8px 8px 0;
}

.article-body-content h3 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Share Bar */
.share-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--surface-color);
  transition: all 0.2s ease;
}

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

/* Author Box */
.author-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--accent-color);
}

/* Comments Section */
.comment-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

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

/* ==========================================================================
   Widget Cards (Sidebar)
   ========================================================================== */

.widget-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--card-shadow);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #0b0f19;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding-top: 4rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
}

.site-footer h5 {
  color: #f8fafc;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Responsive & Utilities
   ========================================================================== */

@media (max-width: 991.98px) {
  .hero-main-card {
    height: 380px;
    padding: 1.5rem;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .article-title-main {
    font-size: 1.85rem;
  }
}

@media (max-width: 575.98px) {
  .hero-main-card {
    height: 320px;
    padding: 1rem;
  }
  .hero-title {
    font-size: 1.3rem;
  }
  .brand-title {
    font-size: 1.6rem;
  }
}
