:root {
  --primary-navy: #07162c;
  --primary-navy-deep: #050f1d;
  --secondary-blue: #0e3868;
  --accent-cyan: #00b4d8;
  --accent-cyan-bright: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.4);
  --alert-red: #dc2626;
  --alert-red-glow: rgba(220, 38, 38, 0.4);
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --bg-light: #f8fafc;
  --surface-white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Sombras multicapa profesionales y elevación ambient */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(11, 34, 64, 0.08), 0 1px 2px rgba(11, 34, 64, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(11, 34, 64, 0.08), 0 2px 6px -1px rgba(11, 34, 64, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(11, 34, 64, 0.12), 0 6px 14px -2px rgba(11, 34, 64, 0.06);
  --shadow-xl: 0 20px 35px -5px rgba(11, 34, 64, 0.18), 0 10px 18px -4px rgba(11, 34, 64, 0.08);
  --shadow-card-hover: 0 16px 36px -4px rgba(11, 34, 64, 0.14), 0 6px 12px -2px rgba(11, 34, 64, 0.06);
  --shadow-glow-cyan: 0 0 24px rgba(0, 240, 255, 0.45);
  
  /* Curvas de aceleración y micro-interacciones */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.18s var(--ease-spring);
  --transition-smooth: 0.28s var(--ease-spring);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Enlace accesible para saltar directo al contenido principal (WCAG 2.1 AA) */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1.5rem;
  background: var(--accent-cyan-bright);
  color: #07162c !important;
  font-weight: 800;
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  z-index: 999999;
  text-decoration: none;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
  transition: top 0.2s var(--ease-spring);
  border: 2px solid #07162c;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
}

/* Foco de accesibilidad de alto contraste para navegación por teclado */
:focus-visible {
  outline: 2.5px solid var(--accent-cyan);
  outline-offset: 3px;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Top Bar */
.top-header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-bottom: 3px solid var(--accent-cyan);
}

.top-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-link:hover {
  opacity: 0.98;
  transform: translateY(-1px);
}

/* Badge circular de alto contraste institucional para el logotipo UICDI */
.brand-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: #ffffff;
  border-radius: 50%;
  padding: 4px;
  border: 2.5px solid #00d4ff;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.75), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  flex-shrink: 0;
}

.brand-link:hover .brand-logo-badge,
.brand-logo-badge:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.brand-logo-main {
  height: 100%;
  width: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Centrado explícito de los textos de los títulos de la cabecera */
.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand-text h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  text-align: center;
}

.brand-text h1 span {
  color: var(--accent-cyan);
}

.brand-text p {
  font-size: 0.82rem;
  color: #e2e8f0;
  text-align: center;
  margin: 3px 0 0 0;
  max-width: 520px;
  line-height: 1.35;
}

.institutional-badges {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.badge-logo {
  height: 40px;
  width: auto;
  background: transparent;
  padding: 0;
  border-radius: 4px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  object-fit: contain;
}

.badge-logo:hover {
  transform: scale(1.18) translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.6));
}

/* ==============================================================================
   NAVEGACIÓN PRINCIPAL (FROSTED GLASS & RESPONSIVE DRAWER)
   ============================================================================== */
.main-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 15px rgba(11, 34, 64, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.5rem;
  position: relative;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.95rem;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease-spring);
}

.nav-link:hover {
  color: var(--secondary-blue);
  background: rgba(14, 56, 104, 0.07);
  border-color: rgba(14, 56, 104, 0.15);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--primary-navy);
  background: rgba(0, 180, 216, 0.12);
  border-color: rgba(0, 180, 216, 0.4);
  box-shadow: 0 2px 8px rgba(0, 180, 216, 0.15);
}

.nav-link.alert-link {
  color: var(--alert-red);
}

.nav-link.alert-link:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #b91c1c;
}

.nav-link.alert-link.active {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.18);
}

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

/* Botón Hamburguesa Accesible para Dispositivos Móviles */
.mobile-nav-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.mobile-nav-toggle:hover {
  background: #f1f5f9;
  border-color: var(--accent-cyan);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--primary-navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Container Principal */
.main-container {
  max-width: 1200px;
  margin: 1.75rem auto 3rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

/* ==============================================================================
   HERO BANNER CIBERNÉTICO (CYBER COMMAND & SEGURIDAD SOBERANA)
   ============================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #07162c 0%, #0d274c 50%, #081d38 100%);
  background-image:
    radial-gradient(rgba(0, 240, 255, 0.14) 1px, transparent 1px),
    linear-gradient(135deg, #07162c 0%, #0d274c 50%, #081d38 100%);
  background-size: 24px 24px, 100% 100%;
  border-radius: 18px;
  padding: 2.75rem 2.5rem;
  box-shadow: 0 16px 36px -4px rgba(7, 22, 44, 0.35), 0 0 0 1px rgba(0, 240, 255, 0.22);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.16) 0%, transparent 68%);
  pointer-events: none;
  border-radius: 50%;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1 1 540px;
}

.hero-live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.beacon-pulse {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: beaconPulseAnim 1.8s infinite;
}

@keyframes beaconPulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-text h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

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

.hero-subtitle {
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 0;
}

.hero-subtitle strong {
  color: #38bdf8;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 250px;
  position: relative;
  z-index: 1;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 4px 18px rgba(0, 180, 216, 0.4);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.96rem;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.55);
  background: linear-gradient(135deg, #00c4ea 0%, #0087cf 100%);
}

.btn-hero-alert {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid rgba(254, 202, 202, 0.4);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.96rem;
}

.btn-hero-alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.55);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Grilla de Métricas de Garantía y Confianza Institucional */
.hero-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-trust-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(0, 240, 255, 0.3);
}

.hero-trust-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.hero-trust-info strong {
  display: block;
  font-size: 0.85rem;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.hero-trust-info span {
  display: block;
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* ==============================================================================
   TARJETAS Y CUADRÍCULAS (ELEVACIÓN DINÁMICA & PEDESTALES)
   ============================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0, 180, 216, 0.35);
}

.card-pillar-1 { border-top: 4px solid var(--secondary-blue); }
.card-pillar-2 { border-top: 4px solid var(--alert-red); }
.card-pillar-3 { border-top: 4px solid var(--accent-cyan); }

/* Pedestal luminoso para iconos de tarjetas */
.card-icon-pedestal {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 1.15rem;
  background: rgba(11, 34, 64, 0.04);
  border: 1px solid rgba(11, 34, 64, 0.08);
  transition: transform 0.25s var(--ease-bounce), background 0.25s ease, border-color 0.25s ease;
}

.card:hover .card-icon-pedestal {
  transform: scale(1.1) rotate(3deg);
  background: rgba(0, 180, 216, 0.1);
  border-color: rgba(0, 180, 216, 0.3);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ==============================================================================
   BOTONES Y CONTROLES INTERACTIVOS
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.93rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
  box-shadow: var(--shadow-xs);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary-navy);
  color: white !important;
}

.btn-primary:hover {
  background: var(--secondary-blue);
  box-shadow: 0 4px 12px rgba(7, 22, 44, 0.25);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--alert-red);
  color: white !important;
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--secondary-blue);
  color: var(--secondary-blue) !important;
}

.btn-outline:hover {
  background: rgba(14, 56, 104, 0.08);
  border-color: var(--primary-navy);
  color: var(--primary-navy) !important;
  transform: translateY(-1px);
}
.btn-outline:hover {
  background: rgba(19, 64, 116, 0.08);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
}

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

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.15);
}

/* Case Tracking Box */
.tracking-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  position: relative;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.timeline-step.active .step-circle {
  background: var(--accent-cyan);
  color: white;
}

.timeline-step.passed .step-circle {
  background: var(--success-green);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-step.active .step-label {
  color: var(--primary-navy);
  font-weight: 700;
}

/* Floating Chatbot */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.2s;
  border: 2px solid var(--accent-cyan);
}

.chat-launcher:hover {
  transform: scale(1.08);
}

.chat-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 370px;
  height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.chat-header {
  background: var(--primary-navy);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f1f5f9;
}

.chat-msg {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  max-width: 82%;
  line-height: 1.4;
}

.chat-msg.bot {
  background: white;
  align-self: flex-start;
  border: 1px solid var(--border-color);
}

.chat-msg.user {
  background: var(--primary-navy);
  color: white;
  align-self: flex-end;
}

.chat-input-bar {
  display: flex;
  padding: 0.75rem;
  background: white;
  border-top: 1px solid var(--border-color);
  gap: 0.5rem;
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem;
  font-size: 0.85rem;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand h4 {
  color: white;
  margin-bottom: 0.35rem;
}

/* Telemetría Pública de Visitantes en Footer */
.footer-telemetry-card {
  max-width: 1200px;
  margin: 0 auto 1.5rem auto;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(7, 22, 44, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.telemetry-live-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  animation: telemetryPulse 1.8s infinite;
}

@keyframes telemetryPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.telemetry-badge-secure {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

.telemetry-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
}

.telemetry-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.telemetry-value {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.telemetry-pulse-text {
  animation: blinkText 1.5s infinite;
  color: #cbd5e1;
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.telemetry-legal-notice {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  line-height: 1.45;
}

/* =========================================================
   ESTILOS PORTAL INSTITUCIONAL UICDI / DPI (ADMINISTRACIÓN)
   ========================================================= */

.admin-header {
  background: linear-gradient(135deg, #07162c 0%, #0b2240 100%);
  color: white;
  padding: 0.85rem 2rem;
  border-bottom: 3px solid #ffd166;
}

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

.admin-badge-restricted {
  background: rgba(255, 209, 102, 0.15);
  color: #ffd166;
  border: 1px solid #ffd166;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-nav-bar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.admin-tabs {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.admin-tab-btn {
  padding: 1rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.admin-tab-btn:hover {
  color: var(--secondary-blue);
  background: #f8fafc;
}

.admin-tab-btn.active {
  color: var(--primary-navy);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 168, 204, 0.05);
}

.admin-container {
  max-width: 1400px;
  margin: 1.5rem auto 3rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-cyan);
}

.kpi-card.kpi-urgent::before {
  background: var(--alert-red);
}

.kpi-card.kpi-success::before {
  background: var(--success-green);
}

.kpi-card.kpi-warning::before {
  background: #e76f51;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.kpi-card.kpi-urgent .kpi-value {
  color: var(--alert-red);
}

.kpi-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Urgent Alert Banner */
.urgent-banner {
  background: linear-gradient(90deg, #d62828 0%, #b71c1c 100%);
  color: white;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(214, 40, 40, 0.25);
}

.urgent-banner-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Data Table */
.table-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: #fbfcfd;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-table th {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--primary-navy);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

/* Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-recibido { background: #e0f2fe; color: #0369a1; }
.badge-revision { background: #fef3c7; color: #b45309; }
.badge-gestion { background: #e0e7ff; color: #4338ca; }
.badge-requiere { background: #fee2e2; color: #b91c1c; }
.badge-canalizado { background: #f3e8ff; color: #7e22ce; }
.badge-finalizado { background: #dcfce7; color: #15803d; }

.badge-masi-tag {
  background: rgba(214, 40, 40, 0.12);
  color: var(--alert-red);
  font-weight: bold;
  border: 1px solid var(--alert-red);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
}

.badge-cyber-tag {
  background: rgba(19, 64, 116, 0.1);
  color: var(--secondary-blue);
  font-weight: 600;
  border: 1px solid rgba(19, 64, 116, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
}

/* Investigation Detail View */
.investigation-panel {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-navy);
}

.notes-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #78350f;
}

/* Modal Wide for Admin Detail */
.modal-content.modal-wide {
  max-width: 820px;
}

/* Prioridades y Asignación de Casos */
.badge-priority-urgente {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  border: 1px solid #f87171;
}

.badge-priority-alta {
  background: #ffedd5;
  color: #9a3412;
  font-weight: 700;
  border: 1px solid #fb923c;
}

.badge-priority-media {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  border: 1px solid #7dd3fc;
}

.badge-mode-auto {
  background: #ede9fe;
  color: #6b21a8;
  font-weight: 600;
  border: 1px solid #c4b5fd;
}

.badge-mode-manual {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  border: 1px solid #cbd5e1;
}

/* Badges de Roles Institucionales */
.badge-role-super {
  background: #1e1b4b;
  color: #facc15;
  font-weight: 700;
  border: 1px solid #eab308;
}

.badge-role-investigator {
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
  border: 1px solid #38bdf8;
}

.badge-role-triage {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  border: 1px solid #f59e0b;
}

.badge-role-catalog {
  background: #ccfbf1;
  color: #115e59;
  font-weight: 600;
  border: 1px solid #2dd4bf;
}

.badge-role-citizen {
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
}

/* Línea de Tiempo del Expediente (Timeline) */
.timeline-container {
  position: relative;
  padding-left: 28px;
  margin: 1rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--secondary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px white;
}

.timeline-dot.dot-urgent { border-color: var(--alert-red); background: #fee2e2; }
.timeline-dot.dot-success { border-color: #10b981; background: #dcfce7; }
.timeline-dot.dot-warning { border-color: #f59e0b; background: #fef3c7; }

.timeline-content {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-navy);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.timeline-body {
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Chatbot IA Avanzado y Banner Institucional */
.chat-alert-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fef3c7;
  color: #92400e;
  font-size: 0.73rem;
  padding: 6px 12px;
  line-height: 1.35;
  border-left: 4px solid #f59e0b;
}

.chat-chips-bar {
  padding: 6px 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.chat-chips-bar::-webkit-scrollbar {
  height: 4px;
}

.chat-chips-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chat-chip {
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  color: var(--secondary-blue);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-chip:hover {
  background: #e0f2fe;
  border-color: var(--accent-cyan);
  color: var(--primary-navy);
}

.chat-msg.bot h3 {
  font-size: 0.92rem;
  color: var(--primary-navy);
  margin-bottom: 6px;
}

.chat-msg.bot p {
  margin-bottom: 6px;
}

.chat-msg.bot hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 8px 0;
}

.chat-msg-dpi-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 0.8rem;
}

/* Leaflet Map & DPI Stations Styling */
#dpi-leaflet-map {
  z-index: 10;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 12px 14px;
}

.dpi-popup-title {
  font-weight: 800;
  color: var(--primary-navy);
  font-size: 0.95rem;
  margin-bottom: 4px;
  border-bottom: 1.5px solid var(--accent-cyan);
  padding-bottom: 3px;
}

.dpi-popup-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dpi-popup-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: var(--primary-navy);
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dpi-card {
  border-top: 4px solid var(--secondary-blue);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.dpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 0.5rem;
}

.dpi-card-dept {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.dpi-card-type {
  font-size: 0.7rem;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #475569;
}

.dpi-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Guía Táctica Pericial para Investigadores */
.tactical-guidance-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.tactical-step-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.tactical-step-num {
  background: #2563eb;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.tactical-badge-category {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

/* ==========================================================================
   Interactive File Dropzone & Image Previews (Evidencias y Capturas)
   ========================================================================== */
.file-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  user-select: none;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 168, 204, 0.06);
  box-shadow: 0 0 16px rgba(0, 168, 204, 0.2);
  transform: translateY(-1px);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.preview-item {
  position: relative;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-item:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.preview-item img {
  width: 100%;
  height: 85px;
  object-fit: cover;
  display: block;
}

.preview-item-info {
  padding: 4px 6px;
  font-size: 0.68rem;
  color: var(--text-dark);
  background: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid #e2e8f0;
}

.preview-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35);
  transition: background 0.2s, transform 0.15s;
}

.preview-remove-btn:hover {
  background: #b91c1c;
  transform: scale(1.1);
}

/* Lightbox Modal para visualización de evidencias forenses */
.evidence-lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 25, 44, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.evidence-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border: 2px solid rgba(255,255,255,0.2);
}

.evidence-lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: white;
  font-size: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.evidence-lightbox-close:hover {
  transform: scale(1.2);
  color: #38bdf8;
}

/* ==============================================================================
   AVISO LEGAL Y TIPIFICACIÓN PENAL (ARTS. 526 Y 527 CÓDIGO PENAL DE HONDURAS)
   ============================================================================== */
.legal-penalty-banner {
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
  border: 1.5px solid #f87171;
  border-left: 6px solid #dc2626;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 1.25rem 0;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.legal-penalty-banner .legal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #991b1b;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.legal-penalty-banner p {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #7f1d1d;
  margin-bottom: 8px;
}

.legal-penalty-banner .legal-articles {
  background: white;
  border: 1px dashed #fca5a5;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}

.legal-checkbox-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 1rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.legal-checkbox-card:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.legal-checkbox-card label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #1e293b;
  cursor: pointer;
  line-height: 1.4;
}

.legal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid #fca5a5;
}

/* ==============================================================================
   CARRUSEL DE NOTICIAS DE MEDIOS DE COMUNICACIÓN DE HONDURAS (IA)
   ============================================================================== */
.news-carousel-section {
  margin-top: 3.5rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.6) 0%, rgba(255, 255, 255, 1) 100%);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.news-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ai-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.ai-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: white;
  color: var(--primary-navy);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
  background: var(--primary-navy);
  color: white;
  border-color: var(--primary-navy);
  transform: translateY(-2px);
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  gap: 1.25rem;
}

.carousel-slide {
  flex: 0 0 calc(33.333% - 0.85rem);
  min-width: 280px;
}

@media (max-width: 992px) {
  .carousel-slide {
    flex: 0 0 calc(50% - 0.65rem);
  }
}

@media (max-width: 640px) {
  .carousel-slide {
    flex: 0 0 100%;
  }
}

.news-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-cyan);
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.news-media-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.news-detained-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.news-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-summary {
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  background: var(--secondary-blue);
  width: 24px;
  border-radius: 12px;
}

/* ==============================================================================
   MÓDULO DE PREVENCIÓN Y MODUS OPERANDI EN TENDENCIA (IA)
   ============================================================================== */
.prevention-section {
  margin-top: 3.5rem;
}

.threat-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.threat-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.threat-filter-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.threat-filter-btn.active {
  background: var(--primary-navy);
  color: white;
  border-color: var(--primary-navy);
  box-shadow: 0 2px 6px rgba(11, 34, 64, 0.25);
}

.threat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.threat-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.threat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.threat-card.risk-critico { border-top: 5px solid #dc2626; }
.threat-card.risk-alto { border-top: 5px solid #f97316; }
.threat-card.risk-medio { border-top: 5px solid #eab308; }

.threat-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.risk-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.risk-pill.critico { background: #fee2e2; color: #991b1b; }
.risk-pill.alto { background: #ffedd5; color: #9a3412; }
.risk-pill.medio { background: #fef9c3; color: #854d0e; }

.threat-trend-score {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0284c7;
  display: flex;
  align-items: center;
  gap: 4px;
}

.threat-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.threat-platforms {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.threat-block {
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.threat-block-label {
  font-weight: 700;
  font-size: 0.78rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.threat-red-flags {
  background: #fff8f8;
  border: 1px solid #fee2e2;
  border-radius: 6px;
  padding: 8px 10px;
  color: #7f1d1d;
  white-space: pre-line;
  font-size: 0.8rem;
}

.threat-tips {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 10px;
  color: #14532d;
  white-space: pre-line;
  font-size: 0.8rem;
}

.threat-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==============================================================================
   PANEL ADMIN: SUPERVISIÓN Y ASIGNACIÓN DE AGENTES
   ============================================================================== */
.supervision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.agent-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.agent-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
}

.agent-info h4 {
  font-size: 0.95rem;
  color: var(--primary-navy);
  margin: 0;
}

.agent-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.workload-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.workload-badge.optima { background: #dcfce7; color: #166534; }
.workload-badge.moderada { background: #fef9c3; color: #854d0e; }
.workload-badge.saturada { background: #fee2e2; color: #991b1b; }

.agent-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1rem;
}

.agent-metric-item .val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.agent-metric-item .lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==============================================================================
   PANEL ADMIN: MÓDULO DE REPORTERÍA GERENCIAL CON GRÁFICOS Y PDF
   ============================================================================== */
.report-sheet-container {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  position: relative;
}

.report-official-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-navy);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-header-logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-header-logos img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.report-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.75rem 0;
}

@media (max-width: 860px) {
  .report-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
}

.chart-card-box h4 {
  font-size: 0.9rem;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-canvas-wrapper {
  position: relative;
  height: 240px;
  width: 100%;
}

.report-narrative-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
}

.report-footer-seal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px dashed #cbd5e1;
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.78rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==============================================================================
   CENTRO DE CIBERSEGURIDAD, SOC Y RESPALDOS FORENSES
   ============================================================================== */
.soc-header-banner {
  background: linear-gradient(135deg, #0b192c 0%, #1e293b 60%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.soc-header-banner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.soc-pulse-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: soc-radar 2s infinite;
}

@keyframes soc-radar {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.soc-shield-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.soc-status-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.soc-hardening-score-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  text-align: center;
  min-width: 190px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.soc-subtab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.soc-subtab-btn:hover {
  background: #e2e8f0;
  color: var(--primary-navy);
}

.soc-subtab-btn.active {
  background: var(--primary-navy);
  color: white;
  border-color: var(--primary-navy);
  box-shadow: 0 4px 10px rgba(11, 34, 64, 0.2);
}

.badge-critico {
  background: #dc2626;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-block;
}

.badge-alto {
  background: #ea580c;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-block;
}

.badge-medio {
  background: #2563eb;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-block;
}

.badge-info {
  background: #64748b;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-block;
}

.badge-status-activa {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-status-resuelta {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid #86efac;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-status-descartada {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.72rem;
}

.backup-action-card {
  background: white;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.backup-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* ==============================================================================
   POLÍTICA DE GALLETAS INFORMÁTICAS (COOKIES) Y CONSENTIMIENTO
   ============================================================================== */
.cookie-banner-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: rgba(11, 34, 64, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 3px solid var(--accent-cyan);
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.45);
  padding: 1.2rem 1.75rem;
  color: #f1f5f9;
}

.cookie-banner-visible {
  animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-banner-hiding {
  animation: cookieSlideDown 0.35s ease forwards;
}

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

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

.cookie-banner-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 540px;
}

.cookie-banner-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  color: #38bdf8;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.cookie-badge-law {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-banner-text p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #38bdf8;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.86rem;
}

.btn-cookie-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.5);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-cookie-necessary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0 !important;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.86rem;
}

.btn-cookie-necessary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-cookie-config {
  background: transparent;
  color: #7dd3fc !important;
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px dashed rgba(125, 211, 252, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.86rem;
}

.btn-cookie-config:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
}

.cookie-banner-link {
  color: #94a3b8;
  font-size: 0.82rem;
  text-decoration: underline;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.cookie-banner-link:hover {
  color: #38bdf8;
}

/* Modal de Cookies */
.cookie-modal-content {
  max-width: 650px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
}

.cookie-modal-body {
  padding: 1rem 0;
}

.cookie-cat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s ease;
}

.cookie-cat-card:hover {
  border-color: #cbd5e1;
}

.cookie-cat-disabled {
  background: #fdf2f2;
  border-color: #fecaca;
  opacity: 0.85;
}

.cookie-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-cat-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-badge-req {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.cookie-badge-opt {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.cookie-badge-prohibited {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.cookie-cat-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 0.35rem;
}

/* Switch Styles */
.cookie-switch-wrap {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-switch-label::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-switch-input:checked + .cookie-switch-label {
  background-color: #0284c7;
}

.cookie-switch-input:checked + .cookie-switch-label::before {
  transform: translateX(20px);
}

.cookie-switch-label.disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* ==============================================================================
   FORMULARIOS Y MODALES: ENFOQUE Y ANIMACIONES MODERNAS
   ============================================================================== */
.form-control {
  transition: border-color 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.22);
}

.modal-content {
  animation: modalPopIn 0.28s var(--ease-spring) forwards;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==============================================================================
   RESPONSIVIDAD: NAVEGACIÓN MÓVIL, HERO Y COMPONENTES
   ============================================================================== */
@media (max-width: 980px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 2px solid var(--accent-cyan);
    box-shadow: 0 16px 32px rgba(7, 22, 44, 0.16);
    flex-direction: column;
    align-items: stretch;
    padding: 1.1rem 1.5rem;
    gap: 0.4rem;
    animation: navDrawerSlide 0.25s var(--ease-spring) forwards;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    justify-content: flex-start;
  }

  .hero-banner {
    padding: 2.25rem 1.75rem;
  }

  .hero-buttons {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn-hero-primary, .btn-hero-alert {
    flex: 1 1 240px;
  }
}

@keyframes navDrawerSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0.75rem 1rem;
  }

  .top-bar-content {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem;
  }

  .brand-section {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }

  .brand-logo-badge {
    width: 64px;
    height: 64px;
  }

  .brand-text h1 {
    font-size: 1.45rem;
  }

  .brand-text p {
    font-size: 0.78rem;
  }

  .institutional-badges {
    justify-content: center;
    gap: 0.65rem;
    padding: 5px 12px;
  }

  .badge-logo {
    height: 34px;
  }

  .main-container {
    padding: 0 1rem;
    margin-top: 1.25rem;
    margin-bottom: 2rem;
  }

  .hero-banner {
    padding: 1.75rem 1.25rem;
    border-radius: 14px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn-hero-primary, .btn-hero-alert {
    width: 100%;
  }

  .hero-trust-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .chat-window {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 80px;
    height: 480px;
  }

  .modal-content {
    width: 95%;
    padding: 1.25rem;
    margin: 1.5rem auto;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner-actions {
    justify-content: flex-start;
  }
}

/* ==============================================================================
   RENDIMIENTO: CONTENT-VISIBILITY PARA FLUIDEZ A 60 FPS
   ============================================================================== */
.news-carousel-section,
.prevention-section,
#guias-prevencion,
#mapa-dpi,
#canales-seccion,
footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

/* ==============================================================================
   ACCESIBILIDAD Y REDUCCIÓN DE MOVIMIENTO (PREFERS-REDUCED-MOTION)
   ============================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .telemetry-live-dot, .beacon-pulse, .ai-pulse-dot {
    animation: none !important;
  }
}

/* ==============================================================================
   ESTÁNDAR DE IMPRESIÓN OFICIAL (EXPEDIENTES Y DOSSIERS PERICIALES)
   ============================================================================== */
@media print {
  .skip-link,
  .top-header,
  .main-nav,
  .hero-buttons,
  .hero-trust-grid,
  .hero-live-beacon,
  .chat-launcher,
  .chat-window,
  .cookie-banner-container,
  #modal-cookie-settings,
  .carousel-controls,
  .carousel-dots,
  #btn-sync-news,
  #btn-sync-prevention,
  #btn-find-my-dpi,
  .threat-filter-bar,
  .btn,
  .nav-actions {
    display: none !important;
  }

  body, .main-container {
    background: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11pt;
  }

  .card, .news-card, .threat-card {
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  .hero-banner {
    background: none !important;
    color: black !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
    padding: 1rem !important;
  }

  .hero-text h2, .hero-subtitle {
    color: black !important;
    -webkit-text-fill-color: black !important;
  }

  a {
    text-decoration: none !important;
    color: black !important;
  }
}





