/* ==========================================================================
   FácilPDF — Hoja de Estilos Original (Mobile-First, Rápida y Accesible)
   ========================================================================== */

:root {
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;
  --border-color: #E2E8F0;
  --primary: #E11D48;
  --primary-hover: #BE123C;
  --success: #059669;
  --success-hover: #047857;
  --danger: #DC2626;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

#result-panel[hidden],
.result-panel[hidden],
#work-panel[hidden],
.work-panel[hidden],
#progress-box[hidden],
.progress-box[hidden],
#error-box[hidden],
.alert-error[hidden],
#extra-downloads-grid[hidden],
.extra-downloads-grid[hidden],
#cookie-banner[hidden],
.cookie-banner[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-logo strong {
  color: var(--primary);
  font-weight: 800;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.nav-link-all {
  background: #FFF1F2;
  color: var(--primary);
}

.nav-link-all:hover {
  background: #FFE4E6;
  color: var(--primary-hover);
}

/* ==========================================================================
   HERO PRINCIPAL
   ========================================================================== */
.hero-section {
  text-align: center;
  padding: 36px 0 24px;
}

.hero-pill {
  display: inline-block;
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid #FECDD3;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  max-width: 760px;
  margin: 0 auto 12px;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ==========================================================================
   CUADRÍCULA DE TARJETAS DE HERRAMIENTAS (PÁGINA PRINCIPAL)
   ========================================================================== */
.tools-section {
  padding: 12px 0 48px;
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--tool-color, var(--primary));
  outline: none;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--tool-bg, #FFF1F2);
  color: var(--tool-color, var(--primary));
  border: 1px solid var(--tool-border, #FECDD3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.tool-mode-pill {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--text-muted);
}

.tool-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tool-card-desc {
  font-size: 0.96rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.tool-card-cta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tool-color, var(--primary));
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   ESPACIOS RESERVADOS PARA GOOGLE ADSENSE (SIN SALTOS CLS NI CONFUSIÓN)
   ========================================================================== */
.ad-container {
  margin: 24px 0;
  text-align: center;
  clear: both;
}

.ad-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  margin-bottom: 4px;
}

.ad-slot {
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
}

body.is-dev .ad-slot {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
}

.ad-placeholder-text {
  font-size: 0.8rem;
  color: #94A3B8;
  padding: 12px;
}

/* 1 y 5: Horizontal responsive (Debajo del título y en Home entre tarjetas) */
.ad-slot-horizontal {
  width: 100%;
  min-height: 96px;
}

/* 2 y 4: Rectangular debajo del área de trabajo y dentro del artículo */
.ad-slot-rectangle {
  width: 100%;
  min-height: 250px;
}

/* 3: Barra lateral fija en escritorio (300x600), oculta en celular */
.tool-sidebar-desktop {
  display: none;
}

.ad-slot-vertical {
  width: 300px;
  min-height: 600px;
}

/* Aviso de Privacidad por herramienta */
.privacy-badge-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
  line-height: 1.5;
}

.privacy-badge-banner.browser-privacy {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}

.privacy-badge-banner.server-privacy {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0369A1;
}

/* ==========================================================================
   PÁGINA DE CADA HERRAMIENTA
   ========================================================================== */
.tool-page-wrapper {
  padding: 20px 0 56px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

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

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-header-icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 16px;
  background: var(--tool-bg);
  color: var(--tool-color);
  border: 1px solid var(--tool-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-header-icon svg {
  width: 30px;
  height: 30px;
}

.tool-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tool-color);
  background: var(--tool-bg);
  border: 1px solid var(--tool-border);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.tool-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}

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

.tool-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

/* ==========================================================================
   ÁREA DE CARGA (DROPZONE) Y PANEL DE TRABAJO
   ========================================================================== */
.workspace-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  min-height: 260px;
}

.dropzone {
  display: block !important;
  min-height: 220px;
  border: 3px dashed var(--tool-color, var(--primary));
  background: var(--tool-bg, #FFF1F2);
  border-radius: var(--radius-md);
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
  user-select: none;
}

.dropzone:hover, .dropzone.drag-over {
  background: #FFFFFF;
  transform: scale(1.005);
}

.dropzone-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--tool-color, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.dropzone-icon svg {
  width: 34px;
  height: 34px;
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.dropzone-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-select-files {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tool-color, var(--primary));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   MINIATURAS DE PÁGINAS DEL PDF (ORDENAR, ROTAR, ELIMINAR)
   ========================================================================== */
.work-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.work-panel-summary {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.work-panel-actions {
  display: flex;
  gap: 8px;
}

.thumbnails-helper {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  max-height: 460px;
  overflow-y: auto;
  padding: 6px;
}

.thumb-item {
  background: #F8FAFC;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: grab;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.thumb-item:active {
  cursor: grabbing;
}

.thumb-item.dragging {
  opacity: 0.45;
  border-color: var(--tool-color);
}

.thumb-item.selected-page {
  border-color: var(--tool-color);
  background: var(--tool-bg);
}

.thumb-canvas-wrap {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.thumb-canvas-wrap canvas,
.thumb-canvas-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.thumb-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.thumb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.thumb-btn {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: var(--text-main);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.thumb-btn:hover {
  background: #F1F5F9;
}

.thumb-btn-delete {
  color: var(--danger);
  border-color: #FECACA;
}

.thumb-btn-delete:hover {
  background: #FEF2F2;
}

/* ==========================================================================
   OPCIONES DE HERRAMIENTA Y BOTÓN PRINCIPAL ÚNICO
   ========================================================================== */
.tool-options-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.option-label {
  display: block;
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.option-help {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.options-two-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.input-text, .input-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--text-main);
}

.input-text:focus, .input-select:focus {
  outline: none;
  border-color: var(--tool-color, var(--primary));
}

.radio-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.radio-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--tool-color, var(--primary));
  background: var(--tool-bg, #FFF1F2);
}

.radio-card input {
  margin-bottom: 4px;
}

.radio-card-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.radio-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.main-cta-wrapper {
  margin-top: 20px;
  padding-top: 8px;
}

.btn-primary-xl {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--tool-color, var(--primary));
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 18px 24px;
  font-size: 1.18rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: filter 0.15s, transform 0.1s;
}

.btn-primary-xl:hover:not(:disabled) {
  filter: brightness(0.93);
}

.btn-primary-xl:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary-sm {
  background: #F1F5F9;
  color: var(--text-main);
  border: 1px solid #CBD5E1;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-ghost-sm {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-ghost-sm:hover {
  background: #F1F5F9;
}

/* ==========================================================================
   BARRA DE PROGRESO Y ALERTAS DE ERROR
   ========================================================================== */
.progress-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--tool-color, var(--primary));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.alert-error {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  color: #991B1B;
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 0.95rem;
}

.alert-success {
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  color: #065F46;
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 0.95rem;
}

/* ==========================================================================
   PANEL DE RESULTADO Y DESCARGA CLARA
   ========================================================================== */
.result-panel {
  text-align: center;
  padding: 28px 16px;
}

.result-success-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ECFDF5;
  color: var(--success);
  border: 2px solid #A7F3D0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
}

.result-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-meta {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.btn-download-xl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  background: var(--success);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 18px 28px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.25);
  transition: background 0.15s, transform 0.1s;
}

.btn-download-xl:hover {
  background: var(--success-hover);
  transform: translateY(-2px);
}

.extra-downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
  text-align: center;
}

.jpg-download-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
}

.jpg-download-card img {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 8px;
}

.jpg-download-card a {
  display: block;
  background: var(--tool-color, var(--primary));
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
}

.result-restart {
  margin-top: 24px;
}

/* ==========================================================================
   SECCIONES DE AYUDA, PASOS, ARTÍCULO SEO Y FAQ
   ========================================================================== */
.steps-section {
  margin: 36px 0;
}

.steps-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

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

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.step-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tool-bg, #FFF1F2);
  color: var(--tool-color, var(--primary));
  font-weight: 800;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.seo-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-top: 28px;
}

.seo-article h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 20px 0 10px;
  color: var(--text-main);
}

.seo-article h2:first-child {
  margin-top: 0;
}

.seo-article h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 18px 0 8px;
}

.seo-article p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.seo-article ul {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.seo-article li {
  margin-bottom: 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #F8FAFC;
  padding: 12px 16px;
}

.faq-question {
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
}

.faq-answer {
  margin-top: 8px;
  font-size: 0.94rem;
}

/* ==========================================================================
   SECCIÓN DE CARACTERÍSTICAS Y PÁGINAS LEGALES
   ========================================================================== */
.features-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 48px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-box {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.feature-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-page-wrapper {
  padding: 28px 0 60px;
}

.legal-container {
  max-width: 840px;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
}

.legal-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 24px 0 10px;
}

.legal-card p, .legal-card li {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.legal-card ul {
  padding-left: 22px;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-light);
}

.contact-info-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.contact-form .form-group {
  margin-bottom: 14px;
}

/* ==========================================================================
   FOOTER Y BANNER DE COOKIES
   ========================================================================== */
.site-footer {
  background: #0F172A;
  color: #CBD5E1;
  padding: 48px 0 28px;
  margin-top: auto;
}

.footer-logo .brand-text {
  color: #FFFFFF;
}

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

.footer-desc {
  font-size: 0.92rem;
  color: #94A3B8;
  margin: 10px 0;
}

.footer-security-note {
  font-size: 0.85rem;
  color: #38BDF8;
  font-weight: 600;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 0.98rem;
  margin-bottom: 12px;
}

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

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

.footer-col a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748B;
}

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 50;
  max-width: 920px;
  margin: 0 auto;
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
}

.cookie-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.cookie-inner p {
  font-size: 0.88rem;
  color: #E2E8F0;
}

.cookie-inner a {
  color: #38BDF8;
}

.btn-cookie-accept {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* ==========================================================================
   BREAKPOINTS TABLET Y ESCRITORIO
   ========================================================================== */
@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .options-two-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .radio-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 2.65rem;
  }
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tool-layout-grid {
    grid-template-columns: 1fr 300px;
  }
  /* Mostrar la barra lateral 300x600 fija únicamente en escritorio */
  .tool-sidebar-desktop {
    display: block;
  }
  .sidebar-sticky {
    position: sticky;
    top: 84px;
  }
  .workspace-card {
    padding: 32px;
  }
  .seo-article {
    padding: 36px;
  }
}
