﻿:root {
    --nx-yellow: #FFDD05;
    --nx-dark: #181819;
    --nx-dark-2: #282829;
    --nx-text: #e8eef6;
    --nx-muted: rgba(232,238,246,.72);
    --nx-stroke: rgba(255,255,255,.12);
}

.nx-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, var(--nx-dark), var(--nx-dark-2));
    border: 1px solid var(--nx-stroke);
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 14px;
}

.nx-article-meta__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0; /* para que el texto haga ellipsis */
}

.nx-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    border: 2px solid var(--yellow);
    box-shadow: 0 0 0 3px rgba(255,221,5,.08);
    display: block;
    background: rgba(255,221,5,.08);
}

    .nx-author-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.nx-article-meta__text {
    min-width: 0;
}

.nx-author-line {
    line-height: 1.1;
    margin-bottom: 2px;
}

.nx-author-name {
    color: var(--nx-text);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .2px;
}

/* .nx-author-name:hover {
            color: var(--nx-yellow);
        } */

.nx-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--nx-muted);
    font-size: 13px;
}

.nx-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nx-meta-label {
    opacity: .75;
}

.nx-meta-sep {
    opacity: .35;
}

/*.nx-meta-line i {
    color: rgba(255,221,5,.9);
    font-size: 12px;
}*/

/* acciones */
.nx-article-meta__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* .nx-share-btn {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: #ffffff;
        color: #111;
        text-decoration: none;
        border: 1px solid rgba(0,0,0,.08);
        transition: transform .15s ease, box-shadow .15s ease;
    }

        .nx-share-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(0,0,0,.25);
        } */

.nx-share-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--nx-text);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--nx-stroke);
    background: rgba(255,255,255,.04);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

    .nx-share-icon:hover {
        transform: translateY(-1px);
        background: var(--yellow);
        /* border-color: rgba(255,221,5,.35); */
        /* color: var(--nx-yellow); */
        color: #000;
    }

/* responsive */
@media (max-width: 576px) {
    .nx-article-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-article-meta__actions {
        justify-content: flex-end;
    }
}





/* Search */
.nx-searchbar {
    display: flex;
    justify-content: center;
}

.nx-searchbar__inner {
    width: min(680px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

    .nx-searchbar__inner i {
        opacity: .65;
    }

/* Featured (anclada) */
.nx-featured {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 18px;
    align-items: stretch;
    text-decoration: none;
    color: #111;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
}

.nx-featured__media {
    min-height: 260px;
    background-size: cover;
    background-position: center;
}

.nx-featured__content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.nx-featured__title {
    font-weight: 900;
    font-size: 2rem;
    line-height: 2.2rem;
    margin: 0;
}

.nx-featured__meta {
    color: rgba(0,0,0,.55);
    font-weight: 600;
    font-size: .95rem;
}

/* Card */
.nx-news-card {
    display: block;
    text-decoration: none;
    color: #111;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 12px 26px rgba(0,0,0,.06);
    height: 100%;
}

.nx-news-card__img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.nx-news-card__body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nx-news-card__title {
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1.3rem;
}

/* Tag (igual que antes) */
.nx-tag {
    display: inline-flex;
    width: fit-content;
    padding: .28rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .4px;
    background: #e9ecef;
    color: #111;
}

.tag-actualidad {
    background: #c7f9f1;
    color: #0b2a25;
}

.tag-novedades {
    background: #ffe6b3;
    color: #3a2b00;
}

.tag-review {
    background: #dbeafe;
    color: #081a2f;
}

.tag-pruebas {
    background: #eadcff;
    color: #1c0b2f;
}

.tag-comparativa {
    background: #ffd6de;
    color: #2f0812;
}

.tag-presentacion {
    background: #d1fae5;
    color: #062114;
}

@media (max-width: 991px) {
    .nx-featured {
        grid-template-columns: 1fr;
    }

    .nx-featured__media {
        min-height: 220px;
    }

    .nx-featured__title {
        font-size: 1.55rem;
        line-height: 1.85rem;
    }
}





/*ESTILOS PARA ARTICULOS*/
.nx-article img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    margin: 14px 0;
}

.nx-article p {
    margin: 0 0 12px;
    line-height: 1.65;
}

.nx-article h2 {
    margin-top: 14px;
}

.nx-article figure {
    margin: 16px 0;
}

.nx-article figcaption {
    font-size: .9rem;
    opacity: .75;
    margin-top: 8px;
}

/* ===== TABLAS EN ARTÍCULOS ===== */
.nx-article table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    font-size: .95rem;
}

/* Encabezado */
.nx-article thead th {
    background: #111;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

/* Celdas */
.nx-article td,
.nx-article th {
    padding: 12px 14px;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

/* Filas */
.nx-article tbody tr:last-child td {
    border-bottom: none;
}

/* Zebra */
.nx-article tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Texto */
.nx-article td {
    color: #333;
}

/* Resaltado de primera columna */
.nx-article tbody td:first-child {
    font-weight: 600;
    color: #111;
}

/* ===== SCROLL HORIZONTAL EN MÓVIL ===== */
@media (max-width:768px) {
    .nx-article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nx-article thead {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

/* ===== LINKS DENTRO DE TABLAS (si sobreviven al sanitizer) ===== */
.nx-article table a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
}

    .nx-article table a:hover {
        text-decoration: underline;
    }




/*ESTILO DETALLE DE LA NOTICIA*/

.nx-detail-hero {
    height: 500px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
}

.nx-detail-overlay {
    position: absolute;
    inset: 0;
    /* background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); */
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    color: #fff;
}

.nx-detail-title {
    font-weight: 900;
    margin: 0;
    font-size: 1.9rem;
    line-height: 2.2rem;
}

.nx-detail-date {
    font-size: 0.75rem;
    color: #666;
    /* font-weight: 600; */
}

.nx-article {
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 22px rgba(0,0,0,.06);
    line-height: 1.65rem;
    font-size: 1rem;
}

.nx-sidecard {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.nx-mini {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: #111;
    align-items: flex-start;
}

.nx-mini__img {
    width: 88px;
    height: 64px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex: 0 0 auto;
}

.nx-mini__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nx-mini__title {
    font-weight: 800;
    line-height: 1.2rem;
    font-size: .92rem;
}

/* tag reutiliza el del Index si lo tienes global, sino mantenlo aquí también */
/*.nx-tag {
    display: inline-flex;
    width: fit-content;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .70rem;
    font-weight: 800;
    letter-spacing: .5px;
    background: #2b2b2b;
    color: #fff;
}*/

/*.tag-actualidad {
    background: #2dd4bf;
    color: #0b2a25;
}

.tag-novedades {
    background: #fbbf24;
    color: #3a2b00;
}

.tag-review {
    background: #60a5fa;
    color: #081a2f;
}

.tag-pruebas {
    background: #a78bfa;
    color: #1c0b2f;
}

.tag-comparativa {
    background: #fb7185;
    color: #2f0812;
}

.tag-presentacion {
    background: #34d399;
    color: #062114;
}*/

@media (max-width: 991px) {
    .nx-detail-hero {
        height: 300px;
    }

    .nx-detail-title {
        font-size: 1.5rem;
        line-height: 1.85rem;
    }
}