/* ==========================================================================
   Mi Ubicación — hoja de estilos única
   --------------------------------------------------------------------------
   Sistema de diseño "geolocalización moderna":
     · lienzo claro con brillos suaves + modo oscuro automático
     · barra de navegación flotante tipo cristal
     · tarjetas con bordes finos, radios grandes y sombras en capas
     · acento por herramienta (IP=esmeralda, GPS=naranja, Coordenadas=azul)

   El acento se controla con la clase del <body>:
     theme-home · theme-ip · theme-gps · theme-coords
     theme-blog · theme-article · theme-legal

   Los estados que maneja el JavaScript se conservan tal cual:
     .show          -> muestra bloques ocultos (.error, .loading, .form-success)
     .hidden        -> oculta la ayuda del mapa
     .copied/.show  -> feedback del portapapeles y del toast
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reinicio
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Superficies y texto */
  --bg: #eef2f8;
  --glow-1: rgba(79, 70, 229, 0.12);
  --glow-2: rgba(14, 165, 233, 0.12);
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --line: #e4e9f2;
  --line-strong: #d3dbe8;
  --text: #0e1729;
  --text-2: #46536b;
  --text-3: #6b7890;
  --text-inv: #ffffff;

  /* Estados */
  --ok: #059669;
  --ok-ink: #047857;
  --ok-soft: rgba(5, 150, 105, 0.12);
  --warn: #d97706;
  --warn-ink: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.14);
  --bad: #e11d48;
  --bad-ink: #be123c;
  --bad-soft: rgba(225, 29, 72, 0.1);

  /* Radios */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Sombras */
  --sh-1: 0 1px 2px rgba(14, 23, 41, 0.05), 0 1px 3px rgba(14, 23, 41, 0.04);
  --sh-2: 0 2px 4px rgba(14, 23, 41, 0.04), 0 12px 24px -10px rgba(14, 23, 41, 0.14);
  --sh-3: 0 8px 16px -6px rgba(14, 23, 41, 0.08),
    0 28px 56px -18px rgba(14, 23, 41, 0.2);

  /* Estructura */
  --shell: 1080px;
  --gutter: clamp(16px, 4vw, 30px);
  --measure: 74ch;
  --nav-h: 66px;

  /* Acento por defecto (marca / inicio) */
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-deep: #312e81;
  --accent-ink: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --accent-tint: rgba(79, 70, 229, 0.045);
  --ring: rgba(79, 70, 229, 0.3);
}

/* Acentos por sección ------------------------------------------------------ */
.theme-ip {
  --accent: #059669;
  --accent-strong: #047857;
  --accent-deep: #065f46;
  --accent-ink: #047857;
  --accent-soft: rgba(5, 150, 105, 0.1);
  --accent-tint: rgba(5, 150, 105, 0.045);
  --ring: rgba(5, 150, 105, 0.3);
}

.theme-gps {
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --accent-deep: #9a3412;
  --accent-ink: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --accent-tint: rgba(234, 88, 12, 0.045);
  --ring: rgba(234, 88, 12, 0.3);
}

.theme-coords {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-deep: #1e3a8a;
  --accent-ink: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-tint: rgba(37, 99, 235, 0.045);
  --ring: rgba(37, 99, 235, 0.3);
}

.theme-blog,
.theme-article {
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-deep: #4c1d95;
  --accent-ink: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-tint: rgba(124, 58, 237, 0.045);
  --ring: rgba(124, 58, 237, 0.3);
}

.theme-legal {
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-deep: #115e59;
  --accent-ink: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --accent-tint: rgba(13, 148, 136, 0.045);
  --ring: rgba(13, 148, 136, 0.3);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      58% 44% at 10% -4%,
      var(--glow-1),
      transparent 68%
    ),
    radial-gradient(52% 40% at 92% 2%, var(--glow-2), transparent 66%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent-ink);
}

strong {
  font-weight: 650;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   4. Barra de navegación
   -------------------------------------------------------------------------- */
.main-nav {
  position: sticky;
  top: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: var(--shell);
  margin: 14px auto 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.main-nav a {
  flex: 0 0 auto;
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--line);
}

.main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  box-shadow: 0 6px 16px -8px var(--ring);
}

.main-nav a.site-logo {
  margin-right: auto;
  padding: 5px 8px;
  color: var(--text);
  background: transparent;
  border-radius: var(--r-md);
}

.main-nav a.site-logo:hover {
  background: var(--surface-3);
  transform: none;
}

.main-nav a.site-logo img {
  display: block;
  width: auto;
  height: 36px;
}

/* --------------------------------------------------------------------------
   5. Estructura y héroes
   -------------------------------------------------------------------------- */
.page,
.container,
.info-section-wrapper,
.breadcrumbs {
  max-width: var(--shell);
  margin-right: auto;
  margin-left: auto;
}

.page,
.container {
  margin-top: clamp(14px, 2.5vw, 22px);
  margin-bottom: clamp(14px, 2.5vw, 22px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  overflow: hidden;
}

.info-section-wrapper {
  margin-top: clamp(14px, 2.5vw, 22px);
}

.info-section {
  padding: var(--gutter);
  padding-top: clamp(26px, 4vw, 40px);
  padding-bottom: clamp(26px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
}

/* Héroe: cabecera de página y de herramienta */
.page-header,
.header {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 6.5vw, 62px) var(--gutter);
  color: #fff;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--accent-strong) 0%,
    var(--accent) 46%,
    var(--accent-deep) 100%
  );
}

/* Retícula cartográfica + foco de luz */
.page-header::before,
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(
    118% 100% at 50% 0%,
    #000 18%,
    transparent 74%
  );
  mask-image: radial-gradient(118% 100% at 50% 0%, #000 18%, transparent 74%);
  pointer-events: none;
}

.page-header::after,
.header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    70% 120% at 50% -30%,
    rgba(255, 255, 255, 0.22),
    transparent 62%
  );
  pointer-events: none;
}

.page-header > *,
.header > * {
  position: relative;
  z-index: 1;
}

.page-header h1,
.header h1 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.page-header p,
.header p {
  max-width: 66ch;
  margin: 0 auto;
  font-size: clamp(1rem, 1.9vw, 1.16rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
}

.page-header .meta {
  margin-top: 12px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   6. Cuerpos de contenido y tipografía
   -------------------------------------------------------------------------- */
.page-body,
.main-content {
  padding: clamp(24px, 4.5vw, 48px);
}

.page-body > p,
.page-body > ul,
.page-body > ol,
.content-section > p,
.content-section > ul,
.content-section > ol,
.info-section > p,
.info-section > ul,
.info-section > ol,
.main-content > p {
  max-width: var(--measure);
}

.page-body h2,
.content-section h2,
.info-section h2 {
  position: relative;
  margin: clamp(30px, 4.5vw, 44px) 0 18px;
  padding-bottom: 12px;
  font-size: clamp(1.28rem, 2.5vw, 1.6rem);
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: -0.016em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.page-body h2:first-child,
.content-section h2:first-child,
.info-section h2:first-child {
  margin-top: 0;
}

.page-body h2::after,
.content-section h2::after,
.info-section h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 68px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}

.page-body h3,
.content-section h3,
.info-section h3,
.main-content h3 {
  margin: 26px 0 10px;
  font-size: clamp(1.06rem, 1.8vw, 1.2rem);
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.page-body p,
.content-section p,
.info-section p {
  margin-bottom: 14px;
  color: var(--text-2);
  line-height: 1.78;
}

.page-body ul,
.page-body ol,
.content-section ul,
.content-section ol,
.info-section ul,
.info-section ol {
  margin: 14px 0 18px 22px;
  color: var(--text-2);
  line-height: 1.78;
}

.page-body li,
.content-section li,
.info-section li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.page-body li::marker,
.content-section li::marker,
.info-section li::marker {
  color: var(--accent);
}

.page-body a,
.info-section a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.page-body a:hover,
.info-section a:hover {
  text-decoration: underline;
}

/* Cifras y valores tecnicos dentro del texto */
.page-body code,
.content-section code,
.info-section code {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 6px;
}

/* Marcado de palabras clave */
.keyword-highlight {
  padding: 1px 7px;
  color: var(--accent-ink);
  font-weight: 650;
  background: var(--accent-soft);
  border-radius: var(--r-xs);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Sobre fondos de acento, invertir el realce */
.cta-section .keyword-highlight,
.cta-box .keyword-highlight,
.page-header .keyword-highlight,
.header .keyword-highlight {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
}

/* Migas de pan */
.breadcrumbs {
  margin-top: 12px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}

.breadcrumbs a {
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}

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

.breadcrumbs span {
  margin: 0 6px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   7. Tarjetas de herramientas (portada)
   -------------------------------------------------------------------------- */
.intro-section {
  max-width: var(--measure);
  margin: 0 auto clamp(28px, 4vw, 40px);
  padding: clamp(22px, 3.5vw, 32px);
  text-align: center;
  background: var(--accent-tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-lg);
}

.intro-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 720;
  letter-spacing: -0.015em;
  color: var(--accent-ink);
}

.intro-section p {
  max-width: 64ch;
  margin: 0 auto;
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--text-2);
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 2.6vw, 26px);
  margin-bottom: clamp(30px, 4.5vw, 44px);
}

.tool-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform 0.24s ease, box-shadow 0.24s ease,
    border-color 0.24s ease;
}

/* Acento propio de cada tarjeta */
.tool-card.ip {
  --accent: #059669;
  --accent-strong: #047857;
  --accent-deep: #065f46;
  --accent-ink: #047857;
  --accent-soft: rgba(5, 150, 105, 0.12);
}

.tool-card.gps {
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --accent-deep: #9a3412;
  --accent-ink: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.12);
}

.tool-card.coords {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-deep: #1e3a8a;
  --accent-ink: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--sh-3);
}

.tool-card .tc-head {
  padding: 26px 22px 22px;
  text-align: center;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}

.tool-card .tc-head .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: var(--r-md);
  box-shadow: 0 10px 20px -10px var(--ring);
}

.tool-card .tc-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.tool-card .tc-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
}

.tool-card .tc-body p {
  margin-bottom: 14px;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.68;
}

.tool-card .tc-body .features {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.tool-card .tc-body .features li {
  position: relative;
  margin-bottom: 7px;
  padding-left: 24px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-2);
}

.tool-card .tc-body .features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: var(--r-pill);
}

/* --------------------------------------------------------------------------
   8. Llamadas a la acción
   -------------------------------------------------------------------------- */
.cta-section,
.cta-box {
  position: relative;
  overflow: hidden;
  margin: clamp(30px, 4.5vw, 46px) 0;
  padding: clamp(28px, 4.5vw, 46px) var(--gutter);
  text-align: center;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--accent-strong) 0%,
    var(--accent) 50%,
    var(--accent-deep) 100%
  );
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
}

.cta-section::after,
.cta-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    72% 130% at 50% -40%,
    rgba(255, 255, 255, 0.2),
    transparent 62%
  );
  pointer-events: none;
}

.cta-section > *,
.cta-box > * {
  position: relative;
  z-index: 1;
}

.cta-section h2,
.cta-box h3 {
  margin: 0 0 12px;
  padding: 0;
  font-size: clamp(1.32rem, 2.8vw, 1.85rem);
  font-weight: 740;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #fff;
  border: none;
}

.cta-section h2::after,
.cta-box h3::after {
  display: none;
}

.cta-section p,
.cta-box p {
  max-width: 60ch;
  margin: 0 auto 24px;
  font-size: clamp(1rem, 1.7vw, 1.1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.93);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-btn,
.cta-box a {
  display: inline-block;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: none;
  background: #fff;
  border-radius: var(--r-pill);
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover,
.cta-box a:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(15, 23, 42, 0.6);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   9. Tablas
   -------------------------------------------------------------------------- */
.comparison-table,
.cookie-table {
  width: 100%;
  margin: clamp(20px, 3vw, 28px) 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}

.comparison-table thead,
.cookie-table thead {
  background: var(--accent-soft);
}

.comparison-table th,
.cookie-table th {
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  border-bottom: 1px solid var(--line);
}

.comparison-table td,
.cookie-table td {
  padding: 13px 16px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.comparison-table tbody tr:last-child td,
.cookie-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(even),
.cookie-table tbody tr:nth-child(even) {
  background: var(--surface-2);
}

.comparison-table tbody tr:hover,
.cookie-table tbody tr:hover {
  background: var(--accent-tint);
}

/* Celda ganadora en una comparacion */
.comparison-table tbody td.cell-best {
  font-weight: 650;
  color: var(--ok-ink);
  background: var(--ok-soft);
}

.comparison-table td strong {
  color: var(--text);
}

.cookie-table .cookie-name {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   10. Preguntas frecuentes
   -------------------------------------------------------------------------- */
.faq-section {
  margin-top: clamp(30px, 4.5vw, 44px);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 20px);
  margin-top: 24px;
}

.faq-item {
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  transition: transform 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  background: var(--surface);
  border-color: var(--line-strong);
  border-left-color: var(--accent);
  box-shadow: var(--sh-2);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 680;
  line-height: 1.4;
  color: var(--text);
}

.faq-item p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   11. Bloques de aviso
   -------------------------------------------------------------------------- */
.highlight-box {
  margin: clamp(20px, 3vw, 28px) 0;
  padding: clamp(18px, 3vw, 24px);
  background: var(--accent-tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
}

.highlight-box p {
  margin: 0;
  color: var(--text-2);
}

.last-updated {
  margin-bottom: 24px;
  padding: 14px 20px;
  font-size: 0.92rem;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
}

.info-box {
  margin-bottom: 18px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--r-sm);
}

.info-box h4 {
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.info-box p {
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--text-2);
}

.click-info-box {
  background: var(--accent-soft);
  border-color: var(--line);
  border-left-color: var(--accent);
}

.click-info-box h4,
.click-info-box p {
  color: var(--accent-ink);
}

.permission-notice {
  margin-bottom: 22px;
  padding: 22px;
  text-align: center;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
}

.permission-notice h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.permission-notice p {
  margin: 0 0 16px;
  color: var(--text-2);
}

.example-box {
  margin: 16px 0;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   12. Panel de datos (herramientas IP / GPS)
   -------------------------------------------------------------------------- */
.content {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
}

.info-panel {
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface-2);
  border-right: 1px solid var(--line);
}

.section-title,
.results-title,
.map-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.section-title .icon,
.results-title .icon,
.map-title .icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Filas de dato */
.info-item,
.address-item {
  position: relative;
  margin-bottom: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.info-item:last-child,
.address-item:last-child {
  margin-bottom: 0;
}

.info-item:hover,
.address-item:hover {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
  box-shadow: var(--sh-2);
}

.info-item label,
.address-item label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.info-item .value,
.address-item .value {
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.value-with-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coordinates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

/* Latitud y longitud llevan etiqueta + decimal + DMS: apiladas se leen mejor */
.coordinates-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

/* Botón de copiado */
.copy-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--accent-ink);
  white-space: nowrap;
  cursor: pointer;
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.12s ease;
}

.copy-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.copy-btn:active {
  transform: scale(0.96);
}

.copy-btn.copied {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
  animation: copyPop 0.3s ease;
}

@keyframes copyPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.09);
  }
  100% {
    transform: scale(1);
  }
}

/* Formatos de coordenadas */
.coordinate-formats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coordinate-format {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}

.format-label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-3);
}

.format-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.address-section {
  margin-top: 20px;
}

.address-value {
  padding: 16px;
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
}

/* Panel de coordenadas capturadas */
.coordinates-display {
  margin-bottom: 20px;
  padding: 18px;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
}

.coordinates-display h4 {
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.coord-format {
  padding: 12px 10px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}

.coord-format label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.coord-format .coord-value {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* Resultado principal resaltado */
.address-item.main-address {
  background: var(--accent-soft) !important;
  border-left-color: var(--accent) !important;
}

.address-item.main-address .value {
  font-weight: 700;
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   13. Indicadores de estado
   -------------------------------------------------------------------------- */
.status-indicator {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 10px;
  vertical-align: middle;
  background: #4ade80;
  border-radius: var(--r-pill);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.65);
  animation: pulse 2.1s infinite;
}

.status-indicator.loading {
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.65);
}

.status-indicator.error {
  background: #fb7185;
  box-shadow: none;
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  }
  70% {
    box-shadow: 0 0 0 11px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.accuracy-indicator {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ok-ink);
  background: var(--ok-soft);
  border-radius: var(--r-pill);
}

.accuracy-indicator.loading {
  color: var(--warn-ink);
  background: var(--warn-soft);
}

.accuracy-indicator.error {
  color: var(--bad-ink);
  background: var(--bad-soft);
}

.loading-indicator {
  font-weight: 700;
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   14. Mapas
   -------------------------------------------------------------------------- */
.map-container {
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
}

/* En las herramientas IP/GPS el mapa comparte fila con el panel de datos:
   se estira para igualar su altura y no dejar hueco vacio debajo. */
.content .map-container {
  height: 100%;
  min-height: clamp(320px, 46vh, 480px);
}

#map {
  width: 100%;
  height: clamp(320px, 46vh, 480px);
  background: var(--surface-3);
}

.content #map {
  height: 100%;
}

#map.leaflet-container,
.map-section #map {
  cursor: crosshair;
}

.map-section {
  margin-bottom: clamp(20px, 3vw, 30px);
  padding: clamp(16px, 2.5vw, 24px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.map-section .map-container {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* Controles flotantes sobre el mapa */
.map-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-btn,
.map-control-btn,
.refresh-btn {
  padding: 9px 15px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.control-btn:hover,
.map-control-btn:hover,
.refresh-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.control-btn:disabled,
.map-control-btn:disabled,
.refresh-btn:disabled {
  color: var(--text-3);
  cursor: not-allowed;
  background: var(--surface-3);
  border-color: var(--line);
  transform: none;
}

.map-control-btn.secondary {
  color: var(--text-2);
  background: var(--surface);
}

.map-control-btn.secondary:hover {
  color: #fff;
  background: var(--text-2);
  border-color: var(--text-2);
}

.refresh-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
}

/* Aviso "toca el mapa" */
.click-instruction {
  position: absolute;
  bottom: 52px;
  left: 50%;
  z-index: 1000;
  padding: 9px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  background: rgba(14, 23, 41, 0.86);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-2);
  transform: translateX(-50%);
  pointer-events: none;
  animation: hintPulse 3s ease-in-out infinite;
}

.click-instruction.hidden {
  display: none;
}

@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

.status-bar {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  padding: 7px 14px;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* --------------------------------------------------------------------------
   15. Formularios
   -------------------------------------------------------------------------- */
.search-section {
  margin-bottom: clamp(20px, 3vw, 30px);
  padding: clamp(20px, 3.2vw, 32px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.search-title {
  margin-bottom: 20px;
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
  letter-spacing: -0.012em;
  color: var(--text);
}

.search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  max-width: 820px;
  margin: 0 auto 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label,
.form-group label {
  font-size: 0.83rem;
  font-weight: 650;
  color: var(--text-2);
}

.input-group input,
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-3);
}

.input-group input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.form-group {
  margin-bottom: 18px;
}

.form-group textarea {
  min-height: 128px;
  resize: vertical;
}

.search-btn,
.submit-btn,
.permission-btn {
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: none;
  border-radius: var(--r-sm);
  box-shadow: 0 10px 22px -12px var(--ring);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.search-btn:hover,
.submit-btn:hover,
.permission-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px var(--ring);
}

.search-btn:active,
.submit-btn:active,
.permission-btn:active {
  transform: translateY(0);
}

.search-btn:disabled {
  color: var(--text-3);
  cursor: not-allowed;
  background: var(--surface-3);
  box-shadow: none;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  border-radius: var(--r-pill);
}

.permission-btn {
  border-radius: var(--r-pill);
}

.search-btn {
  height: fit-content;
}

.examples-section {
  margin-top: 20px;
  text-align: center;
}

.examples-section p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-3);
}

.example-btn {
  margin: 4px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 620;
  color: var(--accent-ink);
  cursor: pointer;
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: background-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease;
}

.example-btn:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}

/* Formulario de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: 26px;
}

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card {
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  background: var(--surface);
  box-shadow: var(--sh-2);
}

.contact-card .card-icon {
  margin-bottom: 8px;
  font-size: 1.6rem;
  line-height: 1;
}

.contact-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 680;
  color: var(--text);
}

.contact-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-2);
}

.contact-card a {
  font-weight: 650;
  color: var(--accent-ink);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-form {
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* Confirmación del formulario */
.form-success {
  display: none;
  padding: 32px;
  text-align: center;
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  border-radius: var(--r-lg);
}

.form-success.show {
  display: block;
}

.form-success .success-icon {
  margin-bottom: 14px;
  font-size: 2.8rem;
  line-height: 1;
}

.form-success h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 720;
  color: var(--ok-ink);
}

.form-success p {
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   16. Bloques de resultados y carga (buscador de coordenadas)
   -------------------------------------------------------------------------- */
.theme-coords .loading {
  display: none;
  padding: 26px 20px;
  text-align: center;
  color: var(--text-2);
}

.theme-coords .loading.show {
  display: block;
}

.theme-coords .loading h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--text);
}

.theme-coords .loading p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-3);
}

.theme-coords .error {
  display: none;
  margin-top: 18px;
  padding: 15px 18px;
  font-size: 0.94rem;
  color: var(--bad-ink);
  background: var(--bad-soft);
  border: 1px solid var(--bad);
  border-left-width: 4px;
  border-radius: var(--r-sm);
}

.theme-coords .error.show {
  display: block;
}

.results-section {
  display: none;
  padding: clamp(20px, 3.2vw, 30px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* En las herramientas IP/GPS, .loading y .error son estados de texto */
.theme-ip .loading,
.theme-gps .loading {
  opacity: 0.55;
}

.theme-ip .error,
.theme-gps .error {
  color: var(--bad) !important;
}

/* --------------------------------------------------------------------------
   17. Portada del blog y artículos
   -------------------------------------------------------------------------- */
.featured-article {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  margin-bottom: clamp(28px, 4vw, 38px);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  transition: transform 0.24s ease, box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.featured-article:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--sh-3);
}

.featured-img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  background: linear-gradient(
    135deg,
    var(--accent-strong) 0%,
    var(--accent) 50%,
    var(--accent-deep) 100%
  );
}

.featured-img .img-icon {
  font-size: 4.4rem;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.28));
}

.featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3.2vw, 32px);
}

.featured-badge {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 13px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: var(--r-pill);
}

.featured-content h3 {
  margin: 0 0 10px;
  font-size: clamp(1.18rem, 2.3vw, 1.44rem);
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}

.featured-content p {
  margin-bottom: 14px;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-2);
}

.featured-meta,
.article-meta {
  font-size: 0.82rem;
  color: var(--text-3);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(16px, 2.4vw, 22px);
  margin-bottom: clamp(28px, 4vw, 38px);
}

.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform 0.24s ease, box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-3);
}

.article-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 118px;
  background: var(--accent-soft);
}

.article-card-img .card-icon {
  font-size: 2.6rem;
  line-height: 1;
}

.article-card-img.green {
  --a: #059669;
  --s: rgba(5, 150, 105, 0.14);
}

.article-card-img.orange {
  --a: #ea580c;
  --s: rgba(234, 88, 12, 0.14);
}

.article-card-img.blue {
  --a: #2563eb;
  --s: rgba(37, 99, 235, 0.14);
}

.article-card-img.purple {
  --a: #7c3aed;
  --s: rgba(124, 58, 237, 0.14);
}

.article-card-img.teal {
  --a: #0d9488;
  --s: rgba(13, 148, 136, 0.14);
}

.article-card-img.red {
  --a: #e11d48;
  --s: rgba(225, 29, 72, 0.13);
}

.article-card-img.green,
.article-card-img.orange,
.article-card-img.blue,
.article-card-img.purple,
.article-card-img.teal,
.article-card-img.red {
  background: var(--s);
}

.article-card-img.green .card-icon,
.article-card-img.orange .card-icon,
.article-card-img.blue .card-icon,
.article-card-img.purple .card-icon,
.article-card-img.teal .card-icon,
.article-card-img.red .card-icon {
  filter: grayscale(0);
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.article-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--text);
}

.article-card-body p {
  flex: 1;
  margin-bottom: 12px;
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* Etiquetas */
.article-tag {
  align-self: flex-start;
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--r-pill);
}

.tag-gps {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}

.tag-guia {
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
}

.tag-privacidad {
  color: #be123c;
  background: rgba(225, 29, 72, 0.11);
}

.tag-tecnologia {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.12);
}

.tag-consejos {
  color: #b45309;
  background: rgba(217, 119, 6, 0.13);
}

/* Temas del blog */
.topics-section {
  margin-top: clamp(28px, 4vw, 40px);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.topic-card {
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--sh-2);
}

.topic-icon {
  margin-bottom: 8px;
  font-size: 1.8rem;
  line-height: 1;
}

.topic-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 680;
  color: var(--text);
}

.topic-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   18. Pasos, veredictos y tarjetas de valores
   -------------------------------------------------------------------------- */
.step-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 14px 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-box:hover {
  border-color: var(--accent);
  box-shadow: var(--sh-1);
}

.step-num {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: var(--r-pill);
  box-shadow: 0 8px 18px -10px var(--ring);
}

.step-content h3 {
  margin: 0 0 4px;
  font-size: 1.04rem;
  font-weight: 690;
  color: var(--text);
}

.step-content p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-2);
}

.verdict-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 26px 0;
}

.verdict-card {
  padding: 24px 20px;
  text-align: center;
  border-radius: var(--r-lg);
}

.verdict-card.gps {
  background: rgba(234, 88, 12, 0.09);
  border: 1px solid #ea580c;
}

.verdict-card.ip {
  background: rgba(5, 150, 105, 0.09);
  border: 1px solid #059669;
}

.verdict-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 720;
  color: var(--text);
}

.verdict-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-2);
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 26px 0;
}

.value-card {
  padding: 26px 22px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--r-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
}

.value-card .icon {
  margin-bottom: 10px;
  font-size: 2.1rem;
  line-height: 1;
}

.value-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.value-card p {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--text-2);
}

.tool-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.tool-item {
  padding: 22px 18px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tool-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tool-item .tool-icon {
  margin-bottom: 8px;
  font-size: 1.8rem;
  line-height: 1;
}

.tool-item h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
}

.tool-item p {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   19. Toast y utilidades
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  max-width: min(340px, calc(100vw - 40px));
  padding: 13px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: rgba(14, 23, 41, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   20. Pie de página
   -------------------------------------------------------------------------- */
.site-footer {
  max-width: var(--shell);
  margin: clamp(20px, 3vw, 32px) auto 0;
  padding: 0 var(--gutter);
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.footer-menu a {
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-pill);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.footer-menu a:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.footer-sep {
  color: var(--line-strong);
}

.copyright {
  padding: 16px 15px 30px;
  font-size: 0.86rem;
  text-align: center;
  color: var(--text-3);
}

.copyright a {
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}

.copyright a:hover {
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   21. Adaptación a pantallas pequeñas
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .content,
  .contact-grid,
  .featured-article {
    grid-template-columns: minmax(0, 1fr);
  }

  .info-panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .featured-img {
    min-height: 160px;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 58px;
  }

  .main-nav {
    top: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 8px;
    border-radius: var(--r-md);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  .main-nav a {
    padding: 8px 13px;
    font-size: 0.85rem;
  }

  .main-nav a.site-logo {
    margin-right: 4px;
  }

  .main-nav a.site-logo img {
    height: 28px;
  }

  .coordinates,
  .coordinates-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .value-with-copy {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .coordinate-format {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .map-overlay,
  .map-controls {
    top: 8px;
    right: 8px;
    gap: 6px;
    padding: 8px;
  }

  .map-control-btn,
  .control-btn,
  .refresh-btn {
    padding: 7px 12px;
    font-size: 0.76rem;
  }

  .click-instruction {
    bottom: 48px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .status-bar {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .step-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .copy-btn {
    width: 100%;
    padding: 8px 12px;
    text-align: center;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
    text-align: center;
  }

  .page-header h1,
  .header h1 {
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.22);
  }
}

/* Tablas anchas: desplazamiento horizontal en lugar de desbordar */
@media (max-width: 720px) {
  .comparison-table,
  .cookie-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .comparison-table th,
  .comparison-table td,
  .cookie-table th,
  .cookie-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* --------------------------------------------------------------------------
   22. Modo oscuro automático
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070c16;
    --glow-1: rgba(99, 102, 241, 0.2);
    --glow-2: rgba(14, 165, 233, 0.16);
    --surface: #0f1729;
    --surface-2: #141d31;
    --surface-3: #1c2740;
    --line: #22304c;
    --line-strong: #33436a;
    --text: #f1f5fb;
    --text-2: #b3c0d6;
    --text-3: #8593ad;

    --ok-ink: #34d399;
    --warn-ink: #fbbf24;
    --bad-ink: #fb7185;

    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    --sh-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 24px -10px rgba(0, 0, 0, 0.6);
    --sh-3: 0 8px 16px -6px rgba(0, 0, 0, 0.45),
      0 28px 56px -18px rgba(0, 0, 0, 0.75);
  }

  .theme-ip {
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-deep: #065f46;
    --accent-ink: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.16);
    --accent-tint: rgba(16, 185, 129, 0.08);
    --ring: rgba(16, 185, 129, 0.4);
  }

  .theme-gps {
    --accent: #fb923c;
    --accent-strong: #ea580c;
    --accent-deep: #9a3412;
    --accent-ink: #fdba74;
    --accent-soft: rgba(251, 146, 60, 0.16);
    --accent-tint: rgba(251, 146, 60, 0.08);
    --ring: rgba(251, 146, 60, 0.4);
  }

  .theme-coords {
    --accent: #60a5fa;
    --accent-strong: #2563eb;
    --accent-deep: #1e3a8a;
    --accent-ink: #93c5fd;
    --accent-soft: rgba(96, 165, 250, 0.16);
    --accent-tint: rgba(96, 165, 250, 0.08);
    --ring: rgba(96, 165, 250, 0.4);
  }

  .theme-blog,
  .theme-article {
    --accent: #a78bfa;
    --accent-strong: #7c3aed;
    --accent-deep: #4c1d95;
    --accent-ink: #c4b5fd;
    --accent-soft: rgba(167, 139, 250, 0.16);
    --accent-tint: rgba(167, 139, 250, 0.08);
    --ring: rgba(167, 139, 250, 0.4);
  }

  .theme-home {
    --accent: #818cf8;
    --accent-strong: #4f46e5;
    --accent-deep: #312e81;
    --accent-ink: #a5b4fc;
    --accent-soft: rgba(129, 140, 248, 0.16);
    --accent-tint: rgba(129, 140, 248, 0.08);
    --ring: rgba(129, 140, 248, 0.4);
  }

  .theme-legal {
    --accent: #2dd4bf;
    --accent-strong: #0d9488;
    --accent-deep: #115e59;
    --accent-ink: #5eead4;
    --accent-soft: rgba(45, 212, 191, 0.16);
    --accent-tint: rgba(45, 212, 191, 0.08);
    --ring: rgba(45, 212, 191, 0.4);
  }

  /* El logotipo tiene fondo blanco: se le da un soporte propio */
  .main-nav {
    background: rgba(15, 23, 41, 0.9);
  }

  .main-nav a.site-logo {
    padding: 4px 8px;
    background: #fff;
  }

  .main-nav a.site-logo:hover {
    background: #eef2f8;
  }

  .main-nav a.active {
    color: var(--text-inv);
  }

  .cta-btn,
  .cta-box a {
    color: #1e1b4b;
  }

  .map-overlay,
  .status-bar,
  .control-btn,
  .map-control-btn,
  .refresh-btn {
    color: var(--text);
    background: rgba(20, 29, 49, 0.92);
    border-color: var(--line-strong);
  }

  .control-btn:hover,
  .map-control-btn:hover,
  .refresh-btn:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
  }

  .map-control-btn.secondary {
    color: var(--text-2);
    background: rgba(28, 39, 64, 0.92);
  }

  .click-instruction {
    color: var(--text);
    background: rgba(4, 8, 16, 0.9);
    border: 1px solid var(--line-strong);
  }

  .toast {
    color: var(--text);
    background: rgba(4, 8, 16, 0.96);
  }

  .article-card-img .card-icon,
  .featured-img .img-icon {
    filter: none;
  }
}

/* --------------------------------------------------------------------------
   23. Preferencias de movimiento e impresión
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .main-nav,
  .map-overlay,
  .map-controls,
  .refresh-btn,
  .copy-btn,
  .toast,
  .click-instruction {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .page,
  .container {
    box-shadow: none;
    border-color: #ccc;
  }
}
