/* ============================================================
   GRUPO ENERGY — BLOG ARCHIVE  |  blog.css
   Paleta: ABYSS (#02171C) · BRAND (#4CB79B) · GOLD (#BF935E)
   ============================================================ */

:root {
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── CABECERA DE PÁGINA ────────────────────────────────────── */
.blog-page-header {
    padding: 13rem 0 4rem; /* ver nota al final sobre este valor */
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.blog-page-header__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.blog-page-header__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold, #BF935E);
}

.bph-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold, #BF935E);
    animation: pulse-dot 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.65); }
}

.blog-page-header__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--abyss);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0;
    text-align: center;
    width: 100%;
}

.blog-page-header__title em {
    font-style: normal;
    color: var(--brand);
}

/* ── SECCIÓN GRID ──────────────────────────────────────────── */
.blog-grid-section {
    padding: 4rem 0 6rem;
    background: var(--white);
}

/* ── GRID: lista vertical, una fila por post ───────────────── */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── CARD: imagen al costado, texto al otro ────────────────── */
.blog-card {
    display: flex;
    flex-direction: row;
    min-height: 450px;
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    opacity: 0;
    transform: translateX(-48px);
    transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out),
                background 0.25s ease;
}

/* Imagen a la derecha en vez de izquierda */
.blog-card--img-right {
    flex-direction: row-reverse;
    transform: translateX(48px);
}

.blog-card:hover {
    background: #f7fffe;
}

.blog-card.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── IMAGEN ────────────────────────────────────────────────── */
.blog-card__img-wrap {
    display: block;
    position: relative;
    width: 42%;
    flex-shrink: 0;
    overflow: hidden;
}

.blog-card__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s var(--ease-out);
}

.blog-card__img-wrap:hover .blog-card__img {
    transform: scale(1.05);
}

/* ── CUERPO ────────────────────────────────────────────────── */
.blog-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 3rem;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Categoría pill */
.post-cat {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    background: rgba(76, 183, 155, 0.1);
    border: 1px solid rgba(76, 183, 155, 0.28);
    padding: 0.22rem 0.7rem;
    border-radius: 9999px;
}

/* Fecha */
.post-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text3);
    font-weight: 500;
}

.post-date i {
    color: var(--brand);
    font-size: 0.7rem;
}

/* Título */
.blog-card__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    font-weight: 700;
    color: var(--abyss);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card__title a:hover {
    color: var(--brand);
}

/* Extracto */
.blog-card__excerpt {
    font-size: 0.88rem;
    color: var(--text2);
    line-height: 1.65;
    margin: 0;
}

/* Footer de la card */
.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.blog-card__author {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text3);
    font-weight: 500;
}

.blog-card__author i {
    color: var(--brand);
    font-size: 0.7rem;
}

/* Botón leer más */
.btn-read {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.btn-read i {
    font-size: 0.7rem;
    transition: transform 0.25s var(--ease-out);
}

.btn-read:hover {
    color: var(--abyss);
}

.btn-read:hover i {
    transform: translateX(5px);
}

/* ── STAGGER de entrada ───────────────────────────────────── */
.blog-card:nth-child(1) { transition-delay: 0ms; }
.blog-card:nth-child(2) { transition-delay: 80ms; }
.blog-card:nth-child(3) { transition-delay: 160ms; }
.blog-card:nth-child(4) { transition-delay: 240ms; }
.blog-card:nth-child(5) { transition-delay: 320ms; }
.blog-card:nth-child(6) { transition-delay: 400ms; }
.blog-card:nth-child(7) { transition-delay: 480ms; }
.blog-card:nth-child(8) { transition-delay: 560ms; }

/* ── VACÍO ─────────────────────────────────────────────────── */
.blog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem;
    gap: 1.5rem;
}

.blog-empty i {
    font-size: 3rem;
    color: var(--brand);
    opacity: 0.35;
}

.blog-empty h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--abyss);
    margin: 0;
}

.blog-empty p {
    color: var(--text2);
    max-width: 38ch;
    line-height: 1.6;
    margin: 0;
}

/* ── PAGINACIÓN ────────────────────────────────────────────── */
.blog-pagination {
    padding: 0 0 6rem;
    background: var(--white);
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--abyss);
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--white);
    transition: all 0.22s ease;
}

.pg-btn--arrow:hover:not(.pg-btn--off) {
    background: var(--abyss);
    color: var(--white);
    border-color: var(--abyss);
}

.pg-btn--off {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pg-numbers {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--abyss);
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--white);
    transition: all 0.22s ease;
}

.pg-num:hover {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
}

.pg-num--active {
    background: var(--abyss);
    color: var(--white);
    border-color: var(--abyss);
    pointer-events: none;
}

.pg-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    font-size: 0.82rem;
    color: var(--text3);
    user-select: none;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .blog-card,
    .blog-card--img-right {
        flex-direction: column;
        min-height: 0;
        transform: translateY(32px);
    }

    .blog-card__img-wrap {
        width: 100%;
        height: 220px;
    }

    .blog-card__body {
        padding: 1.5rem;
    }

    .blog-page-header {
        padding: 9rem 0 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .blog-card__img-wrap {
        width: 38%;
    }

    .blog-card__body {
        padding: 2rem 2.25rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .bph-dot {
        animation: none;
    }
}