/* ============================================================
   MAIN.CSS — OPOTRINCHERA CYBER — v4.0
   Paleta: Verde corporativo + Cyan neón + Naranja acento
   Fuente: Syne (display) + DM Sans (cuerpo)
   ============================================================ */

/* ============================================================
   1. VARIABLES GLOBALES
   ============================================================ */
:root {
  /* — Marca principal (del logo) — */
  --brand:          #087021;
  --brand-dark:     #065318;
  --brand-light:    #065d1a;
  --brand-neon:     #22c55e;
  --brand-pale:     #d1fae5;

  /* — Acento naranja / energía (flecha del logo) — */
  --accent:         #f97316;
  --accent-amber:   #fbbf24;
  --accent-pale:    #fef3c7;

  /* — Cyber / Tech — */
  --cyber:          #06b6d4;
  --cyber-dark:     #0891b2;
  --cyber-pale:     #e0f2fe;

  /* — Semánticos — */
  --success:        #10b981;
  --success-dark:   #059669;
  --success-pale:   #d1fae5;
  --danger:         #ef4444;
  --danger-dark:    #dc2626;
  --danger-pale:    #fee2e2;
  --warning:        #f59e0b;
  --warning-dark:   #d97706;
  --warning-pale:   #fef3c7;
  --info:           #06b6d4;
  --info-pale:      #e0f2fe;

  /* — Fondos — */
  --bg-page:        #f0fdf4;
  --bg-page-alt:    linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 50%, #f8fafc 100%);
  --bg-surface:     #ffffff;
  --bg-surface-2:   #f8fafc;
  --bg-dark:        #0a0f1e;
  --bg-dark-2:      #0f172a;

  /* — Texto — */
  --text:           #0f172a;
  --text-muted:     #64748b;
  --text-light:     #f1f5f9;
  --text-white:     #ffffff;

  /* — Bordes — */
  --border:         rgba(8, 112, 33, 0.12);
  --border-light:   rgba(8, 112, 33, 0.07);
  --border-cyber:   rgba(6, 182, 212, 0.3);

  /* — Gradientes — */
  --g-hero:         linear-gradient(135deg, #0a0f1e 0%, #0b2416 50%, #0a1628 100%);
  --g-brand:        linear-gradient(135deg, #087021 0%, #22c55e 100%);
  --g-brand-dark:   linear-gradient(135deg, #087021 0%, #065318 100%);
  --g-cyber:        linear-gradient(135deg, #06b6d4 0%, #087021 100%);
  --g-accent:       linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
  --g-surface:      linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
  --g-success:      linear-gradient(135deg, #10b981 0%, #059669 100%);
  --g-danger:       linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --g-warning:      linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  /* — Sombras — */
  --shadow-sm:      0 2px 8px rgba(8, 112, 33, 0.08);
  --shadow-md:      0 4px 20px rgba(8, 112, 33, 0.12);
  --shadow-lg:      0 8px 40px rgba(8, 112, 33, 0.18);
  --shadow-xl:      0 20px 60px rgba(8, 112, 33, 0.22);
  --shadow-cyber:   0 0 20px rgba(6, 182, 212, 0.25);

  /* — Radios — */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 50px;

  /* — Transiciones — */
  --t:      all 0.3s ease;
  --t-fast: all 0.18s ease;
  --t-slow: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);

  /* — Navbar — */
  --navbar-h:         70px;
  --navbar-h-mobile:  70px;
  --navbar-bg:        rgba(255, 255, 255, 0.97);

  /* — Platinum (herramientas) — */
  --plat-g:    linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #64748b 100%);
  --plat-g-hv: linear-gradient(135deg, #ffffff 0%, #f1f5f9 25%, #e2e8f0 50%, #cbd5e1 75%, #94a3b8 100%);
  --plat-sh:   rgba(100, 116, 139, 0.2);
}

/* ============================================================
   2. RESET Y BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-page-alt);
  background-color: var(--bg-page);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding-top: var(--navbar-h);
  position: relative;
}

/* Capa de protección del navbar (páginas con navbar antiguo) */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  z-index: 1000;
  pointer-events: none;
}

/* ============================================================
   3. LAYOUTS ESPECIALES
   ============================================================ */

/* Landing pública — sin padding de navbar */
body.landing-page,
body.register-page,
body.esquema-landing-page {
  padding-top: 0 !important;
}

body.landing-page::before,
body.register-page::before,
body.esquema-landing-page::before {
  display: none !important;
}

/* Login */
body.bg-login {
  background: var(--g-hero);
  min-height: 100vh;
  padding-top: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
}
body.bg-login::before { display: none !important; }

/* Páginas con navbar universal */
body.universal-navbar-page {
  padding-top: var(--navbar-h) !important;
}
body.universal-navbar-page::before,
body.universal-navbar-page .top-right-buttons {
  display: none !important;
}

/* Páginas internas con padding reducido */
.quiz-page,
.exam-page,
.home-page,
.upload-page {
  padding-top: 20px !important;
}

/* Duplicados */
.duplicates-page {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  min-height: 100vh;
}

/* ============================================================
   4. NAVBAR UNIVERSAL
   ============================================================ */
.universal-navbar {
  background: var(--navbar-bg);
  padding: 0;
  box-shadow: 0 4px 20px rgba(8, 112, 33, 0.1);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  height: var(--navbar-h);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: var(--t);
}

.universal-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.universal-nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  transition: var(--t);
  gap: 8px;
}
.universal-nav-brand:hover {
  color: var(--brand-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.universal-nav-brand i { font-size: 1.8rem; }

.universal-nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.universal-nav-left a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: var(--t);
  padding: 8px 0;
  position: relative;
}
.universal-nav-left a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}
.universal-nav-left a:hover { color: var(--brand); }
.universal-nav-left a:hover::after { width: 100%; }

.universal-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* — Botones del navbar universal — */
.universal-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.universal-btn i { font-size: 1rem; }

.universal-btn-outline {
  border: 2px solid var(--brand);
  color: var(--brand);
  background: transparent;
}
.universal-btn-outline:hover {
  background: var(--brand);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 112, 33, 0.25);
}

.universal-btn-primary {
  background: var(--g-brand-dark);
  color: white;
  border: 2px solid transparent;
}
.universal-btn-primary:hover {
  background: var(--brand-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.universal-btn-danger {
  background: var(--danger);
  color: white;
  border: 2px solid var(--danger);
}
.universal-btn-danger:hover {
  background: var(--danger-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ============================================================
   5. LANDING NAVBAR (público)
   ============================================================ */
.landing-navbar {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(8, 112, 33, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.landing-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.landing-nav-left a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: var(--t);
  padding: 6px 0;
  position: relative;
}
.landing-nav-left a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}
.landing-nav-left a:hover { color: var(--brand); }
.landing-nav-left a:hover::after { width: 100%; }

.landing-nav-right { display: flex; gap: 12px; }

/* — Botones landing — */
.landing-btn {
  padding: 9px 22px;
  border: none;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.landing-btn-outline {
  border: 2px solid var(--brand);
  color: var(--brand);
  background: transparent;
}
.landing-btn-outline:hover {
  background: var(--brand);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.landing-btn-primary {
  background: var(--g-brand-dark);
  color: white;
  border: 2px solid transparent;
}
.landing-btn-primary:hover {
  background: var(--brand-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.landing-btn-white {
  background: white;
  color: var(--brand);
  border: 2px solid white;
  font-weight: 700;
}
.landing-btn-white:hover {
  background: var(--bg-surface-2);
  color: var(--brand-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}
.landing-btn-large {
  padding: 14px 38px;
  font-size: 1rem;
  border-radius: var(--r-md);
}
.landing-btn-cyber {
  background: linear-gradient(135deg, var(--cyber) 0%, var(--cyber-dark) 100%);
  color: white;
  border: 2px solid transparent;
  box-shadow: var(--shadow-cyber);
}
.landing-btn-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
  color: white;
  text-decoration: none;
}

/* ============================================================
   6. LANDING — HERO
   ============================================================ */
.landing-hero {
  background: var(--g-hero);
  color: white;
  padding: 90px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Efecto de cuadrícula cyber */
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Resplandor central */
.landing-hero::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(8, 112, 33, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.landing-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.landing-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.15;
}

.landing-hero p {
  font-size: 1.2rem;
  margin-bottom: 28px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.landing-stats {
  display: inline-block;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 12px 28px;
  border-radius: var(--r-pill);
  margin: 20px 0;
  backdrop-filter: blur(5px);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   7. LANDING — SECCIONES
   ============================================================ */
.landing-features {
  padding: 80px 0;
  background: linear-gradient(180deg, #f0fdf4 0%, #f0f9ff 100%);
  position: relative;
}

.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.landing-section-title {
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 50px;
  color: var(--text);
}
.landing-section-title strong {
  background: var(--g-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 50px;
}

.landing-feature-card {
  background: white;
  padding: 32px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--t-slow);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}
.landing-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--g-cyber);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.landing-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.landing-feature-card:hover::before { transform: scaleX(1); }

.landing-feature-card h3 {
  font-family: 'Syne', sans-serif;
  color: var(--text);
  margin-bottom: 14px;
  font-size: 1.3rem;
  font-weight: 700;
}
.landing-feature-card p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.landing-cta {
  background: var(--g-hero);
  color: white;
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.landing-cta h2 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.landing-cta p {
  font-size: 1.1rem;
  margin-bottom: 28px;
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.landing-footer {
  background: var(--bg-dark-2);
  color: var(--text-light);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(6, 182, 212, 0.2);
}
.landing-footer a {
  color: var(--cyber);
  text-decoration: none;
  transition: var(--t-fast);
}
.landing-footer a:hover {
  color: white;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

/* ============================================================
   8. COMPONENTES UI
   ============================================================ */

/* — Títulos de página — */
.page-title-label {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand);
  display: block;
  text-align: center;
  margin: 0.5rem 0 2.5rem;
}

.title-icon {
  font-size: 2.5rem;
  color: var(--brand);
}

/* — Cards — */
.card-custom,
.card-login {
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  border-radius: var(--r-lg);
  transition: var(--t-slow);
  background: white;
}
.card-custom:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.card-icon {
  font-size: 3rem;
  color: var(--brand);
  margin-bottom: 1rem;
}

/* — Botones con gradiente — */
.btn-gradient-primary {
  background: var(--g-brand-dark);
  border: none;
  color: white;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  transition: var(--t);
}
.btn-gradient-primary:hover {
  background: var(--brand-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gradient-cyber {
  background: linear-gradient(135deg, var(--cyber) 0%, var(--cyber-dark) 100%);
  border: none;
  color: white;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  transition: var(--t);
}
.btn-gradient-cyber:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-cyber);
  color: white;
}

/* — Texto con gradiente — */
.text-gradient-brand {
  background: var(--g-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-cyber {
  background: var(--g-cyber);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-success {
  background: var(--g-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* — Alerts — */
.alert {
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-sm);
  font-weight: 500;
  border: none;
}
.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border-left: 4px solid var(--success);
  color: var(--success-dark);
}
.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  border-left: 4px solid var(--danger);
  color: var(--danger-dark);
}
.alert-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
  border-left: 4px solid var(--cyber);
  color: var(--cyber-dark);
}
.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
  border-left: 4px solid var(--warning);
  color: var(--warning-dark);
}

/* — Messages container — */
.messages-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  max-width: 400px;
}

/* ============================================================
   9. COMPONENTE QUIZ
   ============================================================ */
.contenido-quiz {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.pregunta-contenedor {
  min-height: 120px;
  max-height: 300px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pregunta-area {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pregunta-texto {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text);
  font-weight: 500;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.respuestas-contenedor {
  height: 260px;
  padding: 1.5rem;
  overflow-y: auto;
  background: white;
}

.feedback-container {
  min-height: 70px;
  margin: 0 1rem 1rem;
  transition: var(--t);
}
.feedback-container .alert { margin-bottom: 0; }
.feedback-container:empty { min-height: 70px; }

/* Respuestas */
.list-group-item {
  border: 1px solid var(--border-light);
  margin-bottom: 4px;
  border-radius: var(--r-sm) !important;
  word-wrap: break-word;
  transition: var(--t-fast);
  cursor: pointer;
}
.list-group-item:hover {
  background: var(--brand-pale);
  border-color: var(--border);
}
.list-group-item strong { margin-right: 8px; }

.respuesta-correcta {
  font-weight: 700 !important;
  color: var(--success-dark) !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-left: 4px solid var(--success) !important;
}

/* Scrollbar del quiz */
.pregunta-area::-webkit-scrollbar,
.respuestas-contenedor::-webkit-scrollbar { width: 6px; }
.pregunta-area::-webkit-scrollbar-track,
.respuestas-contenedor::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.pregunta-area::-webkit-scrollbar-thumb,
.respuestas-contenedor::-webkit-scrollbar-thumb { background: var(--brand-pale); border-radius: 3px; }
.pregunta-area::-webkit-scrollbar-thumb:hover,
.respuestas-contenedor::-webkit-scrollbar-thumb:hover { background: var(--brand-neon); }

/* Info adicional del quiz */
.quiz-page .info-adicional,
.exam-page .info-adicional,
.contenido-quiz .info-adicional {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border-top: 1px solid var(--border-light);
  padding: 1.2rem;
  margin-top: 1rem;
  border-radius: var(--r-sm);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.info-item {
  background: white;
  padding: 0.8rem;
  border-radius: var(--r-sm);
  border-left: 4px solid var(--cyber);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.info-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.3rem;
  display: block;
}
.info-value {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.explicacion-item { grid-column: 1 / -1; border-left-color: var(--success); }
.explicacion-texto {
  background: rgba(16, 185, 129, 0.05);
  padding: 0.8rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-style: italic;
  margin-top: 0.5rem;
  word-wrap: break-word;
  hyphens: auto;
}
.temas-lista { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.tema-badge {
  background: var(--g-cyber);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(6, 182, 212, 0.2);
}

.badge-gratuito {
  background: var(--g-cyber);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-cyber);
}

/* IA / Revisión badges */
.ia-badge, .revision-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.ia-badge.creada-ia { background: var(--g-cyber); color: white; }
.ia-badge.no-ia { background: linear-gradient(135deg, #64748b, #475569); color: white; }
.revision-badge.revisada { background: var(--g-success); color: white; }
.revision-badge.no-revisada { background: var(--g-warning); color: white; }

.probabilidad-item { border-left-color: var(--accent-amber); }
.probabilidad-valor { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.probabilidad-texto {
  background: rgba(249, 115, 22, 0.07);
  padding: 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(249, 115, 22, 0.2);
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.fechas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.fecha-item {
  background: rgba(100, 116, 139, 0.05);
  padding: 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(100, 116, 139, 0.15);
}
.fecha-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 0.2rem; }
.fecha-valor { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.text-blue { color: var(--cyber) !important; }
.text-blue .bi { margin-right: 4px; }

/* ============================================================
   10. CARD HERRAMIENTAS PLATINUM
   ============================================================ */
.card-herramientas {
  background: var(--plat-g);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  transition: var(--t-slow);
  box-shadow: 0 8px 25px var(--plat-sh),
              inset 0 1px 0 rgba(255, 255, 255, 0.6),
              inset 0 -1px 0 rgba(100, 116, 139, 0.15);
}
.card-herramientas::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #f8fafc, #e2e8f0, #cbd5e1, #94a3b8, #64748b, #94a3b8, #cbd5e1, #e2e8f0, #f8fafc);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  animation: plat-border 3s ease-in-out infinite;
  opacity: 0.7;
}
.card-herramientas::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.7) 50%, transparent 70%);
  z-index: 1;
  transition: left 0.6s ease;
  pointer-events: none;
}
.card-herramientas:hover {
  transform: translateY(-5px) rotateX(2deg);
  box-shadow: 0 12px 35px var(--plat-sh),
              inset 0 2px 0 rgba(255, 255, 255, 0.8),
              inset 0 -2px 0 rgba(100, 116, 139, 0.25);
  background: var(--plat-g-hv);
}
.card-herramientas:hover::after { left: 100%; }
.card-herramientas .icon-herramientas {
  font-size: 3.5rem !important;
  background: linear-gradient(145deg, #374151, #4b5563, #6b7280, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 6px rgba(31, 41, 55, 0.3));
  animation: plat-pulse 2.5s ease-in-out infinite;
  position: relative; z-index: 2;
}
.card-herramientas .title-herramientas {
  background: linear-gradient(145deg, #1f2937, #374151, #4b5563, #64748b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700 !important;
  position: relative; z-index: 2;
  letter-spacing: 0.3px;
}
.card-herramientas .btn-herramientas {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0, #cbd5e1) !important;
  border: 2px solid rgba(148, 163, 184, 0.3) !important;
  color: #1f2937 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--r-sm) !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 2 !important;
  transition: var(--t-slow) !important;
  box-shadow: 0 6px 20px var(--plat-sh),
              inset 0 1px 0 rgba(255, 255, 255, 0.7),
              inset 0 -1px 0 rgba(100, 116, 139, 0.15) !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
}
.card-herramientas .btn-herramientas:hover {
  background: linear-gradient(145deg, #ffffff, #f1f5f9, #e2e8f0) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 25px var(--plat-sh),
              inset 0 2px 0 rgba(255, 255, 255, 0.9),
              0 0 15px rgba(148, 163, 184, 0.4) !important;
  color: #111827 !important;
}
.card-herramientas .text-muted { color: #374151 !important; font-weight: 500; position: relative; z-index: 2; }

@keyframes plat-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes plat-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

/* ============================================================
   11. FORMULARIOS
   ============================================================ */
.form-control,
.form-select {
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 112, 33, 0.12);
  outline: none;
}

.form-login {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.cambiar-contraseña-form {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transition: var(--t);
}
.cambiar-contraseña-form:hover {
  box-shadow: var(--shadow-xl);
}
.cambiar-contraseña-form input.form-control {
  border: 2px solid var(--cyber);
  border-radius: var(--r-sm);
}
.cambiar-contraseña-form input.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 8px rgba(8, 112, 33, 0.2);
}

/* ============================================================
   12. PÁGINA REGISTER
   ============================================================ */
.register-container {
  width: 100% !important;
  max-width: 900px !important;
  padding: 2rem !important;
  margin: 30px auto 0 !important;
}
.register-container .page-title-label {
  background: var(--g-brand) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-size: 3rem !important;
  margin-bottom: 2rem !important;
}
.register-container .card-login {
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--r-lg) !important;
}
.register-container .card-login .card-header {
  background: var(--g-brand-dark) !important;
}
.register-container .step-item {
  display: flex !important;
  align-items: flex-start !important;
  padding: 1.2rem !important;
  border-radius: var(--r-md) !important;
  background: linear-gradient(135deg, var(--bg-surface-2), #f0fdf4) !important;
  border-left: 4px solid var(--brand) !important;
  margin-bottom: 1rem !important;
  transition: var(--t) !important;
  box-shadow: var(--shadow-sm) !important;
}
.register-container .step-item:hover {
  transform: translateX(5px) !important;
  box-shadow: 0 4px 15px rgba(8, 112, 33, 0.1) !important;
}
.register-container .step-number {
  background: var(--g-brand-dark) !important;
  color: white !important;
  width: 35px !important; height: 35px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important; justify-content: center !important;
  font-weight: 800 !important;
  margin-right: 1rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(8, 112, 33, 0.3) !important;
}
.register-container .btn-success {
  background: var(--g-brand-dark) !important;
  border: none !important;
  padding: 0.8rem 1.5rem !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  border-radius: var(--r-md) !important;
  transition: var(--t) !important;
  box-shadow: var(--shadow-md) !important;
}
.register-container .btn-success:hover {
  background: var(--brand-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================================
   13. HERO SECTIONS (oposiciones, temas, etc.)
   ============================================================ */
.hero-section {
  background: var(--g-hero);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(8, 112, 33, 0.2) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, var(--cyber-pale) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.92;
  font-weight: 400;
  margin-bottom: 28px;
}

/* Stats en hero */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  border: 1px solid rgba(6, 182, 212, 0.2);
  min-width: 140px;
  transition: var(--t);
}
.stat-item:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.12); }
.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  display: block;
  margin-bottom: 5px;
  background: var(--g-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.88rem; opacity: 0.88; font-weight: 500; }

/* ============================================================
   14. OPOSICIONES CARDS
   ============================================================ */
.oposiciones-section { padding: 80px 0; }
.oposiciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 50px;
}

.oposicion-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 56px 28px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: var(--t-slow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}
.oposicion-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--g-cyber);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.oposicion-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border);
}
.oposicion-card:hover::before { transform: scaleX(1); }

.card-header-content { flex-shrink: 0; }
.card-body-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-footer-content { flex-shrink: 0; margin-top: auto; padding-top: 20px; }

.oposicion-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: var(--g-brand-dark);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--t);
}
.oposicion-card:hover .oposicion-icon { transform: scale(1.1) rotateY(15deg); }

.oposicion-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  min-height: 3.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}
.oposicion-organismo {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  min-height: 1.4rem;
}
.oposicion-description {
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 0.93rem;
  line-height: 1.65;
  min-height: 4.2rem;
  flex-grow: 1;
}
.oposicion-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(8, 112, 33, 0.04), rgba(6, 182, 212, 0.04));
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.stat { text-align: center; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.7rem; font-weight: 800; color: var(--brand); display: block; }
.stat-text { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

.btn-empezar {
  background: var(--g-brand-dark);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--r-pill);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--t);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
  min-width: 180px;
}
.btn-empezar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}
.btn-empezar:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: white;
}
.btn-empezar:hover::before { left: 100%; }

.btn-cta {
  background: white;
  color: var(--brand);
  border: none;
  padding: 18px 46px;
  border-radius: var(--r-pill);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: var(--t);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  color: var(--brand-dark);
}

/* Badges de categoría / estado — SÓLO en tarjetas de oposiciones/exámenes */
.card-oposicion .categoria-badge,
.card-examen .categoria-badge,
.oposicion-card .categoria-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--g-brand-dark);
  color: white;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  font-family: 'Syne', sans-serif;
}
.card-oposicion .estado-badge,
.card-examen .estado-badge {
  position: absolute;
  top: 16px; left: 16px; right: auto;
  background: var(--g-brand-dark);
  color: white;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  font-family: 'Syne', sans-serif;
}
.card-oposicion .estado-badge.completada,
.card-examen .estado-badge.completada { background: linear-gradient(135deg, var(--cyber) 0%, var(--cyber-dark) 100%); }

/* ============================================================
   15. CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--g-hero);
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.cta-content { position: relative; z-index: 2; }
.cta-title { font-family: 'Syne', sans-serif; font-size: 2.4rem; font-weight: 800; margin-bottom: 18px; }
.cta-text { font-size: 1.15rem; margin-bottom: 38px; opacity: 0.92; }

/* ============================================================
   16. ESQUEMA LANDING PAGE
   ============================================================ */
.esquema-landing-page .hero-section { background: var(--g-hero); color: white; }
.esquema-landing-page .min-vh-75 { min-height: 75vh; }
.esquema-landing-page .hero-icon {
  font-size: 8rem;
  color: rgba(6, 182, 212, 0.25);
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
}
.esquema-landing-page .generator-section { background: var(--g-surface); }
.esquema-landing-page .card {
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  border-radius: var(--r-md);
  transition: var(--t);
  overflow: hidden;
}
.esquema-landing-page .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.esquema-landing-page .card-header.bg-info { background: linear-gradient(135deg, var(--cyber) 0%, var(--cyber-dark) 100%) !important; }
.esquema-landing-page .card-header.bg-warning { background: var(--g-warning) !important; }
.esquema-landing-page .card-header.bg-success { background: var(--g-brand-dark) !important; }
.esquema-landing-page .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8, 112, 33, 0.12); }
.esquema-landing-page .result-image-container {
  background: var(--g-surface);
  min-height: 400px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
}
.esquema-landing-page .result-image { max-height: 600px; border-radius: var(--r-sm); transition: var(--t); }
.esquema-landing-page .result-image:hover { transform: scale(1.02); }
.esquema-landing-page .result-card { animation: slideInUp 0.6s ease-out; }
.example-section { background: var(--g-surface); }
.example-image-container { background: white; border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.example-image { transition: transform 0.3s ease; }
.example-image:hover { transform: scale(1.02); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   17. PÁGINA TEMA
   ============================================================ */
.content-preview {
  position: relative;
  min-height: 800px;
  overflow: hidden;
}
.content-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(transparent, rgba(255,255,255,0.92) 30%, white 90%);
  display: flex;
  align-items: flex-end;
}
.concepts-preview { min-height: 250px; overflow: hidden; }
.sidebar-container { position: sticky; top: 20px; }

/* ============================================================
   18. UPLOAD PAGE
   ============================================================ */
.upload-zone {
  border: 3px dashed var(--cyber);
  border-radius: var(--r-md);
  padding: 3rem;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc, #f0f9ff);
  transition: var(--t);
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--brand); background: linear-gradient(135deg, #f0fdf4, #f0f9ff); }
.upload-zone.dragover { border-color: var(--success); background: linear-gradient(135deg, var(--brand-pale), #f8fafc); }
.info-card    { border-left: 4px solid var(--cyber); }
.warning-card { border-left: 4px solid var(--warning); }
.success-card { border-left: 4px solid var(--success); }
.estructura-json { max-height: 300px; overflow-y: auto; border-radius: var(--r-sm); }
.estructura-json pre { margin: 0; font-size: 0.85rem; line-height: 1.4; }
.pregunta-card { border-left: 4px solid var(--cyber); transition: var(--t); }
.pregunta-card.error   { border-left-color: var(--danger); }
.pregunta-card.warning { border-left-color: var(--warning); }
.pregunta-card.success { border-left-color: var(--success); }
.respuesta-item { background: #f8fafc; border-radius: var(--r-sm); padding: 0.5rem 0.75rem; margin-bottom: 0.25rem; transition: var(--t-fast); }
.respuesta-item:hover { background: var(--brand-pale); }
.estadisticas { position: sticky; top: 110px; }

/* ============================================================
   19. RESULTADO QUIZ
   ============================================================ */
.resultado-card { border: none; box-shadow: var(--shadow-xl); border-radius: var(--r-xl); overflow: hidden; }
.stats-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-size: 2.5rem; font-weight: 800; color: white; margin: 0 auto 1rem; box-shadow: var(--shadow-md); }
.success-circle { background: var(--g-success); }
.error-circle   { background: var(--g-danger); }
.info-circle    { background: linear-gradient(135deg, var(--cyber) 0%, var(--cyber-dark) 100%); }

/* ============================================================
   20. DUPLICADOS PAGE
   ============================================================ */
.duplicates-page .page-title {
  background: var(--g-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.duplicates-page .oposicion-card:hover { border-color: rgba(8, 112, 33, 0.3); box-shadow: 0 20px 40px rgba(8, 112, 33, 0.1); }
.duplicates-page .oposicion-icon { background: var(--g-brand-dark); }
.duplicates-page .toggle-btn { background: rgba(8, 112, 33, 0.08); color: var(--brand); border: 1px solid var(--border); }
.duplicates-page .toggle-btn:hover { background: rgba(8, 112, 33, 0.15); }
.duplicates-page .btn-primary { background: var(--g-brand-dark); border: none; box-shadow: var(--shadow-sm); }
.duplicates-page .btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow-md); }
.duplicates-page .tema-card.selected { background: var(--brand-pale); border-color: var(--brand); border-width: 2px; box-shadow: 0 0 0 3px rgba(8, 112, 33, 0.1); }
.duplicates-page .tema-numero { background: var(--g-brand-dark); }
.duplicates-page .btn-analyze { background: var(--g-brand-dark); }
.duplicates-page .btn-delete { background: var(--g-danger); }
.duplicates-page .duplicate-card { background: linear-gradient(135deg, var(--danger-pale), rgba(239,68,68,0.03)); border: 1px solid rgba(239,68,68,0.2); border-left: 4px solid var(--danger); }
.duplicates-page .selection-counter { background: var(--g-brand-dark); border: 2px solid rgba(255,255,255,0.2); }
.duplicates-page .spinner { border-top-color: var(--brand); }

@keyframes duplicatesFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.duplicates-page .oposicion-card { animation: duplicatesFadeIn 0.5s ease-out; }

/* ============================================================
   21. MODAL AVISO
   ============================================================ */
.modal-aviso .modal-header { background: var(--g-warning); color: #1a1a1a; }
.modal-aviso .modal-body { font-size: 1.2rem; }

/* ============================================================
   22. UTILIDADES
   ============================================================ */
.bi { vertical-align: -0.125em; }
.bg-gradient-success { background: var(--g-success) !important; }

.actualizar-fijo { position: fixed; bottom: 20px; right: 20px; z-index: 1040; }
.logout-btn, .logout-btn2 { position: static; margin: 0; padding: 0; }
.logout-btn form { margin: 0; }

.content-wrapper { min-height: calc(100vh - var(--navbar-h)); }
.universal-content { padding-top: 20px; min-height: calc(100vh - var(--navbar-h)); }
.universal-container { width: 100%; max-width: 1200px; padding: 2rem; margin: 0 auto; }
.modern-container { max-width: 1400px; margin: 0 auto; padding: 1rem 2rem; min-height: calc(100vh - var(--navbar-h) - 40px); }

.rate-limit-warning { border-left: 4px solid var(--warning); background: var(--warning-pale); color: var(--warning-dark); }
.rate-limit-error   { border-left: 4px solid var(--danger); background: var(--danger-pale); color: var(--danger-dark); }

.animation-success { animation: bounceIn 1s ease-out; }
@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

#loadingSpinner { animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Protección de herramientas en páginas específicas */
.upload-page .card-herramientas::before, .upload-page .card-herramientas::after,
.register-page .card-herramientas::before, .register-page .card-herramientas::after,
.quiz-page .card-herramientas::before, .quiz-page .card-herramientas::after,
.exam-page .card-herramientas::before, body.bg-login .card-herramientas::before,
.exam-page .card-herramientas::after, body.bg-login .card-herramientas::after { display: none !important; }

/* ============================================================
   23. RESPONSIVE
   ============================================================ */

/* Tablet/móvil grande */
@media (max-width: 992px) {
  .universal-nav-left { gap: 18px; }
  .oposiciones-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

/* Móvil */
@media (max-width: 768px) {
  :root { --navbar-h: 70px; }

  body { padding-top: var(--navbar-h); }

  .universal-nav-container {
    flex-direction: column;
    height: auto;
    padding: 10px 15px;
    gap: 8px;
  }
  .universal-navbar { height: auto; min-height: var(--navbar-h); }
  body.universal-navbar-page { padding-top: 80px !important; }

  .universal-nav-brand { font-size: 1.3rem; }
  .universal-nav-left { gap: 12px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
  .universal-nav-right { gap: 8px; flex-wrap: wrap; justify-content: center; }
  .universal-btn { padding: 6px 12px; font-size: 12px; }

  .landing-nav-container { flex-direction: column; gap: 16px; }
  .landing-nav-left { flex-direction: column; gap: 12px; text-align: center; }
  .landing-nav-right { flex-direction: column; width: 100%; gap: 8px; }
  .landing-btn { text-align: center; width: 100%; justify-content: center; }

  .landing-hero { padding: 60px 0; }
  .landing-hero h1 { font-size: 1.9rem; }
  .landing-hero p { font-size: 1rem; }
  .landing-features-grid { grid-template-columns: 1fr; }
  .landing-btn-large { padding: 12px 28px; font-size: 0.95rem; }

  .hero-title { font-size: 2rem; }
  .stats-container { gap: 16px; }
  .oposiciones-grid { grid-template-columns: 1fr; }

  .pregunta-contenedor { min-height: 100px; max-height: 240px; padding: 1rem; }
  .pregunta-texto { font-size: 1rem; }
  .respuestas-contenedor { height: 250px; padding: 1rem; }
  .info-grid { grid-template-columns: 1fr; }
  .fechas-grid { grid-template-columns: 1fr; }

  .register-container { padding: 1.5rem !important; max-width: 95% !important; margin-top: 20px !important; }
  .page-title-label { font-size: 2.2rem; }
  .upload-zone { padding: 2rem 1rem; }
  .estadisticas { position: static; margin-bottom: 2rem; }
  .stats-circle { width: 100px; height: 100px; font-size: 2rem; }
  .modern-container { padding: 1.5rem; }
  .universal-container { padding: 1.5rem; }

  .content-preview { min-height: 500px; }
  .sidebar-container { position: static; }
}

/* Móvil pequeño */
@media (max-width: 576px) {
  :root { --navbar-h: 140px; }

  .universal-nav-container { padding: 8px 10px; gap: 6px; }
  .universal-nav-brand { font-size: 1.2rem; }
  .universal-btn { padding: 5px 10px; font-size: 11px; }
  body.universal-navbar-page { padding-top: var(--navbar-h) !important; }

  .landing-hero h1 { font-size: 1.6rem; }
  .landing-features { padding: 50px 0; }
  .landing-cta { padding: 50px 0; }
  .cta-title { font-size: 1.8rem; }
  .hero-title { font-size: 1.8rem; }

  .register-container { padding: 1rem !important; }
  .register-container .step-item { flex-direction: column !important; text-align: center !important; }
  .register-container .step-number { margin-right: 0 !important; margin-bottom: 0.5rem !important; }

  .card-herramientas:hover { transform: translateY(-3px); }
  .card-herramientas .icon-herramientas { font-size: 2.8rem !important; }
  .card-herramientas .btn-herramientas { font-size: 0.85rem !important; padding: 0.65rem 1.1rem !important; }

  .universal-nav-right { flex-direction: column; width: 100%; }
  .universal-nav-right .universal-btn { width: 100%; max-width: 200px; margin: 1px 0; justify-content: center; }
  .modern-container { padding: 1rem; }
}

/* Landscape móvil */
@media (max-width: 767px) and (orientation: landscape) {
  :root { --navbar-h: 60px; }
  .universal-nav-container { flex-direction: row; justify-content: space-between; padding: 5px 15px; }
  .universal-nav-left { flex-wrap: nowrap; }
}

/* ============================================================
   PÁGINAS LEGALES (legal_policy.html)
   ============================================================ */
.legal-container { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }

.legal-header {
  text-align: center; margin-bottom: 36px;
  background: var(--g-hero); padding: 50px 30px 40px;
  border-radius: var(--r-xl); color: white;
  position: relative; overflow: hidden;
}
.legal-header::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(6,182,212,.06) 1px,transparent 1px),
                    linear-gradient(90deg,rgba(6,182,212,.06) 1px,transparent 1px);
  background-size: 35px 35px;
}
.legal-badge-freemium {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(6,182,212,.2); border: 1px solid rgba(6,182,212,.35);
  color: var(--cyber-pale); padding: 5px 16px; border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 700; font-family: 'Syne', sans-serif;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 16px;
  position: relative; z-index: 2;
}
.legal-title {
  font-family: 'Syne', sans-serif; font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800;
  margin-bottom: 10px; position: relative; z-index: 2;
}
.legal-subtitle { opacity: .85; font-size: 1rem; position: relative; z-index: 2; }
.legal-meta { margin-top: 12px; font-size: .85rem; opacity: .8; position: relative; z-index: 2; }

.legal-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--g-brand-dark); color: white;
  padding: 10px 22px; border-radius: var(--r-pill);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: var(--t); margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}
.legal-back-btn:hover { color: white; text-decoration: none; transform: translateX(-3px); box-shadow: var(--shadow-lg); }

.legal-content { background: white; border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }

.legal-section {
  padding: 36px 40px; border-bottom: 1px solid var(--border-light);
  transition: background .2s;
}
.legal-section:last-child { border-bottom: none; }
.legal-section:hover { background: rgba(8,112,33,.015); }
.legal-section h2 {
  font-family: 'Syne', sans-serif; font-size: 1.35rem; font-weight: 800;
  color: var(--text); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.legal-section h2 i { color: var(--brand); font-size: 1.1rem; }
.legal-section h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 20px 0 10px; }
.legal-section p { color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; }

.legal-banner { padding: 22px 24px; border-radius: var(--r-md); margin-bottom: 20px; }
.legal-banner h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.legal-banner p  { font-size: .9rem; margin: 0; line-height: 1.7; }
.legal-banner-blue  { background: linear-gradient(135deg,rgba(6,182,212,.1),rgba(6,182,212,.04)); border: 1px solid rgba(6,182,212,.3); color: var(--cyber-dark); }
.legal-banner-green { background: linear-gradient(135deg,rgba(8,112,33,.08),rgba(8,112,33,.03)); border: 1px solid var(--border); color: var(--brand-dark); }

.normativa-container { padding: 16px 18px; background: var(--bg-surface-2); border-radius: var(--r-sm); margin-bottom: 20px; font-size: .88rem; }
.normativa-tag {
  display: inline-block; padding: 3px 10px; margin: 3px 4px;
  background: white; border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 600; color: var(--text-muted);
}

.legal-toc {
  background: linear-gradient(135deg,rgba(8,112,33,.04),rgba(6,182,212,.04));
  border: 1px solid var(--border-light); border-radius: var(--r-md);
  padding: 22px 24px; margin-bottom: 24px;
}
.legal-toc h3 { font-family: 'Syne', sans-serif; font-weight: 800; color: var(--text); font-size: 1rem; margin-bottom: 12px; }
.legal-toc ul  { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 2px; }
.legal-toc a   { color: var(--brand); text-decoration: none; font-size: .88rem; font-weight: 600; padding: 4px 8px; border-radius: var(--r-sm); display: flex; align-items: center; gap: 4px; transition: var(--t-fast); }
.legal-toc a:hover { background: var(--brand-pale); }

.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .88rem; border-radius: var(--r-sm); overflow: hidden; }
.legal-table thead tr { background: var(--g-brand-dark); color: white; }
.legal-table th { padding: 11px 14px; text-align: left; font-family: 'Syne',sans-serif; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
.legal-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); color: var(--text); vertical-align: top; }
.legal-table tr:nth-child(even) td { background: rgba(8,112,33,.02); }
.legal-table tr:hover td { background: rgba(6,182,212,.05); }

.legal-info {
  background: linear-gradient(135deg,rgba(8,112,33,.08),rgba(8,112,33,.03));
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--r-sm); padding: 16px 18px; font-size: .88rem;
  color: var(--brand-dark); line-height: 1.7; margin: 14px 0;
}
.legal-info a { color: white; font-weight: 700; }

.legal-highlight {
  background: rgba(249,115,22,.07); border: 1px solid rgba(249,115,22,.25);
  border-radius: var(--r-sm); padding: 14px 16px; font-size: .88rem;
  color: var(--text); margin: 14px 0;
}

.legal-warning-box {
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--r-sm); padding: 14px 16px; font-size: .88rem;
  color: var(--text); margin: 14px 0; line-height: 1.7;
}

.legal-feature-list { list-style: none; padding: 0; margin: 14px 0; }
.legal-feature-list li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: .9rem; color: var(--text); }
.legal-feature-list span[class^="icon-"] {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; flex-shrink: 0; margin-top: 2px;
}
.icon-check { background: var(--success-pale); color: var(--success-dark); }
.icon-x     { background: var(--danger-pale);  color: var(--danger-dark); }
.icon-info  { background: var(--cyber-pale);   color: var(--cyber-dark); }

.legal-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: .88rem;
}
.legal-step:last-of-type { border-bottom: none; }
.legal-step-number {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--g-brand-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: .85rem;
}
.legal-step div { color: var(--text); line-height: 1.7; }

.legal-contact {
  background: var(--bg-surface-2); border: 1px solid var(--border-light);
  border-radius: var(--r-sm); padding: 18px 20px; font-size: .9rem;
  color: var(--text); line-height: 2;
}
.legal-contact a { color: var(--brand); font-weight: 700; text-decoration: none; }
.legal-contact a:hover { text-decoration: underline; }

.legal-footer {
  text-align: center; padding: 28px;
  background: var(--bg-dark-2); color: rgba(255,255,255,.6);
  font-size: .85rem; margin-top: 32px; border-radius: var(--r-xl);
  border: 1px solid rgba(6,182,212,.15);
}

/* Scroll top button */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--g-brand-dark); color: white;
  border: none; cursor: pointer; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; transition: var(--t); opacity: 0; pointer-events: none; z-index: 1000;
}
.scroll-top.show { opacity: 1; pointer-events: all; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

@media (max-width: 640px) {
  .legal-section { padding: 24px 20px; }
  .legal-table  { font-size: .78rem; }
  .legal-table td, .legal-table th { padding: 8px 10px; }
  .legal-toc ul { grid-template-columns: 1fr; }
}

/* ============================================================
   COOKIE OVERLAY — Modal centrado (landing_page.html)
   ============================================================ */

/* El overlay cubre toda la pantalla con fondo semitransparente */
.cookie-overlay {
  display: none; /* JS lo pone a flex cuando es necesario */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Tarjeta modal centrada */
.cookie-content {
  background: #ffffff;
  border-radius: var(--r-xl, 20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(6, 182, 212, 0.15);
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: cookieSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cookieSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Icono grande centrado */
.cookie-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1;
}

/* Título */
.cookie-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text, #0f172a);
  text-align: center;
  margin-bottom: 10px;
}

/* Descripción */
.cookie-desc {
  font-size: 0.92rem;
  color: var(--text-muted, #64748b);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Checkboxes */
.cookie-checks {
  background: var(--bg-surface-2, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--r-md, 12px);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.cookie-checks .form-check {
  padding-left: 1.6rem;
}

.cookie-checks .form-check-input {
  accent-color: var(--brand, #087021);
  width: 16px;
  height: 16px;
  margin-top: 3px;
  cursor: pointer;
}

.cookie-checks .form-check-label {
  font-size: 0.9rem;
  color: var(--text, #0f172a);
  cursor: pointer;
}

.cookie-checks small {
  font-size: 0.78rem;
}

/* Botones dentro del overlay */
.cookie-content .btn {
  border-radius: var(--r-pill, 50px) !important;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  transition: var(--t, all 0.2s ease);
}

.cookie-content .btn-success {
  background: var(--g-brand-dark, linear-gradient(135deg, #087021, #065318));
  border: none;
  box-shadow: 0 4px 14px rgba(8, 112, 33, 0.3);
}
.cookie-content .btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(8, 112, 33, 0.4); }

.cookie-content .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.cookie-content .btn-primary:hover { transform: translateY(-2px); }

.cookie-content .btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: none;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.cookie-content .btn-danger:hover { transform: translateY(-2px); }

/* Links de política dentro del overlay */
.cookie-content .small a {
  color: var(--brand, #087021);
  font-weight: 600;
  text-decoration: none;
}
.cookie-content .small a:hover { text-decoration: underline; }

/* Página de rechazo (pantalla completa) */
.reject-page {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--g-hero, linear-gradient(135deg, #0a0f1e 0%, #0d2a0f 50%, #0a1628 100%));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: white;
}

.reject-content {
  max-width: 560px;
  width: 100%;
}

.reject-content h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0;
}

/* Contenido principal: oculto hasta aceptar cookies */
#mainContent.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
  .cookie-content {
    padding: 24px 18px 20px;
    border-radius: var(--r-lg, 16px);
  }
  .cookie-title { font-size: 1.2rem; }
}

/* ============================================================
   QUIZ BOTONES DE ACCIÓN (quiz_pregunta_gratuitas.html)
   ============================================================ */
.btn-quiz-submit,
.btn-quiz-saltar,
.btn-quiz-salir {
  padding: 10px 24px;
  border-radius: var(--r-sm);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-quiz-submit {
  background: var(--g-brand-dark);
  color: white;
  border: none;
}
.btn-quiz-submit:hover { opacity: .9; transform: translateY(-1px); }

.btn-quiz-saltar {
  background: transparent;
  border: 2px solid var(--text-muted);
  color: var(--text-muted);
}
.btn-quiz-saltar:hover { border-color: var(--text); color: var(--text); }

.btn-quiz-salir {
  background: transparent;
  border: 2px solid var(--cyber);
  color: var(--cyber);
}
.btn-quiz-salir:hover { background: var(--cyber); color: white; }

/* ============================================================
   TÉRMINOS DEL SERVICIO (terms_of_service.html)
   ============================================================ */
.tos-container {
  max-width: 860px; margin: 0 auto; padding: 40px 20px 80px;
}

.tos-header {
  background: var(--g-hero); color: white;
  border-radius: var(--r-xl); padding: 46px 36px 38px;
  text-align: center; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.tos-header::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(6,182,212,.07) 1px,transparent 1px),
                    linear-gradient(90deg,rgba(6,182,212,.07) 1px,transparent 1px);
  background-size: 35px 35px; pointer-events: none;
}

.tos-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(6,182,212,.2); border: 1px solid rgba(6,182,212,.35);
  color: var(--cyber-pale); padding: 5px 16px; border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700; font-family: 'Syne', sans-serif;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 16px;
  position: relative; z-index: 1;
}

.tos-title {
  font-family: 'Syne', sans-serif; font-size: clamp(1.8rem,4vw,2.8rem);
  font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1;
}

.tos-meta {
  font-size: .85rem; opacity: .8; position: relative; z-index: 1; margin-top: 10px;
}

.tos-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--g-brand-dark); color: white;
  padding: 10px 22px; border-radius: var(--r-pill);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: var(--t); margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}
.tos-back-btn:hover { color: white; text-decoration: none; transform: translateX(-3px); }

.tos-content { background: white; border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }

.tos-toc {
  background: linear-gradient(135deg,rgba(8,112,33,.04),rgba(6,182,212,.04));
  border: 1px solid var(--border-light); border-radius: var(--r-md);
  padding: 22px 24px; margin: 28px 32px;
}
.tos-toc h3 { font-family: 'Syne',sans-serif; font-weight: 800; font-size: 1rem; margin-bottom: 12px; color: var(--text); }
.tos-toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 2px; }
.tos-toc a { color: var(--brand); text-decoration: none; font-size: .88rem; font-weight: 600; padding: 4px 8px; border-radius: var(--r-sm); display: flex; align-items: center; gap: 4px; transition: var(--t-fast); }
.tos-toc a:hover { background: var(--brand-pale); }

.tos-section {
  padding: 32px 36px; border-bottom: 1px solid var(--border-light);
  transition: background .2s;
}
.tos-section:last-child { border-bottom: none; }
.tos-section:hover { background: rgba(8,112,33,.015); }
.tos-section h2 {
  font-family: 'Syne',sans-serif; font-size: 1.3rem; font-weight: 800;
  color: var(--text); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.tos-section h2 i { color: var(--brand); }
.tos-section h3 { font-family: 'Syne',sans-serif; font-weight: 700; font-size: 1rem; color: var(--text); margin: 18px 0 10px; }
.tos-section p { color: var(--text-muted); line-height: 1.8; font-size: .95rem; }

.tos-box {
  padding: 16px 18px; border-radius: var(--r-sm); margin: 14px 0;
  font-size: .88rem; line-height: 1.7;
}
.tos-box-blue   { background: rgba(6,182,212,.07);   border: 1px solid rgba(6,182,212,.25);  color: var(--text); }
.tos-box-green  { background: rgba(8,112,33,.06);    border: 1px solid var(--border);        color: var(--brand-dark); }
.tos-box-warn   { background: rgba(245,158,11,.07);  border: 1px solid rgba(245,158,11,.25); color: var(--text); }
.tos-box-gold   { background: rgba(249,115,22,.06);  border: 1px solid rgba(249,115,22,.25); color: var(--text); }
.tos-box-danger { background: rgba(239,68,68,.06);   border: 1px solid rgba(239,68,68,.25);  color: var(--text); }

.plan-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.plan-col { padding: 20px; border-radius: var(--r-md); }
.plan-col h4 { font-family: 'Syne',sans-serif; font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.plan-col-free { background: rgba(8,112,33,.06); border: 1px solid var(--border); }
.plan-col-prem { background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.25); }

.tos-list { list-style: none; padding: 0; margin: 14px 0; }
.tos-list li { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: .9rem; color: var(--text); }
.tl-icon {
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: .72rem; flex-shrink: 0; margin-top: 2px;
}
.tl-green { background: var(--success-pale); color: var(--success-dark); }
.tl-red   { background: var(--danger-pale);  color: var(--danger); }
.tl-gold  { background: rgba(245,158,11,.15); color: #b45309; }
.tl-blue  { background: var(--cyber-pale);    color: var(--cyber-dark); }

.tos-contact {
  background: var(--bg-surface-2); border: 1px solid var(--border-light);
  border-radius: var(--r-sm); padding: 18px 20px; font-size: .9rem;
  color: var(--text); line-height: 2;
}
.tos-contact a { color: var(--brand); font-weight: 700; text-decoration: none; }

.tos-footer {
  text-align: center; padding: 26px;
  background: var(--bg-dark-2); color: rgba(255,255,255,.6);
  font-size: .85rem; margin-top: 28px; border-radius: var(--r-xl);
  border: 1px solid rgba(6,182,212,.15);
}

@media (max-width: 640px) {
  .tos-section { padding: 20px 18px; }
  .plan-split  { grid-template-columns: 1fr; }
  .tos-toc     { margin: 20px 16px; }
  .tos-toc ul  { grid-template-columns: 1fr; }
}

/* Utilidad: enlace con color de marca */
.link-brand { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-brand:hover { text-decoration: underline; color: var(--brand-dark); }


/* ============================================================
   NOTICIAS — SECCIÓN PÚBLICA
   (lista, detalle, categoria, archivo_anual, archivo_mensual)
   ============================================================ */

/* ── Body pages ── */
.noticias-page,
.noticia-detalle,
.archivo-page,
.archivo-mensual-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ── Hero lista ── */
.hero-noticias {
  background: linear-gradient(135deg, #087021 0%, #065d1a 100%);
  color: white;
  padding: 4rem 0 3rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}
.hero-noticias::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}
.hero-content { position: relative; z-index: 2; }

/* ── Card noticia (lista) ── */
.card-noticia {
  border: none; border-radius: 15px; overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,.1);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  background: white; height: 100%;
}
.card-noticia:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.card-imagen {
  height: 200px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  position: relative; overflow: hidden;
}
.card-imagen img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card-noticia:hover .card-imagen img { transform: scale(1.05); }

.card-body-custom {
  padding: 1.5rem;
  display: flex; flex-direction: column;
  height: calc(100% - 200px);
}

/* ── Badges sobre imagen ── */
.categoria-badge {
  padding: 6px 12px; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: white; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  display: inline-block;
}
/* Cuando el badge está sobre la imagen (tarjetas de lista) */
.card-imagen .categoria-badge {
  position: absolute; top: 15px; left: 15px;
}
.urgente-badge {
  position: absolute; top: 15px; right: 15px;
  background: linear-gradient(45deg, #dc3545, #c82333);
  color: white; padding: 4px 10px; border-radius: 15px;
  font-size: .7rem; font-weight: 700;
  animation: pulso 2s infinite;
}
@keyframes pulso {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

/* ── Texto de card ── */
.noticia-titulo {
  font-size: 1.1rem; font-weight: 700; line-height: 1.4;
  margin-bottom: .8rem; color: #2c3e50;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.noticia-resumen {
  color: #6c757d; font-size: .9rem; line-height: 1.5;
  margin-bottom: 1rem; flex-grow: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.noticia-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  font-size: .85rem; color: #6c757d;
}
.autor-info { display: flex; align-items: center; gap: 8px; }
.fecha-info { display: flex; align-items: center; gap: 5px; }

/* ── Destacada ── */
.destacada-card {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid #ffc107;
  position: relative;
}
.destacada-card::before {
  content: '⭐'; position: absolute; top: 10px; right: 10px; font-size: 1.5rem;
}
.destacada-card .row          { align-items: stretch; }
.destacada-card .col-md-6     { display: flex; flex-direction: column; }
.destacada-card .card-imagen  { height: 100%; min-height: 350px; flex-grow: 1; }

/* ── Búsqueda ── */
.search-container { position: relative; max-width: 500px; }
.search-results {
  position: absolute; top: 100%; left: 0; right: 0;
  background: white; border: 1px solid #e9ecef;
  border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.15);
  z-index: 1000; max-height: 400px; overflow-y: auto; display: none;
}
.search-result-item {
  padding: 15px; border-bottom: 1px solid #f8f9fa;
  cursor: pointer; transition: background-color .2s ease;
}
.search-result-item:hover      { background-color: #f8f9fa; }
.search-result-item:last-child { border-bottom: none; }

/* ── Sidebar lista ── */
.sidebar-sticky { position: sticky; top: 100px; }
.categorias-sidebar .list-group-item {
  border: none; border-radius: 10px !important; margin-bottom: 5px;
  background: rgba(8,112,33,.05); transition: all .2s ease;
}
.categorias-sidebar .list-group-item:hover {
  background: rgba(8,112,33,.1); transform: translateX(5px);
}
.categorias-sidebar .list-group-item.active {
  background: linear-gradient(135deg, #087021, #065d1a); color: white;
}
.filtros-toolbar {
  background: white; border-radius: 15px; padding: 20px;
  margin-bottom: 2rem; box-shadow: 0 4px 15px rgba(0,0,0,.08);
}
.tag-filter {
  display: inline-block; padding: 6px 12px; margin: 3px;
  border-radius: 20px; font-size: .8rem; text-decoration: none;
  transition: all .2s ease; border: 2px solid transparent;
}
.tag-filter:hover { transform: translateY(-2px); text-decoration: none; }

.stats-card {
  background: linear-gradient(135deg, rgba(8,112,33,.1), rgba(8,112,33,.05));
  border-left: 4px solid #087021;
}

/* ── Hero detalle ── */
.hero-noticia {
  background: linear-gradient(135deg, rgba(0,0,0,.7), rgba(0,0,0,.5));
  background-size: cover; background-position: center;
  color: white; padding: 6rem 0 4rem;
  margin-bottom: 3rem; position: relative;
}
.breadcrumb-custom {
  background: rgba(255,255,255,.2); border-radius: 25px; padding: 8px 16px;
}
.breadcrumb-custom a       { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb-custom a:hover { color: white; }

.categoria-badge-large {
  padding: 8px 16px; border-radius: 25px;
  font-size: .9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: white; display: inline-block; margin-bottom: 1rem;
}
.urgente-badge-large {
  background: linear-gradient(45deg, #dc3545, #c82333);
  color: white; padding: 6px 15px; border-radius: 20px;
  font-size: .8rem; font-weight: 700;
  animation: pulso 2s infinite;
  display: inline-block; margin-left: 10px;
}
.noticia-meta-header {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; margin-top: 1.5rem;
  padding: 15px 0; border-top: 1px solid rgba(255,255,255,.2);
}
.meta-item { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,.9); }

/* ── Contenido principal detalle ── */
.contenido-principal {
  background: white; border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
  padding: 3rem; margin-bottom: 3rem; position: relative;
}
.contenido-texto { font-size: 1.1rem; line-height: 1.8; color: #2c3e50; }
.contenido-texto h1 { color: #087021; font-size: 2.5rem; margin-top: 3rem; margin-bottom: 1.5rem; border-bottom: 3px solid #087021; padding-bottom: .5rem; }
.contenido-texto h2 { color: #087021; font-size: 2rem; margin-top: 2.5rem; margin-bottom: 1.2rem; border-bottom: 2px solid #e9ecef; padding-bottom: .5rem; }
.contenido-texto h3 { color: #065d1a; font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; }
.contenido-texto h4 { color: #065d1a; font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: .8rem; font-weight: 600; }
.contenido-texto h5 { color: #087021; font-size: 1.1rem; margin-top: 1.2rem; margin-bottom: .6rem; font-weight: 600; }
.contenido-texto h6 { color: #087021; font-size: 1rem; margin-top: 1rem; margin-bottom: .5rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.contenido-texto p  { margin-bottom: 1.5rem; text-align: justify; }
.contenido-texto ul,
.contenido-texto ol { margin: 1.5rem 0; padding-left: 2rem; }
.contenido-texto li { margin-bottom: .8rem; line-height: 1.6; }
.contenido-texto li strong { color: #087021; }
.contenido-texto blockquote {
  border-left: 4px solid #087021;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 1.5rem 2rem; margin: 2rem 0;
  font-style: italic; border-radius: 0 10px 10px 0; position: relative;
}
.contenido-texto blockquote::before { content: '"'; font-size: 4rem; color: #087021; position: absolute; top: -10px; left: 10px; opacity: .3; }
.contenido-texto blockquote p       { margin-bottom: .5rem; }
.contenido-texto blockquote p:last-child { margin-bottom: 0; }
.contenido-texto code { background: #f8f9fa; color: #e83e8c; padding: 2px 6px; border-radius: 4px; font-size: .9em; border: 1px solid #e9ecef; }
.contenido-texto pre  { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; }
.contenido-texto pre code { background: none; border: none; padding: 0; color: #2c3e50; }
.contenido-texto table { width: 100%; border-collapse: collapse; margin: 2rem 0; box-shadow: 0 2px 8px rgba(0,0,0,.1); border-radius: 8px; overflow: hidden; }
.contenido-texto th,
.contenido-texto td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e9ecef; }
.contenido-texto th { background: #087021; color: white; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.contenido-texto tr:nth-child(even) { background: #f8f9fa; }
.contenido-texto tr:hover { background: #e9ecef; }
.contenido-texto a { color: #087021; text-decoration: none; border-bottom: 1px solid transparent; transition: all .3s ease; }
.contenido-texto a:hover { color: #065d1a; border-bottom-color: #087021; }
.contenido-texto hr { border: none; height: 3px; background: linear-gradient(90deg, #087021, #065d1a, #087021); margin: 3rem 0; border-radius: 2px; }
.contenido-texto img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.1); margin: 1.5rem 0; display: block; }

/* ── Tags y compartir (detalle) ── */
.tags-container { margin: 2rem 0; padding: 20px; background: #f8f9fa; border-radius: 10px; }
.tag-item { display: inline-block; padding: 6px 12px; margin: 3px; border-radius: 20px; font-size: .8rem; text-decoration: none; color: white; transition: all .2s ease; }
.tag-item:hover { transform: translateY(-2px); text-decoration: none; color: white; }
.compartir-section { background: linear-gradient(135deg, #087021, #065d1a); color: white; padding: 2rem; border-radius: 15px; margin: 2rem 0; text-align: center; }
.btn-compartir { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); color: white; border-radius: 25px; padding: 10px 20px; margin: 5px; transition: all .3s ease; text-decoration: none; display: inline-block; }
.btn-compartir:hover { background: white; color: #087021; transform: translateY(-2px); text-decoration: none; }

/* ── Relacionadas y sidebar detalle ── */
.card-relacionada { border: none; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,.1); transition: all .3s ease; height: 100%; }
.card-relacionada:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.15); }
.imagen-relacionada { height: 120px; background: #f8f9fa; position: relative; overflow: hidden; }
.imagen-relacionada img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-detalle { position: sticky; top: 100px; }
.info-adicional { background: white; border-radius: 15px; padding: 2rem; box-shadow: 0 5px 15px rgba(0,0,0,.1); margin-bottom: 2rem; }
.enlace-externo { background: linear-gradient(135deg, #007bff, #0056b3); color: white; padding: 15px 25px; border-radius: 10px; text-decoration: none; display: inline-block; transition: all .3s ease; margin-top: 1rem; }
.enlace-externo:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,123,255,.4); text-decoration: none; color: white; }

/* ── Archivos ── */
.archivo-hero {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  color: white; padding: 4rem 0 3rem; margin-bottom: 3rem;
}
.archivo-hero.hero-green {
  background: linear-gradient(135deg, #087021 0%, #065d1a 100%);
}
.year-stats,
.month-grid,
.categoria-chart,
.year-nav,
.month-nav,
.month-stats {
  background: white; border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,.1);
  padding: 2rem; margin-bottom: 2rem;
}
.year-nav,
.month-nav { padding: 1.5rem; }

.month-card {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 10px; padding: 1.5rem; text-align: center;
  transition: all .3s ease; border: none; text-decoration: none;
  color: #495057; display: block; height: 100%;
}
.month-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.15); text-decoration: none; color: #087021; }
.month-card.has-news { background: linear-gradient(135deg, #087021, #065d1a); color: white; }
.month-card.has-news:hover { color: white; background: linear-gradient(135deg, #065d1a, #054a15); }
.month-name  { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.month-count { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.month-text  { font-size: .9rem; opacity: .8; }

.categoria-bar  { background: #e9ecef; border-radius: 10px; height: 30px; margin-bottom: 1rem; position: relative; overflow: hidden; }
.categoria-fill { height: 100%; border-radius: 10px; display: flex; align-items: center; padding: 0 15px; color: white; font-weight: 600; font-size: .9rem; transition: width .8s ease; }

/* ── Archivo mensual — cards de noticia ── */
.noticia-card { background: white; border-radius: 10px; border: none; transition: all .3s ease; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 1.5rem; }
.noticia-card:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,.1); }
.noticia-imagen { height: 200px; object-fit: cover; border-radius: 10px 10px 0 0; }
.noticia-date  { background: #f8f9fa; border-radius: 5px; padding: .25rem .5rem; font-weight: 600; color: #087021; }

.timeline-divider { position: relative; text-align: center; margin: 2rem 0; }
.timeline-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #e9ecef; z-index: 1; }
.timeline-divider span   { background: white; padding: 0 1rem; color: #6c757d; font-weight: 600; position: relative; z-index: 2; }

/* ── Categoría hero dinámico ── */
.categoria-hero { color: white; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-noticias,
  .archivo-hero   { padding: 2rem 0; }
  .hero-noticia   { padding: 4rem 0 2rem; }
  .contenido-principal { padding: 2rem 1.5rem; }
  .contenido-texto     { font-size: 1rem; }
  .contenido-texto h1  { font-size: 2rem; }
  .contenido-texto h2  { font-size: 1.7rem; }
  .contenido-texto h3  { font-size: 1.4rem; }
  .contenido-texto table  { font-size: .9rem; }
  .contenido-texto th,
  .contenido-texto td     { padding: 8px 10px; }
  .destacada-card .card-imagen { height: 250px; min-height: 250px; }
  .card-imagen    { height: 150px; }
  .sidebar-sticky,
  .sidebar-detalle { position: static; margin-top: 2rem; }
  .filtros-toolbar { padding: 15px; }
  .search-container { max-width: 100%; margin-bottom: 1rem; }
  .year-stats, .month-grid, .categoria-chart,
  .month-stats, .month-nav { padding: 1rem; }
  .month-card     { margin-bottom: 1rem; }
  .noticia-imagen { height: 150px; }
  .noticia-meta   { flex-direction: column; align-items: flex-start; gap: .5rem; }
}


/* ============================================================
   NOTICIAS — ADMIN (panel, form_noticia, categorias, tags,
                     categoria_editar)
   ============================================================ */

.noticias-admin-page { background: #f4f6f8; }

/* ── Wrappers ── */
.admin-wrapper        { max-width: 1500px; margin: 0 auto; padding: 1.5rem 2rem 3rem; }
.form-wrapper         { max-width: 1300px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.admin-cat-wrapper,
.admin-tags-wrapper   { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.admin-cat-edit-wrapper { max-width: 700px; margin: 2rem auto; padding: 1.5rem; }

/* ── Top bars ── */
.admin-topbar,
.form-topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 14px;
  padding: 1.1rem 1.6rem; margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(8,112,33,.09);
  flex-wrap: wrap; gap: .8rem;
}
.admin-topbar h1,
.form-topbar h1 {
  font-size: 1.4rem; font-weight: 800; margin: 0;
  background: linear-gradient(135deg, #087021, #20c997);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; align-items: center; gap: .6rem;
}
.admin-topbar h1  { font-size: 1.6rem; }
.topbar-actions   { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ── Stats row ── */
.stats-row {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 1rem; margin-bottom: 1.5rem; overflow-x: auto;
}
.stat-card {
  background: #fff; border-radius: 14px; padding: 1.2rem 1rem;
  box-shadow: 0 4px 20px rgba(8,112,33,.09); text-align: center;
  transition: all .25s; border-top: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(8,112,33,.14); }
.stat-card .num  { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-card .lbl  { font-size: .78rem; color: #6b7280; font-weight: 600; margin-top: .3rem; text-transform: uppercase; letter-spacing: .5px; }
.sc-total  { border-color: #087021; } .sc-total .num  { color: #087021; }
.sc-pub    { border-color: #20c997; } .sc-pub .num    { color: #20c997; }
.sc-borr   { border-color: #6c757d; } .sc-borr .num   { color: #6c757d; }
.sc-prog   { border-color: #ffc107; } .sc-prog .num   { color: #d97706; }
.sc-arch   { border-color: #adb5bd; } .sc-arch .num   { color: #adb5bd; }
.sc-dest   { border-color: #f59e0b; } .sc-dest .num   { color: #f59e0b; }
.sc-urg    { border-color: #dc3545; } .sc-urg .num    { color: #dc3545; }
.sc-vistas { border-color: #007bff; } .sc-vistas .num { color: #007bff; }

/* ── Grids ── */
.admin-main-grid  { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.admin-cat-grid   { display: grid; grid-template-columns: 1fr 340px; gap: 1.4rem; align-items: start; }
.admin-tags-grid  { display: grid; grid-template-columns: 1fr 300px; gap: 1.4rem; align-items: start; }
.form-grid        { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .admin-main-grid, .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .admin-cat-grid, .admin-tags-grid { grid-template-columns: 1fr; } }

/* ── Cards admin ── */
.admin-card,
.sidebar-card,
.table-card,
.form-card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 4px 20px rgba(8,112,33,.09);
  overflow: hidden; margin-bottom: 1.2rem;
}
.admin-card-header,
.sidebar-header,
.form-card-header {
  padding: .9rem 1.4rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #e5e7eb; font-weight: 700; font-size: .92rem;
  color: #087021; display: flex; align-items: center; gap: .5rem;
  position: relative;
}
.admin-card-header::before,
.sidebar-header::before,
.form-card-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #087021, #20c997);
}
.admin-card-body,
.sidebar-body,
.form-card-body { padding: 1.4rem; }
.sidebar-body   { padding: 1rem 1.2rem; }

/* ── Sidebar panel ── */
.filter-group       { margin-bottom: .9rem; }
.filter-group label { font-size: .78rem; font-weight: 700; color: #374151; margin-bottom: .3rem; display: block; }
.filter-input {
  width: 100%; padding: .45rem .75rem; border-radius: 8px;
  border: 1.5px solid #d1d5db; font-size: .85rem;
  transition: all .25s; background: #fafafa;
}
.filter-input:focus { outline: none; border-color: #087021; background: #fff; box-shadow: 0 0 0 3px rgba(8,112,33,.1); }
.filter-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .5rem; border-radius: 7px; text-decoration: none;
  font-size: .82rem; color: #374151; transition: all .25s; cursor: pointer;
}
.filter-cat-item:hover,
.filter-cat-item.active { background: #e8f5e8; color: #087021; font-weight: 600; }
.filter-cat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.quick-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 9px; text-decoration: none; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; transition: all .25s; }
.ql-cat     { background: rgba(8,112,33,.08);  color: #087021; }
.ql-cat:hover  { background: #087021; color: #fff; }
.ql-tag     { background: rgba(0,123,255,.08); color: #007bff; }
.ql-tag:hover  { background: #007bff; color: #fff; }
.ql-pub     { background: rgba(32,201,151,.1); color: #059669; }
.ql-pub:hover  { background: #059669; color: #fff; }
.ql-nueva   { background: linear-gradient(135deg,#087021,#20c997); color: #fff; box-shadow: 0 4px 12px rgba(8,112,33,.3); }
.ql-nueva:hover { box-shadow: 0 6px 18px rgba(8,112,33,.4); transform: translateY(-2px); color: #fff; }

/* ── Tabla noticias panel ── */
.table-toolbar {
  padding: 1rem 1.4rem; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
}
.search-box-admin {
  flex: 1; min-width: 200px; display: flex; align-items: center;
  background: #f9fafb; border: 1.5px solid #d1d5db; border-radius: 10px; padding: .4rem .8rem; gap: .5rem;
}
.search-box-admin input { border: none; background: transparent; outline: none; font-size: .9rem; width: 100%; }
.search-box-admin i { color: #9ca3af; }

.btn-tbl { padding: .45rem 1rem; border-radius: 8px; border: 1.5px solid; font-size: .82rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; transition: all .25s; }
.btn-tbl-green { border-color: #087021; color: #087021; background: transparent; }
.btn-tbl-green:hover { background: #087021; color: #fff; }
.btn-tbl-red   { border-color: #dc3545; color: #dc3545; background: transparent; }
.btn-tbl-red:hover   { background: #dc3545; color: #fff; }
.btn-tbl-blue  { border-color: #007bff; color: #007bff; background: transparent; }
.btn-tbl-blue:hover  { background: #007bff; color: #fff; }
.btn-tbl-solid { background: linear-gradient(135deg,#087021,#20c997); color: #fff; border-color: transparent; }
.btn-tbl-solid:hover { box-shadow: 0 4px 14px rgba(8,112,33,.35); transform: translateY(-1px); color: #fff; }

.noticias-table { width: 100%; border-collapse: collapse; font-size: .855rem; }
.noticias-table thead th { padding: .75rem 1rem; background: #f8fafc; font-weight: 700; color: #374151; border-bottom: 2px solid #e5e7eb; white-space: nowrap; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
.noticias-table tbody tr { border-bottom: 1px solid #f0f2f5; transition: all .25s; }
.noticias-table tbody tr:hover { background: #f8fff9; }
.noticias-table td { padding: .75rem 1rem; vertical-align: middle; }
.noticia-titulo-cell       { font-weight: 700; color: #1a2332; line-height: 1.3; }
.noticia-titulo-cell small { font-weight: 400; color: #6b7280; font-size: .75rem; display: block; margin-top: .1rem; }

.estado-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 700; white-space: nowrap; cursor: pointer; border: none; }

/* Oposicion cards — badge en desarrollo: rojo */
.oposicion-card .estado-badge:not(.completada) {
  position: absolute; top: 14px; left: 14px; z-index: 10;
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; font-family: 'Syne', sans-serif;
  padding: 6px 14px; border-radius: 50px;
  color: #dc2626; background: rgba(254,242,242,0.97);
  border: 1.5px solid rgba(239,68,68,0.35) !important;
  box-shadow: 0 2px 12px rgba(239,68,68,0.18);
}
/* Oposicion cards — badge completada: azul */
.oposicion-card .estado-badge.completada {
  position: absolute; top: 14px; left: 14px; z-index: 10;
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; font-family: 'Syne', sans-serif;
  padding: 6px 14px; border-radius: 50px;
  color: #1d4ed8; background: rgba(239,246,255,0.97);
  border: 1.5px solid rgba(59,130,246,0.4) !important;
  box-shadow: 0 2px 12px rgba(59,130,246,0.22);
}
.est-publicada  { background: #d1fae5; color: #065f46; }
.est-borrador   { background: #f3f4f6; color: #374151; }
.est-programada { background: #fef3c7; color: #92400e; }
.est-archivada  { background: #e5e7eb; color: #6b7280; }

.tipo-badge        { padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.tipo-noticia      { background: #dbeafe; color: #1e40af; }
.tipo-anuncio      { background: #fce7f3; color: #9d174d; }
.tipo-evento       { background: #ede9fe; color: #5b21b6; }
.tipo-comunicado   { background: #fef3c7; color: #92400e; }
.tipo-actualizacion{ background: #d1fae5; color: #065f46; }

.flag-btn { border: none; background: transparent; cursor: pointer; padding: .2rem .3rem; border-radius: 6px; transition: all .25s; font-size: 1rem; line-height: 1; }
.flag-btn:hover { background: #f3f4f6; }
.flag-on  { filter: saturate(1); }
.flag-off { filter: saturate(0) opacity(.4); }

.act-btn { width: 30px; height: 30px; border-radius: 7px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; transition: all .25s; text-decoration: none; }
.act-edit   { background: rgba(0,123,255,.1); color: #007bff; }
.act-edit:hover   { background: #007bff; color: #fff; }
.act-del    { background: rgba(220,53,69,.1); color: #dc3545; }
.act-del:hover    { background: #dc3545; color: #fff; }
.act-view   { background: rgba(8,112,33,.1); color: #087021; }
.act-view:hover   { background: #087021; color: #fff; }
.act-toggle { background: rgba(8,112,33,.1); color: #087021; }
.act-toggle:hover { background: #087021; color: #fff; }

.check-col input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #087021; }

.estado-dropdown      { position: relative; display: inline-block; }
.estado-dropdown-menu { position: absolute; top: 110%; left: 0; z-index: 999; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .4rem; min-width: 160px; display: none; }
.estado-dropdown:hover .estado-dropdown-menu { display: block; }
.edo-opt { display: block; width: 100%; padding: .45rem .8rem; border: none; background: transparent; text-align: left; font-size: .82rem; cursor: pointer; border-radius: 7px; font-weight: 600; transition: all .25s; }
.edo-opt:hover { background: #f3f4f6; }

.img-mini        { width: 48px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; }
.img-placeholder { width: 48px; height: 34px; background: #f3f4f6; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #d1d5db; font-size: .9rem; }

.bulk-bar { background: linear-gradient(135deg,#1a2332,#2d3a4a); border-radius: 10px; padding: .7rem 1.2rem; display: none; align-items: center; gap: 1rem; color: #fff; font-size: .88rem; flex-wrap: wrap; margin-bottom: .6rem; }
.bulk-bar.visible { display: flex; }
.bulk-select { padding: .3rem .7rem; border-radius: 7px; border: none; font-size: .82rem; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.bulk-select option { background: #fff; color: #1a2332; }
.bulk-apply { padding: .3rem .9rem; border-radius: 7px; border: none; font-weight: 700; background: linear-gradient(135deg,#087021,#20c997); color: #fff; cursor: pointer; font-size: .82rem; transition: all .25s; }
.bulk-apply:hover { box-shadow: 0 3px 10px rgba(8,112,33,.4); }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.4rem; border-top: 1px solid #e5e7eb; font-size: .82rem; color: #6b7280; flex-wrap: wrap; gap: .5rem; }
.page-links    { display: flex; gap: .3rem; }
.page-link-btn { padding: .3rem .65rem; border-radius: 7px; border: 1.5px solid #d1d5db; background: #fff; text-decoration: none; color: #374151; font-size: .82rem; font-weight: 600; transition: all .25s; }
.page-link-btn:hover  { border-color: #087021; color: #087021; }
.page-link-btn.active { background: #087021; border-color: #087021; color: #fff; }

.admin-msg-list { margin-bottom: 1rem; }
.msg-alert  { padding: .75rem 1.2rem; border-radius: 10px; margin-bottom: .5rem; font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: .6rem; }
.msg-success { background: #d1fae5; color: #065f46; }
.msg-warning { background: #fef3c7; color: #92400e; }
.msg-error   { background: #fee2e2; color: #991b1b; }
.msg-info    { background: #dbeafe; color: #1e40af; }

.admin-empty { padding: 4rem 2rem; text-align: center; color: #9ca3af; }
.admin-empty i { font-size: 3.5rem; display: block; margin-bottom: 1rem; }

/* ── Form noticia ── */
.field-group        { margin-bottom: 1.1rem; }
.field-group label  { display: block; font-size: .8rem; font-weight: 700; color: #374151; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .4px; }
.field-group label .req { color: #dc3545; margin-left: .2rem; }
.form-control-modern { width: 100%; padding: .55rem .9rem; border: 1.5px solid #d1d5db; border-radius: 9px; font-size: .9rem; transition: all .25s; background: #fafafa; color: #1a2332; resize: vertical; }
.form-control-modern:focus { outline: none; border-color: #087021; background: #fff; box-shadow: 0 0 0 3px rgba(8,112,33,.12); }
.form-select-modern { width: 100%; padding: .55rem .9rem; border: 1.5px solid #d1d5db; border-radius: 9px; font-size: .9rem; transition: all .25s; background: #fafafa; color: #1a2332; cursor: pointer; }
.form-select-modern:focus { outline: none; border-color: #087021; background: #fff; box-shadow: 0 0 0 3px rgba(8,112,33,.12); }
.field-error { font-size: .78rem; color: #dc3545; margin-top: .3rem; font-weight: 600; }
.field-group.has-error .form-control-modern,
.field-group.has-error .form-select-modern { border-color: #dc3545; background: #fff5f5; }
.char-counter { font-size: .72rem; color: #9ca3af; text-align: right; margin-top: .2rem; }
.editor-hint  { font-size: .75rem; color: #9ca3af; margin-top: .3rem; display: flex; align-items: center; gap: .4rem; }
.form-errors-banner { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 10px; padding: .9rem 1.2rem; margin-bottom: 1rem; font-size: .88rem; color: #991b1b; font-weight: 600; }
select[multiple].form-select-modern { height: auto; min-height: 120px; }

.estado-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.estado-pill  { flex: 1; min-width: 80px; padding: .5rem .4rem; border-radius: 8px; border: 2px solid transparent; cursor: pointer; text-align: center; font-size: .78rem; font-weight: 700; transition: all .25s; background: #f3f4f6; color: #6b7280; }
.estado-pill.sel-publicada  { border-color: #20c997; background: #d1fae5; color: #065f46; }
.estado-pill.sel-borrador   { border-color: #9ca3af; background: #f3f4f6; color: #374151; }
.estado-pill.sel-programada { border-color: #fbbf24; background: #fef3c7; color: #92400e; }
.estado-pill.sel-archivada  { border-color: #adb5bd; background: #e5e7eb; color: #6b7280; }

.tipo-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.tipo-pill  { padding: .35rem .7rem; border-radius: 20px; border: 1.5px solid #d1d5db; cursor: pointer; font-size: .78rem; font-weight: 600; transition: all .25s; background: #fff; color: #6b7280; }
.tipo-pill.active { border-color: #087021; background: #e8f5e8; color: #087021; }

.toggle-row   { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.toggle-label { font-size: .88rem; font-weight: 600; color: #374151; flex: 1; }
.toggle-sub   { font-size: .74rem; color: #9ca3af; display: block; }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 24px; cursor: pointer; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.toggle-switch input:checked + .toggle-slider { background: #087021; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.btn-submit { width: 100%; padding: .85rem; border-radius: 10px; border: none; cursor: pointer; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .6rem; transition: all .25s; }
.btn-primary-submit { background: linear-gradient(135deg, #087021, #20c997); color: #fff; box-shadow: 0 4px 16px rgba(8,112,33,.3); }
.btn-primary-submit:hover { box-shadow: 0 6px 22px rgba(8,112,33,.4); transform: translateY(-1px); }
.btn-secondary-submit { background: #fff; color: #6b7280; border: 1.5px solid #d1d5db; margin-top: .7rem; font-size: .88rem; }
.btn-secondary-submit:hover { border-color: #9ca3af; background: #f9fafb; }

.info-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: .8rem 1rem; font-size: .8rem; color: #065f46; margin-top: .5rem; }
.info-box i { color: #059669; }

.img-preview { width: 100%; border-radius: 9px; border: 2px dashed #d1d5db; min-height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f9fafb; margin-bottom: .6rem; cursor: pointer; transition: all .25s; }
.img-preview:hover { border-color: #087021; background: #e8f5e8; }
.img-preview img { width: 100%; height: 150px; object-fit: cover; border-radius: 7px; }
.img-preview-placeholder { color: #9ca3af; text-align: center; }
.img-preview-placeholder i { font-size: 2rem; display: block; margin-bottom: .3rem; }

/* ── Categorías admin ── */
.cat-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.cat-table thead th { padding: .7rem 1rem; background: #f8fafc; font-weight: 700; color: #374151; border-bottom: 2px solid #e5e7eb; text-transform: uppercase; font-size: .75rem; letter-spacing: .4px; }
.cat-table tbody tr { border-bottom: 1px solid #f0f2f5; transition: all .25s; }
.cat-table tbody tr:hover { background: #f8fff9; }
.cat-table td  { padding: .75rem 1rem; vertical-align: middle; }
.cat-name      { font-weight: 700; color: #1a2332; display: flex; align-items: center; gap: .6rem; }
.cat-dot       { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(0,0,0,.08); }
.cat-count     { font-weight: 800; color: #374151; font-size: .95rem; }
.badge-activa  { background: #d1fae5; color: #065f46; padding: .2rem .6rem; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.badge-inactiva{ background: #f3f4f6; color: #6b7280; padding: .2rem .6rem; border-radius: 20px; font-size: .74rem; font-weight: 700; }

/* ── Tags cloud ── */
.tags-cloud { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.2rem; }
.tag-chip   { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 20px; font-size: .82rem; font-weight: 700; border: 2px solid transparent; transition: all .25s; }
.tag-chip .chip-count { background: rgba(0,0,0,.12); padding: .05rem .4rem; border-radius: 10px; font-size: .72rem; font-weight: 800; }
.tag-del { width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer; background: rgba(0,0,0,.15); color: inherit; font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; transition: all .25s; line-height: 1; }
.tag-del:hover { background: rgba(220,53,69,.8); color: #fff; }

/* ── Campos admin compartidos ── */
.admin-field-group        { margin-bottom: 1rem; }
.admin-field-group label  { display: block; font-size: .78rem; font-weight: 700; color: #374151; margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .4px; }
.admin-field-input { width: 100%; padding: .5rem .85rem; border: 1.5px solid #d1d5db; border-radius: 9px; font-size: .88rem; transition: all .25s; background: #fafafa; }
.admin-field-input:focus { outline: none; border-color: #087021; background: #fff; box-shadow: 0 0 0 3px rgba(8,112,33,.12); }
.admin-btn-submit { width: 100%; padding: .8rem; border-radius: 10px; border: none; cursor: pointer; font-size: .92rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .6rem; transition: all .25s; background: linear-gradient(135deg, #087021, #20c997); color: #fff; box-shadow: 0 4px 14px rgba(8,112,33,.3); }
.admin-btn-submit:hover { box-shadow: 0 6px 20px rgba(8,112,33,.4); transform: translateY(-1px); }
.color-row         { display: flex; align-items: center; gap: .8rem; }
.color-preview-box { width: 36px; height: 36px; border-radius: 8px; border: 2px solid #e5e7eb; flex-shrink: 0; }
.cat-edit-topbar   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.cat-edit-topbar h2 { font-weight: 800; color: #087021; margin: 0; display: flex; align-items: center; gap: .5rem; }

/* ── Panel override ── */
.noticias-admin-page .universal-content   { padding: 0 !important; }
.noticias-admin-page .universal-container { max-width: none !important; padding: 0 !important; margin: 0 !important; width: 100% !important; }


/* ============================================================
   OPOSICIONES LANDING — CARD REDESIGN COMPLETO v2
   Scope: .oposicion-card — no afecta otras páginas
   ============================================================ */

/* — Grid — */
.oposiciones-section .oposiciones-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 24px !important;
}

/* — Card base — */
div.oposicion-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  padding: 0 !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04) !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), box-shadow 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: unset !important;
}

div.oposicion-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.06) !important;
  border-color: rgba(0,0,0,0.1) !important;
}

/* — Franja de color top — */
div.oposicion-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0; right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #087021 0%, #22c55e 100%) !important;
  transform: none !important;
  border-radius: 0 !important;
}
div.oposicion-card:has(> div.estado-badge.completada)::before {
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 50%, #60a5fa 100%) !important;
}

/* — Zona superior con icono y título — */
div.oposicion-card .card-header-content {
  padding: 36px 28px 20px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

/* — Icono — */
div.oposicion-card .oposicion-icon {
  width: 64px !important;
  height: 64px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 18px !important;
  transition: transform 0.3s ease !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  font-size: 0 !important; /* reset */
}
div.oposicion-card .oposicion-icon i {
  font-size: 1.8rem !important;
  background: linear-gradient(135deg, #087021 0%, #22c55e 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
div.oposicion-card:hover .oposicion-icon {
  transform: scale(1.08) rotate(-3deg) !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .oposicion-icon {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .oposicion-icon i {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* — Título — */
div.oposicion-card .oposicion-title {
  font-family: 'Syne', sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin-bottom: 6px !important;
  min-height: unset !important;
  display: block !important;
}

/* — Organismo — */
div.oposicion-card .oposicion-organismo {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  color: #087021 !important;
  margin-bottom: 0 !important;
  min-height: unset !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .oposicion-organismo {
  color: #2563eb !important;
}

/* — Divisor — */
div.oposicion-card .card-body-content {
  padding: 0 28px 0 !important;
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* — Descripción — */
div.oposicion-card .oposicion-description {
  font-size: 0.88rem !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin-bottom: 20px !important;
  min-height: unset !important;
  flex-grow: 0 !important;
  padding-top: 16px !important;
  border-top: 1px solid #f1f5f9 !important;
}

/* — Stats — */
div.oposicion-card .oposicion-stats {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  margin-bottom: 20px !important;
  padding: 14px 16px !important;
  background: #f8fafc !important;
  border-radius: 12px !important;
  border: 1px solid #f1f5f9 !important;
  flex-shrink: 0 !important;
}

div.oposicion-card .stat {
  flex: 1 !important;
  text-align: center !important;
}

div.oposicion-card .stat-divider {
  width: 1px !important;
  height: 32px !important;
  background: #e2e8f0 !important;
  flex-shrink: 0 !important;
}

div.oposicion-card .stat-value {
  font-family: 'Syne', sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #087021 !important;
  display: block !important;
  background: none !important;
  -webkit-text-fill-color: #087021 !important;
  line-height: 1.2 !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .stat-value {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}

div.oposicion-card .stat-text {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-top: 2px !important;
}

/* — Stats en completada — */
div.oposicion-card:has(> div.estado-badge.completada) .oposicion-stats {
  background: #eff6ff !important;
  border-color: #dbeafe !important;
}

/* — Footer / botón — */
div.oposicion-card .card-footer-content {
  padding: 0 28px 24px !important;
  flex-shrink: 0 !important;
  margin-top: 0 !important;
}

div.oposicion-card .btn-empezar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 13px 24px !important;
  border-radius: 12px !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  background: linear-gradient(135deg, #087021 0%, #16a34a 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(8,112,33,0.3) !important;
  transition: all 0.25s ease !important;
  min-width: unset !important;
  align-self: unset !important;
  overflow: hidden !important;
}
div.oposicion-card .btn-empezar:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(8,112,33,0.4) !important;
  color: #ffffff !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .btn-empezar {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35) !important;
}
div.oposicion-card:has(> div.estado-badge.completada) .btn-empezar:hover {
  box-shadow: 0 8px 24px rgba(37,99,235,0.5) !important;
}

