/* ==========================================================================
   AVISO DE PRIVACIDAD INTEGRAL - RECLUTAMIENTO4-0.COM
   Paleta de Colores Oficial: Azul Marino Oscuro, Naranja Vibrante y Blanco
   Diseñado para Máxima Legibilidad, Accesibilidad y Elegancia Corporativa
   ========================================================================== */

/* --- VARIABLES Y SISTEMA DE DISEÑO --- */
:root {
  /* Paleta Base: Azul Marino Profundo (Logo) */
  --bg-primary: #051329;
  --bg-secondary: #0A1C38;
  --bg-card: #0F254B;
  --bg-card-hover: #14305E;
  --bg-surface: #071731;
  --bg-input: #0A1E3E;
  
  /* Acentos de Color: Naranja Corporativo (Logo Reclutamiento 4.0) */
  --brand-orange: #FF390C;
  --brand-orange-hover: #E02E04;
  --brand-orange-light: #FF5A36;
  --brand-orange-subtle: rgba(255, 57, 12, 0.12);
  --brand-orange-glow: rgba(255, 57, 12, 0.28);
  --brand-orange-border: rgba(255, 57, 12, 0.35);

  /* Texto y Contrastes - Modo Oscuro */
  --text-primary: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  /* Bordes y Líneas */
  --border-subtle: #1B355F;
  --border-focus: var(--brand-orange);
  
  /* Indicadores y Estados */
  --badge-bg: rgba(255, 57, 12, 0.15);
  --badge-text: #FF6E4D;
  --callout-bg: rgba(15, 37, 75, 0.7);
  --callout-border: #FF390C;
  
  /* Tipografía */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Escala de texto base */
  --body-font-size: 16.5px;
  --line-height-body: 1.75;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-orange: 0 8px 25px rgba(255, 57, 12, 0.28);
  
  /* Bordes redondeados */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- TEMA CLARO (LECTURA CÓMODA) --- */
body.light-theme {
  --bg-primary: #F4F7FB;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-surface: #E8EEF5;
  --bg-input: #FFFFFF;
  
  --text-primary: #0A1C38;
  --text-secondary: #1E293B;
  --text-muted: #475569;
  --text-dim: #64748B;
  
  --border-subtle: #D8E2EC;
  --badge-bg: rgba(255, 57, 12, 0.1);
  --badge-text: #D92B00;
  --callout-bg: #FFF5F2;
  --callout-border: #FF390C;
  
  --shadow-sm: 0 2px 8px rgba(10, 28, 56, 0.05);
  --shadow-md: 0 8px 24px rgba(10, 28, 56, 0.08);
  --shadow-lg: 0 16px 36px rgba(10, 28, 56, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-size: var(--body-font-size);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* SELECCIÓN DE TEXTO */
::selection {
  background-color: var(--brand-orange);
  color: #FFFFFF;
}

/* BARRA DE PROGRESO DE LECTURA */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1000;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF390C, #FF7A00);
  box-shadow: 0 0 12px var(--brand-orange-light);
  transition: width 0.1s ease-out;
}

/* CONTENEDOR PRINCIPAL */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER DE LA PÁGINA
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: rgba(5, 19, 41, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-theme .site-header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 2px solid var(--brand-orange);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title span {
  color: var(--brand-orange);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Acciones en Cabecera */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

body.light-theme .btn-nav-home {
  background: #EDF2F7;
  color: var(--text-primary);
}

.btn-nav-home:hover {
  background: var(--brand-orange-subtle);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.btn-whatsapp-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #25D366;
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp-header:hover {
  background: #20BA5A;
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO / PORTADA DEL AVISO
   ========================================================================== */
.hero-section {
  padding: 48px 0 36px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 57, 12, 0.12) 0%, rgba(5, 19, 41, 0) 70%), var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

body.light-theme .hero-section {
  background: radial-gradient(circle at 50% 0%, rgba(255, 57, 12, 0.08) 0%, rgba(244, 247, 251, 0) 70%), var(--bg-primary);
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  border: 1px solid var(--brand-orange-border);
  color: var(--brand-orange);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--brand-orange);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
}

/* Tarjetas Informativas Rápidas (Resumen Ejecutivo) */
.quick-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 32px;
  text-align: left;
}

.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-orange);
  opacity: 0.8;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-orange-border);
}

.quick-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  color: var(--brand-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.quick-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.quick-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.quick-card strong {
  color: var(--text-primary);
}

/* ==========================================================================
   BARRA FLOTANTE DE HERRAMIENTAS DE LECTURA
   ========================================================================== */
.reading-toolbar-container {
  position: sticky;
  top: 74px;
  z-index: 850;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buscador en vivo */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 460px;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 8px 38px 8px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-subtle);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: none;
  padding: 4px;
  border-radius: 50%;
}

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

/* Botones de control de lectura */
.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.control-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-subtle);
}

.control-btn.active {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #FFFFFF;
}

.mobile-toc-toggle {
  display: none;
}

/* ==========================================================================
   DISPOSICIÓN PRINCIPAL: SIDEBAR ÍNDICE + CONTENIDO
   ========================================================================== */
.content-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 40px;
  padding: 48px 0 80px;
  align-items: start;
}

/* --- SIDEBAR ÍNDICE DE NAVEGACIÓN --- */
.sidebar-toc {
  position: sticky;
  top: 138px;
  max-height: calc(100vh - 156px);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.toc-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-header h3 svg {
  color: var(--brand-orange);
}

.toc-count-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--brand-orange);
  font-weight: 700;
}

.toc-scroll-list {
  list-style: none;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Estilo de scrollbar personalizado */
.toc-scroll-list::-webkit-scrollbar {
  width: 5px;
}
.toc-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}
.toc-scroll-list::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 10px;
}
.toc-scroll-list::-webkit-scrollbar-thumb:hover {
  background: var(--brand-orange);
}

.toc-item a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  transition: var(--transition);
  border-left: 2px solid transparent;
}

.toc-num {
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--brand-orange);
  background: var(--brand-orange-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.toc-item a:hover {
  color: var(--text-primary);
  background: var(--brand-orange-subtle);
}

.toc-item.active a {
  color: var(--brand-orange);
  font-weight: 700;
  background: var(--brand-orange-subtle);
  border-left-color: var(--brand-orange);
}

/* ==========================================================================
   CONTENIDO DE LAS SECCIONES DEL AVISO
   ========================================================================== */
.privacy-article {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Tarjeta de Cada Sección */
.privacy-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 38px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  scroll-margin-top: 140px;
}

.privacy-section-card:hover {
  border-color: rgba(255, 57, 12, 0.4);
}

/* Cabecera de Sección */
.section-header-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-number-pill {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF390C, #E02E04);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 10px rgba(255, 57, 12, 0.35);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.copy-anchor-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.copy-anchor-btn:hover {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: var(--brand-orange-subtle);
}

/* Párrafos y tipografía interna */
.privacy-section-card p {
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.privacy-section-card p:last-child {
  margin-bottom: 0;
}

.privacy-section-card strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Subsecciones (4.1, 4.2, 10.1, etc.) */
.subsection-block {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--bg-surface);
  border-left: 3px solid var(--brand-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsection-title span {
  color: var(--brand-orange);
}

/* Listas estilizadas */
.custom-list {
  list-style: none;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.custom-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-orange);
  box-shadow: 0 0 6px var(--brand-orange-glow);
}

/* Listas alfabéticas y numéricas */
.alpha-list {
  list-style: none;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alpha-list li {
  position: relative;
  padding-left: 34px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.alpha-list li .item-letter {
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--brand-orange);
  background: var(--brand-orange-subtle);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cajas de Alerta y Resalte Especial */
.callout-box {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 22px 0;
  position: relative;
}

.callout-box p {
  color: var(--text-primary);
  margin-bottom: 0;
  font-weight: 500;
}

.callout-box strong {
  color: var(--brand-orange);
}

/* Tarjeta Especial de Datos del Responsable (Sección 1) */
.responsable-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}

.data-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-item-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-orange);
}

.data-item-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.data-item-value a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--brand-orange);
  transition: color 0.2s ease;
}

.data-item-value a:hover {
  color: var(--brand-orange);
}

/* Tarjeta Especial de Derechos ARCO (Sección 16) */
.arco-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.arco-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.arco-card:hover {
  border-color: var(--brand-orange);
  transform: translateY(-2px);
}

.arco-letter-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--brand-orange);
  margin-bottom: 8px;
}

.arco-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.arco-card p {
  font-size: 0.88rem;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Sección Declaración Final */
.final-declaration-card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-surface));
  border: 2px solid var(--brand-orange-border);
  box-shadow: var(--shadow-orange);
}

.final-declaration-card h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--brand-orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Resaltado de Búsqueda */
mark.search-highlight {
  background: var(--brand-orange);
  color: #FFFFFF;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 700;
}

/* Toast de notificación de copiado */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--brand-orange);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast-notice.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Botón flotante para volver arriba */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #FFFFFF;
  border: none;
  box-shadow: var(--shadow-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 800;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: var(--transition);
}

.back-to-top-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.back-to-top-btn:hover {
  background: var(--brand-orange-hover);
  transform: scale(1.1);
}

/* ==========================================================================
   FOOTER INSTITUCIONAL
   ========================================================================== */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 32px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brand-orange);
  object-fit: cover;
}

.footer-brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 420px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links li a:hover {
  color: var(--brand-orange);
}

.footer-legal-notice {
  padding: 16px 20px;
  background: rgba(255, 57, 12, 0.08);
  border: 1px solid var(--brand-orange-border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.footer-legal-notice strong {
  color: var(--brand-orange);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN (PRINT READY)
   ========================================================================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt !important;
    line-height: 1.5 !important;
  }
  
  .reading-progress-container,
  .site-header,
  .reading-toolbar-container,
  .sidebar-toc,
  .back-to-top-btn,
  .toast-notice,
  .copy-anchor-btn,
  .site-footer,
  .quick-cards-grid {
    display: none !important;
  }
  
  .content-layout {
    display: block !important;
    padding: 0 !important;
  }
  
  .privacy-section-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 16pt 0 !important;
    page-break-inside: avoid;
    border-bottom: 1pt solid #DDD !important;
  }
  
  .hero-section {
    background: transparent !important;
    border: none !important;
    padding: 10pt 0 20pt !important;
  }
  
  .hero-title {
    color: #000000 !important;
  }
  
  .section-title {
    color: #000000 !important;
  }
  
  .section-number-pill {
    background: #000000 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
  }
  
  .subsection-block {
    background: #F8F9FA !important;
    border-left: 3pt solid #333 !important;
  }
}

/* ==========================================================================
   RESPONSIVIDAD Y DISPOSITIVOS MÓVILES
   ========================================================================== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 260px 1fr;
    gap: 28px;
  }
  .privacy-section-card {
    padding: 28px 24px;
  }
}

@media (max-width: 860px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-toc {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1500;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar-toc.open {
    display: flex;
  }

  .toc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1400;
  }
  
  .toc-backdrop.open {
    display: block;
  }

  .mobile-toc-toggle {
    display: inline-flex;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 580px) {
  .header-inner {
    height: 64px;
  }
  
  .brand-logo-img {
    width: 38px;
    height: 38px;
  }
  
  .brand-title {
    font-size: 1.05rem;
  }
  
  .btn-nav-home span {
    display: none;
  }
  
  .btn-whatsapp-header span {
    display: none;
  }
  
  .privacy-section-card {
    padding: 22px 18px;
  }
  
  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper {
    max-width: 100%;
  }
  
  .toolbar-controls {
    justify-content: space-between;
  }
}
