/* ============================================================
   Auditas — Página de Políticas (Tratamiento de Datos / Términos
   y Condiciones / Política de Cookies). Reutiliza hero V2.1 (sin
   pills/CTA/icono, ver revisoria-fiscal.html como referencia) y el
   fondo de puntos en loop de "Método" (subpage.css + method-dots.js).
   Sin protecciones anticopia por decisión del cliente: se prioriza
   SEO/GEO — el texto de las 3 pestañas vive siempre en el HTML.
   ============================================================ */

.policies__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  min-width: 0;
}
.policies__layout > * { min-width: 0; }

/* ---- Tabs (sidebar en desktop) ---- */
.policies__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--header-h) + 28px);
}
.policies__tab {
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--r-s);
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--gray70);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.policies__tab:hover { background: var(--gray10); color: var(--blackdit); }
.policies__tab.is-active {
  color: var(--blackdit);
  font-weight: var(--fw-bold);
  border-left: 3px solid var(--yelludit);
  padding-left: 13px;
}

/* ---- Panels ---- */
.policies__panel[hidden] { display: none; }

/* Bloques de contenido: el navegador se salta el cálculo de layout/pintura
   de los bloques que están lejos de la pantalla (sin cambiar el scroll ni
   el diseño — la página se sigue leyendo igual, solo se aligera el trabajo
   real del navegador en documentos muy largos como Tratamiento de Datos). */
.policies__chunk {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.policies__meta {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray60);
  margin: 0 0 28px;
}
.policies__panel h2 {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: clamp(24px, 2.6vw, 30px);
  color: var(--blackdit);
  line-height: 1.25;
  margin: 0 0 6px;
}
.policies__panel h3 {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: 20px;
  color: var(--blackdit);
  line-height: 1.35;
  margin: 36px 0 14px;
  border-left: 3px solid var(--yelludit);
  padding-left: 14px;
}
.policies__panel h3:first-of-type { margin-top: 0; }
.policies__panel h4 {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: 16px;
  color: var(--yelludit60);
  margin: 20px 0 8px;
}
.policies__panel p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray70);
  margin: 0 0 16px;
}
.policies__panel ul,
.policies__panel ol {
  margin: 0 0 16px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policies__panel li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray70);
}
.policies__panel strong { color: var(--blackdit); }

/* ---- Tablas (info del responsable, definiciones, cookies) ---- */
.policies__table-wrap { overflow-x: auto; margin: 0 0 20px; }
.policies__table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15px; }
.policies__table th,
.policies__table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray20);
  vertical-align: top;
  font-family: var(--font-body);
  color: var(--gray70);
}
.policies__table th {
  color: var(--blackdit);
  font-weight: var(--fw-bold);
  background: var(--gray10);
  white-space: nowrap;
}
.policies__table--defs th:first-child { width: 22%; }

/* ---- Recuadro destacado (advertencias, alcance del documento) ---- */
.policies__callout {
  background: var(--gray10);
  border-left: 4px solid var(--yelludit);
  border-radius: var(--r-m);
  padding: 20px 24px;
  margin: 24px 0;
}
.policies__callout p:last-child { margin-bottom: 0; }
.policies__callout strong { color: var(--blackdit); }

.policies__pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--yelludit60);
  font-weight: var(--fw-bold);
  text-decoration: underline;
  text-decoration-color: var(--yelludit40, var(--yelludit));
}
.policies__pdf-link:hover { color: var(--blackdit); }

.policies__sign {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--gray20);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray60);
}
.policies__sign strong { display: block; color: var(--blackdit); margin-bottom: 2px; }

/* ---- Responsive: sidebar -> tabs horizontales arriba ---- */
@media (max-width: 880px) {
  .policies__layout { grid-template-columns: 1fr; }
  .policies__tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gray20);
    -webkit-overflow-scrolling: touch;
  }
  .policies__tab { flex: none; white-space: nowrap; }
  .policies__tab.is-active { border-left: 0; border-bottom: 3px solid var(--yelludit); padding-left: 16px; }
}

/* ---- Impresión: ocultar solo los fondos decorativos (no el texto) ---- */
@media print {
  .ilines, .method-dots, .subhero__brandcheck { display: none !important; }
}
