/* ============================================================================
 * news-detail.css — Página de detalle de noticia (Lote 10 G1)
 * ----------------------------------------------------------------------------
 * Extraído del CSS inline de news-detail.php (~415 líneas).
 *
 * Cambios respecto al inline original:
 *   - :root local eliminado (definía tokens duplicados de _tokens.css).
 *   - Tokens canónicos directos: --color-blue-*, --color-violet, --color-pink,
 *     --color-teal, etc. desde _tokens.css.
 *   - #fff → var(--color-white) en todas las ocurrencias.
 *   - Cromática MIXTA (decisión Lote 10, coherente con Lote 9):
 *       · Estructura (header, links, hovers, btn-back, related-card)
 *         → AZULES canónicos.
 *       · Acentos de identidad (category-badge en header) → mantienen
 *         color claro semitransparente sobre el gradient azul.
 *       · Brand colors de share buttons → MANTENIDOS como literales
 *         (#000000 X/Twitter, #1877F2 Facebook, #0A66C2 LinkedIn),
 *         documentados como tales.
 *   - Estilos extraídos del HTML inline:
 *       · .empty-related-icon (icono "no hay imagen" en related cards)
 *       · .share-btn--copied (estado visual tras copiar link al clipboard)
 *   - Hex literal #1e3a5f mantenido en gradient header (mismo criterio
 *     que reset-password.css, forgot-password.css, hazte-socio.css,
 *     news.css: azul muy oscuro sin token canónico exacto).
 *   - 4 utilities G1 replicadas al final.
 *
 * Deuda apuntada (G3 / consolidación):
 *   - Clases compartidas con news.css (.featured-image, .article-meta,
 *     .author-avatar) podrían moverse a un futuro _news-shared.css.
 * ============================================================================ */

/* ─── Article header (estructura → azul) ───────────────────────────────────── */
.article-header {
    background: linear-gradient(135deg, var(--color-blue-700) 0%, var(--color-navy) 50%, #1e3a5f 100%);
    color: var(--color-white);
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.breadcrumb-nav {
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: var(--color-white);
}

.breadcrumb-nav span {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0.5rem;
}

.article-header h1 {
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.article-meta-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.meta-item i {
    font-size: 1rem;
}

/* category-badge: acento sobre gradient azul, color claro translúcido
 * (mantiene contraste, no necesita token específico). */
.category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.author-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Featured image (overlap con header) ─────────────────────────────────── */
.featured-image-wrapper {
    margin-top: -4rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.featured-image-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-height: 500px;
}

.featured-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ─── Article content ─────────────────────────────────────────────────────── */
.article-content {
    background: var(--color-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-subtle);
}

.article-content h3 {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-left: 4px solid var(--color-green);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--color-green-dark);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--color-blue-700);
    font-weight: 500;
}

.article-content a:hover {
    color: var(--color-navy);
}

/* ─── Share section ───────────────────────────────────────────────────────── */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-subtle);
    margin-top: 2rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    background: var(--color-white);
    transition: all 0.3s;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    color: var(--color-white);
}

/* ─── Brand colors share buttons (LITERALES INTENCIONADOS) ─────────────────
 * Estos hex son los colores oficiales de cada plataforma:
 *   - X / Twitter:  #000000  (rebranding 2023)
 *   - Facebook:     #1877F2  (Meta corporate blue)
 *   - LinkedIn:     #0A66C2  (LinkedIn corporate blue)
 * NO sustituir por tokens canónicos ni unificar a la paleta del proyecto. */
.share-btn.twitter {
    color: #000000;
    border-color: var(--border-color);
}

.share-btn.twitter:hover {
    background: #000000;
    border-color: #000000;
    color: var(--color-white);
}

.share-btn.facebook {
    color: #1877F2;
    border-color: var(--border-color);
}

.share-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: var(--color-white);
}

.share-btn.linkedin {
    color: #0A66C2;
    border-color: var(--border-color);
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: var(--color-white);
}

/* Botón "copiar link" — usa el azul del proyecto (no es brand). */
.share-btn.copy {
    color: var(--color-blue-700);
    border-color: var(--border-color);
}

.share-btn.copy:hover {
    background: var(--color-blue-700);
    border-color: var(--color-blue-700);
    color: var(--color-white);
}

/* Estado tras copiar (verde de éxito). Aplicado por JS durante 2s. */
.share-btn--copied {
    background: var(--color-green) !important;
    border-color: var(--color-green) !important;
    color: var(--color-white) !important;
}

/* ─── Related articles ────────────────────────────────────────────────────── */
.related-section {
    margin-top: 3rem;
}

.related-section h4 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-section h4 i {
    color: var(--color-blue-700);
}

.related-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-blue-300);
}

.related-image {
    height: 150px;
    background: linear-gradient(135deg, var(--color-blue-300) 0%, var(--color-blue-500) 100%);
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-body {
    padding: 1.25rem;
}

.related-body h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-body h5 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-body h5 a:hover {
    color: var(--color-blue-700);
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Icono dentro de related-card cuando no hay featured_image
 * (extraído del style="font-size:2rem;color:rgba(255,255,255,0.7);" inline). */
.empty-related-icon {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Estado "no encontrado" ──────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding: 5rem 2rem;
}

.not-found .icon-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.not-found .icon-circle i {
    font-size: 3rem;
    color: var(--text-secondary);
}

/* ─── Botón "volver" ──────────────────────────────────────────────────────── */
.btn-back,
a.btn-back,
a.btn-back:link,
a.btn-back:visited {
    background: linear-gradient(135deg, var(--color-blue-500) 0%, var(--color-blue-700) 100%);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-weight: 700;
    color: var(--color-white);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 86, 163, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 163, 0.4);
    color: var(--color-white);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .article-header {
        padding: 2rem 0;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-meta-header {
        gap: 1rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-content p {
        font-size: 1rem;
    }

    .featured-image-wrapper {
        margin-top: -2rem;
    }
}

/* ============================================================================
 * Utility classes G1 (replicadas en cada archivo refactor hasta que se
 * cree _components.css en Fase 4/G3 — decisión §4 HANDOFF v2)
 * ============================================================================ */
.grad-care     { background: linear-gradient(135deg, #f59e0b, var(--color-red)); }
.grad-tech     { background: linear-gradient(135deg, var(--color-blue-400), var(--color-violet-dark)); }
.grad-research { background: linear-gradient(135deg, var(--color-green), var(--color-success)); }
.grad-control  { background: linear-gradient(135deg, var(--color-violet-dark), var(--color-pink)); }
