/* ============================================================
   Blog: listado y ficha de articulo.
   Paleta y tipografias son las de base.css; aqui solo se recogen
   como variables para no repetir los hex en cada regla.
   ============================================================ */

:root {
    --vg-ink: #4B2C24;
    --vg-body: #4A332F;
    --vg-bg: #FDF7F7;
    --vg-cream: #f6eee0;
    --vg-accent: #E8A798;
    --vg-accent-deep: #B26E5D;
    --vg-line: #E8D8D1;
}

/* Antetitulo de categoria, compartido por listado y articulo */
.post-cat {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vg-accent-deep);
}

/* ============================================================
   LISTADO
   ============================================================ */
.blog-intro {
    padding: 50px 0 40px;
    text-align: center;
}
.blog-intro h1 { margin-bottom: 0; }

/* Destacado: imagen a sangre con el titular encima */
.blog-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 70px;
    display: block;
    text-decoration: none;
    min-height: 360px;
}
.blog-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Doble degradado: vertical para el pie y horizontal para que el titular
   tenga contraste suficiente sobre la parte clara de la foto. */
.blog-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(75, 44, 36, 0.10) 0%, rgba(75, 44, 36, 0.62) 48%, rgba(75, 44, 36, 0.92) 100%),
        linear-gradient(90deg, rgba(75, 44, 36, 0.6) 0%, rgba(75, 44, 36, 0.08) 65%);
}
.blog-hero-body {
    position: relative;
    padding: 120px 26px 34px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* El antetitulo va en el blanco calido del fondo del sitio, no en el color
   de acento: a 11px sobre la foto, #E8A798 se queda en 2.67:1 cuando el
   minimo es 4.5:1, y no hay degradado que lo salve sin tapar la imagen.
   #FDF7F7 da 5.09:1 y mantiene el matiz. El acento sigue en el subrayado. */
.blog-hero-flag {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vg-bg);
}
.blog-hero h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.28;
    margin: 0;
    max-width: 22ch;
}
.blog-hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    max-width: 58ch;
}
.blog-hero-more {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border-bottom: 2px solid var(--vg-accent);
    align-self: flex-start;
    padding-bottom: 3px;
    margin-top: 6px;
}

/* Rejilla del resto de articulos */
.blog-grid-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vg-ink);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--vg-line);
    margin-bottom: 32px;
}
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px 28px;
    padding-bottom: 70px;
}
.blog-tile { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.blog-tile-media {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--vg-cream);
}
.blog-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.blog-tile:hover .blog-tile-media img { transform: scale(1.05); }
.blog-tile h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}
.blog-tile p { font-size: 14px; line-height: 1.6; margin: 0; }

@media (min-width: 768px) {
    .blog-hero { min-height: 440px; }
    .blog-hero-body { padding: 190px 44px 44px; }
    .blog-hero h2 { font-size: 36px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .blog-hero h2 { font-size: 42px; }
    .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   FICHA DE ARTICULO
   Editorial a una columna: titular tipografico grande, capitular,
   secciones numeradas al margen y un destacado entresacado. Migas,
   imagen, titular y texto comparten la misma caja para que todos
   arranquen en el mismo margen.
   ============================================================ */
.post-wrap {
    max-width: 820px;
    margin: 0 auto;
}

/* Migas.
   Es un <nav>, asi que hay que anular los estilos globales de nav de
   base.css (fixed en movil, flex con space-between en escritorio),
   igual que hace #footer-nav. */
.post-crumbs {
    position: static;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: var(--vg-body);
    padding: 30px 0 0;
}
.post-crumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.post-crumbs a { color: var(--vg-accent-deep); text-decoration: none; }
.post-crumbs a:hover { text-decoration: underline; }

/* Imagen de cabecera */
.post-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    min-height: 200px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--vg-cream);
    margin: 22px 0 0;
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Titular */
.post-head { padding: 40px 0 0; }
.post-head h1 {
    font-size: 32px;
    line-height: 1.18;
    font-weight: 500;
    margin-bottom: 0;
}

/* Filete de separacion con el arranque en color de acento */
.post-rule {
    height: 1px;
    background: var(--vg-line);
    margin: 34px 0 40px;
    position: relative;
}
.post-rule::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 90px;
    height: 3px;
    background: var(--vg-accent);
}

/* Cuerpo del texto */
.post-body { counter-reset: seccion; }
.post-body > p:first-of-type::first-letter {
    float: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 66px;
    line-height: 0.82;
    font-weight: 600;
    color: var(--vg-ink);
    margin: 6px 12px 0 0;
}
.post-body p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
}
.post-body strong { font-weight: 600; color: var(--vg-ink); }

/* Cada seccion abre con filete y una barra de acento encima. La barra va
   como background-image en lugar de ::before para no pelearse con el
   padding-top: asi se dibuja justo sobre el borde. */
.post-body h2 {
    counter-increment: seccion;
    position: relative;
    font-size: 24px;
    font-weight: 500;
    margin: 48px 0 18px;
    padding-top: 26px;
    border-top: 1px solid var(--vg-line);
    background-image: linear-gradient(var(--vg-accent), var(--vg-accent));
    background-size: 46px 3px;
    background-position: 0 0;
    background-repeat: no-repeat;
    scroll-margin-top: 110px;
}

/* Destacado entresacado */
.post-pull {
    font-family: 'Montserrat', sans-serif;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--vg-ink);
    border-left: 3px solid var(--vg-accent);
    padding: 4px 0 4px 22px;
    margin: 40px 0;
}

/* Enlaces dentro del texto */
.post-body a {
    color: var(--vg-accent-deep);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.25s ease;
}
.post-body a:hover { color: var(--vg-ink); }

/* Referencias: sin filete propio, cada h2 ya trae el suyo */
.post-refs { margin-top: 56px; }
.post-refs h2 { font-size: 20px; }
.post-refs ol { padding-left: 0; list-style: none; }
.post-refs li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--vg-body);
    margin-bottom: 16px;
    padding-left: 22px;
    text-indent: -22px;
}
.post-refs a { color: var(--vg-accent-deep); word-break: break-word; }

/* Cierre: caja en crema con llamada a la accion. Va fuera de .post-body,
   asi que su h2 no entra en la numeracion de secciones. */
.post-cta {
    background: var(--vg-cream);
    border-radius: 14px;
    padding: 38px 26px;
    text-align: center;
    margin: 60px 0 80px;
}
.post-cta h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}
.post-cta p {
    max-width: 52ch;
    margin: 0 auto 24px;
    font-size: 16px;
}

@media (min-width: 992px) {
    .post-head h1 { font-size: 52px; }
    .post-body p { font-size: 18px; }
    .post-body h2 { font-size: 28px; }
    .post-pull { font-size: 25px; margin: 52px 0; }
}

/* La numeracion de seccion vive en el margen izquierdo, asi que solo
   aparece cuando el hueco entre el borde del contenedor y la caja del
   texto da de si. */
@media (min-width: 1140px) {
    .post-body h2::after {
        content: counter(seccion, decimal-leading-zero);
        position: absolute;
        left: -78px;
        top: 30px;
        font-family: 'Montserrat', sans-serif;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.06em;
        color: var(--vg-accent);
    }
}
