/* =============================================================================
   Quíntuple PLV - Formato Editorial y Moderno para Páginas de Texto
   ============================================================================= */

/* Breadcrumb & Subtítulos */
.page-breadcrumb {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-breadcrumb a {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.page-breadcrumb a:hover {
    color: #0f172a;
}

.page-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.page-breadcrumb .current {
    color: #0f172a;
    font-weight: 700;
}

/* Badge de categoría */
.legal-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.legal-badge.generic {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

/* Tabs de navegación legal (Aviso Legal, Privacidad, Cookies) */
.legal-nav-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 26px 0;
    padding: 12px 6px 16px 6px;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    box-sizing: border-box;
}

.legal-tab {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    white-space: nowrap;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.legal-tab svg {
    color: var(--brand-primary, #005D93);
    stroke: currentColor;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.legal-tab:hover {
    background: var(--brand-primary-50, #f3f8fb);
    color: var(--brand-primary, #005D93);
    border-color: var(--brand-primary, #005D93);
    box-shadow: 0 2px 8px rgba(0, 93, 147, 0.12);
}

.legal-tab:hover svg {
    color: var(--brand-primary, #005D93);
}

.legal-tab.active {
    background: var(--brand-primary, #005D93);
    color: #ffffff !important;
    border-color: var(--brand-primary, #005D93);
    box-shadow: 0 4px 12px rgba(0, 93, 147, 0.25);
}

.legal-tab.active svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.legal-tab.active:hover {
    background: var(--brand-primary-hover, #004873);
    border-color: var(--brand-primary-hover, #004873);
    color: #ffffff !important;
}

/* Tarjeta Principal de Contenido */
.text-article-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 40px 48px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Barra de metadatos superior */
.text-meta-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
    color: #64748b;
    flex-wrap: wrap;
}

.text-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.text-meta-item svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.text-meta-sep {
    color: #cbd5e1;
}

.btn-print-text {
    margin-left: auto;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
}

.btn-print-text:hover {
    background: var(--brand-primary, #005D93);
    color: #ffffff;
    border-color: var(--brand-primary, #005D93);
}

/* -----------------------------------------------------------------------------
   Tipografía y Jerarquía Visual del Texto
   ----------------------------------------------------------------------------- */
.text-article-card .lead {
    background: #f8fafc;
    border-left: 4px solid #0d9488;
    border-radius: 0 14px 14px 0;
    padding: 20px 24px;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #1e293b;
    margin: 0 0 32px 0;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
}

.text-article-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin: 36px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-article-card h2:first-of-type {
    margin-top: 10px;
}

.text-article-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 26px 0 12px 0;
}

.text-article-card p {
    font-size: 0.94rem;
    line-height: 1.75;
    color: #334155;
    margin: 0 0 16px 0;
}

.text-article-card ul,
.text-article-card ol {
    margin: 12px 0 22px 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-article-card li {
    font-size: 0.93rem;
    line-height: 1.65;
    color: #334155;
}

.text-article-card li strong {
    color: #0f172a;
    font-weight: 700;
}

.text-article-card a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(2, 132, 199, 0.3);
    transition: all 0.15s ease;
}

.text-article-card a:hover {
    color: #0369a1;
    border-bottom-color: #0369a1;
}

/* Tabla de Cookies Elegante */
.text-article-card table,
.text-article-card .cookies-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    font-size: 0.88rem;
    background: #ffffff;
}

.text-article-card thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.6px;
    padding: 12px 18px;
    border-bottom: 1.5px solid #e2e8f0;
    text-align: left;
}

.text-article-card tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
    line-height: 1.55;
}

.text-article-card tbody tr:last-child td {
    border-bottom: none;
}

.text-article-card tbody tr:hover td {
    background: #fbfcfe;
}

/* Bloques de advertencia / nota dentro del texto */
.text-callout {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 0.9rem;
    color: #166534;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* -----------------------------------------------------------------------------
   Adaptación Móvil y Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .text-article-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .text-article-card h2 {
        font-size: 1.15rem;
    }

    .text-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .text-meta-sep {
        display: none;
    }

    .btn-print-text {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 6px;
    }

    .legal-nav-tabs {
        padding-bottom: 8px;
    }

    .legal-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

/* -----------------------------------------------------------------------------
   Optimización para Impresión
   ----------------------------------------------------------------------------- */
@media print {
    #sidebar, #header, #footer, .legal-nav-tabs, .btn-print-text, .page-header-actions, .cookie-floating-trigger {
        display: none !important;
    }

    #page, #content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .text-article-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10pt !important;
    }
}

