/* ========================================
   ANTIGRAVITY — Nerio-Inspired Premium Dark UI
   Theme: Midnight Neon
   Typography: Outfit + Inter
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Dynamic Fallbacks from Header.php Variables */
  --bg-deep: var(--dark-bg-deep, #0B1120);
  --bg-surface: var(--dark-bg-surface, #111827);
  --bg-card: var(--dark-bg-card, #1a2332);
  --bg-card-hover: var(--dark-bg-card-hover, #1e2b3d);
  
  --accent: var(--p-accent, #0066FF);
  --accent-glow: var(--accent-glow, rgba(0, 102, 255, 0.35));
  --accent-dim: rgba(0, 102, 255, 0.08);
  
  --text-primary: var(--theme-dark-text-primary, #FFFFFF);
  --text-secondary: var(--theme-dark-text-secondary, #A0AEC0);
  --text-muted: var(--theme-dark-text-muted, #718096);
  
  --border-color: var(--theme-dark-border, rgba(255, 255, 255, 0.07));
  --border-hover: var(--theme-dark-border-hover, rgba(0, 102, 255, 0.3));
  
  --radius: var(--app-radius, 16px);
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-xs: calc(var(--radius) * 0.4);
  --border-width: var(--app-border-width, 1px);
  --card-shadow: var(--app-card-shadow, 0 10px 30px -10px rgba(0,0,0,0.1));
  --glass-blur: var(--app-glass-blur, 16px);
  
  --font-display: var(--font-heading, 'Outfit', sans-serif);
  --font-body: var(--font-body, 'Inter', sans-serif);
  
  --transition: all var(--card-transition, 0.3s) cubic-bezier(0.4, 0, 0.2, 1);

  /* Global Gradients */
  --grad-primary: linear-gradient(135deg, var(--accent) 0%, #00B2FF 100%);
  --grad-dark: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
  --grad-surface: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, #00B2FF 100%);
}

[data-theme="light"] {
  --bg-deep: var(--light-bg-deep, #F8FAFC);
  --bg-surface: var(--light-bg-surface, #FFFFFF);
  --bg-card: var(--light-bg-card, #F1F5F9);
  --bg-card-hover: var(--light-bg-card-hover, #E2E8F0);
  
  --text-primary: var(--theme-light-text-primary, #0F172A);
  --text-secondary: var(--theme-light-text-secondary, #475569);
  --text-muted: var(--theme-light-text-muted, #64748B);
  
  --border-color: var(--theme-light-border, rgba(0, 0, 0, 0.08));
  --border-hover: var(--theme-light-border-hover, rgba(0, 102, 255, 0.2));
}

[data-theme="dark"] {
  --bg-deep: var(--dark-bg-deep, #0B1120);
  --bg-surface: var(--dark-bg-surface, #111827);
  --bg-card: var(--dark-bg-card, #1a2332);
  --bg-card-hover: var(--dark-bg-card-hover, #1e2b3d);
  
  --text-primary: var(--theme-dark-text-primary, #FFFFFF);
  --text-secondary: var(--theme-dark-text-secondary, #A0AEC0);
  --text-muted: var(--theme-dark-text-muted, #718096);
  
  --border-color: var(--theme-dark-border, rgba(255, 255, 255, 0.07));
  --border-hover: var(--theme-dark-border-hover, rgba(0, 102, 255, 0.3));
}


/* ===== RESET & BASE ===== */
body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* ===== MOD-AWARE ADAPTIVE UTILITIES ===== */
.text-adaptive       { color: var(--text-primary) !important; }
.text-adaptive-muted { color: var(--text-muted) !important; }
.text-adaptive-secondary { color: var(--text-secondary) !important; }
.bg-adaptive-surface { background: var(--bg-surface) !important; }
.bg-adaptive-card    { background: var(--bg-card) !important; }
.bg-adaptive-deep    { background: var(--bg-deep) !important; }
.border-adaptive     { border-color: var(--border-color) !important; }

/* ===== REUSABLE COMPONENTS ===== */

/* Category Badge */
.cat-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  width: fit-content;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cat-badge-sm { padding: 3px 10px; font-size: 0.55rem; }
.cat-badge-xs { padding: 2px 8px; font-size: 0.5rem; }

/* Post Meta */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}
.post-meta i { margin-right: 4px; opacity: 0.7; }
.post-meta-sm { font-size: 0.7rem; gap: 10px; }

/* Section Head */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.section-head h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}
.see-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.see-all:hover { gap: 8px; }

/* Section Tabs */
.section-tabs { display: flex; gap: 4px; }
.tab {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.tab.active { background: var(--grad-accent); color: white; box-shadow: 0 4px 15px var(--accent-glow); }
.tab:hover:not(.active) { color: white; }

/* Widget Title */
.widget-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 18px;
}

.mb-section { margin-bottom: 80px; }

/* ===== NAVBAR ===== */
.navbar-portal {
  background: var(--nav-bg, rgba(11, 17, 32, 0.96)) !important;
  backdrop-filter: blur(var(--nav-blur, 16px));
  border-bottom: 1px solid var(--border-color);
  padding: var(--theme-navbar-padding, 0.8rem) 0;
  z-index: 1050;
}
.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: white !important;
}
.brand-dot { color: var(--accent); }
.nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem 1rem !important;
}

/* Dropdown Premium Style */
.dropdown-menu {
  background: var(--bg-card) !important;
  border: var(--border-width) solid var(--border-color) !important;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--card-shadow) !important;
  border-radius: var(--radius) !important;
  padding: 10px !important;
  margin-top: 10px !important;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--accent) !important;
  color: white !important;
  transform: translateX(5px);
}

@media (min-width: 992px) {
  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Search */
.search-container { width: 220px; }
.search-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 7px 16px 7px 38px;
  color: white;
  font-size: 0.8rem;
  width: 100%;
  outline: none;
  transition: var(--transition);
}
.search-input:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* ===== TICKER ===== */
.ticker-bar {
  background: #111827;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
}
.ticker-scroll {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: tickerMove 30s linear infinite;
}
.ticker-item { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.badge-live {
  background: var(--p-accent, #0066FF);
  color: white;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}
@keyframes tickerMove { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== HERO SECTION ===== */
.hero-main-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 520px;
  box-shadow: var(--card-shadow);
}
.hero-main-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}
.hero-main-card:hover img { transform: scale(1.04); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,17,32,0.94) 0%, rgba(11,17,32,0.55) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 45px;
}
.hero-overlay .cat-badge { margin-bottom: 18px; }
.hero-overlay h1 {
  font-size: 2.6rem;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 580px;
}
.hero-overlay .post-meta { margin-bottom: 24px; }


/* Accent Button */
.btn-accent {
  display: inline-flex;
  align-items: center;
  background: var(--grad-accent);
  color: white !important;
  padding: 11px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: var(--transition);
  border: none;
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--accent-glow);
}

/* ===== CARD HORIZONTAL (hero alt kartlar) ===== */
.card-horizontal {
  display: flex;
  gap: 14px;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px;
  align-items: center;
  height: 100%;
  transition: var(--transition);
  cursor: pointer;
}
.card-horizontal:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.card-horizontal-img {
  width: 140px; height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.card-horizontal-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card-horizontal:hover .card-horizontal-img img { transform: scale(1.1); }
.card-horizontal-body { min-width: 0; }
.card-horizontal-body .cat-badge { margin-bottom: 8px; }
.card-horizontal-body h6 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SIDEBAR STACK (hero sağ) ===== */
.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.sidebar-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  flex: 1;
  cursor: pointer;
}
.sidebar-card:hover {
  border-color: var(--border-hover);
  transform: translateX(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.sidebar-card-body { flex: 1; min-width: 0; }
.sidebar-card-body .cat-badge { margin-bottom: 6px; }
.sidebar-card-body h6 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-card-img {
  width: 110px; height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.sidebar-card:hover .sidebar-card-img img { transform: scale(1.1); }

/* ===== PREMIUM GLASS HERO SLIDER (UI/UX PRO MAX) ===== */
.hero-slider-wrapper {
  position: relative;
  margin-top: 20px;
}

.hero-slide-content {
  position: relative;
  height: 600px;
  width: 100%;
}

.slide-bg-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slide-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 10s ease;
}

.carousel-item.active .slide-bg-img {
  transform: scale(1.15);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.4) 50%, transparent 100%);
  z-index: 1;
}

.glass-info-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-width) solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 50px;
  position: relative;
  z-index: 10;
  box-shadow: var(--card-shadow);
  max-width: 650px;
}

.badge-premium {
  background: #22D3EE;
  color: white;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.pulse-breaking {
  animation: pulse-cyan 2s infinite;
}

@keyframes pulse-cyan {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.badge-category {
  background: rgba(255,255,255,0.1);
  color: white;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
}

.slide-title {
  font-family: 'Newsreader', serif;
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-cyber-primary {
  background: #22D3EE;
  color: white;
  border: none;
  padding: 14px 35px;
  border-radius: 100px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.3);
}

.btn-cyber-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(34, 211, 238, 0.5);
  color: white;
}

.btn-play-mini {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-play-mini:hover {
  background: white;
  color: #22D3EE;
  transform: rotate(360deg);
}

/* Custom Indicators / Progress Bar */
.carousel-indicators-custom {
  position: absolute;
  bottom: 40px;
  left: 50px;
  z-index: 15;
  display: flex;
  gap: 15px;
}

.carousel-indicators-custom button {
  background: none;
  border: none;
  padding: 0;
  width: 150px;
  text-align: left;
  opacity: 0.5;
  transition: all 0.4s;
}

.carousel-indicators-custom button.active {
  opacity: 1;
  width: 200px;
}

.indicator-bar {
  display: block;
  height: 3px;
  background: rgba(255,255,255,0.2);
  width: 100%;
  border-radius: 10px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.active .indicator-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #22D3EE;
  animation: progress-slide 5s linear forwards;
}

@keyframes progress-slide {
  from { width: 0; }
  to { width: 100%; }
}

.indicator-title {
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation Circles */
.nav-circle {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.carousel-control-prev:hover .nav-circle,
.carousel-control-next:hover .nav-circle {
  background: white;
  color: black;
  transform: scale(1.1);
}

/* RESPONSIVE HERO */
@media (max-width: 992px) {
  .hero-slide-content { height: 500px; }
  .glass-info-card { padding: 30px; margin: 0 15px; }
  .slide-title { font-size: 2rem; }
  .carousel-indicators-custom { left: 50%; transform: translateX(-50%); bottom: 20px; }
}
.featured-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  min-height: 380px;
  background-color: var(--bg-card, #1a2332) !important;
}
.featured-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.featured-card:hover img { transform: scale(1.05); }
.featured-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  cursor: pointer;
}
.featured-card-overlay .cat-badge { margin-bottom: 12px; }
.featured-card-overlay h3, .featured-card-overlay h4, .featured-card-overlay h5 {
  color: white;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card-overlay p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card-lg { min-height: 450px; }
.featured-card-half { min-height: 210px; }

/* ===== GRID CARD (küçük kart ızgara) ===== */
.grid-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  cursor: pointer;
}
.grid-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.grid-card-img {
  height: 140px;
  overflow: hidden;
  background-color: var(--bg-deep);
}
.grid-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.grid-card:hover .grid-card-img img { transform: scale(1.1); }
.grid-card-body {
  padding: 14px;
}
.grid-card-body .cat-badge { margin-bottom: 8px; }
.grid-card-body h6 {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== POP CARD (overlay kart) ===== */
.pop-card {
  display: block;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  height: 280px;
  transition: var(--transition);
  background-color: var(--bg-card, #1a2332) !important;
}
.pop-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.pop-card-img { width: 100%; height: 100%; background-color: var(--bg-deep); }
.pop-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.pop-card:hover .pop-card-img img { transform: scale(1.08); }
.pop-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.pop-card-overlay .cat-badge { margin-bottom: 8px; }
.pop-card-overlay h6 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== LIST CARD (yatay haber kartı) ===== */
.list-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.list-card:hover {
  border-color: var(--border-hover);
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.list-card-img {
  width: 240px; height: 170px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.list-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.list-card:hover .list-card-img img { transform: scale(1.08); }
.list-card-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.list-card-body .cat-badge { margin-bottom: 10px; }
.list-card-body h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SIDEBAR WIDGETS ===== */
.sidebar-widget {
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 30px;
  color: var(--sidebar-text, var(--text-primary));
}
/* Category Tags */
.category-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.category-tag:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Social Grid */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  transition: var(--transition);
}
.social-card:hover { transform: translateY(-3px); color: white; }
.social-card i { font-size: 1.1rem; }
.social-fb { background: #1877F2; }
.social-tw { background: #1DA1F2; }
.social-ig { background: linear-gradient(135deg, #833AB4, #E1306C, #FCAF45); }
.social-yt { background: #FF0000; }

/* ===== NEWSLETTER ===== */
.newsletter-section {
  background: linear-gradient(135deg, var(--accent) 0%, #0052CC 100%);
  border-radius: var(--radius);
  overflow: hidden;
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
  gap: 40px;
}
.newsletter-text h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}
.newsletter-text p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin: 0;
  max-width: 420px;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.newsletter-form input {
  padding: 14px 24px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.9rem;
  width: 300px;
  outline: none;
  transition: var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.55); }
.newsletter-form input:focus { border-color: white; background: rgba(255,255,255,0.18); }
.newsletter-form button {
  padding: 14px 32px;
  background: white;
  color: var(--accent);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { background: #F0F4FF; transform: translateY(-2px); }

/* ===== FOOTER ===== */
.footer-dark {
  background: var(--footer-bg, #080C14);
  padding: var(--footer-pt, 80px) 0 var(--footer-pb, 40px);
  border-top: 1px solid var(--border-color);
  color: var(--footer-text, var(--text-secondary));
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--footer-heading, white);
}
.footer-text { color: var(--footer-text, var(--text-secondary)); font-size: 0.9rem; max-width: 320px; margin-bottom: 24px; }
.footer-links h6 {
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--footer-heading, white);
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--footer-text, var(--text-secondary)); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 50px;
  padding-top: 24px;
}
.bg-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
}

/* ===== NERIO EVOLUTION (UI/UX PRO MAX 4.0 - CYBER HOLOGRAPHIC) ===== */
:root {
  --n-bg: #030014;
  --n-glass: rgba(10, 10, 25, 0.7);
  --n-border: rgba(255, 255, 255, 0.1);
  --n-accent: #22D3EE; /* Cyber Cyan */
  --n-secondary: #F97316; /* Neon Orange */
  --n-glow: rgba(34, 211, 238, 0.3);
  --f-main: 'Inter', sans-serif;
}




/* Animated Mesh Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  filter: blur(100px);
  z-index: -1;
  animation: mesh-move 20s infinite alternate ease-in-out;
}
[data-theme="light"] body::before { opacity: 0.03; }
[data-theme="dark"] body::before { opacity: 0.5; }

@keyframes mesh-move {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.2) translate(5%, 5%); }
}

/* FAZ 6.2 Burger Icon Mod-Aware */
[data-theme="light"] .burger-icon span { background: #1a1a1a; }
[data-theme="dark"] .burger-icon span { background: #fff; }

/* FAZ 6.3 Search Modal Mod-Aware */
[data-theme="light"] .search-input-field {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

/* Holographic Card System */
.n-card {
  background: var(--n-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--n-border);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  text-decoration: none;
  display: block;
  cursor: pointer;
}

/* Card base for news items */
.p-card, .news-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%;
}
.p-card:hover, .news-card:hover {
  color: inherit;
}

.n-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(34, 211, 238, 0.05) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

.n-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--n-accent);
  box-shadow: 0 0 40px var(--n-glow);
}

.n-card:hover::after {
  transform: translateX(100%);
}

/* Nerio Hero Grid */
.nerio-hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 200px;
  gap: 24px;
}

.n-item-large { grid-column: span 8; grid-row: span 3; }
.n-item-small { grid-column: span 4; grid-row: span 1.5; }

.n-img-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.n-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  filter: brightness(0.6) contrast(1.1);
}

.n-card:hover .n-img-wrapper img {
  transform: scale(1.1);
  filter: brightness(0.4);
}

.n-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.n-tag {
  background: var(--n-accent);
  color: var(--n-bg);
  font-size: 10px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.n-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: white;
  text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.n-item-small .n-title { font-size: 1.5rem; letter-spacing: -1px; }

/* Cyber Video Module */
.cyber-video-container {
  margin-top: 100px;
  position: relative;
  padding: 80px;
  background: rgba(34, 211, 238, 0.02);
  border: 1px solid var(--n-border);
  border-radius: 40px;
}

.cyber-video-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50px;
  width: 100px;
  height: 2px;
  background: var(--n-accent);
  box-shadow: 0 0 15px var(--n-accent);
}

.play-trigger-cyber {
  width: 100px;
  height: 100px;
  border: 2px solid var(--n-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--n-accent);
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.4s;
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 20px var(--n-glow);
}

.play-trigger-cyber:hover {
  background: var(--n-accent);
  color: var(--n-bg);
  transform: scale(1.1) rotate(10deg);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .n-item-large, .n-item-small { grid-column: span 12; }
  .n-title { font-size: 2rem; }
  .cyber-video-container { padding: 40px 20px; }
}
@media (max-width: 1200px) {
  .hero-overlay h1 { font-size: 2.2rem; }
}

@media (max-width: 991px) {
  .hero-main-card { height: 420px; }
  .hero-overlay { padding: 30px; }
  .hero-overlay h1 { font-size: 1.8rem; }
  .newsletter-inner { flex-direction: column; text-align: center; padding: 40px 30px; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { flex: 1; width: auto; }
  .list-card { flex-direction: column; }
  .list-card-img { width: 100%; height: 200px; }
  .sidebar-card-img { width: 80px; height: 60px; }
  .card-horizontal-img { width: 100px; height: 75px; }
  .featured-card-lg { min-height: 350px; }
}

@media (max-width: 767px) {
  .hero-main-card { height: 340px; }
  .hero-overlay h1 { font-size: 1.5rem; }
  .hero-overlay { padding: 24px; }
  .mb-section { margin-bottom: 50px; }
  .section-head h3 { font-size: 1.2rem; }
  .pop-card { height: 220px; }
  .featured-card { min-height: 260px; }
  .featured-card-half { min-height: 180px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
}

/* ===== SKELETON LOADING (Faz 1.5) ===== */
.skeleton {
  background-color: rgba(255, 255, 255, 0.05);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skeleton-text { height: 1rem; margin-bottom: 0.5rem; border-radius: 4px; }
.skeleton-title { height: 2rem; width: 80%; margin-bottom: 1rem; }
.skeleton-img { width: 100%; aspect-ratio: 16/9; margin-bottom: 1rem; }

/* Utility Classes */
.hover-opacity-80:hover { opacity: 0.8; }
.hover-scale-110:hover { transform: scale(1.1); }
.transition-all { transition: all 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }
.duration-500 { transition-duration: 500ms !important; }
.object-fit-cover { object-fit: cover; }
.fw-black { font-weight: 900; }

/* ===== ANTI-RED BACKGROUND FIX ===== */
/* Tüm kart ve resim konteynerlerinin arka planını koyu yap */
/* Resim yüklenmediğinde veya tam kaplamadığında kırmızı alan görünmesini engeller */
[data-theme="dark"] .featured-card,
[data-theme="dark"] .pop-card,
[data-theme="dark"] .grid-card-img {
    background-color: #0B1120 !important;
}

[data-theme="light"] .featured-card,
[data-theme="light"] .pop-card,
[data-theme="light"] .grid-card-img {
    background-color: #F1F5F9 !important;
}

/* ==========================================================================
   ULTIMATE DESIGN ENGINE - VARIATIONS (V4.0)
   ========================================================================== */

/* HEADER: Minimal Float */
body.h-type-minimal_float .navbar-portal {
    margin: 20px auto;
    width: calc(100% - 40px);
    max-width: 1200px;
    border-radius: 50px !important;
    background: rgba(var(--bg-card-rgb, 26, 35, 50), 0.8) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    padding: 10px 20px;
}

/* HEADER: Side Panel Simulation */
body.h-type-side_panel .navbar-portal {
    border-left: 5px solid var(--p-accent) !important;
}

/* HEADER: Mega Creative */
body.h-type-mega_standard .navbar-portal {
    padding: 25px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
}

/* FOOTER: Clean Minimal */
body.f-type-clean_minimal footer {
    padding: 40px 0 !important;
    text-align: center;
}
body.f-type-clean_minimal .footer-links,
body.f-type-clean_minimal .footer-text,
body.f-type-clean_minimal .newsletter-above {
    display: none !important;
}

/* FOOTER: Social Centric */
body.f-type-social_centric .footer-links {
    display: none !important;
}
body.f-type-social_centric footer {
    padding: 60px 0;
}

/* WORLD SPECIFIC OVERRIDES - PRO MAX (V4.0) */
body.world-vapor_glitch {
    background: #1A0033 !important;
}
body.world-vapor_glitch .card, 
body.world-vapor_glitch .stat-card,
body.world-vapor_glitch .grid-card {
    background: #2A004D !important;
    border: 1px solid #FF00FF !important;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2) !important;
}

body.world-deep_space {
    background: #000000 !important;
}
body.world-deep_space .card,
body.world-deep_space .grid-card,
body.world-deep_space .navbar-portal {
    background: #050505 !important;
    border: 1px solid #111 !important;
}

body.world-dark_academia {
    background: #1a140f !important;
}
body.world-dark_academia .card {
    background: #2c241d !important;
    border: 1px solid #704214 !important;
}

/* FOOTER TYPE REFINEMENTS */
body.f-type-clean_minimal footer {
    background: var(--bg-deep) !important;
    border-top: 1px solid var(--border-color) !important;
}
body.f-type-clean_minimal .footer-bottom {
    border-top: none !important;
    padding-top: 0 !important;
    justify-content: center !important;
}

/* --- SIDEBAR CHAMELEON DESIGN ENGINE --- */
[data-mod-palette] {
    --sm-bg: #ffffff;
    --sm-text: #64748b;
    --sm-title: #0f172a;
    --sm-news-title: #1e293b;
    --sm-accent: #3b82f6;
    --sm-border: rgba(0,0,0,0.06);
    background: var(--sm-bg) !important;
    color: var(--sm-text) !important;
}

/* 20 SMART PALETTES */
[data-mod-palette="ocean"]    { --sm-bg: #F1F5F9; --sm-text: #475569; --sm-title: #0F172A; --sm-news-title: #0066FF; --sm-accent: #0066FF; }
[data-mod-palette="volcano"]  { --sm-bg: #FEF2F2; --sm-text: #991B1B; --sm-title: #450A0A; --sm-news-title: #DC2626; --sm-accent: #DC2626; }
[data-mod-palette="forest"]   { --sm-bg: #F0FDF4; --sm-text: #166534; --sm-title: #064E3B; --sm-news-title: #16A34A; --sm-accent: #16A34A; }
[data-mod-palette="royal"]    { --sm-bg: #F5F3FF; --sm-text: #5B21B6; --sm-title: #2E1065; --sm-news-title: #7C3AED; --sm-accent: #7C3AED; }
[data-mod-palette="sun"]      { --sm-bg: #FEF3C7; --sm-text: #92400E; --sm-title: #451A03; --sm-news-title: #D97706; --sm-accent: #D97706; }
[data-mod-palette="midnight"] { --sm-bg: #0F172A; --sm-text: #94A3B8; --sm-title: #F8FAFC; --sm-news-title: #38BDF8; --sm-accent: #38BDF8; }
[data-mod-palette="cyber"]    { --sm-bg: #170215; --sm-text: #F472B6; --sm-title: #FFFFFF; --sm-news-title: #D946EF; --sm-accent: #D946EF; }
[data-mod-palette="neon"]     { --sm-bg: #083344; --sm-text: #22D3EE; --sm-title: #FFFFFF; --sm-news-title: #06B6D4; --sm-accent: #06B6D4; }
[data-mod-palette="vintage"]  { --sm-bg: #FFF1F2; --sm-text: #BE123C; --sm-title: #4C0519; --sm-news-title: #E11D48; --sm-accent: #E11D48; }
[data-mod-palette="golden"]   { --sm-bg: #FEF9C3; --sm-text: #854D0E; --sm-title: #422006; --sm-news-title: #CA8A04; --sm-accent: #CA8A04; }
[data-mod-palette="arctic"]   { --sm-bg: #F0F9FF; --sm-text: #075985; --sm-title: #082F49; --sm-news-title: #0284C7; --sm-accent: #0284C7; }
[data-mod-palette="earth"]    { --sm-bg: #ECFCCB; --sm-text: #3F6212; --sm-title: #1A2E05; --sm-news-title: #65A30D; --sm-accent: #65A30D; }
[data-mod-palette="mono"]     { --sm-bg: #FAFAFA; --sm-text: #404040; --sm-title: #000000; --sm-news-title: #171717; --sm-accent: #171717; }
[data-mod-palette="lavender"] { --sm-bg: #FAF5FF; --sm-text: #6B21A8; --sm-title: #3B0764; --sm-news-title: #9333EA; --sm-accent: #9333EA; }
[data-mod-palette="desert"]   { --sm-bg: #FFFBEB; --sm-text: #92400E; --sm-title: #451A03; --sm-news-title: #B45309; --sm-accent: #B45309; }
[data-mod-palette="emerald"]  { --sm-bg: #ECFDF5; --sm-text: #065F46; --sm-title: #022C22; --sm-news-title: #059669; --sm-accent: #059669; }
[data-mod-palette="coral"]    { --sm-bg: #FFF1F2; --sm-text: #9F1239; --sm-title: #4C0519; --sm-news-title: #F43F5E; --sm-accent: #F43F5E; }
[data-mod-palette="slate"]    { --sm-bg: #F8FAFC; --sm-text: #334155; --sm-title: #0F172A; --sm-news-title: #475569; --sm-accent: #475569; }
[data-mod-palette="sky"]      { --sm-bg: #E0F2FE; --sm-text: #0369A1; --sm-title: #0C4A6E; --sm-news-title: #0EA5E9; --sm-accent: #0EA5E9; }
[data-mod-palette="crimson"]  { --sm-bg: #FFF1F2; --sm-text: #9F1239; --sm-title: #4C0519; --sm-news-title: #BE123C; --sm-accent: #BE123C; }

/* SHARED CARD STYLES */
.sm-card {
    background: var(--sm-bg) !important;
    border: 1px solid var(--sm-border);
    border-radius: var(--theme-border-radius, 24px);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.sm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.sm-header {
    border-bottom: 1px solid var(--sm-border);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}
.sm-header h6 { color: var(--sm-title) !important; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.sm-news-title { color: var(--sm-news-title) !important; font-weight: 700; transition: all 0.2s ease; text-decoration: none; display: block; }
.sm-news-title:hover { color: var(--sm-accent) !important; opacity: 0.8; }
.sm-news-meta { color: var(--sm-text) !important; opacity: 0.7; font-size: 0.75rem; }

/* ==========================================================================
   CHAMELEON DESIGN ENGINE: SIDEBAR SMART PALETTES (20 PRESETS)
   ========================================================================== */

[data-mod-palette] {
    background: var(--sm-bg) !important;
    border: 1px solid var(--sm-border, var(--sm-accent)) !important;
    padding: 1.5rem !important;
    border-radius: var(--radius) !important;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
}

[data-mod-palette] .mod-title {
    color: var(--sm-news-title) !important;
    border-left: 4px solid var(--sm-accent) !important;
    padding-left: 12px !important;
    margin-bottom: 1.5rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

[data-mod-palette] .news-item-title {
    color: var(--sm-news-title) !important;
    transition: color 0.2s ease;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    text-decoration: none;
}

[data-mod-palette] .news-item-title:hover {
    color: var(--sm-accent) !important;
}

[data-mod-palette] .news-meta {
    color: var(--sm-text) !important;
    font-size: 0.75rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-mod-palette] .news-item {
    border-bottom: 1px solid var(--sm-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

[data-mod-palette] .news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* PALETTE DEFINITIONS */
/* PALETTE DEFINITIONS (DUAL-MODE) */
/* 1. OCEAN */
[data-theme="dark"] [data-mod-palette="ocean"] { --sm-bg: #0f172a; --sm-text: #94a3b8; --sm-news-title: #f8fafc; --sm-accent: #3b82f6; --sm-border: rgba(59, 130, 246, 0.2); }
[data-theme="light"] [data-mod-palette="ocean"] { --sm-bg: #f0f9ff; --sm-text: #0369a1; --sm-news-title: #082f49; --sm-accent: #0284c7; --sm-border: rgba(2, 132, 199, 0.1); }

/* 2. VOLCANO */
[data-theme="dark"] [data-mod-palette="volcano"] { --sm-bg: #1a0b0b; --sm-text: #fca5a5; --sm-news-title: #ffffff; --sm-accent: #ef4444; --sm-border: rgba(239, 68, 68, 0.2); }
[data-theme="light"] [data-mod-palette="volcano"] { --sm-bg: #fff1f2; --sm-text: #991b1b; --sm-news-title: #450a0a; --sm-accent: #dc2626; --sm-border: rgba(220, 38, 38, 0.1); }

/* 3. FOREST */
[data-theme="dark"] [data-mod-palette="forest"] { --sm-bg: #061006; --sm-text: #86efac; --sm-news-title: #f0fdf4; --sm-accent: #22c55e; --sm-border: rgba(34, 197, 94, 0.2); }
[data-theme="light"] [data-mod-palette="forest"] { --sm-bg: #f0fdf4; --sm-text: #166534; --sm-news-title: #052e16; --sm-accent: #15803d; --sm-border: rgba(21, 128, 61, 0.1); }

/* 4. ROYAL */
[data-theme="dark"] [data-mod-palette="royal"] { --sm-bg: #1e1b4b; --sm-text: #c7d2fe; --sm-news-title: #ffffff; --sm-accent: #818cf8; --sm-border: rgba(129, 140, 248, 0.2); }
[data-theme="light"] [data-mod-palette="royal"] { --sm-bg: #eef2ff; --sm-text: #3730a3; --sm-news-title: #1e1b4b; --sm-accent: #4f46e5; --sm-border: rgba(79, 70, 229, 0.1); }

/* 5. SUN */
[data-theme="dark"] [data-mod-palette="sun"] { --sm-bg: #1c1917; --sm-text: #fde047; --sm-news-title: #ffffff; --sm-accent: #eab308; --sm-border: rgba(234, 179, 8, 0.2); }
[data-theme="light"] [data-mod-palette="sun"] { --sm-bg: #fefce8; --sm-text: #854d0e; --sm-news-title: #422006; --sm-accent: #ca8a04; --sm-border: rgba(202, 138, 4, 0.1); }

/* 6. MIDNIGHT */
[data-theme="dark"] [data-mod-palette="midnight"] { --sm-bg: #020617; --sm-text: #94a3b8; --sm-news-title: #f8fafc; --sm-accent: #6366f1; --sm-border: rgba(99, 102, 241, 0.2); }
[data-theme="light"] [data-mod-palette="midnight"] { --sm-bg: #f5f3ff; --sm-text: #4338ca; --sm-news-title: #1e1b4b; --sm-accent: #4f46e5; --sm-border: rgba(79, 70, 229, 0.1); }

/* 7. CYBER */
[data-theme="dark"] [data-mod-palette="cyber"] { --sm-bg: #000000; --sm-text: #22d3ee; --sm-news-title: #ffffff; --sm-accent: #0066ff; --sm-border: #0066ff; }
[data-theme="light"] [data-mod-palette="cyber"] { --sm-bg: #ecfeff; --sm-text: #0e7490; --sm-news-title: #083344; --sm-accent: #0891b2; --sm-border: rgba(8, 145, 178, 0.2); }

/* 8. NEON */
[data-theme="dark"] [data-mod-palette="neon"] { --sm-bg: #09090b; --sm-text: #4ade80; --sm-news-title: #ffffff; --sm-accent: #22c55e; --sm-border: #22c55e; }
[data-theme="light"] [data-mod-palette="neon"] { --sm-bg: #f0fdf4; --sm-text: #15803d; --sm-news-title: #064e3b; --sm-accent: #16a34a; --sm-border: rgba(22, 163, 74, 0.2); }

/* 9. VINTAGE */
[data-theme="dark"] [data-mod-palette="vintage"] { --sm-bg: #1c1917; --sm-text: #d6d3d1; --sm-news-title: #fafaf9; --sm-accent: #a8a29e; --sm-border: #444; }
[data-theme="light"] [data-mod-palette="vintage"] { --sm-bg: #fafaf9; --sm-text: #57534e; --sm-news-title: #1c1917; --sm-accent: #78716c; --sm-border: #d6d3d1; }

/* 10. GOLDEN */
[data-theme="dark"] [data-mod-palette="golden"] { --sm-bg: #0a0a0a; --sm-text: #fbbf24; --sm-news-title: #ffffff; --sm-accent: #d4af37; --sm-border: #d4af37; }
[data-theme="light"] [data-mod-palette="golden"] { --sm-bg: #fffbeb; --sm-text: #92400e; --sm-news-title: #451a03; --sm-accent: #b45309; --sm-border: #fde68a; }

/* 11. ARCTIC */
[data-theme="dark"] [data-mod-palette="arctic"] { --sm-bg: #0f172a; --sm-text: #bae6fd; --sm-news-title: #f8fafc; --sm-accent: #0ea5e9; --sm-border: #0ea5e9; }
[data-theme="light"] [data-mod-palette="arctic"] { --sm-bg: #f8fafc; --sm-text: #0369a1; --sm-news-title: #0c4a6e; --sm-accent: #0ea5e9; --sm-border: #bae6fd; }

/* 12. EARTH */
[data-theme="dark"] [data-mod-palette="earth"] { --sm-bg: #171717; --sm-text: #a3e635; --sm-news-title: #f7fee7; --sm-accent: #65a30d; --sm-border: #3f6212; }
[data-theme="light"] [data-mod-palette="earth"] { --sm-bg: #f7fee7; --sm-text: #365314; --sm-news-title: #1a2e05; --sm-accent: #4d7c0f; --sm-border: #d9f99d; }

/* 13. MONO */
[data-theme="dark"] [data-mod-palette="mono"] { --sm-bg: #000000; --sm-text: #a1a1aa; --sm-news-title: #ffffff; --sm-accent: #ffffff; --sm-border: #333; }
[data-theme="light"] [data-mod-palette="mono"] { --sm-bg: #ffffff; --sm-text: #52525b; --sm-news-title: #000000; --sm-accent: #000000; --sm-border: #e5e5e5; }

/* 14. LAVENDER */
[data-theme="dark"] [data-mod-palette="lavender"] { --sm-bg: #2e1065; --sm-text: #ddd6fe; --sm-news-title: #ffffff; --sm-accent: #a78bfa; --sm-border: #5b21b6; }
[data-theme="light"] [data-mod-palette="lavender"] { --sm-bg: #f5f3ff; --sm-text: #6d28d9; --sm-news-title: #2e1065; --sm-accent: #7c3aed; --sm-border: #ddd6fe; }

/* 15. DESERT */
[data-theme="dark"] [data-mod-palette="desert"] { --sm-bg: #451a03; --sm-text: #fdba74; --sm-news-title: #fff7ed; --sm-accent: #f97316; --sm-border: #9a3412; }
[data-theme="light"] [data-mod-palette="desert"] { --sm-bg: #fff7ed; --sm-text: #9a3412; --sm-news-title: #451a03; --sm-accent: #ea580c; --sm-border: #fed7aa; }

/* 16. EMERALD */
[data-theme="dark"] [data-mod-palette="emerald"] { --sm-bg: #064e3b; --sm-text: #6ee7b7; --sm-news-title: #ecfdf5; --sm-accent: #10b981; --sm-border: #065f46; }
[data-theme="light"] [data-mod-palette="emerald"] { --sm-bg: #ecfdf5; --sm-text: #065f46; --sm-news-title: #064e3b; --sm-accent: #059669; --sm-border: #a7f3d0; }

/* 17. CORAL */
[data-theme="dark"] [data-mod-palette="coral"] { --sm-bg: #450a0a; --sm-text: #fca5a5; --sm-news-title: #fef2f2; --sm-accent: #f43f5e; --sm-border: #991b1b; }
[data-theme="light"] [data-mod-palette="coral"] { --sm-bg: #fef2f2; --sm-text: #991b1b; --sm-news-title: #450a0a; --sm-accent: #e11d48; --sm-border: #fecaca; }

/* 18. SLATE */
[data-theme="dark"] [data-mod-palette="slate"] { --sm-bg: #0f172a; --sm-text: #94a3b8; --sm-news-title: #f1f5f9; --sm-accent: #475569; --sm-border: #1e293b; }
[data-theme="light"] [data-mod-palette="slate"] { --sm-bg: #f1f5f9; --sm-text: #475569; --sm-news-title: #0f172a; --sm-accent: #64748b; --sm-border: #e2e8f0; }

/* 19. SKY */
[data-theme="dark"] [data-mod-palette="sky"] { --sm-bg: #0c4a6e; --sm-text: #bae6fd; --sm-news-title: #f0f9ff; --sm-accent: #0ea5e9; --sm-border: #075985; }
[data-theme="light"] [data-mod-palette="sky"] { --sm-bg: #f0f9ff; --sm-text: #075985; --sm-news-title: #0c4a6e; --sm-accent: #0284c7; --sm-border: #bae6fd; }

/* 20. CRIMSON */
[data-theme="dark"] [data-mod-palette="crimson"] { --sm-bg: #45062e; --sm-text: #f9a8d4; --sm-news-title: #fdf2f8; --sm-accent: #db2777; --sm-border: #701a75; }
[data-theme="light"] [data-mod-palette="crimson"] { --sm-bg: #fdf2f8; --sm-text: #701a75; --sm-news-title: #45062e; --sm-accent: #c026d3; --sm-border: #fbcfe8; }



/* Mod-aware text utilities */
.text-adaptive       { color: var(--text-primary) !important; }
.text-adaptive-muted { color: var(--text-muted) !important; }
.text-adaptive-secondary { color: var(--text-secondary) !important; }
.bg-adaptive-surface { background: var(--bg-surface) !important; }
.bg-adaptive-card    { background: var(--bg-card) !important; }
.border-adaptive     { border-color: var(--border-color) !important; }

/* --- Chameleon Dynamic Module Engine v2.1 (ULTRA) --- */
.chameleon-module-wrapper {
    /* Base Variables Defaults */
    --m-bg: var(--mod-bg-light, transparent);
    --m-grad-end: var(--mod-grad-end-light, transparent);
    --m-opacity: var(--mod-bg-opacity-light, 1);
    --m-title: var(--mod-title-light, var(--p-accent));
    --m-accent: var(--mod-accent-light, var(--p-accent));
    --m-text: var(--mod-text-light, inherit);
    --m-content-bg: var(--mod-content-bg-light, var(--bg-card));
    
    position: relative;
    color: var(--m-text);
    border-radius: var(--mod-border-radius, 0);
    border: var(--mod-border-width, 0) solid var(--m-title);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
}

.chameleon-module-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--m-bg);
    opacity: var(--m-opacity);
    z-index: -1;
    border-radius: inherit;
    transition: inherit;
}

/* Gradient logic */
.chameleon-module-wrapper[style*="--mod-use-gradient-light"]::before {
    background: linear-gradient(135deg, var(--m-bg), var(--m-grad-end)) !important;
}

[data-theme="dark"] .chameleon-module-wrapper {
    --m-bg: var(--mod-bg-dark, transparent);
    --m-grad-end: var(--mod-grad-end-dark, transparent);
    --m-opacity: var(--mod-bg-opacity-dark, 1);
    --m-title: var(--mod-title-dark, var(--p-accent));
    --m-accent: var(--mod-accent-dark, var(--p-accent));
    --m-text: var(--mod-text-dark, #cbd5e1); /* Optimized Dark Slate for readability */
    --m-content-bg: var(--mod-content-bg-dark, #1e293b);
}

[data-theme="dark"] .chameleon-module-wrapper[style*="--mod-use-gradient-dark"]::before {
    background: linear-gradient(135deg, var(--m-bg), var(--m-grad-end)) !important;
}

/* Titles & Premium Typography */
.chameleon-module-wrapper h1,
.chameleon-module-wrapper h2,
.chameleon-module-wrapper h3,
.chameleon-module-wrapper h4,
.chameleon-module-wrapper h5,
.chameleon-module-wrapper h6,
.chameleon-module-wrapper .module-title,
.chameleon-module-wrapper .section-head h3,
.chameleon-module-wrapper .fw-black,
.chameleon-module-wrapper .text-adaptive {
    color: var(--m-title) !important;
    text-align: var(--mod-title-align, inherit) !important;
}

/* Sub-text and body readability */
.chameleon-module-wrapper p,
.chameleon-module-wrapper .p-desc,
.chameleon-module-wrapper .small,
.chameleon-module-wrapper .x-small,
.chameleon-module-wrapper .text-muted:not(.badge) {
    color: var(--m-text) !important;
    opacity: 0.9;
}

.chameleon-module-wrapper .p-tag,
.chameleon-module-wrapper .n-tag,
.chameleon-module-wrapper i[class*="bi-"],
.chameleon-module-wrapper .bi {
    color: var(--m-accent) !important;
}

/* Shadow Intensity */
.chameleon-module-wrapper[style*="--mod-shadow-intensity: low"] { box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.chameleon-module-wrapper[style*="--mod-shadow-intensity: medium"] { box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.chameleon-module-wrapper[style*="--mod-shadow-intensity: high"] { box-shadow: 0 30px 70px rgba(0,0,0,0.2); }
.chameleon-module-wrapper[style*="--mod-shadow-intensity: glow"] { box-shadow: 0 0 50px rgba(var(--m-title-rgb, 59, 130, 246), 0.3); }

/* Content BG Overrides (Internal Cards) */
.chameleon-module-wrapper .p-card,
.chameleon-module-wrapper .card,
.chameleon-module-wrapper .bg-card,
.chameleon-module-wrapper .pop-card,
.chameleon-module-wrapper .featured-card,
.chameleon-module-wrapper .module-content-inner,
.chameleon-module-wrapper .p-2.rounded-4 {
    background-color: var(--m-content-bg) !important;
    border-color: rgba(var(--m-title-rgb, 0,0,0), 0.05) !important;
}

/* Presets Expanded & Refined */
.mod-style-glass {
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.mod-style-glass::before {
    background: var(--m-bg) !important; /* Respect user color but force low opacity */
    opacity: 0.15 !important;
}

.mod-style-neon {
    border: 2px solid var(--m-title) !important;
    box-shadow: 0 0 20px var(--m-title), inset 0 0 10px var(--m-title) !important;
}

.mod-style-boxed_shadow { 
    border-radius: 32px !important;
    box-shadow: 0 40px 80px rgba(0,0,0,0.06);
}
.mod-style-boxed_shadow::before {
    background: var(--m-bg) !important;
    opacity: 1 !important;
}

/* Alignment Helper - Deep Flex Control */
.chameleon-module-wrapper[style*="--mod-title-align: center"] .section-head,
.chameleon-module-wrapper[style*="--mod-title-align: center"] .d-flex.justify-content-between {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}
.chameleon-module-wrapper[style*="--mod-title-align: right"] .section-head,
.chameleon-module-wrapper[style*="--mod-title-align: right"] .d-flex.justify-content-between {
    flex-direction: row-reverse !important;
}
/* --- End Chameleon Dynamic Module Engine v2.1 --- */

