/* ================================================================
   Cleocultural — category-grid.css
   Layout: 2 columnas de posts + sidebar derecho. Intercicial cada 4.
   Paleta: #151F28 | #1C2834 | #DAB56C | #010004
   ================================================================ */


/* ── Contenedor principal ── */
.cleo-category-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    background-color: #FFFFFF;
}


/* ── Encabezado de categoría ── */
.cleo-category-header {
    margin-bottom: 28px;
    padding-bottom: 4px;
    border-bottom: 2px solid #DAB56C;
}

.cleo-category-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 600;
    color: #DAB56C;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cleo-category-description {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
}


/* ── Layout principal: contenido + sidebar ── */
.cleo-category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.cleo-main-content {
    min-width: 0; /* evita desbordamiento en grid */
}

.cleo-sidebar {
    position: sticky;
    top: 20px;
}


/* ── Grilla de posts: 2 columnas ── */
.cleo-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}


/* ── Card de noticia ── */
.cleo-post-card {
    background-color: #1C2834;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cleo-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cleo-post-thumbnail {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.cleo-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cleo-post-card:hover .cleo-post-thumbnail img {
    transform: scale(1.04);
}

.cleo-post-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cleo-post-cat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #DAB56C;
    text-decoration: none;
    border: 1px solid #DAB56C;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    width: fit-content;
}

.cleo-post-cat-label:hover {
    background-color: #DAB56C;
    color: #010004;
}

.cleo-post-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: #ffffff;
}

.cleo-post-title a {
    color: inherit;
    text-decoration: none;
}

.cleo-post-title a:hover {
    color: #DAB56C;
}

.cleo-post-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

.cleo-post-excerpt {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}


/* ── Intersticiales ── */
.cleo-ad {
    width: 100%;
    margin: 24px 0;
    line-height: 0;
}

.cleo-ad-widget {
    width: 100%;
}

.cleo-ad-widget img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Desktop: muestra el ad de bloque (fuera del grid), oculta el inline */
.cleo-ad--desktop-only { display: block; }
.cleo-ad--mobile-only  { display: none;  }


/* ── Paginación ── */
.cleo-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.cleo-pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cleo-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    background-color: #1C2834;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.cleo-pagination .page-numbers:hover,
.cleo-pagination .page-numbers.current {
    background-color: #DAB56C;
    color: #010004;
    border-color: #DAB56C;
}

.cleo-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, 0.4);
}


/* ── Sin resultados ── */
.cleo-no-posts {
    padding: 48px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}


/* ── Responsive ── */
@media (max-width: 960px) {
    .cleo-category-layout {
        grid-template-columns: 1fr 240px;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .cleo-category-layout {
        grid-template-columns: 1fr;
    }
    .cleo-sidebar {
        position: static;
    }
    .cleo-posts-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile: oculta los ads de bloque (desktop), muestra los inline */
    .cleo-ad--desktop-only { display: none; }
    .cleo-ad--mobile-only  {
        display: block;
        grid-column: 1 / -1; /* ocupa el ancho completo del grid de 1 col */
        margin: 16px 0;
    }
}
