/* ==========================================================================
   بايوسيستم (BioSystem.space) — Visual Redesign CSS
   Futuristic Cyberpunk / Dark Executive Aesthetic with Glassmorphism & Animations
   ========================================================================== */

/* --- Root Design Tokens & Variables --- */
:root {
  --font-main: 'Tajawal', 'Alexandria', system-ui, -apple-system, sans-serif;
  --font-heading: 'Alexandria', 'Tajawal', sans-serif;

  /* Color Palette - Ultra Dark Cyber Mode */
  --bg-main: #07090e;
  --bg-card: rgba(15, 22, 36, 0.75);
  --bg-card-hover: rgba(22, 32, 54, 0.85);
  --bg-glass: rgba(18, 26, 44, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.25);
  
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #00f0ff;
  --accent-emerald: #00ff9d;
  --accent-purple: #9d4edd;
  --accent-pink: #ff2a85;
  --accent-gold: #ffb703;
  --accent-red: #ff3b5c;

  --gradient-neon: linear-gradient(135deg, #00f0ff 0%, #00ff9d 100%);
  --gradient-hot: linear-gradient(135deg, #ff2a85 0%, #ff3b5c 100%);
  --gradient-purple: linear-gradient(135deg, #9d4edd 0%, #00f0ff 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.2) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.18);
  --shadow-hot: 0 0 25px rgba(255, 42, 133, 0.22);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
.light-theme {
  --bg-main: #f4f6fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(0, 168, 255, 0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.wrap {
  width: 92%;
  max-width: 1320px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

/* --- Ambient Glow Animation Elements --- */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  animation: floatGlow 14s infinite alternate ease-in-out;
}

.glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
  top: -150px;
  right: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-purple), transparent 70%);
  top: 40%;
  left: -200px;
  animation-delay: -5s;
}

.glow-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-pink), transparent 70%);
  bottom: -100px;
  right: 20%;
  animation-delay: -9s;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.15); }
  100% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-neon);
  z-index: 1000;
  width: 0%;
  transition: width 0.1s ease;
}

/* --- Top Announcement / Ticker Bar --- */
.top-ticker-bar {
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 8px 0;
  font-size: 0.85rem;
  position: relative;
  z-index: 100;
}

.ticker-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: rgba(255, 42, 133, 0.15);
  border: 1px solid rgba(255, 42, 133, 0.4);
  color: var(--accent-pink);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.78rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-pink);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-pink);
  animation: pulse 1.5s infinite;
}

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

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

.ticker-item {
  display: inline-block;
  padding-left: 40px;
  color: var(--text-secondary);
  animation: marquee 28s linear infinite;
}
.ticker-item b {
  color: var(--accent-cyan);
}

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

.top-tools {
  display: flex;
  align-items: center;
  gap: 15px;
}

.time-clock {
  font-family: monospace;
  color: var(--accent-emerald);
  background: rgba(0, 255, 157, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.country-selector-mini select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
}
.country-selector-mini select option {
  background: #0f172a;
  color: #fff;
}

/* --- Main Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 14px 0;
  transition: all var(--transition-smooth);
}

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

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--gradient-neon);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
  transform: rotate(-4deg);
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-icon {
  transform: rotate(0deg) scale(1.08);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--accent-emerald);
  font-weight: 700;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: var(--gradient-neon);
  color: #050811;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search Box */
.search-box {
  position: relative;
}

.search-box input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 16px 8px 40px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  width: 220px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  width: 280px;
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.search-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
}
.search-box input:focus + .search-btn {
  color: var(--accent-cyan);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  padding: 10px;
}

.search-result-item {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--transition-fast);
}
.search-result-item:hover {
  background: rgba(0, 240, 255, 0.1);
}
.search-result-item h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
}
.search-result-item span {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* Icon Buttons */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  cursor: pointer;
  padding: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* --- Hero Showcase Section ("يتصدّر الآن") --- */
.hero-showcase {
  padding: 30px 0 20px;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-glass);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
  transition: transform 0.5s ease;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s ease, background-image 0.8s ease;
  transform: scale(1.03);
}

.hero-card:hover .hero-bg {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #07090e 15%, rgba(7, 9, 14, 0.7) 60%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 40px;
  max-width: 850px;
}

.hero-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag-live {
  background: var(--gradient-hot);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: var(--shadow-hot);
}

.tag-cat {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-surge {
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 14px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-excerpt {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 22px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 25px;
}
.author-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-glow {
  background: var(--gradient-neon);
  color: #050811;
  box-shadow: var(--shadow-glow);
}
.btn-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: #fff;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.w-100 { width: 100%; }

.hero-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 15;
}

.slide-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 14px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dot.active {
  width: 32px;
  background: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

/* --- Section Headers --- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-icon {
  font-size: 1.4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Trending Strip Rail (🔥 الأكثر رواجاً) --- */
.trending-strip-section {
  padding: 30px 0;
}

.trend-cards-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.trend-mini-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.trend-mini-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-neon);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 0;
}

.trend-mini-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.trend-mini-card:hover::before {
  opacity: 0.05;
}

.trend-rank {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-hot);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  z-index: 1;
}

.trend-body {
  flex: 1;
  z-index: 1;
}

.trend-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.trend-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-meter {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.meter-bar {
  height: 100%;
  background: var(--gradient-neon);
  border-radius: 2px;
}

.trend-stat {
  font-size: 0.72rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

/* --- Main Articles Grid Section --- */
.main-articles-section {
  padding: 30px 0 50px;
}

.grid-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.cat-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover, .pill.active {
  color: #fff;
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.pill.active {
  background: var(--accent-cyan);
  color: #050811;
  font-weight: 800;
}

.view-switches {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.view-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.view-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  transition: all var(--transition-smooth);
}

.articles-grid.list-view {
  grid-template-columns: 1fr;
}

/* Article Card */
.article-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 240, 255, 0.15);
}

.card-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.article-card:hover .card-img {
  transform: scale(1.08);
}

.card-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: var(--accent-cyan);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-bookmark-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.card-bookmark-btn:hover {
  background: var(--accent-pink);
  color: #fff;
}
.card-bookmark-btn.saved {
  background: var(--accent-pink);
  color: #fff;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.article-card:hover .card-title {
  color: var(--accent-cyan);
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* List View Overrides */
.articles-grid.list-view .article-card {
  flex-direction: row;
  align-items: center;
}
.articles-grid.list-view .card-media {
  width: 280px;
  aspect-ratio: 16/10;
  flex-shrink: 0;
}

/* --- Subpages Specific Headers --- */
.page-hero-section {
  padding: 40px 0 20px;
}

.page-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.text-center { text-align: center; }

.hero-badge {
  display: inline-block;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.6;
}

.cat-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
}
.cat-stat-box .number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-cyan);
  display: block;
}
.cat-stat-box .label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Standalone Article Layout Page */
.article-page-layout {
  padding: 30px 0 60px;
}

.article-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 35px;
}

.single-article-body {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.single-art-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.3;
  margin: 16px 0;
}

.single-art-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-y: 1px solid var(--border-glass);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 15px;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.art-meta-items {
  display: flex;
  gap: 15px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.audio-player-box {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.player-info .icon {
  font-size: 1.8rem;
}

.art-hero-img-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 420px;
  margin-bottom: 30px;
}
.art-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reactions Box */
.reactions-box {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}
.reactions-box h4 {
  font-family: var(--font-heading);
  margin-bottom: 16px;
}
.reactions-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reaction-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.reaction-btn:hover, .reaction-btn.voted {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-widget {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-widget h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: #fff;
}

/* About Grid */
.about-features-section {
  padding: 40px 0 60px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.about-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}
.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #fff;
}
.about-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.stats-counter-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 35px;
  display: flex;
  justify-content: space-around;
  text-align: center;
}
.stat-counter-item .num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent-cyan);
}
.stat-counter-item .txt {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact Grid */
.contact-section {
  padding: 30px 0 60px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.contact-card, .contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 35px;
}
.contact-card h3, .contact-info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
}
.form-group select option { background: #0f172a; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-cyan);
}

.info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}
.info-item .icon { font-size: 1.5rem; }

.social-box { margin-top: 30px; }
.social-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.social-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
}
.social-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* Big Search */
.big-search-box {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 20px auto 0;
}
.big-search-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glow);
  padding: 14px 22px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 1rem;
}

/* Legal Container */
.legal-page { padding: 40px 0 60px; }
.legal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 900px;
}
.last-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }
.legal-content h3 { color: var(--accent-cyan); font-family: var(--font-heading); margin: 20px 0 8px; }
.legal-content p { color: var(--text-secondary); line-height: 1.8; }

/* --- Footer --- */
.site-footer {
  background: #03050a;
  border-top: 1px solid var(--border-glass);
  padding: 60px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.foot-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 14px 0 20px;
}

.foot-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.foot-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.foot-col a:hover {
  color: var(--accent-cyan);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .article-container { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.7rem; }
  .hero-content { padding: 25px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .search-box { display: none; }
}
@media (max-width: 560px){
  .footer-grid { grid-template-columns: 1fr; }
  .top-tools .country-selector-mini { display:none; }
}

/* ==========================================================================
   BioSystem engine additions (server-rendered, bilingual, SEO)
   ========================================================================== */
.skip-link{position:absolute;inset-inline-start:-999px;top:0;background:var(--accent-cyan);color:#000;padding:10px 16px;z-index:1000}
.skip-link:focus{inset-inline-start:8px}

/* Language switch */
.lang-switch-btn{display:inline-flex;align-items:center;padding:0 12px;height:38px;border-radius:var(--radius-full);background:rgba(255,255,255,.05);border:1px solid var(--border-glass);color:var(--text-primary);font-weight:700;font-size:.85rem}
.lang-switch-btn:hover{border-color:var(--accent-cyan);color:var(--accent-cyan)}

/* Mobile drawer (design shipped without these) */
.drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200;backdrop-filter:blur(2px)}
.mobile-drawer{position:fixed;top:0;inset-inline-end:0;width:min(84vw,320px);height:100dvh;background:#0b1120;border-inline-start:1px solid var(--border-glass);z-index:210;padding:20px;display:flex;flex-direction:column;gap:4px;box-shadow:0 0 60px rgba(0,0,0,.6)}
.mobile-drawer[hidden],.drawer-backdrop[hidden]{display:none}
.drawer-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.close-btn{background:transparent;color:var(--text-secondary);font-size:1.3rem;cursor:pointer}
.mobile-nav{display:flex;flex-direction:column}
.mobile-nav a{padding:13px 8px;border-bottom:1px solid var(--border-glass);color:var(--text-secondary);font-weight:600}
.mobile-nav a.active,.mobile-nav a:hover{color:var(--accent-cyan)}
.drawer-lang{margin-top:auto;text-align:center}

/* LTR (English) tweaks */
html[dir="ltr"] .search-btn{left:auto;right:10px}
html[dir="ltr"] .search-box input{padding:8px 16px 8px 40px}
html[dir="ltr"] .ticker-item{padding-left:0;padding-right:40px}
html[dir="ltr"] .badge-count{right:auto;left:-4px}
html[dir="ltr"] .brand-icon{transform:rotate(4deg)}
html[dir="ltr"] .reading-progress-bar{right:auto;left:0}

/* Generated trend-chart thumbnail as card/hero media (no external photos) */
.card-media{background:linear-gradient(160deg,#0e1626,#0a0f1c)}
.card-media .trend-thumb{position:absolute;inset:0;width:100%;height:100%;display:block}
.trend-thumb{display:block}
.tt-line{fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:240;stroke-dashoffset:0;animation:tt-draw 1.6s cubic-bezier(.16,1,.3,1) both}
.tt-area{opacity:.85}
.tt-dot{filter:drop-shadow(0 0 5px currentColor)}
@keyframes tt-draw{from{stroke-dashoffset:240}to{stroke-dashoffset:0}}
.hero-bg.hero-gradient{background:radial-gradient(120% 120% at 80% 10%, rgba(0,240,255,.16), transparent 55%), linear-gradient(160deg,#0c1424,#07090e)}
.hero-viz-lg{position:absolute;inset:0;width:100%;height:100%;opacity:.45}
.hero-viz-lg .tt-line{stroke-width:2}

/* Article body typography */
.article-text-body{font-size:1.08rem;color:var(--text-secondary);line-height:1.9}
.article-text-body h2{font-family:var(--font-heading);font-size:1.55rem;color:var(--text-primary);margin:1.6em 0 .5em;scroll-margin-top:90px}
.article-text-body h3{font-family:var(--font-heading);font-size:1.25rem;color:var(--text-primary);margin:1.3em 0 .4em;scroll-margin-top:90px}
.article-text-body p{margin:0 0 1.1em}
.article-text-body ul,.article-text-body ol{margin:0 0 1.2em;padding-inline-start:1.4em}
.article-text-body li{margin-bottom:.5em}
.article-text-body a{color:var(--accent-cyan);text-decoration:underline;text-underline-offset:3px}
.article-text-body strong{color:var(--text-primary)}
.article-text-body blockquote{border-inline-start:3px solid var(--accent-cyan);background:rgba(0,240,255,.06);margin:1.4em 0;padding:14px 20px;border-radius:0 var(--radius-sm) var(--radius-sm) 0;color:var(--text-primary)}
.article-text-body table{width:100%;border-collapse:collapse;margin:1.4em 0;font-size:.96rem}
.article-text-body th,.article-text-body td{border:1px solid var(--border-glass);padding:10px 12px;text-align:start}
.article-text-body th{background:rgba(255,255,255,.04)}
.article-text-body img{border-radius:var(--radius-md);margin:1.4em 0;max-width:100%}

/* Key takeaways */
.key-takeaways-box{background:rgba(0,240,255,.06);border:1px solid var(--border-glow);border-radius:var(--radius-md);padding:20px 24px;margin:24px 0}
.key-takeaways-box h4{font-family:var(--font-heading);margin-bottom:10px;color:var(--text-primary)}
.key-takeaways-box ul{margin:0;padding-inline-start:1.2em;color:var(--text-secondary)}
.key-takeaways-box li{margin-bottom:.5em}

/* TOC */
.toc{background:var(--bg-glass);border:1px solid var(--border-glass);border-radius:var(--radius-md);padding:18px 22px;margin:24px 0}
.toc-title{font-family:var(--font-heading);font-weight:800;margin-bottom:10px;color:var(--text-primary)}
.toc ol{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:6px}
.toc a{color:var(--accent-cyan)}
.toc-h3{margin-inline-start:16px;font-size:.92rem;opacity:.85}

/* Breadcrumb */
.breadcrumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--text-muted);font-size:.85rem;margin-bottom:16px}
.breadcrumb a{color:var(--accent-cyan)}
.breadcrumb .sep{opacity:.5}

/* FAQ */
.faq{margin:30px 0}
.faq h2{font-family:var(--font-heading);font-size:1.4rem;margin-bottom:.6em;color:var(--text-primary)}
.faq-item{border:1px solid var(--border-glass);border-radius:var(--radius-sm);margin-bottom:10px;padding:2px 18px;background:var(--bg-card)}
.faq-item summary{cursor:pointer;font-weight:700;padding:14px 0;list-style:none;color:var(--text-primary)}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";float:inline-end;color:var(--accent-cyan);font-size:1.3rem}
.faq-item[open] summary::after{content:"−"}
.faq-item p{margin:0 0 14px;color:var(--text-secondary)}

/* Share */
.share{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:26px 0;padding:16px 0;border-block:1px solid var(--border-glass);color:var(--text-secondary)}
.share a{background:rgba(255,255,255,.05);border:1px solid var(--border-glass);padding:7px 16px;border-radius:var(--radius-full);font-weight:700;font-size:.85rem;color:var(--text-primary)}
.share a:hover{border-color:var(--accent-cyan);color:var(--accent-cyan)}

/* Ads */
.ad-slot{margin:24px 0;text-align:center;min-height:90px}

/* Pager */
.pager{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:36px}
.pager a{min-width:42px;text-align:center;padding:9px 12px;border:1px solid var(--border-glass);border-radius:var(--radius-sm);font-weight:700;color:var(--text-secondary);background:var(--bg-card)}
.pager a.is-active,.pager a:hover{background:var(--accent-cyan);color:#050811;border-color:var(--accent-cyan)}

/* Notices + honeypot */
.notice{padding:14px 18px;border-radius:var(--radius-sm);margin-bottom:18px;font-weight:600}
.notice-ok{background:rgba(0,255,157,.12);color:var(--accent-emerald);border:1px solid rgba(0,255,157,.3)}
.notice-err{background:rgba(255,59,92,.12);color:var(--accent-red);border:1px solid rgba(255,59,92,.3)}
.hp{position:absolute;left:-9999px}

/* WhatsApp float */
.wa-float{position:fixed;inset-block-end:22px;inset-inline-end:22px;background:#25d366;color:#fff;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-size:1.6rem;box-shadow:var(--shadow-card);z-index:80}

/* Newsletter */
.newsletter-form-mini{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.newsletter-form-mini input{background:rgba(255,255,255,.05);border:1px solid var(--border-glass);padding:11px 14px;border-radius:var(--radius-sm);color:var(--text-primary)}
.newsletter-section{padding:20px 0 50px}
.newsletter-card{position:relative;background:linear-gradient(135deg, rgba(0,240,255,.1), rgba(15,23,42,.7));border:1px solid var(--border-glow);border-radius:var(--radius-lg);padding:44px;text-align:center;overflow:hidden}
.newsletter-card h2{font-family:var(--font-heading);color:#fff;margin-bottom:10px}
.newsletter-card p{color:var(--text-secondary);max-width:560px;margin:0 auto 20px}
.newsletter-form{display:flex;gap:10px;max-width:520px;margin:0 auto;flex-wrap:wrap;justify-content:center}
.newsletter-form input{flex:1;min-width:220px;background:rgba(0,0,0,.3);border:1px solid var(--border-glass);padding:14px 20px;border-radius:var(--radius-full);color:#fff}
.icon-pulse{font-size:2.4rem;margin-bottom:8px}
.newsletter-note{margin-top:14px;font-size:.8rem;color:var(--text-muted)}

/* Empty state */
.empty{color:var(--text-muted);text-align:center;padding:50px 0;grid-column:1/-1}

@media (prefers-reduced-motion:reduce){
  .ambient-glow,.pulse-dot,.ticker-item,.tt-line{animation:none}
  .tt-line{stroke-dashoffset:0}
}
