/* =========================================================
   JaimeDiaz.TV — News Story
   Componente editorial para listados de Noticias
   ========================================================= */

.jdr-content-page--news {
    display: grid;
    gap: 18px;

    overflow: visible;

    border: 0;
    border-radius: 0;

    background: transparent;

    box-shadow: none;
}


/* =========================================================
   Story
   ========================================================= */

.jdr-news-story {
    position: relative;

    min-width: 0;
    min-height: 188px;

    display: grid;

    grid-template-columns:
        228px
        minmax(0, 1fr);

    overflow: hidden;

    border: 0;
    border-radius: 14px;

    background:
        var(--jdr-surface);

    box-shadow:
        0 6px 22px
        rgba(16, 25, 43, 0.05);

    transition:
        box-shadow
        var(--jdr-duration-fast)
        var(--jdr-ease-standard),
        transform
        var(--jdr-duration-fast)
        var(--jdr-ease-standard);
}

.jdr-news-story:hover {
    box-shadow:
        0 11px 30px
        rgba(16, 25, 43, 0.075);

    transform:
        translateY(-1px);
}


/* Primera noticia:
   misma familia, un poco más de jerarquía. */

.jdr-news-story:first-child {
    min-height: 208px;

    grid-template-columns:
        270px
        minmax(0, 1fr);
}


/* =========================================================
   Media
   ========================================================= */

.jdr-news-story__media {
    position: relative;

    min-width: 0;
    min-height: 188px;

    display: block;

    overflow: hidden;

    background:
        var(--jdr-surface-soft);

    text-decoration: none;
}

.jdr-news-story:first-child
.jdr-news-story__media {
    min-height: 208px;
}

.jdr-news-story__image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform
        380ms
        var(--jdr-ease-standard);
}

.jdr-news-story:hover
.jdr-news-story__image {
    transform:
        scale(1.025);
}

.jdr-news-story__placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color:
        var(--jdr-text-muted);

    font-size: 1.4rem;
}

.jdr-news-story__media-accent {
    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;

    width: 3px;

    background:
        var(--jdr-orange-700);

    opacity: 0.72;

    pointer-events: none;
}


/* =========================================================
   Body
   ========================================================= */

.jdr-news-story__body {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding:
        21px
        25px
        18px;
}


/* =========================================================
   Contexto superior
   ========================================================= */

.jdr-news-story__topline {
    min-height: 27px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}

.jdr-news-story__context {
    min-width: 0;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
}

.jdr-news-story__category {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    color:
        var(--jdr-orange-700);

    font-size: 0.62rem;
    font-weight: 850;

    letter-spacing: 0.085em;

    text-decoration: none;
    text-transform: uppercase;
}

.jdr-news-story__category::before {
    width: 5px;
    height: 5px;

    flex: 0 0 auto;

    border-radius: 50%;

    background:
        var(--jdr-orange-700);

    content: "";
}

.jdr-news-story__category:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jdr-news-story__date {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    min-height: 25px;

    padding:
        4px
        8px;

    border-radius: 999px;

    color:
        var(--jdr-text-secondary);

    background:
        var(--jdr-surface-soft);

    font-size: 0.58rem;
    font-weight: 700;

    letter-spacing: 0.01em;
}


/* =========================================================
   Estados editoriales
   ========================================================= */

.jdr-news-story__status {
    display: inline-flex;
    align-items: center;

    min-height: 19px;

    padding:
        2px
        7px;

    border-radius: 999px;

    font-size: 0.48rem;
    font-weight: 820;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}

.jdr-news-story__status--new {
    color:
        var(--jdr-orange-700);

    background:
        rgba(244, 115, 33, 0.08);
}

.jdr-news-story__status--updated {
    color:
        var(--jdr-text-secondary);

    background:
        var(--jdr-surface-soft);
}

.jdr-news-story__pin {
    color:
        var(--jdr-orange-700);

    font-size: 0.52rem;
}


/* =========================================================
   Headline
   ========================================================= */

.jdr-news-story__title {
    max-width: 760px;

    margin:
        11px
        0
        0;

    color:
        var(--jdr-text-primary);

    font-size: 1.10rem;
    font-weight: 830;

    letter-spacing: -0.03em;
    line-height: 1.14;
}

.jdr-news-story:first-child
.jdr-news-story__title {
    font-size: 1.22rem;
}

.jdr-news-story__title a {
    color: inherit;

    text-decoration: none;
}

.jdr-news-story__title a:hover {
    color:
        var(--jdr-orange-700);
}


/* =========================================================
   Resumen
   ========================================================= */

.jdr-news-story__summary {
    max-width: 720px;

    margin-top: 9px;

    color:
        var(--jdr-text-secondary);

    font-size: 0.70rem;
    line-height: 1.52;

    display: -webkit-box;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* =========================================================
   Footer editorial
   ========================================================= */

.jdr-news-story__footer {
    display: flex;
    align-items: center;

    gap: 18px;

    margin-top: auto;

    padding-top: 13px;

    border-top:
        1px solid
        rgba(102, 112, 133, 0.12);
}

.jdr-news-story__byline {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    color:
        var(--jdr-text-muted);

    font-size: 0.59rem;
    line-height: 1;
}

.jdr-news-story__byline strong {
    color:
        var(--jdr-text-secondary);

    font-weight: 780;
}

.jdr-news-story__engagement {
    display: flex;
    align-items: center;

    gap: 13px;

    color:
        var(--jdr-text-muted);

    font-size: 0.59rem;
}

.jdr-news-story__engagement span {
    display: inline-flex;
    align-items: center;

    gap: 5px;
}

.jdr-news-story__read {
    margin-left: auto;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    color:
        var(--jdr-orange-700);

    font-size: 0.61rem;
    font-weight: 820;

    text-decoration: none;

    letter-spacing: 0.01em;
}

.jdr-news-story__read i {
    transition:
        transform
        var(--jdr-duration-fast)
        var(--jdr-ease-standard);
}

.jdr-news-story__read:hover i {
    transform:
        translateX(3px);
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1020px) {

    .jdr-news-story,
    .jdr-news-story:first-child {
        grid-template-columns:
            205px
            minmax(0, 1fr);
    }

    .jdr-news-story:first-child
    .jdr-news-story__title {
        font-size: 1.08rem;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 680px) {

    .jdr-content-page--news {
        gap: 12px;
    }

    .jdr-news-story,
    .jdr-news-story:first-child {
        min-height: 0;

        grid-template-columns:
            118px
            minmax(0, 1fr);

        border-radius: 12px;
    }

    .jdr-news-story__media,
    .jdr-news-story:first-child
    .jdr-news-story__media {
        min-height: 138px;
    }

    .jdr-news-story__body {
        padding:
            13px
            13px
            12px;
    }

    .jdr-news-story__date {
        display: none;
    }

    .jdr-news-story__title,
    .jdr-news-story:first-child
    .jdr-news-story__title {
        margin-top: 6px;

        font-size: 0.80rem;
        line-height: 1.18;
    }

    .jdr-news-story__summary {
        margin-top: 6px;

        font-size: 0.57rem;

        -webkit-line-clamp: 2;
    }

    .jdr-news-story__footer {
        gap: 10px;

        padding-top: 10px;
    }

    .jdr-news-story__byline {
        display: none;
    }

    .jdr-news-story__read span {
        display: none;
    }

}


/* =========================================================
   JaimeDiaz.TV — News Story
   Integración nativa DLE
   ========================================================= */


/* ---------------------------------------------------------
   Fecha navegable
   --------------------------------------------------------- */

.jdr-news-story__date a {
    color: inherit;
    text-decoration: none;
}

.jdr-news-story__date a:hover {
    color: var(--jdr-orange-700);
}


/* ---------------------------------------------------------
   Autor / perfil
   --------------------------------------------------------- */

.jdr-news-story__byline a {
    color: inherit;
    text-decoration: none;
}

.jdr-news-story__byline a:hover strong {
    color: var(--jdr-orange-700);
}


/* ---------------------------------------------------------
   Estados editoriales
   --------------------------------------------------------- */

.jdr-news-story__status {
    display: inline-flex;
    align-items: center;

    min-height: 20px;

    padding: 3px 7px;

    border-radius: 999px;

    font-size: 0.56rem;
    font-weight: 800;

    letter-spacing: 0.07em;
    line-height: 1;

    text-transform: uppercase;
}

.jdr-news-story__status--new {
    color: var(--jdr-orange-700);

    background:
        rgba(244, 115, 33, 0.08);
}

.jdr-news-story__status--updated {
    color: var(--jdr-blue-700, #233a61);

    background:
        rgba(35, 58, 97, 0.07);
}


/* ---------------------------------------------------------
   Publicación fijada
   --------------------------------------------------------- */

.jdr-news-story__pin {
    display: inline-grid;
    place-items: center;

    width: 20px;
    height: 20px;

    color: var(--jdr-orange-700);

    font-size: 0.62rem;
}


/* ---------------------------------------------------------
   Comentarios navegables
   --------------------------------------------------------- */

.jdr-news-story__engagement a {
    color: inherit;
    text-decoration: none;
}

.jdr-news-story__comments {
    transition:
        color
        var(--jdr-duration-fast)
        var(--jdr-ease-standard);
}

.jdr-news-story__engagement a:hover
.jdr-news-story__comments {
    color: var(--jdr-orange-700);
}


/* ---------------------------------------------------------
   Acciones
   --------------------------------------------------------- */

.jdr-news-story__actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.jdr-news-story__utility {
    width: 28px;
    height: 28px;

    display: inline-grid;
    place-items: center;

    border-radius: 50%;

    color: var(--jdr-text-secondary);

    cursor: pointer;

    font-size: 0.72rem;

    transition:
        color
        var(--jdr-duration-fast)
        var(--jdr-ease-standard),
        background
        var(--jdr-duration-fast)
        var(--jdr-ease-standard);
}

.jdr-news-story__utility:hover {
    color: var(--jdr-orange-700);

    background:
        rgba(244, 115, 33, 0.07);
}

.jdr-news-story__utility--active {
    color: var(--jdr-orange-700);
}


/* ---------------------------------------------------------
   Fixed — acento editorial muy discreto
   --------------------------------------------------------- */

.jdr-news-story--fixed::after {
    position: absolute;

    top: 18px;
    left: 0;

    width: 3px;
    height: 34px;

    border-radius:
        0
        3px
        3px
        0;

    background:
        var(--jdr-orange-700);

    content: "";
}


/* ---------------------------------------------------------
   Focus accesible
   --------------------------------------------------------- */

.jdr-news-story__date a:focus-visible,
.jdr-news-story__byline a:focus-visible,
.jdr-news-story__engagement a:focus-visible {
    outline:
        2px solid
        rgba(244, 115, 33, 0.45);

    outline-offset: 3px;

    border-radius: 3px;
}


/* =========================================================
   Footer metadata — alineación estable
   Evita que autor, vistas y comentarios salten de línea
   ========================================================= */

.jdr-news-story__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.jdr-news-story__meta {
    min-width: 0;

    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px;
}

.jdr-news-story__byline,
.jdr-news-story__engagement {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
}

.jdr-news-story__byline {
    gap: 5px;
    white-space: nowrap;
}

.jdr-news-story__engagement {
    gap: 14px;
}

.jdr-news-story__engagement > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    white-space: nowrap;
}

.jdr-news-story__actions {
    margin-left: auto;

    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;

    white-space: nowrap;
}


/* DLE envuelve favoritos dentro de un <a> propio */
.jdr-news-story__actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ---------------------------------------------------------
   Responsive
   En móvil sí permitimos reorganización controlada
   --------------------------------------------------------- */

@media (max-width: 640px) {

    .jdr-news-story__footer {
        gap: 12px;
    }

    .jdr-news-story__meta {
        gap: 12px;
    }

    .jdr-news-story__engagement {
        gap: 10px;
    }

}


/* =========================================================
   Generic Shortstory
   Fechas, búsqueda, tags, favoritos y listados DLE
   ========================================================= */

.jdr-content-page:not(.jdr-content-page--news)
.jdr-news-story {
    width: 100%;
    max-width: 1000px;

    margin-right: auto;
    margin-left: auto;
}

.jdr-content-page:not(.jdr-content-page--news)
.jdr-news-story + .jdr-news-story {
    margin-top: 18px;
}

.jdr-news-story--generic:first-child {
    min-height: 188px;

    grid-template-columns:
        228px
        minmax(0, 1fr);
}

.jdr-news-story--generic:first-child
.jdr-news-story__media {
    min-height: 188px;
}


/* Edición de publicación */

.jdr-news-story__edited {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 10px;

    color: var(--jdr-text-muted);

    font-size: 0.56rem;
    line-height: 1.4;
}

.jdr-news-story__edited i {
    color: var(--jdr-orange-700);
}

.jdr-news-story__edited span {
    width: 100%;
}


/* =========================================================
   Mobile generic
   ========================================================= */

@media (max-width: 680px) {

    .jdr-news-story--generic:first-child {
        min-height: 0;

        grid-template-columns:
            118px
            minmax(0, 1fr);
    }

    .jdr-news-story--generic:first-child
    .jdr-news-story__media {
        min-height: 138px;
    }

}
