/* ==========================================================================
   CASCAVELES RD - SYSTEM DESIGN SYSTEM & CORE CSS
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  /* Color Palette - Dark Mode (Default) */
  --bg-primary: #08090c;
  --bg-secondary: #0f1118;
  --bg-tertiary: #161a24;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #ff2e63;
  --accent-rgb: 255, 46, 99;
  --accent-hover: #ff0044;
  --accent-glow: rgba(255, 46, 99, 0.15);
  
  --success: #10b981;
  
  --glass-bg: rgba(15, 17, 24, 0.75);
  --glass-border: rgba(255, 255, 255, 0.05);
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 20px rgba(255, 46, 99, 0.2);

  --font-title: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables overrides */
:root[data-theme="light"], [data-theme="light"] {
  --bg-primary: #f3f4f6;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  
  --accent: #e11d48;
  --accent-rgb: 225, 29, 72;
  --accent-hover: #be123c;
  --accent-glow: rgba(225, 29, 72, 0.1);
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.06);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 0 15px rgba(225, 29, 72, 0.15);
}

/* CSS RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

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

/* GENERAL UTILITIES */
.hidden {
  display: none !important;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================================
   COMPONENTS & LAYOUTS
   ========================================================================== */

/* 1. Navbar & Top Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), background-color var(--transition-normal);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-link {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.logo-accent {
  color: var(--accent);
}

.logo-sub {
  font-weight: 500;
  font-size: 16px;
  padding: 2px 6px;
  background-color: var(--accent);
  color: #fff;
  border-radius: 4px;
  margin-left: 2px;
}

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

/* Search Box */
.search-box {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
  background-color: var(--bg-primary);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  font-size: 18px;
  color: var(--text-secondary);
  display: none; /* Controlled via JS */
  line-height: 1;
}

.clear-search-btn:hover {
  color: var(--accent);
}

/* Header Controls */
.controls-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.favorites-btn, .theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
}

.favorites-btn:hover, .theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.heart-icon {
  width: 20px;
  height: 20px;
}

.fav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.fav-badge.active {
  opacity: 1;
}

.theme-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

[data-theme="dark"] .theme-icon.moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}
[data-theme="dark"] .theme-icon.sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
[data-theme="light"] .theme-icon.sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}
[data-theme="light"] .theme-icon.moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* 2. Horizontal Categories Navigation */
.categories-bar {
  position: fixed;
  top: 71px;
  left: 0;
  width: 100%;
  z-index: 90;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
  transition: background-color var(--transition-normal);
}

.categories-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  /* Hide scrollbars */
  scrollbar-width: none;
}
.categories-container::-webkit-scrollbar {
  display: none;
}

.category-chip {
  padding: 8px 16px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.category-chip:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background-color: var(--bg-tertiary);
}

.category-chip.active {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

/* 3. Main Workspace */
.main-content {
  max-width: 1400px;
  margin: 150px auto 40px auto;
  padding: 0 30px;
}

.filter-status {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.filter-status.hidden {
  display: none;
}

.reset-filters-btn {
  color: var(--accent);
  font-weight: 600;
}
.reset-filters-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   BENTO GRID DESIGN (Premium & Modern)
   ========================================================================== */
.bento-section {
  margin-bottom: 50px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  grid-auto-rows: 240px;
}

.bento-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.bento-item:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
}

/* Image styling in cards */
.card-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.bento-item:hover .card-img {
  transform: scale(1.05);
}

.card-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(8, 9, 12, 0.1) 20%, rgba(8, 9, 12, 0.95) 90%);
  z-index: 2;
}

[data-theme="light"] .card-gradient {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.95) 90%);
}

.card-content {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 24px;
}

.category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.meta-score {
  font-weight: 700;
  color: var(--accent);
}

/* 1. Hero Card - Spans 2 cols, 2 rows */
.hero-card {
  grid-column: span 2;
  grid-row: span 2;
}

.hero-card .card-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-card .card-excerpt {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 13.5px;
  margin-top: 8px;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-card .card-meta {
  color: rgba(255, 255, 255, 0.75) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-card .meta-date,
.hero-card .meta-score {
  color: rgba(255, 255, 255, 0.75) !important;
}

.hero-card .card-gradient {
  background: linear-gradient(to bottom, rgba(8, 9, 12, 0) 0%, rgba(8, 9, 12, 0.4) 40%, rgba(8, 9, 12, 0.95) 85%) !important;
}

/* 2. Secondary Bento Cards */
.secondary-card .card-title {
  font-size: 18px;
  font-weight: 700;
}

/* 3. Sidebar (Trending/Tendencias) */
.bento-sidebar {
  grid-column: 3;
  grid-row: 1 / 3;
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.sidebar-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  flex: 1;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  cursor: pointer;
  padding: 5px 0;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

.trending-item:hover {
  transform: translateX(4px);
}

.trending-number {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.4;
  line-height: 1;
}

.trending-item:hover .trending-number {
  color: var(--accent);
  opacity: 1;
}

.trending-info {
  flex: 1;
}

.trending-headline {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   HIGHLIGHTS SECTION — Grid asimétrico Principal (2/3 + 1/3)
   Inspirado en la estructura editorial de deultimominuto.net
   ========================================================================== */

.highlights-section {
  margin-bottom: 48px;
}

/* Grid padre: 3 columnas balanceadas (Sub-destacados | Noticia Principal | Noticias Recientes) */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 20px;
  align-items: start;
}

/* --- Tarjeta Hero (centro grande) y Contenedor Principal ------------------ */
#hero-container {
  width: 100%;
}

#hero-container .bento-item.hero-card {
  grid-column: unset; /* desactiva el span-2 del bento-grid original */
  grid-row: unset;
  height: 450px;
  border-radius: var(--radius-lg);
}

#hero-container .hero-card .card-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* --- Sub-destacados Grid (Al lado del Hero) -------------------------------- */
.sub-highlights-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  height: 450px;
}

.sub-highlight-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  height: 140px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.sub-highlight-card:hover {
  transform: translateX(4px);
  border-color: var(--accent);
}

.sub-card-image-wrapper {
  position: relative;
  width: 140px;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.sub-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.sub-card-content {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.sub-card-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: inline-block;
}

.sub-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.sub-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
}

/* --- Panel compacto lateral (derecha, lista de recientes) ------------------ */
.sidebar-right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.compact-news-list {
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  height: 450px;
  display: flex;
  flex-direction: column;
}

.compact-news-list .sidebar-header {
  padding: 18px 20px 14px 20px;
  margin-bottom: 0;
}

.compact-news-list .sidebar-title {
  font-size: 16px;
}

/* Wrapper interno con scroll */
.compact-list-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.compact-list-wrapper::-webkit-scrollbar {
  width: 4px;
}
.compact-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

/* Cada ítem compacto: miniatura circular + titular */
.compact-news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

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

.compact-news-item:hover {
  background-color: var(--bg-tertiary);
  transform: translateX(3px);
}

.compact-news-thumb {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  transition: border-color var(--transition-fast);
  background-color: var(--bg-tertiary);
}

.compact-news-item:hover .compact-news-thumb {
  border-color: var(--accent);
}

.compact-news-body {
  flex: 1;
  min-width: 0;
}

.compact-news-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  display: block;
}

.compact-news-title {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

.compact-news-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Skeleton placeholders para el panel compacto */
.compact-item-skeleton {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--glass-border);
}

.circle-skeleton {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
}

.text-skeleton-half {
  height: 14px;
  width: 70%;
  border-radius: 4px;
}


/* ==========================================================================
   MULTIMEDIA SECTION — Cascaveles TV (fila de video-cards 16:9)
   ========================================================================== */

.multimedia-section {
  margin-bottom: 48px;
}

/* Encabezado con línea decorativa acento */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-tertiary);
  position: relative;
}

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

.section-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.section-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition-fast);
}

.section-see-all:hover {
  opacity: 0.75;
}

/* Grid horizontal de tarjetas de video */
.multimedia-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Tarjeta de video individual */
.video-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--shadow-md), var(--shadow-accent);
}

/* Thumbnail 16:9 con overlay de play */
.video-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  background-color: var(--bg-tertiary);
  overflow: hidden;
}

.video-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.video-card:hover .video-thumb-img {
  transform: scale(1.05);
}

/* Botón play circular centrado */
.play-btn-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 52px;
  height: 52px;
  background-color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  z-index: 2;
}

.play-btn-circle svg {
  width: 22px;
  height: 22px;
  color: #fff;
  margin-left: 3px; /* Ajuste óptico del triángulo */
}

.video-card:hover .play-btn-circle {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.65);
}

/* Badge de duración (opcional, esquina inf-derecha) */
.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(8, 9, 12, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 2;
}

/* Información textual bajo el thumbnail */
.video-info {
  padding: 14px 16px 16px 16px;
}

.video-category-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  display: block;
}

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

.video-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ==========================================================================
   CATEGORY BLOCK SECTIONS — Bloques temáticos dinámicos por categoría
   ========================================================================== */

.category-block {
  margin-bottom: 52px;
}

/* Encabezado de bloque con borde acento a la izquierda */
.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-tertiary);
  position: relative;
}

.category-block-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--accent);
}

.category-block-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-block-title-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.category-block-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.category-block-see-all:hover {
  color: var(--accent);
}

/* Grid interno del bloque: tarjeta grande + 2 pequeñas en vertical */
.category-block-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}

/* Primera tarjeta del bloque: card grande a la izquierda */
.category-main-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  height: 320px;
  transition: all var(--transition-normal);
}

.category-main-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-md), var(--shadow-accent);
}

.category-main-card .card-image-wrapper {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.category-main-card .card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-main-card:hover .card-img {
  transform: scale(1.05);
}

.category-main-card .card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  padding: 20px;
  background: linear-gradient(to top, rgba(8,9,12,0.95) 0%, rgba(8,9,12,0.4) 70%, transparent 100%);
}

[data-theme="light"] .category-main-card .card-content {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.4) 70%, transparent 100%);
}

.category-main-card .card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stack vertical de 2 tarjetas menores a la derecha */
.category-side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Tarjeta minor horizontal (imagen a izq, texto a der) */
.category-minor-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  padding: 12px;
  transition: all var(--transition-normal);
}

.category-minor-card:hover {
  background-color: var(--bg-tertiary);
  border-color: rgba(var(--accent-rgb), 0.25);
  transform: translateX(3px);
}

.category-minor-thumb {
  width: 88px;
  height: 88px;
  min-width: 88px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  transition: border-color var(--transition-fast);
}

.category-minor-body {
  flex: 1;
  min-width: 0;
}

.category-minor-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  display: block;
}

.category-minor-title {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

.category-minor-time {
  font-size: 11px;
  color: var(--text-muted);
}


/* ==========================================================================
   STANDARD FEED SECTION (Responsive Cards Grid)
   ========================================================================== */
.feed-section {
  margin-top: 30px;
}

.feed-header {
  border-bottom: 2px solid var(--bg-tertiary);
  padding-bottom: 12px;
  margin-bottom: 25px;
}

.feed-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  position: relative;
}

.feed-header h2::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--accent);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.feed-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
  height: 380px;
}

.feed-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-md), var(--shadow-accent);
}

.feed-card .card-image-wrapper {
  position: relative;
  height: 180px;
  width: 100%;
}

.feed-card .card-gradient {
  background: linear-gradient(to bottom, rgba(8,9,12,0) 50%, rgba(8,9,12,0.4) 100%);
}

[data-theme="light"] .feed-card .card-gradient {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.15) 100%);
}

.feed-card .card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.feed-card .card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card .card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.feed-card .card-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}

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

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* ==========================================================================
   MOBILE BOTTOM STICKY NAVIGATION (App-like UX)
   ========================================================================== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--glass-border);
  display: none; /* Responsive */
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  flex: 1;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item.active svg {
  transform: translateY(-2px);
}

/* ==========================================================================
   DETAILED MODAL DRAWER OVERLAY
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 9, 12, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 800px;
  height: 85vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(8, 9, 12, 0.6);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--accent);
  transform: rotate(90deg);
}

.modal-body-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.modal-hero-image {
  position: relative;
  width: 100%;
  height: 380px;
}

.modal-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(8, 9, 12, 0.2) 50%, var(--bg-secondary) 100%);
}

[data-theme="light"] .modal-hero-gradient {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 50%, var(--bg-secondary) 100%);
}

.modal-category {
  position: absolute;
  bottom: 20px;
  left: 30px;
  background-color: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  z-index: 2;
}

.modal-info {
  padding: 30px 40px 40px 40px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.modal-fav-btn {
  margin-left: auto;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal-fav-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.modal-fav-btn.active {
  color: var(--accent);
  fill: var(--accent);
}

.modal-heart-icon {
  width: 24px;
  height: 24px;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 25px;
}

.modal-content-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal-content-text p {
  margin-bottom: 20px;
}

.modal-footer-tags {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--glass-border);
}

.modal-section-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.tag-badge {
  font-size: 12px;
  padding: 4px 10px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: 4px;
}

.modal-prompt-text {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 15px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* ==========================================================================
   SKELETON PLACEHOLDER LOADING STATE
   ========================================================================== */
.skeleton-loader {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s infinite;
  border-radius: 4px;
}

.img-skeleton {
  width: 100%;
  height: 100%;
}

.img-skeleton-rect {
  width: 100%;
  height: 180px;
}

.title-skeleton-short {
  height: 20px;
  width: 30%;
  margin-bottom: 10px;
}

.title-skeleton-long {
  height: 24px;
  width: 85%;
  margin-bottom: 15px;
}

.text-skeleton {
  height: 14px;
  width: 95%;
  margin-bottom: 8px;
}

.trending-item-skeleton {
  padding: 10px 0;
}

/* ==========================================================================
   PROFESSIONAL FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 20px 0;
  margin-top: 80px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-brand .footer-logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  display: inline-block;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 450px;
}

.footer-links h4 {
  font-family: var(--font-title);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  grid-column: span 2;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* ==========================================================================
   RESPONSIVENESS & MEDIA QUERIES (Multiplatform tuning)
   ========================================================================== */

/* 1. Large Screen Adjustments */
@media (min-width: 1400px) {
  .bento-grid {
    grid-auto-rows: 260px;
  }
}

/* 2. Tablet Mode (Landscape & Portrait) */
@media (max-width: 1024px) {
  .header-container {
    padding: 15px 20px;
  }
  
  .categories-container {
    padding: 0 20px;
  }
  
  .main-content {
    padding: 0 20px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }
  
  .hero-card {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .bento-sidebar {
    grid-column: span 2;
    grid-row: span 1;
    height: 320px;
  }
  
  .trending-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 20px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    grid-column: span 1;
  }

  /* Highlights grid: columna compacta pasa debajo en tablet */
  .highlights-grid {
    display: flex !important;
    flex-direction: column !important;
  }

  #hero-container {
    order: 1 !important;
  }

  .sub-highlights-grid {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    height: auto !important;
    gap: 15px !important;
  }

  .sidebar-right-column {
    order: 3 !important;
  }

  .sub-highlight-card {
    flex-direction: column !important;
    height: 260px !important;
  }

  .sub-card-image-wrapper {
    width: 100% !important;
    height: 120px !important;
  }

  .sub-card-content {
    padding: 12px !important;
  }

  .compact-news-list {
    height: auto;
    max-height: 340px;
  }

  #hero-container .bento-item.hero-card {
    height: 400px;
  }

  /* Multimedia: 2 columnas en tablet */
  .multimedia-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Bloques de categoría: columna única en tablet */
  .category-block-grid {
    grid-template-columns: 1fr;
  }

  .category-main-card {
    height: 260px;
  }
}

/* 3. Mobile Phone Mode (iPhone & Android UI optimization) */
@media (max-width: 768px) {
  .header-container {
    padding: 10px 15px !important;
    gap: 10px !important;
  }
  .logo-link {
    font-size: 18px !important;
  }
  .logo-sub {
    font-size: 13px !important;
    padding: 1px 4px !important;
  }
  .sub-highlights-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .sub-highlight-card {
    height: auto !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
  }
  
  .sub-card-image-wrapper {
    width: 100px !important;
    height: 80px !important;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
  }
  
  .sub-card-content {
    padding: 8px 10px 8px 0 !important;
    height: 100%;
    justify-content: center !important;
  }
  
  .sub-card-title {
    font-size: 12px !important;
    margin-bottom: 4px !important;
    -webkit-line-clamp: 2 !important;
  }

  /* Offset content for bottom sticky nav */
  body {
    padding-bottom: 70px;
  }
  
  .main-content {
    margin-top: 130px;
    padding: 0 15px;
  }
  
  .main-header {
    background-color: var(--bg-secondary);
  }
  
  .categories-bar {
    top: 67px;
  }
  
  /* Collapse Bento Grid to Linear highlight view */
  .bento-section {
    margin-bottom: 30px;
  }
  
  .bento-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .bento-item {
    height: 250px;
  }
  
  .hero-card {
    height: 320px;
  }
  
  .hero-card .card-title {
    font-size: 20px;
  }
  
  .bento-sidebar {
    height: auto;
    padding: 20px;
  }
  
  .trending-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .trending-number {
    font-size: 20px;
  }
  
  /* Responsive card grid */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .feed-card {
    height: auto;
    min-height: 320px;
  }
  
  .feed-card .card-image-wrapper {
    height: 160px;
  }
  
  /* Reveal sticky mobile nav app buttons */
  .mobile-nav {
    display: flex;
  }
  
  /* Center & slide up modal card in mobile drawer format */
  .modal-card {
    height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: absolute;
    bottom: 0;
    transform: translateY(100%);
  }
  
  .modal-overlay.active .modal-card {
    transform: translateY(0);
  }
  
  .modal-info {
    padding: 20px 20px 30px 20px;
  }
  
  .modal-hero-image {
    height: 250px;
  }
  
  .modal-title {
    font-size: 22px;
    margin-bottom: 15px;
  }
  
  .modal-content-text {
    font-size: 15px;
  }
  
  /* Hide search bar inside main header to save space; it will be handled by mobile-nav search trigger */
  .search-box {
    display: none;
  }
  
  /* Show search box in header if mobile nav search is active */
  .search-box.mobile-active {
    display: flex;
    position: fixed;
    top: 71px;
    left: 0;
    width: 100%;
    max-width: 100%;
    z-index: 95;
    padding: 10px 15px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--glass-border);
  }
  
  .search-box.mobile-active input {
    border-radius: var(--radius-md);
  }

  /* --- Nuevos componentes editoriales en móvil ----------------------------- */

  /* Highlights: todo en columna única */
  .highlights-section {
    margin-bottom: 28px;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #hero-container .bento-item.hero-card {
    height: 300px;
  }

  #hero-container .hero-card .card-title {
    font-size: 20px;
  }

  .compact-news-list {
    height: auto;
    max-height: 300px;
  }

  /* Multimedia: columna única en móvil */
  .multimedia-section {
    margin-bottom: 28px;
  }

  .multimedia-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Bloques de categoría: columna única */
  .category-block {
    margin-bottom: 32px;
  }

  .category-block-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .category-main-card {
    height: 220px;
  }

  .category-minor-card {
    padding: 10px;
  }

  .category-minor-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
}


/* ==========================================================================
   GOOGLE ADSENSE & MONETIZATION PREMIUM STYLING
   ========================================================================== */
.adsense-container {
  width: 100%;
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ads-placeholder {
  width: 100%;
  min-height: 90px;
  background-color: var(--bg-secondary);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

/* Cuando el banner tiene imagen real, quitar fondo/borde para no mostrar rectangulos blancos */
.ads-placeholder.has-image {
  background: transparent;
  border: none;
  padding: 0;
  min-height: unset;
  border-radius: 0;
}

.ads-indicator {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 5px;
}

/* Header Banner (Mega Leaderboard) */
.adsense-top-banner {
  max-width: 1200px;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 25px;
}
.adsense-top-banner .ads-placeholder {
  min-height: 90px;
  max-height: 120px;
}

/* Sidebar Ad Banner */
.adsense-sidebar-banner {
  margin-top: 20px;
  margin-bottom: 0;
}
.adsense-sidebar-banner .ads-placeholder {
  min-height: 250px;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.03), transparent);
}

/* In-Feed Banner */
.adsense-in-feed {
  max-width: 1200px;
  padding: 0 24px;
}
.adsense-in-feed .ads-placeholder {
  min-height: 150px;
}

/* ==========================================================================
   ANTIGRAVITY 3D DEPTH & ADVANCED GLASSMORPHISM
   ========================================================================== */
/* Z-axis depth container */
.perspective-container {
  perspective: 1000px;
}

/* Glassmorphism enhanced values */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
}

/* 3D hover tilt helper classes */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.1s ease-out, border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.tilt-inner {
  transform: translateZ(30px);
  transform-style: preserve-3d;
}

/* GSAP staggered entrance state (initial opacity 0 for page load animation) */
.gsap-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
}

/* ==========================================================================
   LANGUAGE SELECTOR & TRANSLATION ENGINE OVERRIDES
   ========================================================================== */
.lang-selector-container {
  position: relative;
  display: inline-block;
}

.lang-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
  height: 40px;
}

.lang-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.login-btn-header {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
  height: 40px;
  text-decoration: none;
}

.login-btn-header:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.lang-icon, .login-icon {
  width: 16px;
  height: 16px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  min-width: 130px;
  z-index: 2000;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.lang-dropdown.active {
  display: flex;
}

.lang-opt {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  width: 100%;
}

.lang-opt:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Ocultar barra superior de Google Translate */
body {
  top: 0 !important;
}
.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame {
  display: none !important;
}
.goog-tooltip, .goog-tooltip:hover {
  display: none !important;
}
.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
iframe.goog-te-banner-frame {
  display: none !important;
}
body {
  position: static !important;
}

/* ==========================================================================
   PAGINATION CONTROLS
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  backdrop-filter: blur(8px);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --- MODAL DE NOTIFICACIONES PREMIUM --- */
.notif-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.notif-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.notif-modal-card {
  width: 90%;
  max-width: 460px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 33, 0.65);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: translateY(30px) scale(0.95);
  transition: transform var(--transition-normal);
  backdrop-filter: blur(20px);
}

.notif-modal-overlay.active .notif-modal-card {
  transform: translateY(0) scale(1);
}

.notif-step-content {
  opacity: 1;
  transition: opacity var(--transition-fast);
}

.notif-step-content.hidden {
  display: none !important;
}

.notif-icon-circle {
  width: 72px;
  height: 72px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 20px var(--accent-glow);
  animation: notifPulse 2s infinite;
}

.notif-success-circle {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
  animation: none;
}

@keyframes notifPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 46, 99, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 46, 99, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 46, 99, 0); }
}

.notif-bell-icon {
  width: 32px;
  height: 32px;
}

.notif-success-icon {
  width: 36px;
  height: 36px;
}

.notif-modal-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.notif-modal-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.notif-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.notif-btn {
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.notif-btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.notif-btn-primary:hover {
  background-color: #ff527b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.notif-btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.notif-channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.notif-channel-option {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  transition: all var(--transition-fast);
  outline: none;
}

.notif-channel-option:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-3px);
}

.notif-channel-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 12px var(--accent-glow);
}

.channel-icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.notif-channel-option:hover .channel-icon,
.notif-channel-option.selected .channel-icon {
  color: var(--accent);
}

.notif-channel-option span {
  font-size: 0.8rem;
  font-weight: 500;
}

.notif-input-section {
  animation: fadeIn var(--transition-fast) ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-input-wrapper input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  background: rgba(18, 18, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  z-index: 9999;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 46, 99, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: cookieSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 46, 99, 0.03);
}

@keyframes cookieSlideUp {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

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

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

.cookie-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-btn {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn-accept {
  background: var(--accent);
  color: #ffffff;
  border: none;
}

.cookie-btn-accept:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .cookie-btn-reject:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 16px;
  }
  .cookie-buttons {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}




