/* ============================================================
   Blog Archive — Beps PuroOmega Widgets
   ============================================================ */

/* === WRAP === */
.beps-ab-wrap {
    position: relative;
    max-width: 1640px;
    margin-left: auto;
    margin-right: auto;
}

/* ── HEADER — 2 columnas fijas ───────────────────────────────── */
.beps-ab-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.beps-ab-header-info {
    min-width: 0;
}

.beps-ab-heading {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.beps-ab-description {
    margin: 0;
    line-height: 1.6;
}

/* ── TABS ────────────────────────────────────────────────────── */
.beps-ab-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.beps-ab-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    background: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #555555;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.beps-ab-tab:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #1a1a1a;
}

.beps-ab-tab--active {
    background-color: #141436;
    color: #ffffff;
    border-color: #141436;
}

/* ── GRID ────────────────────────────────────────────────────── */
.beps-ab-grid {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

.beps-ab-grid.beps-ab-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ── CARD DESTACADA ──────────────────────────────────────────── */
.beps-ab-card--featured {
    flex: 1.6;            /* proporción por defecto; max-width del control lo limita */
    position: relative;
    height: 630px;        /* default visual; el control height lo sobreescribe */
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.beps-ab-card--featured .beps-ab-card-link {
    display: block;
    position: absolute;
    inset: 0;
    text-decoration: none;
    color: inherit;
}

.beps-ab-card--featured .beps-ab-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.beps-ab-card--featured:hover .beps-ab-image {
    transform: scale(1.04);
}

/* ── OVERLAY (compartido por featured y secondary) ───────────── */
.beps-ab-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(10, 10, 40, 0.92) 0%, transparent 100%);
    pointer-events: none;
}

/* === BADGE (compartido) === */
.beps-ab-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

/* === TÍTULO en overlay (compartido) === */
.beps-ab-title {
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
}

.beps-ab-title a {
    color: inherit;
    text-decoration: none;
}

.beps-ab-card--featured .beps-ab-title {
    font-size: 22px;
}

.beps-ab-card--secondary .beps-ab-title {
    font-size: 16px;
}

/* === EXCERPT (solo en destacada) === */
.beps-ab-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

/* === META (compartida) === */
.beps-ab-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.beps-ab-meta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
    color: rgba(255, 255, 255, 0.7);
}

.beps-ab-meta-text {
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── COLUMNA SECUNDARIA ──────────────────────────────────────── */
.beps-ab-secondary {
    flex: 1;              /* proporción por defecto; max-width del control lo limita */
    display: flex;
    flex-direction: column;
    gap: 42px;            /* 630 = 294 + 42 + 294 */
    min-width: 0;
}

/* ── CARD SECUNDARIA — overlay style, igual que la destacada ─── */
.beps-ab-card--secondary {
    position: relative;
    height: 294px;        /* default visual; el control height lo sobreescribe */
    border-radius: 14px;
    overflow: hidden;
}

.beps-ab-card--secondary .beps-ab-card-link {
    display: block;
    position: absolute;
    inset: 0;
    text-decoration: none;
    color: inherit;
}

.beps-ab-card--secondary .beps-ab-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.beps-ab-card--secondary:hover .beps-ab-image {
    transform: scale(1.04);
}

/* ── RESPONSIVE — Desktop mediano (≤ 1600px): carrusel de tabs ───── */
@media (min-width: 768px) and (max-width: 1600px) {

    /* Header: columna de info auto, columna de tabs toma el resto */
    .beps-ab-header {
        grid-template-columns: auto 1fr;
    }

    /* Tabs: carrusel horizontal sin wrap, alineado a la derecha */
    .beps-ab-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-end;
    }

    .beps-ab-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Header: dos columnas → columna única */
    .beps-ab-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .beps-ab-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        max-width: 100%;
    }

    .beps-ab-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Grid: columna única + rompe el padding del contenedor para ir a sangre */
    .beps-ab-grid {
        flex-direction: column;
        gap: 0;
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }

    .beps-ab-card--featured {
        flex: none !important;
        max-width: none !important;
        width: 100% !important;
        height: 300px !important;
        border-radius: 0 !important;
    }

    .beps-ab-card--secondary {
        flex: none !important;
        max-width: none !important;
        width: 100% !important;
        height: 210px !important;
        border-radius: 0 !important;
    }

    .beps-ab-secondary {
        flex: none !important;
        max-width: none !important;
        width: 100% !important;
        gap: 0;
    }
}
