/* ============================================================
   CODEMINDS — LEGAL PAGES CSS
   Usado por: politica-privacidad.html, terminos-condiciones.html
   No se carga en la landing page (index.html)
   ============================================================ */

/* ==========================================================================
   PÁGINAS LEGALES: TÉRMINOS Y PRIVACIDAD — DISEÑO PREMIUM
   ========================================================================== */

/* --- Hero Banner Legal --- */
.legal-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #3B82F6 100%);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    animation: legal-glow 8s ease-in-out infinite alternate;
}

@keyframes legal-glow {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-3%, 3%);
    }
}

.legal-hero h1 {
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.legal-hero .legal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    position: relative;
    z-index: 1;
    margin: 0;
}

.legal-hero .legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 58, 138, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.85rem;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* --- Layout Principal Legal --- */
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

/* --- Tabla de Contenidos (Sidebar) --- */
.legal-toc {
    position: sticky;
    top: 100px;
    align-self: start;
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px 20px;
    border: 1px solid #e2e8f0;
}

.legal-toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: left;
    padding-left: 10px;
}

.legal-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-toc ul li {
    margin-bottom: 6px;
}

.legal-toc ul li a {
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    padding: 10px 14px;
    display: block;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1.4;
    text-align: left;
    font-weight: 500;
}

.legal-toc ul li a:hover {
    background: #e0eaff;
    color: #1e40af;
}

.legal-toc ul li a.active {
    background: #e0eaff;
    color: #1e40af;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #2563eb;
}

/* --- Contenido Principal Legal --- */
.legal-content {
    min-width: 0;
}

.legal-article {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 35px 40px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
}

.legal-article:hover {
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
}

.legal-article h2 {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-article h2 .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #2563eb, #1D4ED8);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.legal-article p {
    font-size: 15px;
    color: #475569;
    line-height: 1.75;
    margin-bottom: 12px;
    text-align: justify;
}

.legal-article ul {
    padding-left: 0;
    list-style: none;
    margin: 12px 0;
}

.legal-article ul li {
    padding: 8px 0 8px 12px;
    border-left: 3px solid #e2e8f0;
    margin-bottom: 6px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    transition: border-color 0.2s ease;
    text-align: justify;
}

.legal-article ul li:hover {
    border-left-color: #3B82F6;
}

.legal-article a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.legal-article a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* --- Artículo de contacto (último) --- */
.legal-article.legal-contact {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
    border-color: #bfdbfe;
    text-align: center;
}

.legal-article.legal-contact p {
    color: #1e40af;
}

/* --- Botón Volver --- */
.legal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1D4ED8);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.legal-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

/* --- Estilos legado (mantener compatibilidad) --- */
.privacidad,
.terminos {
    width: 100%;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-align: left;
    box-sizing: border-box;
}

.privacidad .btn,
.terminos .btn {
    cursor: pointer;
    display: inline-block;
    padding: 12px 25px;
    font-size: 18px;
    color: #ffffff;
    background: #1D4ED8;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s ease-in-out, transform 0.2s;
    margin-top: 20px;
}

.privacidad h1,
.privacidad h2,
.terminos h1,
.terminos h2 {
    color: #3B82F6;
}

.privacidad p,
.terminos p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    text-align: justify;
}

.privacidad .btn:hover,
.terminos .btn:hover {
    background: rgba(0, 86, 179, 0.9);
}

/* --- Responsive Legal Pages --- */
@media (max-width: 868px) {
    .legal-layout {
        grid-template-columns: 1fr;
        padding: 30px 15px 40px;
        gap: 0;
    }

    .legal-toc {
        position: relative;
        top: auto;
        margin-bottom: 30px;
    }

    .legal-hero h1 {
        font-size: 2rem;
    }

    .legal-article {
        padding: 25px 22px;
    }

    .legal-article h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: 60px 15px 40px;
    }

    .legal-hero h1 {
        font-size: 1.6rem;
    }

    .legal-article {
        padding: 20px 18px;
        margin-bottom: 16px;
    }

    .legal-article h2 .section-number {
        min-width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* Mobile overrides for .privacidad / .terminos */
@media (max-width: 480px) {

    .privacidad,
    .terminos {
        padding: 15px;
    }
}