/* ═══════════════════════════════════════════════════════════
   His perspective — Premium Glassmorphism Design
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg: #eef2ff;
  --bg-card: rgba(255, 255, 255, 0.65);
  --bg-card-hover: rgba(255, 255, 255, 0.82);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-glow: rgba(99, 102, 241, 0.3);
  --text: #18213a;
  --text-muted: #5a6a84;
  --text-light: #94a3b8;
  --border: rgba(255, 255, 255, 0.55);
  --border-subtle: rgba(99, 102, 241, 0.12);
  --glass-blur: 20px;
  --shadow-sm: 0 2px 12px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 32px rgba(99, 102, 241, 0.13), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 24px 64px rgba(99, 102, 241, 0.22), 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --bg: #07080f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: rgba(129, 140, 248, 0.14);
  --accent-glow: rgba(129, 140, 248, 0.28);
  --text: #e8edf5;
  --text-muted: #8b949e;
  --text-light: #3d4552;
  --border: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(129, 140, 248, 0.15);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.55);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 24px 64px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(129, 140, 248, 0.18);
}

/* ── Reset ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }

/* ── Animated Gradient Background ──────────────────────────── */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Light mode — soft purple-blue mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #eef2ff 0%, #f5f0ff 40%, #ede9fe 70%, #e0e7ff 100%);
  animation: bgShimmer 22s ease-in-out infinite alternate;
  pointer-events: none;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 70% 55% at 5% 0%, rgba(139, 92, 246, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 5%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 65% 55% at 50% 105%, rgba(168, 85, 247, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 85%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #07080f 0%, #0e0b1a 40%, #080d1c 70%, #07080f 100%);
}

@keyframes bgShimmer {
  0%   { opacity: 1; transform: scale(1) translateY(0px); }
  50%  { opacity: 0.92; transform: scale(1.015) translateY(-6px); }
  100% { opacity: 1; transform: scale(1) translateY(0px); }
}

/* ── Glass mixin helper ─────────────────────────────────────── */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border);
}

/* ── Widgets bar ────────────────────────────────────────────── */
.widgets-bar {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
  font-size: 0.8125rem;
  position: relative;
  z-index: 90;
}

[data-theme="dark"] .widgets-bar {
  background: rgba(10, 10, 20, 0.55);
  border-color: var(--border);
}

.widgets-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.widget-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.widget-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.widget-name {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.widget-value {
  color: var(--text);
  font-weight: 600;
}

.widget-divider {
  width: 1px;
  height: 1rem;
  background: var(--border-subtle);
}

.widget-select {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
}

[data-theme="dark"] .widget-select {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.widget-select:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .widgets-bar {
    padding: 0.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .widgets-bar::-webkit-scrollbar { height: 4px; }
  .widgets-bar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
  }
  .widgets-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem 1rem;
    padding: 0 1rem;
    justify-content: flex-start;
    min-width: min-content;
    max-width: none;
  }
  .widget-group  { flex-shrink: 0; white-space: nowrap; }
  .widget-icon   { font-size: 0.9rem; }
  .widget-name   { font-size: 0.7rem; }
  .widget-value  { font-size: 0.75rem; }
  .widget-weather .widget-select { max-width: 120px; }
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.07);
  transition: background 0.3s;
}

[data-theme="dark"] .header {
  background: rgba(7, 8, 15, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 0 0 transparent;
}

.logo:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 20px var(--accent-glow);
}

.tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 0.5rem;
}

.channel-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.channel-link:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Main layout ────────────────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.post-main {
  max-width: 1180px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 950px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* ── Sidebar / Related ──────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
}

.related-posts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.related-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent-soft);
}

.related-card-image {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border-subtle);
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

[data-theme="dark"] .related-card-image {
  background: rgba(255, 255, 255, 0.06);
}

.related-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.related-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: block;
  word-wrap: break-word;
}

.related-card-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ── Main header + Search ───────────────────────────────────── */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-form:focus-within {
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm);
  border-color: var(--accent);
}

.search-input {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  width: 220px;
  transition: width 0.2s;
}

.search-input:focus {
  outline: none;
  width: 260px;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-btn {
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.pagination-info {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.all-link-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

.all-link-wrap.hidden { display: none; }

.all-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.all-link:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.back-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Featured Banner ────────────────────────────────────────── */
.featured-banner {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--border);
  position: relative;
}

.featured-slides {
  position: relative;
  overflow: hidden;
}

.featured-link {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 220px;
  text-decoration: none;
  color: inherit;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  background: var(--bg-card);
  transition: opacity 0.4s ease;
}

.featured-link.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.featured-banner:hover .featured-link.active:hover {
  box-shadow: var(--shadow-hover);
}

.featured-image-wrap {
  width: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  overflow: hidden;
  isolation: isolate;
}

[data-theme="dark"] .featured-image-wrap {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  transition: transform 0.5s ease;
}

.featured-link.active:hover .featured-image {
  transform: scale(1.04);
}

.featured-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-light);
}

.featured-body {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-card);
}

.featured-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.featured-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

.featured-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
}

.featured-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.featured-time {
  font-size: 0.875rem;
  color: var(--text-light);
}

.featured-read-more {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s, color 0.2s;
}

.featured-link:hover .featured-read-more {
  gap: 0.6rem;
  color: var(--accent-hover);
}

.featured-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-card);
}

.featured-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  border: none;
  background: var(--text-light);
  cursor: pointer;
  padding: 0;
  opacity: 0.45;
  transition: width 0.3s ease, background 0.2s, opacity 0.2s;
}

.featured-dot:hover,
.featured-dot.active {
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.featured-dot.active { width: 20px; }

@media (max-width: 768px) {
  .featured-link {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .featured-image-wrap,
  .featured-image-placeholder { min-height: 200px; }
  .featured-body { padding: 1.25rem 1.5rem; }
  .featured-title { font-size: 1.2rem; }
}

/* ── Post Cards Grid ────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.post-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  position: relative;
}

/* Subtle shine on hover */
.post-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: var(--radius);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
}

.post-card:hover::after { opacity: 1; }

.post-card-image-wrap {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  overflow: hidden;
}

[data-theme="dark"] .post-card-image-wrap {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%);
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image { transform: scale(1.05); }

.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 2.5rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

[data-theme="dark"] .post-card-image-placeholder {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #3d4552;
}

.post-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.55;
  flex: 1;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.post-card-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.post-card-time::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-glow);
}

.post-card-views-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.post-card-views-badge .views-icon-sm { opacity: 0.85; }

.read-more {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.25s ease;
}

.post-card:hover .read-more { gap: 0.6rem; }

/* ── Loading / empty / error ────────────────────────────────── */
.loading, .empty, .error {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
}

.hidden { display: none !important; }

/* ── Article sahifasi ───────────────────────────────────────── */
.article {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.article-header {
  padding: 2rem 2rem 1.5rem;
}

.article-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.article-date::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

.article-views-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
}

.article-views-badge .views-icon { opacity: 0.85; }

.article-image-wrap {
  margin: 0;
  line-height: 0;
}

.article-image-wrap img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.article-video-wrap {
  margin: 0;
  line-height: 0;
}

.article-video {
  width: 100%;
  max-height: 480px;
  display: block;
  background: #000;
}

.article-image-wrap .image-credit,
.article-video-wrap .image-credit {
  margin: 0;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}

.article-body-wrap {
  padding: 2rem;
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--text);
  max-width: 720px;
}

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

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.article-body img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  margin: 0.5rem 0;
}

/* Rating */
.article-rating {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.article-rating-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-rating-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-rating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.article-rating-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.article-rating-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.article-rating-thanks { margin-top: 0.5rem; }

.article-rating-thanks-msg {
  font-weight: 600;
  color: var(--accent);
}

.article-rating-thanks-counts {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Share tugmalari */
.article-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn-tg {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.2);
  color: #0088cc;
}

.share-btn-tg:hover {
  background: #0088cc;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
}

[data-theme="dark"] .share-btn-tg {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.15);
  color: #54acd9;
}

[data-theme="dark"] .share-btn-tg:hover {
  background: #0088cc;
  color: #fff;
}

.share-btn-copy {
  background: var(--accent-soft);
  border-color: var(--border-subtle);
  color: var(--accent);
}

.share-btn-copy:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.share-btn-copy.copied {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.25);
  color: #16a34a;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-soft);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 999px;
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* O'qish vaqti */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

[data-theme="dark"] .footer {
  background: rgba(7, 8, 15, 0.55);
}

.footer p { margin: 0; }

.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-top a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.15s, text-shadow 0.15s;
}

.footer-top a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 12px var(--accent-glow);
}

.footer-sep { color: var(--border-subtle); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0 !important;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover { text-decoration: underline; }
.footer-links span { color: var(--text-muted); }

/* ── Breadcrumbs ────────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs .bc-sep {
  margin: 0 0.15rem;
  opacity: 0.4;
}

.breadcrumbs .bc-current {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

/* ── Responsive — Tablet ────────────────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .header { padding: 0.7rem 1rem; }
  .header-inner { gap: 0.4rem; }
  .header-brand { flex: 1; min-width: 0; }
  .header-actions { margin-left: 0; flex-shrink: 0; gap: 0.35rem; }
  .logo { font-size: 1.2rem; }
  .tagline { display: none; }
  .theme-toggle { width: 36px; height: 36px; margin-right: 0; }
  .theme-toggle svg { width: 18px; height: 18px; }
  .channel-link { font-size: 0.8rem; padding: 0.35rem 0.65rem; }

  /* Main */
  .main { padding: 1.25rem 0.9rem; }

  /* Main header — qidiruvni pastga tushir */
  .main-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .search-form { width: 100%; border-radius: var(--radius-sm); }
  .search-input { width: 100%; flex: 1; }
  .search-input:focus { width: 100%; }
  .search-btn { flex-shrink: 0; }

  /* Post grid — 1 ustun */
  .posts-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* Article */
  .article-header,
  .article-body-wrap { padding: 1.25rem 1rem; }
  .article-title { font-size: 1.4rem; }
  .article-body { font-size: 0.9875rem; }

  /* Featured dots */
  .featured-dots { padding: 0.75rem; }

  /* Pagination tugmalar */
  .pagination { gap: 0.75rem; }
  .pagination-btn { padding: 0.45rem 0.85rem; font-size: 0.875rem; }

  /* Footer */
  .footer { padding: 1.75rem 1rem; }
  .footer-top { gap: 0.85rem; }
}

/* ── Responsive — Mobile (kichik ekranlar) ──────────────────── */
@media (max-width: 480px) {
  /* Header yanada ixcham */
  .header { padding: 0.6rem 0.85rem; }
  .logo { font-size: 1.1rem; }
  .channel-link:not(:last-child) { display: none; } /* Faqat Telegram qoldirish */

  /* Post kartalar — gorizontal (rasm chap, matn o'ng) */
  .posts-grid { gap: 0.85rem; }

  .post-card {
    flex-direction: row;
    min-height: 110px;
    border-radius: var(--radius-sm);
  }

  .post-card-image-wrap {
    width: 110px;
    min-width: 110px;
    aspect-ratio: unset;
    align-self: stretch;
    border-radius: 0;
  }

  .post-card-body {
    padding: 0.85rem 0.9rem 0.85rem 0.85rem;
    justify-content: space-between;
  }

  .post-card-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
    margin-bottom: 0.3rem;
  }

  .post-card-excerpt { display: none; }

  .post-card-meta { margin-top: auto; }

  .read-more { display: none; }

  /* Featured banner — rasm ustida, matn pastda */
  .featured-image-wrap { min-height: 200px; }
  .featured-body { padding: 1rem 1rem 0.85rem; }
  .featured-title { font-size: 1.05rem; }
  .featured-excerpt { display: none; }
  .featured-dots { padding: 0.6rem; }

  /* Article */
  .article-header,
  .article-body-wrap { padding: 1rem 0.9rem; }
  .article-title { font-size: 1.25rem; }
  .article-meta { gap: 0.5rem; }

  /* Share tugmalari wrap bo'lsin */
  .article-share { gap: 0.5rem; }
  .share-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

  /* Back link */
  .back-link { padding: 0.6rem 1.1rem; font-size: 0.875rem; }

  /* Breadcrumbs */
  .breadcrumbs .bc-current { max-width: 200px; }

  /* Rating tugmalari */
  .article-rating-btn { padding: 0.45rem 0.75rem; font-size: 0.875rem; }

  /* All link */
  .all-link { padding: 0.55rem 1.5rem; font-size: 0.9rem; }

  /* Footer */
  .footer { padding: 1.5rem 0.85rem; }
  .footer-top { gap: 0.65rem; font-size: 0.82rem; }

  /* Widgets bar */
  .widgets-bar { padding: 0.4rem 0; }

  /* Safe area — iPhone pastki qismi */
  .footer { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
}

/* ── Touch qurilmalar — hover effektni o'chirish ────────────── */
@media (hover: none) {
  .post-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  .post-card:hover .post-card-image { transform: none; }
  .post-card:active {
    transform: scale(0.985);
    box-shadow: var(--shadow);
    transition: transform 0.1s ease;
  }
}

/* ── @supports fallback (no backdrop-filter) ────────────────── */
@supports not (backdrop-filter: blur(1px)) {
  .header        { background: rgba(238, 242, 255, 0.97); }
  .widgets-bar   { background: rgba(238, 242, 255, 0.97); }
  .post-card     { background: rgba(255, 255, 255, 0.95); }
  .article       { background: rgba(255, 255, 255, 0.95); }
  .footer        { background: rgba(238, 242, 255, 0.97); }
  .featured-body { background: rgba(255, 255, 255, 0.95); }
  .related-card  { background: rgba(255, 255, 255, 0.95); }

  [data-theme="dark"] .header        { background: rgba(7, 8, 15, 0.98); }
  [data-theme="dark"] .widgets-bar   { background: rgba(7, 8, 15, 0.98); }
  [data-theme="dark"] .post-card     { background: rgba(14, 16, 28, 0.98); }
  [data-theme="dark"] .article       { background: rgba(14, 16, 28, 0.98); }
  [data-theme="dark"] .footer        { background: rgba(7, 8, 15, 0.98); }
  [data-theme="dark"] .featured-body { background: rgba(14, 16, 28, 0.98); }
  [data-theme="dark"] .related-card  { background: rgba(14, 16, 28, 0.98); }
}

/* ── Maqola ichidagi rasm (figure) ──────────────────────────── */
.article-figure { margin: 1.5rem 0; }
.article-figure img {
  width: 100%; height: auto; display: block;
  border-radius: 12px;
}
.article-figure figcaption {
  font-size: 0.85rem; color: var(--text-muted, #5a6a84);
  text-align: center; margin-top: 0.5rem; font-style: italic;
}
