﻿:root {
    --bg-page: #050505;
    --bg-card: #0f1014;
    --text-main: #e4e4e7;
    --text-muted: #a1a1aa;
    --primary: #0ea5e9;
    --border: rgba(255, 255, 255, 0.08);
}

body.light-mode {
    --bg-page: #eef1f7;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #0284c7;
    --border: rgba(15, 23, 42, 0.12);
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    margin: 0;
}
html { scroll-behavior: smooth; }

.legal-wrapper { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

/* --- HEADER --- */
.doc-header { text-align: center; margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.badge-legal {
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; color: #10b981; /* Verde transparencia */
    border: 1px solid rgba(16, 185, 129, 0.3); padding: 4px 10px; border-radius: 20px; margin-bottom: 16px; display: inline-block;
}
h1 {
    font-size: 2.5rem; margin: 10px 0;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.meta-info { display: flex; justify-content: center; gap: 20px; font-size: 0.9rem; color: #71717a; margin-top: 16px; }

/* --- LAYOUT SIDEBAR --- */
.doc-container { display: grid; grid-template-columns: 220px 1fr; gap: 60px; }
.doc-sidebar { position: sticky; top: 40px; height: fit-content; }
.nav-title { font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.doc-sidebar ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.doc-sidebar li a {
    display: block; text-decoration: none; color: var(--text-muted);
    padding: 8px 0 8px 20px; font-size: 0.9rem; border-left: 2px solid transparent; margin-left: -1px; transition: 0.2s;
}
.doc-sidebar li a:hover, .doc-sidebar li a.active {
    color: var(--primary); border-left-color: var(--primary);
    background: linear-gradient(90deg, rgba(14,165,233,0.05), transparent);
}

/* --- CONTENIDO --- */
.doc-content h2 { font-size: 1.8rem; margin-top: 60px; margin-bottom: 24px; color: #fff; scroll-margin-top: 80px; }
.doc-content p { margin-bottom: 16px; color: #d4d4d8; }
.highlight { color: var(--primary); font-family: monospace; }
.divider { height: 1px; background: var(--border); margin: 40px 0; }
code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; font-family: monospace; }

/* --- COMPONENTES ESPECIALES --- */

/* Info Card Simple */
.info-card {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 24px; border-radius: 12px; display: flex; gap: 16px; align-items: center;
}
.icon-large { font-size: 2rem; color: var(--primary); }
.info-card p { margin: 0; }

/* Grid de Tipos de Cookies */
.cookies-grid-types {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.type-card {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 24px; border-radius: 16px; transition: 0.2s;
}
.type-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }
.card-icon {
    width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 16px;
}
.type-card h3 { margin: 0 0 10px 0; font-size: 1.1rem; color: white; }
.type-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* Colores por tipo */
.type-card.technical .card-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; } /* Azul */
.type-card.prefs .card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; } /* Verde */
.type-card.ads .card-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; } /* Amarillo */
.type-card.analytics .card-icon { background: rgba(34, 211, 238, 0.1); color: #22d3ee; } /* Violeta */

/* Links Externos */
.external-links-box {
    margin-top: 20px; background: rgba(255,255,255,0.02); padding: 20px; border-radius: 12px; border: 1px solid var(--border);
}
.links-column { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.link-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px;
    text-decoration: none; color: var(--text-main); font-size: 0.9rem; transition: 0.2s;
}
.link-row:hover { background: rgba(255,255,255,0.05); border-color: var(--primary); }

/* Contact Box */
.contact-box {
    background: linear-gradient(135deg, rgba(14,165,233,0.1), transparent);
    border: 1px solid var(--primary); padding: 30px; border-radius: 16px; text-align: center;
}
.contact-box h2 { margin-top: 0; font-size: 1.5rem; }
.email-link {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--primary); color: white; padding: 10px 20px; border-radius: 8px;
    text-decoration: none; font-weight: 600; margin-top: 10px; transition: 0.2s;
}
.email-link:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(14,165,233,0.4); }

/* --- LIGHT MODE OVERRIDES --- */
body.light-mode h1 {
    background: linear-gradient(to right, #0f172a, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .doc-content h2 {
    color: var(--text-main);
}

body.light-mode .doc-content p {
    color: var(--text-muted);
}

body.light-mode code {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

body.light-mode .info-card,
body.light-mode .type-card,
body.light-mode .external-links-box {
    background: rgba(15, 23, 42, 0.02);
    border-color: var(--border);
}

body.light-mode .type-card h3 {
    color: var(--text-main);
}

body.light-mode .link-row {
    background: #ffffff;
    color: #0f172a;
    border-color: var(--border);
}

body.light-mode .link-row:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: var(--primary);
}

body.light-mode .contact-box {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(2, 132, 199, 0.02));
    border-color: rgba(2, 132, 199, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .doc-container { grid-template-columns: 1fr; }
    .doc-sidebar { display: none; }
    .cookies-grid-types { grid-template-columns: 1fr; }
}


