/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - MODO CLARO Y OSCURO
   ========================================================================== */
:root {
  color-scheme: light dark;

  /* Colores Base - Modo Claro (Default) */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-input: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* Colores de Marca y Acento */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  
  --accent: #8b5cf6;
  --accent-light: rgba(139, 92, 246, 0.1);
  
  /* Estados */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  
  /* Sombras y Efectos */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
  
  /* Anuncios */
  --ad-bg: rgba(255, 255, 255, 0.03);
  --ad-border: rgba(255, 255, 255, 0.2);
  --ad-text: #94a3b8;
  
  /* Radio y Espaciados */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modo Oscuro - Por preferencia de sistema o forzado vía data-theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-main: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --bg-card: #141e33;
    --bg-card-hover: #1e293b;
    --bg-input: #111827;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --border-color: #1e293b;
    --border-focus: #60a5fa;
    
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    
    --accent: #a78bfa;
    --accent-light: rgba(167, 139, 250, 0.15);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
    
    --ad-bg: rgba(255, 255, 255, 0.03);
    --ad-border: rgba(255, 255, 255, 0.2);
    --ad-text: #94a3b8;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: #141e33;
  --bg-card-hover: #1e293b;
  --bg-input: #111827;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --border-color: #1e293b;
  --border-focus: #60a5fa;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  
  --accent: #a78bfa;
  --accent-light: rgba(167, 139, 250, 0.15);
  
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
  
  --ad-bg: rgba(255, 255, 255, 0.03);
  --ad-border: rgba(255, 255, 255, 0.2);
  --ad-text: #94a3b8;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-input: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  
  --accent: #8b5cf6;
  --accent-light: rgba(139, 92, 246, 0.1);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
  
  --ad-bg: rgba(255, 255, 255, 0.03);
  --ad-border: rgba(255, 255, 255, 0.2);
  --ad-text: #94a3b8;
}

/* ==========================================================================
   RESET & ESTILOS BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ==========================================================================
   CONTENEDORES & LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-main {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

/* Layout de 2 columnas para Herramientas (Contenido Principal + Sidebar) */
.tool-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .tool-page-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

.tool-main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5rem;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(var(--bg-surface), 0.85);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  margin-left: 0.35rem;
  letter-spacing: 0.05em;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 860px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

/* Dropdown de Herramientas */
.dropdown-wrapper {
  position: relative;
}

.dropdown-trigger {
  cursor: pointer;
  background: transparent;
  border: none;
}

.dropdown-arrow {
  transition: transform var(--transition-fast);
}

.dropdown-wrapper:hover .dropdown-arrow,
.dropdown-wrapper:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  width: 280px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.dropdown-wrapper:hover .dropdown-menu,
.dropdown-wrapper:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-card);
  color: var(--primary);
}

.dropdown-item-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Botones de acción del header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
}

@media (min-width: 860px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Menú móvil desplegable */
.mobile-nav-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem;
  animation: slideDown 0.2s ease-out;
}

.mobile-nav-drawer.open {
  display: block;
}

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

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding-left: 0.5rem;
}

/* ==========================================================================
   ESPACIOS DE PUBLICIDAD ADSENSE (DIVS RESERVADOS)
   ========================================================================== */
.ad-slot {
  position: relative;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transition: all var(--transition-normal);
  margin: 1.25rem 0;
}

.ad-slot::before {
  content: "ESPACIO PUBLICITARIO";
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.ad-slot-placeholder-text {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Ad Header (Banner Superior, ej. 728x90 responsive) */
.ad-slot-header {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  margin: 1rem auto;
  padding: 0.75rem;
}

/* Ad In-Content (Entre contenidos/artículo, responsive) */
.ad-slot-content {
  width: 100%;
  min-height: 120px;
  margin: 2rem 0;
  padding: 1rem;
}

/* Ad Sidebar (Rectángulo lateral, ej. 300x250 o 300x600) */
.ad-slot-sidebar {
  width: 100%;
  min-height: 250px;
  padding: 1rem;
  margin: 0;
}

/* ==========================================================================
   HERO SECTION (HOME)
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 2rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Buscador de herramientas en Home */
.search-bar-container {
  max-width: 580px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 3rem;
  font-size: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-lg);
}

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

/* Badges de filtros rápidos */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-tag {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tag:hover, .filter-tag.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   GRID DE HERRAMIENTAS (TARJETAS)
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-xl);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.tool-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.08);
}

.tool-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tool-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.tool-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.tool-card-privacy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}

.tool-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.tool-card-btn:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateX(2px);
}

/* ==========================================================================
   CARACTERÍSTICAS Y PRIVACIDAD (HOME VALUE PROPS)
   ========================================================================== */
.features-section {
  margin-top: 4rem;
  padding: 3rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

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

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

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

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

.feature-box {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.feature-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   HERRAMIENTAS: WIDGET CONTAINER & UI INTERACTIVA
   ========================================================================== */
.tool-header-block {
  margin-bottom: 1rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--text-light);
}

.tool-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.tool-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.privacy-banner-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-main);
  font-size: 0.88rem;
  margin-top: 1rem;
}

.privacy-banner-icon {
  color: var(--success);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Caja contenedora principal de la herramienta */
.tool-widget-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
  .tool-widget-card {
    padding: 1.25rem;
  }
}

/* Controles de Formulario, Sliders e Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-label-value {
  color: var(--primary);
  font-weight: 700;
}

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

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}

.form-textarea.code-font {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-range {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
  border-radius: var(--radius-full);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  filter: brightness(1.1);
}

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

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Dropzone de Archivos */
.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background-color: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.dropzone-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

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

.dropzone-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Tarjetas de Estadísticas / Resultados */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ==========================================================================
   SECCIÓN DE CONTENIDO SEO & PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.seo-content-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.seo-content-card h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.seo-content-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.seo-content-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}

.step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-text h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Acordeón de FAQs */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--primary);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question::after {
  content: "−";
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   SIDEBAR COMPONENTES (HERRAMIENTAS RELACIONADAS & CARD PRIVACIDAD)
   ========================================================================== */
.sidebar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-tool-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-tool-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.related-tool-link:hover {
  background-color: var(--bg-card);
  color: var(--primary);
}

.related-tool-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col-brand {
  max-width: 320px;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.15rem;
  color: var(--text-main);
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--success-bg);
  color: var(--success);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ==========================================================================
   PÁGINAS ESTÁTICAS (PRIVACIDAD, TÉRMINOS, CONTACTO)
   ========================================================================== */
.static-page-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .static-page-card {
    padding: 1.5rem;
  }
}

.static-page-card h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.static-page-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.static-page-card p, .static-page-card li {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.static-page-card ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Formulario de Contacto */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Toast Notificaciones Flotantes */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

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

/* ==========================================================================
   HERRAMIENTAS DE VIDEO (FFMPEG WASM)
   ========================================================================== */
.video-op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.video-op-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  user-select: none;
}

.video-op-card:hover {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
}

.video-op-card.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.video-op-icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  display: block;
}

.video-op-title {
  font-size: 0.92rem;
  font-weight: 700;
  display: block;
}

.video-op-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: block;
}

.video-op-card.active .video-op-desc {
  color: var(--text-main);
}

.video-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.video-player-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.video-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.video-element-wrapper {
  background-color: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 320px;
}

.video-element-wrapper video,
.video-element-wrapper img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.video-progress-wrapper {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.video-progress-bar {
  width: 100%;
  height: 12px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.75rem 0 0.5rem;
  border: 1px solid var(--border-color);
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

.video-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.video-warning-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--warning-bg);
  border: 1px solid var(--warning);
  color: var(--text-main);
  font-size: 0.88rem;
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.video-error-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--text-main);
  font-size: 0.88rem;
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}


