/* ==========================================================================
   CONSTRUYENDO EDUCACIÓN - MODERN DESIGN SYSTEM & STYLES
   Paleta inspirada en los logos institucionales:
   - Primario: Azul Zafiro Profundo (#132a68 / #1e40af)
   - Secundario: Amarillo Oro Ámbar (#f59e0b / #fbbf24)
   - Acento Tecnológico: Turquesa / Cian Eléctrico (#0284c7 / #06b6d4)
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary-900: #0c1c44;
  --primary-800: #132a68;
  --primary-700: #1d3fa1;
  --primary-600: #2563eb;
  --primary-500: #3b82f6;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;

  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-amber-soft: #fef3c7;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #38bdf8;
  --accent-cyan-soft: #e0f2fe;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Surfaces & Neutrals */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.72);
  --border-glass: rgba(255, 255, 255, 0.5);
  --border-subtle: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #0c1c44 0%, #1e3a8a 55%, #0369a1 100%);
  --grad-primary: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  --grad-card-overlay: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.85) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -1px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px -3px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 40px -5px rgba(15, 23, 42, 0.16);
  --shadow-gold: 0 10px 25px -4px rgba(245, 158, 11, 0.35);
  --shadow-blue: 0 10px 25px -4px rgba(37, 99, 235, 0.35);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme overrides when active */
[data-theme="dark"] {
  --bg-main: #0b1120;
  --bg-card: #151f32;
  --bg-glass: rgba(21, 31, 50, 0.88);
  --bg-glass-card: rgba(26, 38, 62, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-subtle: #24324c;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --shadow-lg: 0 12px 35px -5px rgba(0, 0, 0, 0.45);
}

/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--trans-smooth);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-700);
  line-height: 1.1;
}

[data-theme="dark"] .brand-title {
  color: #60a5fa;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--trans-fast);
  position: relative;
  padding: 0.35rem 0;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-600);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-amber);
  transition: width var(--trans-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans-smooth);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -2px rgba(37, 99, 235, 0.45);
}

.btn-gold {
  background: var(--grad-gold);
  color: #ffffff;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -2px rgba(245, 158, 11, 0.5);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-icon:hover {
  color: var(--primary-600);
  border-color: var(--primary-600);
  transform: scale(1.04);
}

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--grad-hero);
  color: #ffffff;
  padding: 4.5rem 1.5rem 6.5rem;
  overflow: hidden;
}

.hero-background-art {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.18;
  background-image: url('assets/hero_education_banner_1789433359471.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.3) contrast(1.1);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
}

.hero-glow-2 {
  position: absolute;
  bottom: -20%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
}

.hero-container {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-amber-light);
  margin-bottom: 1.25rem;
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGreen 2s infinite;
}

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

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-title-highlight {
  background: linear-gradient(135deg, #fbbf24 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-slogan {
  font-size: 1.25rem;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

/* Quick Search bar in Hero */
.hero-search-box {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 0.45rem 0.6rem 0.45rem 1.2rem;
  display: flex;
  align-items: center;
  max-width: 540px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hero-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
}

.hero-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Hero Right Card */
.hero-visual-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 1.8rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.hero-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.hero-visual-badge {
  background: var(--grad-gold);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.hero-visual-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 16/10;
}

.hero-visual-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-visual-card:hover .hero-visual-img-wrap img {
  transform: scale(1.04);
}

.hero-visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   METRICS / STATS COUNTER BAR
   ========================================================================== */
.stats-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.75rem 2.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.5rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.stat-icon.blue {
  background: var(--primary-50);
  color: var(--primary-600);
}

.stat-icon.gold {
  background: var(--accent-amber-soft);
  color: var(--accent-amber);
}

.stat-icon.cyan {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan);
}

.stat-icon.emerald {
  background: #ecfdf5;
  color: #059669;
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-family: 'Outfit', sans-serif;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   CONTENT LAYOUT & SECTIONS
   ========================================================================== */
.section {
  padding: 5rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.section-tag.gold {
  background: var(--accent-amber-soft);
  color: #b45309;
}

.section-tag.cyan {
  background: var(--accent-cyan-soft);
  color: #0369a1;
}

.section-title {
  font-size: 2.35rem;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MATERIALS EXPLORER (FILTERS & CARDS)
   ========================================================================== */
.materials-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.category-dropdown-container {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 280px;
}

.category-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 440px;
}

.category-select-icon {
  position: absolute;
  left: 0.95rem;
  font-size: 1.15rem;
  pointer-events: none;
  z-index: 1;
}

.category-dropdown-select {
  width: 100%;
  padding: 0.72rem 1.25rem 0.72rem 2.85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.15rem center;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-fast);
}

.category-dropdown-select:hover {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.category-dropdown-select:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.cat-pill {
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.cat-pill:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--primary-50);
}

.cat-pill.active {
  background: var(--grad-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.search-sort-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 0.9rem;
  color: var(--text-light);
  pointer-events: none;
}

.input-with-icon input {
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--trans-fast);
  min-width: 220px;
}

.input-with-icon input:focus {
  border-color: var(--primary-600);
  background: var(--bg-card);
}

.sort-select {
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

/* Materials Cards Grid */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.85rem;
}

.material-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-smooth);
  position: relative;
}

.material-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.3);
}

.material-card-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #1e293b;
}

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

.material-card:hover .material-card-thumb img {
  transform: scale(1.07);
}

.material-badge-featured {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--grad-gold);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.material-badge-format {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

.material-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.material-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.material-category-tag {
  color: var(--primary-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.material-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  line-height: 1.35;
}

.material-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.material-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.material-stats {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   BENEFITS SECTION
   ========================================================================== */
.benefits-section {
  background: linear-gradient(180deg, var(--bg-main) 0%, rgba(37, 99, 235, 0.04) 50%, var(--bg-main) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: var(--bg-card);
  padding: 2.25rem 1.85rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-smooth);
  position: relative;
  overflow: hidden;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-500);
}

.benefit-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform var(--trans-fast);
}

.benefit-card:hover .benefit-icon-wrap {
  transform: scale(1.1) rotate(-3deg);
}

.benefit-icon-wrap.blue {
  background: var(--primary-100);
  color: var(--primary-700);
}

.benefit-icon-wrap.amber {
  background: var(--accent-amber-soft);
  color: #b45309;
}

.benefit-icon-wrap.cyan {
  background: var(--accent-cyan-soft);
  color: #0369a1;
}

.benefit-icon-wrap.emerald {
  background: #d1fae5;
  color: #047857;
}

.benefit-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.benefit-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   SERVICES & ADVICE SECTION
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.service-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--trans-smooth);
}

.service-item:hover {
  transform: translateX(4px);
  border-color: var(--primary-600);
  background: var(--primary-50);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Contact Form Layout */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info-panel h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.contact-highlight-list {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-highlight-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-highlight-list li svg {
  color: var(--accent-amber);
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--trans-fast);
}

.form-control:focus {
  border-color: var(--primary-600);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   ADMIN PANEL / DASHBOARD MODES
   ========================================================================== */
.admin-view {
  background: var(--bg-main);
  min-height: 100vh;
  padding: 2rem 1.5rem 5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-title-area h2 {
  font-size: 1.85rem;
  color: var(--text-main);
}

.admin-title-area p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  max-width: 1300px;
  margin: 0 auto 2rem;
  padding-bottom: 0.5rem;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--trans-fast);
}

.admin-tab-btn:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.admin-tab-btn.active {
  color: var(--primary-600);
  background: var(--primary-100);
}

.admin-table-container {
  max-width: 1300px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.admin-table-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-table-header h3 {
  font-size: 1.2rem;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th {
  padding: 1rem 1.5rem;
  background: var(--bg-main);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.modern-table td {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  vertical-align: middle;
}

.modern-table tr:hover td {
  background: rgba(37, 99, 235, 0.02);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-gold {
  background: var(--accent-amber-soft);
  color: #b45309;
}

.badge-blue {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-green {
  background: #d1fae5;
  color: #047857;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-smooth);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--trans-smooth);
  position: relative;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.modal-close:hover {
  background: var(--bg-main);
  color: var(--danger);
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border-left: 4px solid var(--primary-600);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 300px;
  transform: translateX(120%);
  transition: transform var(--trans-smooth);
}

.toast.show {
  transform: translateX(0);
}

.toast.toast-success {
  border-left-color: var(--success);
}

.toast.toast-warning {
  border-left-color: var(--warning);
}

.toast.toast-danger {
  border-left-color: var(--danger);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #09132b;
  color: #cbd5e1;
  padding: 4.5rem 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h4 {
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 380px;
}

.footer-col h5 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.92rem;
  transition: color var(--trans-fast);
}

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

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: all var(--trans-fast);
}

.social-btn:hover {
  background: var(--primary-600);
  color: #ffffff;
  transform: translateY(-3px);
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: #64748b;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-search-box {
    margin: 0 auto;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SISTEMA DE SCROLL INTERACTIVO + UI/UX PRO MAX
   - Ritmo pausado y perceptible (600ms - 1100ms)
   - Transiciones elegantes: Fade up, Mask reveal, Blur-to-sharp, Stagger
   - Continuidad visual viva mediante iluminación y conectores
   - Respeto a prefers-reduced-motion y alta performance (GPU accelerated)
   ========================================================================== */

/* Barra de progreso de lectura en cabecera */
.scroll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #f59e0b 100%);
  transform-origin: 0% 50%;
  transform: scaleX(0);
  transition: transform 0.08s ease-out;
  z-index: 1001;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.65);
}

/* Conectores ambientales de sección */
.section-connector-glow {
  position: absolute;
  width: 100%;
  height: 120px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.section-connector-glow.top-amber {
  top: -60px;
  background: radial-gradient(ellipse 70% 60px at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.section-connector-glow.top-blue {
  top: -60px;
  background: radial-gradient(ellipse 70% 60px at 50% 50%, rgba(37, 99, 235, 0.09) 0%, transparent 70%);
}

/* Base de elementos animados por scroll */
.scroll-reveal {
  opacity: 0;
  will-change: transform, opacity, filter;
  transition-property: transform, opacity, filter;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Variación 1: Fade Up Pausado y Suave */
.scroll-reveal.reveal-up {
  transform: translate3d(0, 38px, 0);
  transition-duration: 850ms;
}

.scroll-reveal.reveal-up.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Variación 2: Blur to Sharp + Scale Sutil */
.scroll-reveal.reveal-blur {
  transform: scale(0.95) translate3d(0, 24px, 0);
  filter: blur(10px);
  transition-duration: 950ms;
}

.scroll-reveal.reveal-blur.is-revealed {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
  filter: blur(0);
}

/* Variación 3: Slide Lateral Izquierda/Derecha */
.scroll-reveal.reveal-left {
  transform: translate3d(-40px, 0, 0);
  transition-duration: 900ms;
}

.scroll-reveal.reveal-left.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.scroll-reveal.reveal-right {
  transform: translate3d(40px, 0, 0);
  transition-duration: 900ms;
}

.scroll-reveal.reveal-right.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Stagger Children: Progresión pausada y armónica */
.stagger-group .stagger-item {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.stagger-group.is-revealed .stagger-item:nth-child(1) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 0ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(2) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 130ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(3) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 260ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(4) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 390ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(5) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 520ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(6) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 650ms;
}
.stagger-group.is-revealed .stagger-item:nth-child(n+7) {
  opacity: 1; transform: translate3d(0, 0, 0); transition-delay: 750ms;
}

/* Efecto de Profundidad Interactiva en Tarjetas de Materiales (Desktop Tilt) */
@media (min-width: 1025px) {
  .material-card {
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.35s ease;
  }

  .material-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.18),
                0 0 20px -3px rgba(37, 99, 235, 0.15);
  }

  /* Parallax leve en orbes de luz del hero */
  .hero-glow-1 {
    transform: translateY(calc(var(--scroll-y, 0px) * -0.18));
  }
  .hero-glow-2 {
    transform: translateY(calc(var(--scroll-y, 0px) * 0.12));
  }
}

/* Adaptación Específica para Móvil (UI/UX Pro Max Touch Experience) */
@media (max-width: 768px) {
  .scroll-reveal.reveal-up {
    transform: translate3d(0, 20px, 0);
    transition-duration: 700ms;
  }
  .scroll-reveal.reveal-left,
  .scroll-reveal.reveal-right {
    transform: translate3d(0, 18px, 0); /* En móvil evitar deslizamientos laterales que causen desbordamiento */
    transition-duration: 700ms;
  }
  .stagger-group .stagger-item {
    transform: translate3d(0, 18px, 0);
    transition-duration: 650ms;
  }
  .material-card:hover {
    transform: none; /* No depender de hover en touch devices */
  }
}

/* Accesibilidad estricta: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .stagger-group .stagger-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .scroll-progress-bar {
    display: none;
  }
}

/* ==========================================================================
   CARRUSEL PEDAGÓGICO INTERACTIVO & SHOWCASE DE INNOVACIÓN (UI/UX PRO MAX)
   ========================================================================== */
.carousel-section {
  position: relative;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5rem 1.5rem;
}

.carousel-container {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

.carousel-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-main);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--border-subtle);
  border: 1px solid var(--border-subtle);
  max-width: 1140px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: stretch;
  min-height: 420px;
  max-height: 480px;
}

.carousel-media {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 340px;
  max-height: 480px;
  background: #0c1c44;
}

.carousel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.8s ease;
}

.carousel-slide:hover .carousel-media img {
  transform: scale(1.035);
}

.carousel-media-tag {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  background: rgba(12, 28, 68, 0.88);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.carousel-content {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-card);
}

.carousel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  margin-bottom: 0.5rem;
}

.carousel-title {
  font-size: 1.6rem;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.carousel-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.carousel-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.carousel-highlights li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-main);
}

.carousel-highlights li svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0 0.5rem;
}

.carousel-indicators {
  display: flex;
  gap: 0.6rem;
}

.carousel-dot {
  width: 32px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  cursor: pointer;
  transition: all 0.4s ease;
  border: none;
}

.carousel-dot.active {
  width: 52px;
  background: var(--grad-gold);
}

.carousel-nav-btns {
  display: flex;
  gap: 0.75rem;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
  background: var(--primary-600);
  color: #ffffff;
  border-color: var(--primary-600);
  transform: scale(1.06);
}

/* ==========================================================================
   BANNER DE ÚLTIMAS ENTRADAS Y DESTACADOS (POST-HERO SHOWCASE)
   ========================================================================== */
.posthero-entries-bar {
  position: relative;
  z-index: 12;
  max-width: 1280px;
  margin: -3.5rem auto 1.5rem auto;
  padding: 0 1.5rem;
}

.entries-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.15), 0 0 15px rgba(37, 99, 235, 0.08);
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(16px);
}

.entries-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.entries-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.entries-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.entries-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseGreen 1.5s infinite;
}

.entries-heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.entries-tabs-switch {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-main);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.entries-tab-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.entries-tab-btn.active {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.entries-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.entry-card-mini {
  display: flex;
  gap: 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.entry-card-mini:hover {
  transform: translateY(-4px);
  border-color: var(--primary-500);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12);
}

.entry-mini-thumb {
  width: 90px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.entry-mini-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.entry-mini-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-mini-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-mini-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ==========================================================================
   SELECT DESPLEGABLE ELEGANTE PARA TODAS LAS CATEGORÍAS (MÉXICO NEM)
   ========================================================================== */
.category-dropdown-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 1.25rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
}

.category-dropdown-wrapper label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-dropdown-select {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--trans-fast);
}

.category-dropdown-select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

@media (max-width: 900px) {
  .entries-cards-grid {
    grid-template-columns: 1fr;
  }
  .posthero-entries-bar {
    margin-top: -1.5rem;
  }
}

/* ==========================================================================
   ADVANCED PUBLISHING STUDIO & MATERIAL CREATOR (UI UX PRO MAX)
   ========================================================================== */
.modal-card.modal-card-xl {
  max-width: 1140px;
  width: 96vw;
  max-height: 94vh;
  border-radius: var(--radius-xl);
}

.publishing-studio-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 960px) {
  .publishing-studio-layout {
    grid-template-columns: 1fr;
  }
}

.studio-main-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.studio-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.studio-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--trans-fast);
}

.studio-panel:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
}

.studio-panel-title {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-700);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

[data-theme="dark"] .studio-panel-title {
  color: var(--accent-cyan);
}

/* Input Título Grande y Elegante */
.input-title-hero {
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  width: 100%;
  outline: none;
  transition: all var(--trans-fast);
  font-family: 'Outfit', sans-serif;
}

.input-title-hero:focus {
  border-color: var(--primary-600);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-title-hero::placeholder {
  color: var(--text-light);
  font-weight: 500;
}

/* Rich Text Editor */
.rich-editor-wrapper {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.rich-editor-toolbar {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  user-select: none;
}

.rich-editor-btn-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.3rem;
  border-right: 1px solid var(--border-subtle);
}

.rich-editor-btn-group:last-child {
  border-right: none;
}

.rich-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 32px;
  height: 32px;
  transition: all var(--trans-fast);
}

.rich-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--primary-600);
}

.rich-btn.active {
  background: var(--primary-100);
  color: var(--primary-700);
  border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .rich-btn.active {
  background: rgba(37, 99, 235, 0.25);
  color: var(--accent-cyan);
}

.rich-editor-content {
  min-height: 260px;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  color: var(--text-main);
  line-height: 1.7;
  font-size: 0.98rem;
  outline: none;
}

.rich-editor-content:empty:before {
  content: attr(placeholder);
  color: var(--text-light);
  pointer-events: none;
  display: block;
}

.rich-editor-content h2 {
  font-size: 1.5rem;
  margin: 1.2rem 0 0.6rem;
  color: var(--primary-800);
}

[data-theme="dark"] .rich-editor-content h2 {
  color: #93c5fd;
}

.rich-editor-content h3 {
  font-size: 1.25rem;
  margin: 1rem 0 0.5rem;
  color: var(--primary-700);
}

.rich-editor-content p {
  margin-bottom: 0.85rem;
}

.rich-editor-content blockquote {
  border-left: 4px solid var(--accent-amber);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.rich-editor-content ul, .rich-editor-content ol {
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
}

.rich-editor-content hr {
  border: none;
  border-top: 1px dashed var(--border-subtle);
  margin: 1.5rem 0;
}

.rich-editor-content a {
  color: var(--primary-600);
  text-decoration: underline;
  font-weight: 600;
}

.rich-editor-content img {
  border-radius: var(--radius-md);
  margin: 1rem auto;
  max-height: 380px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Video Responsive Embed */
.video-responsive-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 1.25rem 0;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Zona de Archivos Drag & Drop */
.drag-drop-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.5rem;
  text-align: center;
  background: var(--bg-main);
  cursor: pointer;
  transition: all var(--trans-smooth);
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
  border-color: var(--primary-600);
  background: var(--primary-50);
  transform: scale(1.005);
}

[data-theme="dark"] .drag-drop-zone:hover, [data-theme="dark"] .drag-drop-zone.dragover {
  background: rgba(37, 99, 235, 0.12);
}

.drag-drop-icon {
  font-size: 2.2rem;
  color: var(--primary-600);
  margin-bottom: 0.5rem;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--trans-fast);
}

.attachment-item:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-sm);
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.attachment-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.attachment-badge.pdf { background: #fee2e2; color: #b91c1c; }
.attachment-badge.word { background: #dbeafe; color: #1d4ed8; }
.attachment-badge.ppt { background: #ffedd5; color: #c2410c; }
.attachment-badge.excel { background: #dcfce7; color: #15803d; }
.attachment-badge.zip { background: #f3e8ff; color: #7e22ce; }
.attachment-badge.img { background: #e0f2fe; color: #0369a1; }
.attachment-badge.other { background: #f1f5f9; color: #475569; }

.attachment-meta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.attachment-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar Elements: Miniatura */
.thumbnail-preview-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.thumbnail-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-actions {
  display: flex;
  gap: 0.5rem;
}

/* Tags Chips */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 44px;
}

.tag-chip {
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="dark"] .tag-chip {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
}

.tag-chip-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.65;
  transition: opacity var(--trans-fast);
}

.tag-chip-remove:hover {
  opacity: 1;
}

.tags-input-field {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-main);
}

/* Estado del Material Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.publicado { background: #dcfce7; color: #166534; }
.status-badge.borrador { background: #fef3c7; color: #92400e; }
.status-badge.programado { background: #e0f2fe; color: #075985; }
.status-badge.archivado { background: #f1f5f9; color: #475569; }

[data-theme="dark"] .status-badge.publicado { background: rgba(34, 197, 94, 0.2); color: #86efac; }
[data-theme="dark"] .status-badge.borrador { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
[data-theme="dark"] .status-badge.programado { background: rgba(6, 182, 212, 0.2); color: #a5f3fc; }
[data-theme="dark"] .status-badge.archivado { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* SEO Google Preview Box */
.seo-google-preview {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
  font-family: Arial, sans-serif;
}

.google-url {
  font-size: 0.78rem;
  color: #202124;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.google-title {
  font-size: 1.1rem;
  color: #1a0dab;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.google-snippet {
  font-size: 0.85rem;
  color: #4d5156;
  line-height: 1.4;
}

/* Preview Modal Dual (Desktop & Mobile) */
.preview-device-switch {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-main);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.preview-device-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.preview-device-btn.active {
  background: var(--primary-600);
  color: #ffffff;
}

.preview-viewport-frame {
  margin: 0 auto;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.preview-viewport-frame.mobile {
  max-width: 390px;
  border: 8px solid #1e293b;
  border-radius: 36px;
  max-height: 75vh;
  overflow-y: auto;
}

.preview-viewport-frame.desktop {
  max-width: 100%;
}

/* ==========================================================================
   FULL PAGE MATERIAL PUBLISHING STUDIO VIEW
   ========================================================================== */
.material-studio-view {
  min-height: calc(100vh - 75px);
  background: var(--bg-main);
  padding: 2rem 1.5rem 5rem;
}

.studio-view-container {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.studio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: var(--bg-card);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  position: sticky;
  top: 80px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.studio-top-bar-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.studio-top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
