/* ============================================================================
 * terms-privacy.css — Página de Términos de Servicio y Política de Privacidad
 * ----------------------------------------------------------------------------
 * Extraído del <style> inline de terms-privacy.php en la armonización G1
 * (Lote 2). Usa exclusivamente los tokens definidos en _tokens.css.
 *
 * Cambios respecto al inline original:
 *   1. Eliminado el :root local que redefinía 8 variables (--cyan, --bg-light,
 *      --border, --blue-medium, --blue-dark, --text-primary, --text-secondary,
 *      --blue). Todas migradas a tokens canónicos.
 *   2. Sombra del pill activo: rgba(139,92,246,0.3) [violeta] → rgba(37,99,235,0.3)
 *      [azul]. Bug latente de la migración all-blue.
 *   3. .highlight-box.success: restaurada semántica VERDE (estaba con bg azul
 *      pero h4 verde, inconsistente). Usa var(--color-success-*).
 *   4. .highlight-box.warning: restaurada semántica ÁMBAR (estaba con bg cyan,
 *      pero el contenido es realmente avisos: limitaciones IA, datos de salud,
 *      cookies). Usa var(--color-warning-*).
 *   5. .highlight-box.info: AÑADIDA (se usaba en legal-content-es.php para la
 *      caja de Cloudflare Turnstile pero no tenía estilos definidos).
 *   6. Texto de cuerpo (.content-text): #64748b → var(--text-muted) (#334155).
 *      Más legible. Coherente con la dirección del sistema (oscurecimiento de
 *      grises tras feedback de abr-2026).
 *   7. Gradientes/colores hardcoded migrados a sus tokens equivalentes
 *      (identidad de valor cuando es posible).
 * ============================================================================ */


/* ───────────────────────────────────────────────────────────────────────────
 * Body
 * ─────────────────────────────────────────────────────────────────────────── */
body {
    background: var(--bg-body);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Hero section
 * ─────────────────────────────────────────────────────────────────────────── */
.terms-hero {
    background: linear-gradient(135deg, var(--color-blue-900) 0%, var(--color-blue-700) 50%, var(--color-blue-500) 100%);
    padding: 100px 0 60px;
    color: var(--color-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: termsHeroFloat 15s ease-in-out infinite;
}

@keyframes termsHeroFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(20px, -20px); }
}

.terms-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.terms-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
}


/* ───────────────────────────────────────────────────────────────────────────
 * Sticky navigation pills
 * ─────────────────────────────────────────────────────────────────────────── */
.terms-nav {
    background: var(--color-white);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 70px;
    z-index: 100;
    padding: 1rem 0;
}

.nav-pills .nav-link {
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    border: 2px solid transparent;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--color-blue-900), var(--color-blue-700), var(--color-blue-500));
    color: var(--color-white);
    /* Bug fix G1: la sombra original era rgba(139,92,246,0.3) [violeta], residuo
       de antes de la migración all-blue. Migrada a azul coherente. */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.nav-pills .nav-link:hover:not(.active) {
    background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
    border-color: var(--color-blue-700);
    transform: translateY(-2px);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Content section
 * ─────────────────────────────────────────────────────────────────────────── */
.terms-content {
    padding: 60px 0;
    background: var(--bg-body);
}

.content-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.content-section:hover {
    border-color: var(--color-blue-700);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Section / subsection headers
 * ─────────────────────────────────────────────────────────────────────────── */
.section-header {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-blue-700);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header i {
    font-size: 1.5rem;
    color: var(--color-blue-700);
}

.subsection-header {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-header::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-blue-900), var(--color-blue-700));
    border-radius: 2px;
}


/* ───────────────────────────────────────────────────────────────────────────
 * Content text + bullet lists
 * ─────────────────────────────────────────────────────────────────────────── */
.content-text {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1rem;
}

.content-text ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.content-text ul li {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
}

.content-text ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--color-blue-900), var(--color-blue-700));
    border-radius: 50%;
}

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


/* ───────────────────────────────────────────────────────────────────────────
 * Highlight boxes — semánticas (success / warning / danger / info)
 *
 * Cada variante usa SU paleta de estado, no azul. Esto restaura la pista
 * visual semántica que se había perdido durante la migración all-blue parcial.
 * Las clases las usan los archivos /includes/legal-content-{es,en}.php.
 * ─────────────────────────────────────────────────────────────────────────── */
.highlight-box {
    background: var(--color-blue-50);
    border-left: 4px solid var(--color-blue-700);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.highlight-box h4 {
    color: var(--color-blue-700);
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Success — verde (compromiso de privacidad, ejercer derechos) */
.highlight-box.success {
    background: var(--color-success-soft);
    border-left-color: var(--color-success);
}

.highlight-box.success h4 {
    color: var(--color-success-dark);
}

/* Warning — ámbar (limitaciones IA, datos de salud, cookies necesarias) */
.highlight-box.warning {
    background: var(--color-warning-soft);
    border-left-color: var(--color-warning);
}

.highlight-box.warning h4 {
    color: var(--color-warning-dark);
}

/* Danger — rojo (descargo médico crítico) */
.highlight-box.danger {
    background: var(--color-danger-soft);
    border-left-color: var(--color-danger);
}

.highlight-box.danger h4 {
    color: var(--color-danger-dark);
}

/* Info — azul cyan (Cloudflare Turnstile, notas técnicas).
   No existía en el CSS original — se añade aquí porque legal-content-es.php
   sí usa la clase. */
.highlight-box.info {
    background: var(--color-blue-50);
    border-left-color: var(--color-info);
}

.highlight-box.info h4 {
    color: var(--color-info-dark);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Last updated badge
 * ─────────────────────────────────────────────────────────────────────────── */
.last-updated {
    background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.last-updated i {
    color: var(--color-blue-700);
    margin-right: 0.5rem;
}


/* ───────────────────────────────────────────────────────────────────────────
 * Contact section
 * ─────────────────────────────────────────────────────────────────────────── */
.contact-section {
    background: linear-gradient(135deg, var(--color-blue-900), var(--color-blue-700));
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-top: 3rem;
    color: var(--color-white);
}

.contact-section h3 {
    color: var(--color-white);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-section ul li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.contact-section ul li::before {
    /* Anula el bullet azul de .content-text dentro de la sección de contacto */
    display: none;
}

.contact-section a {
    color: var(--color-white);
    text-decoration: underline;
}


/* ───────────────────────────────────────────────────────────────────────────
 * Data table (tablas de datos personales tratados, etc.)
 * ─────────────────────────────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
    font-weight: 700;
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: var(--bg-body);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Legal info box (recuadros con info legal específica)
 * ─────────────────────────────────────────────────────────────────────────── */
.legal-info-box {
    background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
    border: 2px solid var(--color-blue-400);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
}

.legal-info-box h4 {
    color: var(--color-blue-900);
    font-weight: 700;
    margin-bottom: 1rem;
}

.legal-info-box p,
.legal-info-box li {
    color: var(--color-blue-900);
}


/* ───────────────────────────────────────────────────────────────────────────
 * Responsive
 * ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .terms-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }

    .nav-pills .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        margin: 0.25rem;
    }
}
