/* =========================================
   BLOG — Rastro Ripollet
   Reutiliza los tokens de base.css / global.css
   (page-header, --bg-card, --text-main, etc.)
   Tipografía fluida con clamp() para legibilidad
   en móvil, tablet y escritorio.
   ========================================= */

/* ---------- Listado (blog.html) ---------- */

.blog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 70px;
}

.blog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px auto 34px;
}

.blog-filter-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter-btn:hover {
    border-color: var(--text-main);
}

.blog-filter-btn.active {
    background: var(--text-main);
    border-color: var(--text-main);
    color: var(--bg-body);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(128, 128, 128, 0.14);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    width: 100%;
    background: var(--bg-card-alt);
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 22px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-card-category {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--text-main);
    background: var(--bg-card-alt);
    padding: 4px 10px;
    border-radius: 999px;
}

.blog-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(17px, 2.2vw, 20px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin: 0 0 10px;
}

.blog-card-excerpt {
    font-size: clamp(13.5px, 1.8vw, 14.5px);
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-read {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.blog-empty,
.blog-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 15px;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 44px;
}

.blog-pagination button {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-pagination button:hover:not(:disabled) {
    background: var(--text-main);
    color: var(--bg-body);
}

.blog-pagination button:disabled {
    opacity: 0.35;
    cursor: default;
}

.blog-pagination span {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ---------- Artículo (blog-post.html) ---------- */

.post-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px 70px;
}

.post-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.post-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.post-breadcrumb a:hover {
    color: var(--text-main);
}

.post-category {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-main);
    background: var(--bg-card-alt);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.post-title {
    font-family: 'Poppins', sans-serif;
    /* Fluida: 26px móvil pequeño → 40px escritorio, siempre legible */
    font-size: clamp(26px, 5.5vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0 0 14px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 26px;
}

.post-cover {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    background: var(--bg-card-alt);
}

.post-cover img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

/* Cuerpo del artículo — legibilidad primero */
.post-content {
    font-size: clamp(15.5px, 2vw, 17px);
    line-height: 1.75;
    color: var(--text-main);
    overflow-wrap: break-word;
}

.post-content p {
    margin: 0 0 1.15em;
}

.post-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 3.4vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    margin: 1.7em 0 0.65em;
}

.post-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(17px, 2.6vw, 21px);
    font-weight: 700;
    line-height: 1.35;
    margin: 1.5em 0 0.55em;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.15em;
    padding-left: 1.4em;
}

.post-content li {
    margin-bottom: 0.45em;
}

.post-content a {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    border-left: 3px solid var(--accent-solid);
    background: var(--bg-card-alt);
    border-radius: 0 12px 12px 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1em 0;
}

/* CTA final hacia el catálogo */
.post-cta {
    margin-top: 44px;
    padding: 26px 24px;
    border-radius: 16px;
    background: var(--accent-gradient);
    border: 1px solid rgba(128, 128, 128, 0.12);
    text-align: center;
}

.post-cta h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(17px, 2.6vw, 21px);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px;
}

.post-cta p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.post-cta a {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--text-main);
    color: var(--bg-body);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.post-cta a:hover {
    opacity: 0.85;
}

/* Seguir leyendo */
.post-related {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 70px;
}

.post-related h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(19px, 3vw, 24px);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 22px;
    text-align: center;
}

/* Móvil: cover más compacta */
@media (max-width: 600px) {
    .post-cover img {
        max-height: 240px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}
