/* Blog público · listado + artículo */

/* ===== HERO BLOG ===== */
.zw-blog-hero {
    background: var(--zander-black);
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.zw-blog-hero__title {
    font-size: var(--fs-h1);
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--zander-white-hi);
    line-height: 1.05;
    margin-bottom: 16px;
}

.zw-blog-hero__title .highlight {
    color: var(--zander-yellow);
}

.zw-blog-hero__sub {
    font-size: var(--fs-body);
    color: rgba(255,255,255,0.65);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== LISTADO ===== */
.zw-blog-section {
    background: var(--zander-white-soft);
    padding: 80px 0 100px;
}

.zw-blog-section__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.zw-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Card */
.zw-blog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(29,29,27,0.1);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.zw-blog-card:hover {
    box-shadow: 0 12px 40px rgba(29,29,27,0.12);
    transform: translateY(-4px);
}

.zw-blog-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.zw-blog-card__img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--zander-black) 0%, #2d2d2b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zw-blog-card__img-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.2;
    fill: var(--zander-yellow);
}

.zw-blog-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.zw-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.zw-blog-card__category {
    background: var(--zander-yellow);
    color: var(--zander-black);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
}

.zw-blog-card__date {
    font-size: var(--fs-small);
    color: rgba(29,29,27,0.5);
}

.zw-blog-card__title {
    font-size: var(--fs-h4);
    font-weight: 700;
    color: var(--zander-black);
    line-height: 1.35;
    margin-bottom: 10px;
}

.zw-blog-card__excerpt {
    font-size: var(--fs-body);
    color: rgba(29,29,27,0.7);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zw-blog-card__cta {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--zander-black);
    display: flex;
    align-items: center;
    gap: 6px;
}

.zw-blog-card__cta svg {
    width: 16px;
    height: 16px;
    fill: var(--zander-yellow);
    transition: transform 0.2s ease;
}

.zw-blog-card:hover .zw-blog-card__cta svg {
    transform: translateX(4px);
}

/* Empty state */
.zw-blog-empty {
    text-align: center;
    padding: 60px 0;
    grid-column: 1 / -1;
}

.zw-blog-empty p {
    font-size: var(--fs-body);
    color: rgba(29,29,27,0.5);
}

/* ===== PAGINACIÓN ===== */
.zw-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.zw-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--zander-black);
    background: #fff;
    border: 1px solid rgba(29,29,27,0.2);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.zw-pagination__btn:hover,
.zw-pagination__btn--active {
    background: var(--zander-yellow);
    border-color: var(--zander-yellow);
    color: var(--zander-black);
}

.zw-pagination__btn--prev,
.zw-pagination__btn--next {
    width: auto;
    padding: 0 16px;
}

/* ===== ARTÍCULO INDIVIDUAL ===== */
.zw-post-hero {
    background: var(--zander-black);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.zw-post-hero__inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.zw-post-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.zw-post-hero__category {
    background: var(--zander-yellow);
    color: var(--zander-black);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
}

.zw-post-hero__date {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.zw-post-hero__readtime {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 12px;
}

.zw-post-hero__title {
    font-size: var(--fs-h1);
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--zander-white-hi);
    line-height: 1.05;
    margin-bottom: 0;
}

/* Post content */
.zw-post-section {
    background: #fff;
    padding: 60px 0 100px;
}

.zw-post-section__inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.zw-post__featured-img {
    width: 100%;
    aspect-ratio: 16 / 9; /* reserva espacio antes de cargar la imagen (anti-CLS) */
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 48px;
    display: block;
}

/* Prose / article content */
.zw-post__content {
    font-size: var(--fs-body);
    line-height: 1.8;
    color: var(--zander-black);
}

.zw-post__content h2 {
    font-size: var(--fs-h2);
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 2em 0 0.6em;
    line-height: 1.15;
}

.zw-post__content h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin: 1.6em 0 0.5em;
}

.zw-post__content h4 {
    font-size: var(--fs-h4);
    font-weight: 700;
    margin: 1.4em 0 0.4em;
}

.zw-post__content p { margin: 0 0 1.4em; }

.zw-post__content a {
    color: var(--zander-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.zw-post__content a:hover {
    color: var(--zander-yellow);
}

.zw-post__content ul,
.zw-post__content ol {
    margin: 0 0 1.4em 1.5em;
}

.zw-post__content li { margin-bottom: 0.4em; }

/* Tablas (p. ej. política de cookies): que quepan en móvil sin desbordar.
   table-layout:fixed respeta el width:100% y el contenido largo envuelve. */
.zw-post__content table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}
.zw-post__content th,
.zw-post__content td {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.zw-post__content blockquote {
    border-left: 4px solid var(--zander-yellow);
    margin: 1.6em 0;
    padding: 0.8em 1.5em;
    background: rgba(252,198,28,0.06);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.zw-post__content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 0.8em 0;
}

.zw-post__content pre {
    background: var(--zander-black);
    color: #f8f8f8;
    padding: 1.2em 1.4em;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    margin: 1.4em 0;
}

.zw-post__content code {
    background: rgba(29,29,27,0.07);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.zw-post__content pre code {
    background: none;
    padding: 0;
}

.zw-post__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 15px;
}

.zw-post__content th,
.zw-post__content td {
    border: 1px solid rgba(29,29,27,0.15);
    padding: 10px 14px;
    text-align: left;
}

.zw-post__content th {
    background: var(--zander-black);
    color: #fff;
    font-weight: 700;
}

/* ===== CTA dentro del cuerpo del artículo =====
   Caja branded (negro Zander + acento amarillo) que reutiliza el botón skew
   del sitio. Se inserta en el content_html con .zw-post-cta. */
.zw-post__content .zw-post-cta {
    margin: 2.6em 0;
    padding: 34px 38px;
    background: var(--zander-black, #1D1D1B);
    border: 1px solid rgba(252, 198, 28, 0.18);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}
.zw-post__content .zw-post-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(252, 198, 28, 0.16), transparent 55%);
    pointer-events: none;
}
.zw-post-cta__eyebrow {
    position: relative;
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zander-yellow, #FCC61C);
    margin: 0 0 10px;
}
.zw-post__content .zw-post-cta__title {
    position: relative;
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: #fbfbfb;
    margin: 0 0 10px;
}
.zw-post__content .zw-post-cta__text {
    position: relative;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(251, 251, 251, 0.82);
    margin: 0 0 18px;
}
/* El botón skew dentro del CTA: sin subrayado heredado y sin margen lateral */
.zw-post__content .zw-post-cta .wp-skew-btn {
    margin: 0;
    text-decoration: none;
}
.zw-post__content .zw-post-cta .wp-skew-btn span { text-decoration: none; }

@media (max-width: 600px) {
    .zw-post__content .zw-post-cta { padding: 26px 24px; }
    .zw-post__content .zw-post-cta .wp-skew-btn {
        width: 100%;
        min-width: 0 !important;
    }
}

/* Post footer */
.zw-post__footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(29,29,27,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.zw-post__author {
    font-size: 14px;
    color: rgba(29,29,27,0.6);
}

.zw-post__back {
    font-size: 14px;
    font-weight: 700;
    color: var(--zander-black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.zw-post__back:hover { color: var(--zander-yellow); }

.zw-post__back svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 999.98px) {
    .zw-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 689.98px) {
    .zw-blog-grid {
        grid-template-columns: 1fr;
    }

    .zw-blog-hero,
    .zw-post-hero {
        padding: 120px 0 70px;
    }

    .zw-post-section { padding: 40px 0 80px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .zw-blog-card { transition: none; }
    .zw-blog-card__cta svg { transition: none; }
}

/* ============================
   POSTS RELACIONADOS
   ============================ */
.zw-related {
    background: #fbfbfb;
    padding: 80px 24px 100px;
}
.zw-related__inner {
    max-width: 1200px;
    margin: 0 auto;
}
.zw-related__title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--zander-black);
    margin: 0 0 32px;
}
.zw-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.zw-related__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.zw-related__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}
.zw-related__img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}
.zw-related__img--empty {
    background: linear-gradient(135deg, #1D1D1B 0%, #3a3a36 100%);
}
.zw-related__body {
    padding: 18px 20px 22px;
}
.zw-related__name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--zander-black);
}
.zw-related__excerpt {
    font-size: 13px;
    color: rgba(29,29,27,0.6);
    margin: 0;
    line-height: 1.5;
}

/* ============================
   COMPARTIR
   ============================ */
.zw-post__share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 48px 0 32px;
    padding: 18px 22px;
    background: #fbfbfb;
    border-radius: 14px;
    border: 1px solid rgba(29,29,27,0.08);
}
.zw-post__share-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(29,29,27,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}
.zw-post__share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(29,29,27,0.12);
    background: #fff;
    color: var(--zander-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: background 0.18s, color 0.18s, transform 0.18s, border-color 0.18s;
}
.zw-post__share-btn:hover {
    background: var(--zander-yellow);
    border-color: var(--zander-yellow);
    color: var(--zander-black);
    transform: translateY(-2px);
}
.zw-post__share-btn.is-copied {
    background: var(--zander-yellow);
    border-color: var(--zander-yellow);
}
.zw-post__share-feedback {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--zander-black);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
