/* =========================================================================
   fdh-blog.css — Índice y artículos del blog
   ========================================================================= */

/* ---------- Índice ---------- */
.fdh-blog-hero {
    background: var(--fdh-tinta);
    color: var(--fdh-crema);
    padding: clamp(4.5rem, 3rem + 7vw, 7.5rem) var(--fdh-s3) clamp(2.5rem, 2rem + 3vw, 4rem);
    text-align: center;
}

.fdh-blog-hero h1 {
    color: #fff;
}

/* El hero es oscuro, así que hay que aclarar también el texto: .fdh-lead viene
   con el gris de cuerpo y se quedaba en tinta sobre tinta, invisible. */
.fdh-blog-hero p,
.fdh-blog-hero .fdh-lead {
    color: rgba(250, 247, 242, .84);
}

.fdh-blog-hero b,
.fdh-blog-hero strong {
    color: #fff;
}

.fdh-blog-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: center;
    margin-top: var(--fdh-s3);
}

.fdh-blog-filtros button {
    border: 1px solid rgba(255, 255, 255, .28);
    background: transparent;
    color: rgba(255, 255, 255, .82);
    border-radius: 999px;
    padding: .48em 1.15em;
    font-size: .82rem;
    font-family: var(--fdh-texto);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.fdh-blog-filtros button:hover {
    border-color: #fff;
    color: #fff;
}

.fdh-blog-filtros button.activo {
    background: var(--fdh-oro);
    border-color: var(--fdh-oro);
    color: var(--fdh-tinta);
    font-weight: 600;
}

.fdh-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: var(--fdh-s3);
}

.fdh-post-card {
    background: var(--fdh-blanco);
    border: 1px solid var(--fdh-linea);
    border-radius: var(--fdh-r-m);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s cubic-bezier(.3, .8, .4, 1), box-shadow .25s ease;
}

.fdh-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--fdh-sombra-m);
}

.fdh-post-card__img {
    aspect-ratio: 1200 / 628;
    overflow: hidden;
    background: var(--fdh-crema-2);
}

.fdh-post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.3, .8, .4, 1);
}

.fdh-post-card:hover .fdh-post-card__img img {
    transform: scale(1.05);
}

.fdh-post-card__cuerpo {
    padding: var(--fdh-s3);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1 1 auto;
}

.fdh-post-card h2,
.fdh-post-card h3 {
    font-size: 1.14rem;
    line-height: 1.28;
    margin: 0;
}

.fdh-post-card h2 a,
.fdh-post-card h3 a {
    color: var(--fdh-tinta);
    text-decoration: none !important;
}

.fdh-post-card h2 a:hover,
.fdh-post-card h3 a:hover {
    color: var(--fdh-rosa);
}

.fdh-post-card p {
    font-size: .9rem;
    font-weight: 300;
    color: var(--fdh-tinta-70);
    margin: 0;
    flex: 1 1 auto;
}

.fdh-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    font-size: .74rem;
    color: var(--fdh-tinta-50);
}

.fdh-post-cat {
    background: var(--fdh-rosa-suave);
    color: var(--fdh-rosa-osc);
    border-radius: 999px;
    padding: .28em .8em;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fdh-post-cat[data-cat="Aprender"] {
    background: var(--fdh-azul-suave);
    color: var(--fdh-azul-osc);
}

.fdh-post-cat[data-cat="Negocio"] {
    background: var(--fdh-naranja-suave);
    color: var(--fdh-naranja-texto);
}

.fdh-post-cat[data-cat="Dar lecturas"] {
    background: var(--fdh-lila-suave);
    color: #6b3a92;
}

/* Artículo destacado del índice */
.fdh-post-destacado {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 0;
    background: var(--fdh-blanco);
    border: 1px solid var(--fdh-linea);
    border-radius: var(--fdh-r-l);
    overflow: hidden;
    margin-bottom: var(--fdh-s4);
}

.fdh-post-destacado__img {
    min-height: 320px;
    background: var(--fdh-crema-2);
}

.fdh-post-destacado__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fdh-post-destacado__cuerpo {
    padding: clamp(1.6rem, 1rem + 2.5vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .9rem;
}

.fdh-post-destacado h2 {
    font-size: clamp(1.4rem, 1.15rem + 1.2vw, 2.1rem);
    margin: 0;
}

.fdh-post-destacado h2 a {
    color: var(--fdh-tinta);
    text-decoration: none !important;
}

.fdh-post-destacado h2 a:hover {
    color: var(--fdh-rosa);
}

@media (max-width: 860px) {
    .fdh-post-destacado {
        grid-template-columns: 1fr;
    }

    .fdh-post-destacado__img {
        min-height: 0;
        aspect-ratio: 1200 / 628;
    }
}

/* ---------- Artículo ---------- */
.fdh-articulo-cab {
    background: var(--fdh-crema-2);
    padding: var(--fdh-s3) var(--fdh-s3) var(--fdh-s5);
    text-align: center;
}

.fdh-articulo-cab__inner {
    max-width: 820px;
    margin-inline: auto;
}

.fdh-articulo-cab h1 {
    font-size: clamp(1.75rem, 1.3rem + 2.2vw, 3rem);
    margin: var(--fdh-s3) 0 var(--fdh-s2);
    line-height: 1.14;
}

.fdh-articulo-cab .fdh-lead {
    margin-bottom: var(--fdh-s3);
}

.fdh-articulo-autor {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: .84rem;
    color: var(--fdh-tinta-70);
}

.fdh-articulo-autor img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fdh-articulo-autor b {
    color: var(--fdh-tinta);
}

.fdh-articulo-portada {
    max-width: 980px;
    margin: calc(var(--fdh-s5) * -1) auto var(--fdh-s5);
    padding-inline: var(--fdh-s3);
}

.fdh-articulo-portada img {
    width: 100%;
    border-radius: var(--fdh-r-l);
    box-shadow: var(--fdh-sombra-m);
}

.fdh-articulo {
    max-width: 740px;
    margin-inline: auto;
    padding-inline: var(--fdh-s3);
    font-size: 1.075rem;
    line-height: 1.78;
    font-weight: 300;
}

.fdh-articulo h2 {
    font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem);
    margin: var(--fdh-s6) 0 var(--fdh-s2);
    scroll-margin-top: 90px;
}

.fdh-articulo h3 {
    font-size: clamp(1.12rem, 1.02rem + .5vw, 1.35rem);
    margin: var(--fdh-s4) 0 var(--fdh-s2);
    color: var(--fdh-azul-osc);
    scroll-margin-top: 90px;
}

.fdh-articulo p {
    margin-bottom: 1.35rem;
}

.fdh-articulo ul,
.fdh-articulo ol {
    margin-bottom: 1.6rem;
    padding-left: 1.4em;
}

.fdh-articulo li {
    margin-bottom: .7em;
}

.fdh-articulo strong {
    font-weight: 600;
}

.fdh-articulo a {
    color: var(--fdh-rosa-osc);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.fdh-articulo a:hover {
    color: var(--fdh-rosa);
}

.fdh-articulo>*:first-child {
    margin-top: 0;
}

/* Índice de contenidos */
.fdh-indice {
    background: var(--fdh-blanco);
    border: 1px solid var(--fdh-linea);
    border-radius: var(--fdh-r-m);
    padding: var(--fdh-s3) var(--fdh-s4);
    margin-bottom: var(--fdh-s5);
}

.fdh-indice h2 {
    font-size: .78rem !important;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--fdh-tinta-50);
    margin: 0 0 var(--fdh-s2) !important;
    font-weight: 600;
}

.fdh-indice ol {
    margin: 0;
    padding-left: 1.3em;
    font-size: .95rem;
}

.fdh-indice li {
    margin-bottom: .45em;
}

.fdh-indice a {
    color: var(--fdh-tinta);
    text-decoration: none;
}

.fdh-indice a:hover,
.fdh-indice a.activo {
    color: var(--fdh-rosa);
    text-decoration: underline;
}

.fdh-indice a.activo {
    font-weight: 600;
}

/* Elementos dentro del artículo */
.fdh-articulo .fdh-destacado {
    border-left: 4px solid var(--fdh-rosa);
    background: var(--fdh-rosa-suave);
    padding: var(--fdh-s3) var(--fdh-s3) var(--fdh-s3) var(--fdh-s4);
    border-radius: 0 var(--fdh-r-m) var(--fdh-r-m) 0;
    margin: var(--fdh-s4) 0;
    font-size: 1.06rem;
    font-weight: 400;
}

.fdh-articulo .fdh-destacado p:last-child {
    margin-bottom: 0;
}

.fdh-articulo .fdh-caja {
    background: var(--fdh-azul-suave);
    border-radius: var(--fdh-r-m);
    padding: var(--fdh-s3) var(--fdh-s4);
    margin: var(--fdh-s4) 0;
    font-size: .98rem;
}

.fdh-articulo .fdh-caja h3 {
    margin-top: 0;
    color: var(--fdh-azul-osc);
    font-size: 1.05rem;
}

.fdh-articulo .fdh-caja p:last-child,
.fdh-articulo .fdh-caja ul:last-child {
    margin-bottom: 0;
}

.fdh-articulo figure {
    margin: var(--fdh-s4) 0;
}

.fdh-articulo figure img {
    border-radius: var(--fdh-r-m);
    width: 100%;
}

.fdh-articulo figcaption {
    font-size: .8rem;
    color: var(--fdh-tinta-50);
    text-align: center;
    margin-top: .6rem;
}

/* CTA intercalado */
.fdh-cta-inline {
    background: var(--fdh-tinta);
    color: var(--fdh-crema);
    border-radius: var(--fdh-r-l);
    padding: var(--fdh-s4);
    margin: var(--fdh-s5) 0;
    text-align: center;
}

.fdh-cta-inline h3 {
    color: #fff !important;
    margin-top: 0 !important;
    font-size: 1.3rem !important;
}

.fdh-cta-inline p {
    color: rgba(250, 247, 242, .8);
    font-size: .97rem;
}

.fdh-cta-inline p:last-of-type {
    margin-bottom: var(--fdh-s3);
}

.fdh-cta-inline a.fdh-btn {
    text-decoration: none !important;
}

/* Firma del autor */
.fdh-firma {
    display: flex;
    gap: var(--fdh-s3);
    align-items: flex-start;
    background: var(--fdh-blanco);
    border: 1px solid var(--fdh-linea);
    border-radius: var(--fdh-r-m);
    padding: var(--fdh-s3) var(--fdh-s4);
    margin: var(--fdh-s5) 0 0;
    font-size: .93rem;
}

.fdh-firma img {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.fdh-firma h3 {
    margin: 0 0 .3rem !important;
    font-size: 1.02rem !important;
    color: var(--fdh-tinta) !important;
}

.fdh-firma p {
    margin: 0;
    font-size: .89rem;
    color: var(--fdh-tinta-70);
}

.fdh-firma__dh {
    font-size: .76rem;
    color: var(--fdh-rosa);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .5rem !important;
    display: block;
}

/* Relacionados */
.fdh-relacionados {
    background: var(--fdh-crema-2);
    margin-top: var(--fdh-s6);
}

@media (max-width: 560px) {
    .fdh-articulo {
        font-size: 1.02rem;
    }

    .fdh-firma {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .fdh-indice {
        padding: var(--fdh-s3);
    }
}
