/* ============================================================
   Cyber Brief Daily -- Premium Magazine Theme
   Inspired by Foxiz / ThemeRuby
   ============================================================ */

/* --- CSS Variables (Light Mode) --- */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --surface: #ffffff;
  --text: #000000;
  --text-secondary: #555555;
  --muted: #888888;
  --accent: #5280a0;
  --accent-90: #5280a0e6;
  --accent-light: rgba(82, 128, 160, 0.06);
  --accent-glow: rgba(82, 128, 160, 0.15);
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --nav-bg: #ffffff;
  --header-border: #e0e0e0;
  --footer-bg: #111111;
  --footer-text: #cccccc;
  --footer-muted: #777777;
  --max: 1200px;
  --radius: 0px;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.1);
  --img-brightness: 1;
}

/* --- Dark Mode --- */
body.dark {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --surface: #161616;
  --text: #e0e0e0;
  --text-secondary: #aaaaaa;
  --muted: #666666;
  --accent: #7ab0d4;
  --accent-90: #7ab0d4e6;
  --accent-light: rgba(122, 176, 212, 0.08);
  --accent-glow: rgba(122, 176, 212, 0.12);
  --border: #222222;
  --border-light: #1a1a1a;
  --nav-bg: #131517;
  --header-border: #222222;
  --footer-bg: #080808;
  --footer-text: #999999;
  --footer-muted: #555555;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.2);
  --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.4);
  --img-brightness: 0.9;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-90); }
img { max-width: 100%; height: auto; display: block; filter: brightness(var(--img-brightness)); }

/* ============================================================
   ACCENT STRIP (breaking news red bar at very top)
   ============================================================ */
.accent-strip {
  height: 3px;
  background: linear-gradient(90deg, #c0392b 0%, var(--accent) 50%, #c0392b 100%);
  width: 100%;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}

/* Top row: search | logo | icons */
.header-top {
  border-bottom: 1px solid var(--border-light);
}
.header-top-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.header-left { display: flex; align-items: center; }
.header-center { text-align: center; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* Logo */
.site-logo { display: inline-block; text-decoration: none; }
.logo-text {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 40px;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.1;
  transition: color 0.3s ease;
}
.logo-accent { color: var(--accent); }

/* Tagline */
.site-tagline {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Icon buttons */
.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--accent-light); color: var(--accent); }

/* Dark mode toggle icons */
.moon-icon { display: none; }
.sun-icon { display: inline; }
body.dark .sun-icon { display: inline; }
body.dark .moon-icon { display: none; }
.dark .sun-icon { display: none; }
.dark .moon-icon { display: inline; }

/* Search overlay */
.search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  padding: 20vh 24px 0;
}
.search-overlay.open { display: flex; justify-content: center; align-items: flex-start; }
.search-box {
  width: 100%;
  max-width: 640px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.search-box input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-box .icon-btn { color: var(--muted); font-size: 20px; }

/* --- Navigation bar --- */
.main-nav {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.3s ease;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.nav-item { position: relative; }
.nav-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  padding: 15px 22px;
  transition: color 0.2s ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

/* Mega menu (News) */
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 48px rgba(0,0,0,0.1);
  z-index: 800;
  padding: 24px 28px;
  animation: fadeDown 0.15s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.has-mega:hover .mega-menu { display: block; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.mega-grid a {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 3px;
  transition: all 0.15s ease;
}
.mega-grid a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* Dropdown (Resources) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 48px rgba(0,0,0,0.08);
  z-index: 800;
  animation: fadeDown 0.15s ease;
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.15s ease;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* Trending bar */
.trending-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}
.trending-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.trending-label {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c0392b;
  white-space: nowrap;
  padding: 3px 8px;
  background: rgba(192, 57, 43, 0.08);
  border-radius: 3px;
}
body.dark .trending-label { color: #e74c3c; background: rgba(231, 76, 60, 0.1); }
.trending-tags {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.trending-tags::-webkit-scrollbar { display: none; }
.trend-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all 0.2s ease;
}
.trend-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ============================================================
   HERO FEATURED ARTICLE
   ============================================================ */
.hero-feature {
  position: relative;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  background-color: #1a2332;
  display: flex;
  align-items: flex-end;
  max-width: var(--max);
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 24px;
}
.hero-overlay {
  width: 100%;
  padding: 0 0 0 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.15) 100%
  );
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
}
.hero-content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 40px;
  width: 100%;
}
.hero-cat-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent);
  padding: 4px 12px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  margin-bottom: 16px;
  color: #ffffff;
  max-width: 760px;
}
.hero-content h1 a { color: #ffffff; transition: opacity 0.2s ease; }
.hero-content h1 a:hover { opacity: 0.85; color: #ffffff; }
.hero-excerpt {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 600px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.hero-meta .sep { color: rgba(255,255,255,0.3); }
.hero-meta .author-avatar { background: var(--accent); }
.hero-author { color: rgba(255,255,255,0.9); font-weight: 500; }

/* Category label */
.cat-label {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  gap: 6px;
}
.cat-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 1px;
}

/* Author avatar (circle with initial) */
.author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   HOME LAYOUT (content + sidebar)
   ============================================================ */
.home {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0;
}
.main-content { min-width: 0; }

/* Section header with accent bar */
.section-header {
  margin-bottom: 28px;
}
.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-accent {
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-title .count {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
}
.card.animate-in:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.card.stub { opacity: 0.45; }

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
  text-decoration: none;
}
.card-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}
.card-thumb-empty {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border) 100%);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }

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

.card-body h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
  transition: color 0.2s ease;
}
.card:hover .card-body h3 { color: var(--accent); }

.card-excerpt {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: auto;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.card-meta .sep { color: var(--border); }
.card-meta .author-avatar { width: 22px; height: 22px; font-size: 10px; }

.read-more {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.2s ease;
  opacity: 0;
}
.card:hover .read-more { opacity: 1; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { padding-top: 0; }

.widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 28px;
  background: var(--surface);
}
.widget-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.cat-list { list-style: none; }
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  transition: padding-left 0.2s ease;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list li:hover { padding-left: 4px; }
.cat-list a {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
}
.cat-list a:hover { color: var(--accent); }
.cat-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  padding: 2px 10px;
  border-radius: 12px;
  min-width: 28px;
  text-align: center;
}

/* Recent articles in sidebar */
.recent-list { list-style: none; }
.recent-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.recent-item:last-child { border-bottom: none; }
.recent-item a {
  display: block;
  text-decoration: none;
  transition: padding-left 0.2s ease;
}
.recent-item a:hover { padding-left: 4px; }
.recent-title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4px;
  transition: color 0.2s ease;
}
.recent-item a:hover .recent-title { color: var(--accent); }
.recent-date {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.article-single {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

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

.article-cats {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 0;
  transition: opacity 0.2s ease;
}
.badge:hover { opacity: 0.7; }

.article-page h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 38px);
  line-height: 1.18;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-info .author-avatar {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.author-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.author-name {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.article-date { color: var(--muted); font-size: 13px; }
.read-time { color: var(--muted); font-size: 13px; }

.article-hero {
  margin-bottom: 32px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.article-hero img {
  width: 100%;
  height: auto;
}

/* Article body typography */
.article-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.85;
  color: var(--text);
}
.article-body p { margin-bottom: 1.4em; }

/* Drop cap on first paragraph */
.article-body > p:first-of-type::first-letter {
  float: left;
  font-family: 'DM Serif Display', serif;
  font-size: 3.8em;
  line-height: 0.8;
  padding: 4px 10px 0 0;
  color: var(--accent);
  font-weight: 400;
}

.article-body h2, .article-body h3, .article-body h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin: 2em 0 0.7em;
  color: var(--text);
}
.article-body h2 { font-size: 26px; }
.article-body h3 { font-size: 22px; }
.article-body h4 { font-size: 18px; }

.article-body blockquote {
  font-family: 'DM Serif Text', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 21px;
  line-height: 1.55;
  border-left: 4px solid var(--accent);
  padding: 20px 28px;
  margin: 2em 0 2em 0;
  color: var(--text-secondary);
  background: var(--bg-alt);
}

.article-body strong { font-weight: 700; color: var(--text); }
.article-body img {
  margin: 2em 0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.4em 1.5em;
}
.article-body li { margin-bottom: 0.5em; }

.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.article-body a:hover { border-bottom-color: var(--accent); }

.stub-msg {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.stub-icon {
  margin-bottom: 16px;
  opacity: 0.3;
}
.stub-icon svg { margin: 0 auto; }
.stub-msg p {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-secondary);
}
.stub-msg span {
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-page {
  max-width: var(--max);
  margin: 0 auto;
}
.cat-header {
  padding: 56px 24px 40px;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.cat-header-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.cat-label-sm {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.cat-header h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 38px;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.cat-count-text { color: var(--muted); font-size: 15px; }
.cat-body {
  padding: 40px 24px 72px;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   CARD SCROLL ANIMATIONS
   ============================================================ */
.card.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.card.stub.animate-in { opacity: 0.45; }

/* Hidden cards (Load More) */
.card.hidden-card { display: none; }

/* Card thumb hover overlay */
.card-thumb { position: relative; }
.card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover .card-thumb-overlay { opacity: 1; }

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.filter-tab {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */
.load-more-wrap {
  text-align: center;
  padding: 40px 0 16px;
}
.load-more-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 14px 48px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.25s ease;
}
.load-more-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* ============================================================
   SIDEBAR STATS / ANIMATED COUNTERS
   ============================================================ */
.stats-widget {
  display: flex;
  gap: 0;
}
.stat-counter {
  flex: 1;
  text-align: center;
  padding: 20px 12px;
  border-right: 1px solid var(--border-light);
}
.stat-counter:last-child { border-right: none; }
.counter-num {
  display: block;
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
}
.counter-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

/* ============================================================
   BROWSE ALL CTA (replaces archive table)
   ============================================================ */
.browse-all-cta {
  padding: 56px 24px 72px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  text-align: center;
}
.cta-inner {
  max-width: 800px;
  margin: 0 auto;
}
.cta-inner h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--text);
  margin-bottom: 8px;
}
.cta-inner p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}
.cta-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cta-cat-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background: var(--surface);
  transition: all 0.2s ease;
}
.cta-cat-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.cta-cat-link span {
  color: var(--muted);
  font-size: 12px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page {
  max-width: var(--max);
  margin: 0 auto;
}
.about-hero {
  background: linear-gradient(135deg, #1a2332 0%, #0f1922 100%);
  padding: 72px 24px 56px;
  text-align: center;
}
.about-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}
.about-hero h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 42px;
  margin-bottom: 20px;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.lead {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 21px;
  letter-spacing: -0.3px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.about-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 0 0 48px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.about-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.about-card-icon {
  color: var(--accent);
  margin-bottom: 14px;
}
.about-card h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
}
.about-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.about-section {
  padding: 28px 0;
  border-top: 1px solid var(--border-light);
}
.about-section h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--text);
}
.about-section p {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.about-section a { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  margin-top: 0;
  color: var(--footer-text);
}
body.dark .site-footer { background: #050505; }

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.3fr;
  gap: 40px;
}
.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 14px;
}
.footer-logo .logo-accent { color: var(--accent); }
body.dark .footer-logo .logo-accent { color: #7ab0d4; }
.footer-tagline {
  font-size: 14px;
  color: var(--footer-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--footer-text);
  transition: all 0.2s ease;
}
.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(82, 128, 160, 0.1);
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--footer-muted);
  padding: 5px 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-newsletter-text {
  font-size: 13px;
  color: var(--footer-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.footer-newsletter {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
}
.footer-newsletter input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-right: none;
  background: rgba(255,255,255,0.05);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}
.footer-newsletter input::placeholder { color: var(--footer-muted); }
.footer-newsletter input:focus { border-color: var(--accent); }
.footer-newsletter button {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.footer-newsletter button:hover { opacity: 0.85; }

.footer-contact {
  display: flex;
  gap: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-bottom-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--footer-muted);
}
.back-to-top {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--footer-muted);
  transition: color 0.2s ease;
}
.back-to-top:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
  .hero-feature { min-height: 380px; border-radius: 0; margin-top: 0; }
  .hero-overlay { min-height: 380px; border-radius: 0; }
  .hero-content { padding: 40px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-top-inner { padding: 16px; }
  .logo-text { font-size: 28px; }
  .site-tagline { font-size: 13px; }

  .nav-inner {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .nav-inner.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-link { padding: 10px 0; font-size: 14px; border-bottom: none; }

  .mega-menu, .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    min-width: auto;
    display: none;
    transform: none;
    animation: none;
  }
  .has-mega:hover .mega-menu,
  .has-dropdown:hover .dropdown-menu { display: block; }
  .mega-grid { grid-template-columns: 1fr 1fr; }

  .trending-bar { display: none; }

  .hero-feature { min-height: 340px; }
  .hero-overlay { min-height: 340px; }
  .hero-content h1 { font-size: 26px; }

  .grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }

  .filter-tabs { gap: 6px; }
  .filter-tab { font-size: 12px; padding: 5px 14px; }

  .cat-header h1 { font-size: 30px; }
  .about-hero h1 { font-size: 30px; }
  .about-grid { grid-template-columns: 1fr 1fr; }

  .cta-inner h2 { font-size: 24px; }
  .cta-cat-link { font-size: 13px; padding: 8px 16px; }
}

@media (max-width: 480px) {
  .header-left { display: none; }
  .header-top-inner { grid-template-columns: 1fr auto; }
  .logo-text { font-size: 24px; }
  .site-tagline { display: none; }

  .hero-feature { min-height: 300px; }
  .hero-overlay { min-height: 300px; }
  .hero-content h1 { font-size: 22px; }
  .hero-content { padding: 32px 16px; }

  .card-thumb { height: 160px; }

  .article-page h1 { font-size: 26px; }
  .article-body { font-size: 16px; }
  .article-body > p:first-of-type::first-letter { font-size: 3em; }

  .cat-header { padding: 36px 16px 28px; }
  .cat-header h1 { font-size: 26px; }
  .cat-body { padding: 28px 16px 48px; }

  .about-hero { padding: 48px 16px 36px; }
  .about-hero h1 { font-size: 26px; }
  .lead { font-size: 18px; }
  .about-grid { grid-template-columns: 1fr; }

  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .browse-all-cta { padding: 40px 16px 56px; }
}
