/* ═══════════════════════════════════════════════════════════
   BLOG
   Listado, ficha de artículo y navegación por categoría.
   Usa las variables del camping definidas en camping.css.
   ═══════════════════════════════════════════════════════════ */

/* ====== CABECERA DE SECCIÓN ====== */

.content__header {
    max-width: 46rem;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}
.content__header h1 {
    font-family: var(--camping-display);
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.08;
    margin: 0 0 1rem;
    text-wrap: balance;
}
.content__lead {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* ====== NAVEGACIÓN POR CATEGORÍA ====== */

.chip-nav {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .5rem;
    margin: 0 auto clamp(2.2rem, 4vw, 3.2rem);
    padding: 0; list-style: none;
    max-width: 56rem;
}
.chip-nav__item,
.chip-nav a {
    display: inline-flex; align-items: center;
    padding: .5rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    background: transparent;
    font-size: .86rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
}
.chip-nav a:hover {
    border-color: var(--espresso);
    color: var(--espresso);
}
.chip-nav a.is-active,
.chip-nav__item.is-active {
    background: var(--espresso);
    border-color: var(--espresso);
    color: var(--ivory);
}

/* ====== GRILLA DE ARTÍCULOS ====== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: clamp(1.2rem, 2.5vw, 2rem);
    margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.post-card {
    display: flex; flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-soft);
    box-shadow: 0 22px 46px -22px rgba(13, 26, 20, .3);
}
.post-card__img {
    display: block;
    aspect-ratio: 3 / 2;
    background: var(--ivory-2);
    overflow: hidden;
}
.post-card__img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s ease;
}
.post-card:hover .post-card__img img { transform: scale(1.04); }

/* El título vive dentro del mismo enlace que la imagen: el enlace es el
   bloque de contenido, y meta y extracto van como hermanos debajo. */
.post-card__link {
    display: block;
    text-decoration: none;
    color: var(--espresso);
}
.post-card__title {
    margin: 0;
    padding: clamp(1.05rem, 2vw, 1.35rem) clamp(1.05rem, 2vw, 1.4rem) 0;
    font-family: var(--camping-display);
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -.02em;
    transition: color .2s ease;
}
.post-card__link:hover .post-card__title { color: var(--gold); }

.post-card__cat {
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-deep);
}
.post-card__meta {
    margin: .5rem 0 0;
    padding: 0 clamp(1.05rem, 2vw, 1.4rem);
    font-size: .78rem;
    color: var(--color-text-subtle);
}
.post-card__text {
    margin: .75rem 0 0;
    padding: .9rem clamp(1.05rem, 2vw, 1.4rem) clamp(1.05rem, 2vw, 1.4rem);
    border-top: 1px solid var(--color-border);
    font-size: .92rem;
    line-height: 1.62;
    color: var(--color-text-muted);
}

/* ====== ARTÍCULO ====== */

.post { max-width: 44rem; margin: 0 auto; }
.post__meta {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem;
    font-size: .8rem; letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 1rem;
    justify-content: center;
}
.content__hero-img {
    display: block;
    width: 100%;
    max-width: 56rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.prose { font-size: 1.02rem; line-height: 1.78; color: var(--color-text); }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
    font-family: var(--camping-display);
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 600; letter-spacing: -.02em; line-height: 1.2;
    margin: 2.6rem 0 0; padding-top: 1.8rem;
    border-top: 1px solid var(--color-border);
    text-wrap: balance;
}
.prose h3 {
    font-family: var(--camping-display);
    font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
    margin: 1.9rem 0 0;
}
.prose p { margin: 1.1rem 0 0; }
.prose strong { font-weight: 600; color: var(--espresso); }
.prose a { color: var(--gold-deep); text-underline-offset: 3px; }
.prose a:hover { color: var(--espresso); }
.prose ul, .prose ol { margin: 1.2rem 0 0; padding-left: 0; list-style: none; }
.prose li {
    position: relative;
    padding: .55rem 0 .55rem 1.9rem;
    border-bottom: 1px solid var(--color-border);
}
.prose ul li::before {
    content: ""; position: absolute; left: 0; top: 1.35rem;
    width: 11px; height: 1px; background: var(--gold);
}
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before {
    content: counter(n, decimal-leading-zero);
    position: absolute; left: 0; top: .62rem;
    font-size: .78rem; color: var(--gold-deep);
}
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }

.content__note {
    margin-top: 2.2rem; padding: 1.3rem 1.5rem;
    border: 1px solid var(--gold-soft);
    border-radius: var(--radius);
    background: rgba(233, 220, 196, .38);
    font-size: .92rem; line-height: 1.65;
}
.content__section-title {
    font-family: var(--camping-display);
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 600; letter-spacing: -.02em;
    margin: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
    text-align: center;
}

/* ====== MIGA Y PAGINACIÓN ====== */

.breadcrumb {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .4rem .7rem;
    margin: 0 0 1.2rem; padding: 0; list-style: none;
    font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--color-text-subtle);
}
.breadcrumb a { color: var(--gold-deep); text-decoration: none; }
.breadcrumb a:hover { color: var(--espresso); }

.pagination {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .45rem; margin: clamp(2rem, 4vw, 3rem) 0 0;
    padding: 0; list-style: none;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 .7rem;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    font-size: .88rem; text-decoration: none;
    color: var(--color-text-muted);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pagination a:hover { border-color: var(--espresso); color: var(--espresso); }
.pagination .is-active,
.pagination [aria-current] {
    background: var(--espresso); border-color: var(--espresso); color: var(--ivory);
}

@media (prefers-reduced-motion: reduce) {
    .post-card, .post-card__img img { transition: none; }
    .post-card:hover { transform: none; }
    .post-card:hover .post-card__img img { transform: none; }
}

/* ====== ENTRADAS EN EL INICIO ====== */

.post-grid--home { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.home-blog__mas { margin: clamp(2rem, 4vw, 3rem) 0 0; text-align: center; }
