/**
 * cpt-blocks-style.css
 * Estilos de frontend para los bloques CPT Blocks.
 * Se carga tanto en el frontend como dentro del editor (previsualización).
 *
 * Variables CSS: se integran con los tokens de color/tipografía de GeneratePress.
 * Todos los valores fallback son neutros para que funcionen independientemente.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   Variables locales
───────────────────────────────────────────────────────────────────────────── */
.cptb-single,
.cptb-grid,
.cptb-news {
    --cptb-primary:    var(--wp--preset--color--contrast,     #1a1a1a);
    --cptb-accent:     var(--wp--preset--color--primary,      #0066cc);
    --cptb-text:       var(--wp--preset--color--contrast-2,   #444444);
    --cptb-subtle:     var(--wp--preset--color--base-2,       #f5f5f5);
    --cptb-border:     #e5e7eb;
    --cptb-radius:     8px;
    --cptb-shadow:     0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    --cptb-shadow-h:   0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    --cptb-gap:        1.5rem;
    --cptb-pad:        1.25rem;
    --cptb-card-bg:    #ffffff;
    --cptb-padding:    1.25rem;
    --cptb-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CUADRÍCULA (.cptb-grid)
───────────────────────────────────────────────────────────────────────────── */
.cptb-grid {
    display: grid;
    gap: var(--cptb-gap);
}

.cptb-cols-1 { grid-template-columns: 1fr; }
.cptb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cptb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cptb-cols-4 { grid-template-columns: repeat(4, 1fr); }
.cptb-cols-5 { grid-template-columns: repeat(5, 1fr); }
.cptb-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ─────────────────────────────────────────────────────────────────────────────
   TARJETA BASE (item de grid + single con layout card)
───────────────────────────────────────────────────────────────────────────── */
.cptb-grid__item,
.cptb-single.cptb-layout-card,
.cptb-single.cptb-layout-minimal {
    background: var(--cptb-card-bg, #fff);
    border-radius: var(--cptb-radius);
    overflow: hidden;
    box-shadow: var(--cptb-shadow);
    display: flex;
    flex-direction: column;
    transition: transform var(--cptb-transition), box-shadow var(--cptb-transition), background var(--cptb-transition);
    border: 1px solid var(--cptb-border);
    will-change: transform;
}

.cptb-grid__item:hover,
.cptb-single.cptb-layout-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--cptb-shadow-h);
    border-color: color-mix(in srgb, var(--cptb-accent) 25%, var(--cptb-border));
}

/* ─────────────────────────────────────────────────────────────────────────────
   IMAGEN DESTACADA
───────────────────────────────────────────────────────────────────────────── */
.cptb-thumbnail {
    overflow: hidden;
    line-height: 0;
}

.cptb-thumbnail img {
    width: 100%;
    height: auto;
    min-height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

/* Cuando no hay ratio explícito ni altura custom, usar altura por defecto */
.cptb-thumbnail:not([class*="cptb-ratio-"]) img {
    height: 220px;
}

.cptb-grid__item:hover .cptb-thumbnail img,
.cptb-single:hover .cptb-thumbnail img {
    transform: scale(1.06);
}

/* PRO: Gradient overlay on image hover (Elementor-style) */
.cptb-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}
.cptb-thumbnail { position: relative; }
.cptb-grid__item:hover .cptb-thumbnail::after,
.cptb-news__item:hover .cptb-news__thumb::after { opacity: 1; }

/* ─────────────────────────────────────────────────────────────────────────────
   CUERPO DE LA TARJETA
───────────────────────────────────────────────────────────────────────────── */
.cptb-body {
    padding: var(--cptb-pad);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.55rem;
}

/* ── Título ── */
.cptb-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.cptb-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--cptb-transition);
    background-image: linear-gradient(var(--cptb-accent), var(--cptb-accent));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: color var(--cptb-transition), background-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cptb-title a:hover,
.cptb-title a:focus {
    color: var(--cptb-accent);
    background-size: 100% 2px;
}

/* ── Subtítulo ── */
.cptb-subtitle {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* ── Extracto ── */
.cptb-excerpt,
.cptb-news__excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--cptb-text, #444);
    flex: 1;
}

.cptb-excerpt p { margin: 0; }

/* ── Cita destacada ── */
.cptb-quote {
    margin: 1rem 0;
    padding: 0.85rem 1.2rem 0.85rem 1.2rem;
    border-left: 4px solid var(--cptb-accent);
    background: rgba(0, 102, 204, 0.05);
    border-radius: 0 var(--cptb-radius) var(--cptb-radius) 0;
    font-style: italic;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Sinopsis / Resumen ── */
.cptb-synopsis,
.cptb-summary {
    font-size: 0.875rem;
    color: var(--cptb-text);
    line-height: 1.65;
    background: var(--cptb-subtle);
    border-radius: 4px;
    padding: 0.6rem 0.85rem;
}

.cptb-label {
    font-weight: 700;
    color: var(--cptb-primary);
    margin-right: 0.25rem;
}

/* ── Cuerpo completo ── */
.cptb-content {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--cptb-text);
}

/* Párrafos con separación clara para que no queden pegados */
.cptb-content p {
    margin-top: 0;
    margin-bottom: 0.85em;
}
.cptb-content p:last-child { margin-bottom: 0; }

/* Subtítulos dentro del cuerpo HTML */
.cptb-content h1,
.cptb-content h2,
.cptb-content h3,
.cptb-content h4,
.cptb-content h5,
.cptb-content h6 {
    margin-top: 1.1em;
    margin-bottom: 0.35em;
    font-size: 1em;
    font-weight: 700;
    color: var(--cptb-primary);
    line-height: 1.3;
}

/* Listas dentro del cuerpo */
.cptb-content ul,
.cptb-content ol {
    padding-left: 1.4em;
    margin-bottom: 0.75em;
}
.cptb-content li { margin-bottom: 0.25em; }

.cptb-content > *:first-child { margin-top: 0; }
.cptb-content > *:last-child  { margin-bottom: 0; }

/* ── Columnas CSS del cuerpo de texto ── */
/* Distribuye los párrafos en columnas sin JS: ideal para artículos
   con varios párrafos cortos que quedan feos como texto seguido.   */
.cptb-content--cols-2 {
    column-count: 2;
    column-gap: 1.5rem;
}
.cptb-content--cols-3 {
    column-count: 3;
    column-gap: 1.25rem;
}

/* Evitar que un párrafo quede partido entre columnas */
.cptb-content--cols-2 p,
.cptb-content--cols-3 p,
.cptb-content--cols-2 li,
.cptb-content--cols-3 li {
    break-inside: avoid;
}

/* En móvil colapsar siempre a 1 columna */
@media (max-width: 680px) {
    .cptb-content--cols-2,
    .cptb-content--cols-3 {
        column-count: 1;
    }
}

/* ── Meta: fecha + autor ── */
.cptb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.78rem;
    color: #888;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--cptb-border);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.cptb-date::before  { content: '📅 '; }
.cptb-author::before{ content: '👤 '; }

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT: HORIZONTAL (imagen a la izquierda + texto a la derecha)
───────────────────────────────────────────────────────────────────────────── */
.cptb-layout-horizontal,
.cptb-grid.cptb-layout-horizontal-list .cptb-grid__item {
    flex-direction: row;
    align-items: stretch;
}

.cptb-layout-horizontal .cptb-thumbnail,
.cptb-grid.cptb-layout-horizontal-list .cptb-grid__item .cptb-thumbnail {
    flex: 0 0 200px;
    max-width: 200px;
}

.cptb-layout-horizontal .cptb-thumbnail img,
.cptb-grid.cptb-layout-horizontal-list .cptb-grid__item .cptb-thumbnail img {
    height: 100%;
    min-height: 160px;
}

@media (max-width: 560px) {
    .cptb-layout-horizontal {
        flex-direction: column;
    }
    .cptb-layout-horizontal .cptb-thumbnail {
        flex: none;
        max-width: 100%;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT: HERO (imagen de fondo con texto superpuesto)
───────────────────────────────────────────────────────────────────────────── */
.cptb-single.cptb-layout-hero {
    position: relative;
    min-height: 420px;
    border-radius: var(--cptb-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--cptb-shadow-h);
}

.cptb-single.cptb-layout-hero .cptb-thumbnail {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cptb-single.cptb-layout-hero .cptb-thumbnail img {
    width: 100%;
    height: 100%;
    min-height: unset;
    object-fit: cover;
    object-position: center;
    opacity: 0.75;
    filter: brightness(0.85);
    transition: none;
}

.cptb-single.cptb-layout-hero .cptb-body {
    position: relative;
    z-index: 1;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
    color: #fff;
    gap: 0.5rem;
    width: 100%;
}

/* Overlay de color personalizado del hero */
.cptb-single.cptb-layout-hero .cptb-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Alineación de contenido en hero */
.cptb-single.cptb-layout-hero.cptb-hero-align-center {
    justify-content: center;
}
.cptb-single.cptb-layout-hero.cptb-hero-align-top {
    justify-content: flex-start;
}

.cptb-single.cptb-layout-hero .cptb-title,
.cptb-single.cptb-layout-hero .cptb-title a,
.cptb-single.cptb-layout-hero .cptb-subtitle,
.cptb-single.cptb-layout-hero .cptb-excerpt,
.cptb-single.cptb-layout-hero .cptb-meta {
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.cptb-single.cptb-layout-hero .cptb-quote {
    border-left-color: #fff;
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT: LIST (grid en modo lista vertical)
───────────────────────────────────────────────────────────────────────────── */
.cptb-grid.cptb-layout-list {
    grid-template-columns: 1fr !important;
    gap: 1rem;
}

.cptb-grid.cptb-layout-list .cptb-grid__item {
    flex-direction: row;
    align-items: stretch;
    min-height: 160px;
}

.cptb-grid.cptb-layout-list .cptb-grid__item .cptb-thumbnail {
    flex: 0 0 260px;
    max-width: 260px;
}

.cptb-grid.cptb-layout-list .cptb-grid__item .cptb-thumbnail img {
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

.cptb-grid.cptb-layout-list .cptb-grid__item .cptb-body {
    padding: 1.25rem 1.5rem;
    justify-content: center;
}

.cptb-grid.cptb-layout-list .cptb-grid__item .cptb-title {
    font-size: 1.15rem;
}

@media (max-width: 680px) {
    .cptb-grid.cptb-layout-list .cptb-grid__item {
        flex-direction: column;
    }
    .cptb-grid.cptb-layout-list .cptb-grid__item .cptb-thumbnail {
        flex: none;
        max-width: 100%;
    }
    .cptb-grid.cptb-layout-list .cptb-grid__item .cptb-thumbnail img {
        height: 200px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT: MASONRY (CSS columns fallback, sin JS)
───────────────────────────────────────────────────────────────────────────── */
.cptb-grid.cptb-layout-masonry {
    display: block;
    column-gap: var(--cptb-gap);
}

.cptb-grid.cptb-layout-masonry.cptb-cols-2 { columns: 2; }
.cptb-grid.cptb-layout-masonry.cptb-cols-3 { columns: 3; }
.cptb-grid.cptb-layout-masonry.cptb-cols-4 { columns: 4; }

.cptb-grid.cptb-layout-masonry .cptb-grid__item {
    break-inside: avoid;
    margin-bottom: var(--cptb-gap);
    display: flex; /* restore flex for internal layout */
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT: MINIMAL (sin sombra, borde simple)
───────────────────────────────────────────────────────────────────────────── */
.cptb-single.cptb-layout-minimal {
    box-shadow: none;
    border: 1px solid var(--cptb-border);
    background: #fff;
    border-radius: var(--cptb-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cptb-grid.cptb-layout-minimal .cptb-grid__item {
    box-shadow: none;
    border: 1px solid var(--cptb-border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PAGINACIÓN
───────────────────────────────────────────────────────────────────────────── */
.cptb-pagination {
    margin-top: 2.5rem;
    text-align: center;
}

/* paginate_links con type='list' genera <ul class="page-numbers"><li>… */
.cptb-pagination > ul.page-numbers {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cptb-pagination > ul.page-numbers > li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    background: none !important;
}

.cptb-pagination > ul.page-numbers > li > a.page-numbers,
.cptb-pagination > ul.page-numbers > li > span.page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.65rem;
    border: 1.5px solid var(--cptb-border) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: var(--cptb-text) !important;
    background: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cptb-pagination > ul.page-numbers > li > a.page-numbers:hover {
    background: var(--cptb-accent) !important;
    color: #fff !important;
    border-color: var(--cptb-accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cptb-accent) 30%, transparent);
}

.cptb-pagination > ul.page-numbers > li > span.current {
    background: var(--cptb-accent) !important;
    color: #fff !important;
    border-color: var(--cptb-accent) !important;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cptb-accent) 25%, transparent);
}

/* Prev/Next arrows bigger */
.cptb-pagination > ul.page-numbers > li > a.prev,
.cptb-pagination > ul.page-numbers > li > a.next {
    font-size: 1rem;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Mensaje sin entradas
───────────────────────────────────────────────────────────────────────────── */
.cptb-no-posts {
    text-align: center;
    padding: 2.5rem;
    color: #888;
    font-style: italic;
    border: 1px dashed var(--cptb-border);
    border-radius: var(--cptb-radius);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Alineaciones anchas de Gutenberg
───────────────────────────────────────────────────────────────────────────── */
.wp-block-cpt-blocks-single-item.alignwide,
.wp-block-cpt-blocks-grid.alignwide {
    max-width: var(--wp--style--global--wide-size, 1200px);
}

.wp-block-cpt-blocks-single-item.alignfull,
.wp-block-cpt-blocks-grid.alignfull {
    max-width: 100%;
    padding-left: var(--wp--style--root--padding-left, 1rem);
    padding-right: var(--wp--style--root--padding-right, 1rem);
}

/* =============================================================================
   BLOQUE: NOTICIAS POR CATEGORÍA  (.cptb-news / .cptb-news-*)
============================================================================= */

/* ── Wrapper principal ── */
.cptb-news-wrap {
    container-type: inline-size;
}

/* ── Cabecera de sección ── */
.cptb-news__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--cptb-accent);
}

.cptb-news__section-title {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cptb-text);
    line-height: 1.2;
}

.cptb-news__see-all {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cptb-accent);
    text-decoration: none;
    border: 1px solid var(--cptb-accent);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    transition: background var(--cptb-transition), color var(--cptb-transition);
}

.cptb-news__see-all:hover {
    background: var(--cptb-accent);
    color: #fff;
}

/* ── PRO: Cabecera con metadatos del término ── */
.cptb-news__header-text {
    flex: 1;
    min-width: 0;
}

.cptb-news__term-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--news-term-accent, var(--cptb-accent));
}

.cptb-news__term-desc {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--cptb-text-muted, #666);
}
.cptb-news__term-desc p { margin: 0; }

/* ── Cuadrícula base de noticias ── */
.cptb-news {
    display: grid;
    gap: var(--cptb-gap);
    grid-template-columns: repeat(var(--cptb-news-cols, 3), 1fr);
}

.cptb-news.cptb-cols-1 { --cptb-news-cols: 1; }
.cptb-news.cptb-cols-2 { --cptb-news-cols: 2; }
.cptb-news.cptb-cols-3 { --cptb-news-cols: 3; }
.cptb-news.cptb-cols-4 { --cptb-news-cols: 4; }

/* ── Tarjeta individual ── */
.cptb-news__item {
    background: var(--cptb-card-bg);
    border-radius: var(--cptb-radius);
    box-shadow: var(--cptb-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--cptb-transition), transform var(--cptb-transition), background var(--cptb-transition);
    border: 1px solid var(--cptb-border);
    will-change: transform;
}

.cptb-news__item:hover {
    box-shadow: var(--cptb-shadow-h);
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--cptb-accent) 25%, var(--cptb-border));
}

/* ── Imagen de la tarjeta ── */
.cptb-news__thumb {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}
/* Overlay gradient on hover */
.cptb-news__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.cptb-news__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cptb-news__item:hover .cptb-news__thumb img {
    transform: scale(1.06);
}

/* ── Cuerpo de la tarjeta ── */
.cptb-news__body {
    padding: var(--cptb-padding);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

/* ── Badge de categoría ── */
.cptb-news__cat-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: var(--cptb-accent);
    color: #fff;
    text-decoration: none;
    align-self: flex-start;
    transition: opacity var(--cptb-transition);
}

.cptb-news__cat-badge:hover {
    opacity: 0.85;
}

/* ── Título ── */
.cptb-news__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.cptb-news__title a {
    color: var(--cptb-text);
    text-decoration: none;
    background-image: linear-gradient(var(--cptb-accent), var(--cptb-accent));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: color var(--cptb-transition), background-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cptb-news__title a:hover {
    color: var(--cptb-accent);
    background-size: 100% 2px;
}

/* ── Extracto ── */
.cptb-news__excerpt {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ── Meta (fecha + autor) dentro de news ── */
.cptb-news .cptb-meta {
    font-size: 0.78rem;
    padding-top: 0.5rem;
}

/* ── Enlace "Leer más" ── */
.cptb-news__read-more {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cptb-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
    align-self: flex-start;
    border: 1.5px solid var(--cptb-accent);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    background: transparent;
    transition: gap var(--cptb-transition), background var(--cptb-transition), color var(--cptb-transition), border-color var(--cptb-transition);
}

.cptb-news__read-more:hover {
    background: var(--cptb-accent);
    color: #fff;
    border-color: var(--cptb-accent);
}

.cptb-news__read-more--filled {
    background: var(--cptb-accent);
    color: #fff;
    border-color: var(--cptb-accent);
}
.cptb-news__read-more--filled:hover {
    filter: brightness(1.1);
    color: #fff;
}

.cptb-news__read-more--text {
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
}
.cptb-news__read-more--text:hover {
    background: transparent;
    text-decoration: underline;
    color: var(--cptb-accent);
}

.cptb-news__read-more::after {
    content: '→';
    transition: transform var(--cptb-transition);
}

.cptb-news__read-more:hover::after {
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT VARIANTE: noticia DESTACADA (primera entrada)
   Solo activo cuando el bloque tiene featuredFirst = true
════════════════════════════════════════════════════════════════════════════ */
.cptb-news--has-featured .cptb-news__item--featured {
    grid-column: 1 / -1; /* ocupa todo el ancho */
    flex-direction: row;
    align-items: stretch;
}

/* En cuadrículas ≥ 3 cols, la destacada abarca 2 columnas */
@media (min-width: 640px) {
    .cptb-news.cptb-cols-3.cptb-news--has-featured .cptb-news__item--featured,
    .cptb-news.cptb-cols-4.cptb-news--has-featured .cptb-news__item--featured {
        grid-column: span 2;
    }
}

.cptb-news--has-featured .cptb-news__item--featured .cptb-news__thumb {
    flex: 0 0 50%;
    max-width: 50%;
    aspect-ratio: unset;
    min-height: 240px;
}

/* ── PRO: Featured layout = hero-sidebar ── */
.cptb-news--feat-hero-sidebar {
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: auto;
}
.cptb-news--feat-hero-sidebar .cptb-news__item--featured {
    grid-column: 1;
    grid-row: 1 / span 3;
    flex-direction: column;
}
.cptb-news--feat-hero-sidebar .cptb-news__item--featured .cptb-news__thumb {
    flex: none;
    max-width: 100%;
    min-height: 280px;
}
.cptb-news--feat-hero-sidebar .cptb-news__item:not(.cptb-news__item--featured) {
    grid-column: 2;
    flex-direction: row;
    gap: 0.75rem;
}
.cptb-news--feat-hero-sidebar .cptb-news__item:not(.cptb-news__item--featured) .cptb-news__thumb {
    flex: 0 0 100px;
    max-width: 100px;
    min-height: 80px;
    aspect-ratio: 4/3;
}
.cptb-news--feat-hero-sidebar .cptb-news__item:not(.cptb-news__item--featured) .cptb-news__title {
    font-size: 0.95rem;
}
.cptb-news--feat-hero-sidebar .cptb-news__item:not(.cptb-news__item--featured) .cptb-news__excerpt {
    display: none;
}
@media (max-width: 768px) {
    .cptb-news--feat-hero-sidebar {
        grid-template-columns: 1fr;
    }
    .cptb-news--feat-hero-sidebar .cptb-news__item--featured {
        grid-row: auto;
    }
    .cptb-news--feat-hero-sidebar .cptb-news__item:not(.cptb-news__item--featured) {
        grid-column: 1;
    }
}

/* ── PRO: Featured layout = overlay ── */
.cptb-news--feat-overlay .cptb-news__item--featured {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: var(--cptb-radius, 8px);
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__thumb {
    position: absolute;
    inset: 0;
    flex: none;
    max-width: 100%;
    min-height: 100%;
    z-index: 0;
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    color: #fff;
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__title a {
    color: #fff;
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__title a:hover {
    opacity: 0.85;
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-subtitle,
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__excerpt,
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-meta {
    color: rgba(255,255,255,0.85);
}
.cptb-news--feat-overlay .cptb-news__item--featured .cptb-news__cat-badge {
    background: var(--news-term-accent, var(--cptb-accent));
    color: #fff;
}

/* =============================================================================
   NUEVAS FUNCIONES DEL BLOQUE GRID CPT
============================================================================= */

/* ── Cabecera de sección (grid CPT) ── */
.cptb-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--cptb-accent, #0066cc);
}

.cptb-section-title {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cptb-primary, #1a1a1a);
}

/* ── Elemento destacado (featuredFirst) ── */
.cptb-grid__item--featured {
    grid-column: 1 / -1;   /* ocupa toda la fila */
    flex-direction: row;
    align-items: stretch;
}

.cptb-grid__item--featured .cptb-thumbnail {
    flex: 0 0 52%;
    max-width: 52%;
}

.cptb-grid__item--featured .cptb-thumbnail img {
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.cptb-grid__item--featured .cptb-body {
    flex: 1;
    padding: 2rem;
    justify-content: center;
}

.cptb-grid__item--featured .cptb-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.cptb-grid__item--featured .cptb-excerpt {
    font-size: 1rem;
    line-height: 1.7;
}

/* En una sola columna, el destacado vuelve a vertical */
@media (max-width: 680px) {
    .cptb-grid__item--featured {
        flex-direction: column;
    }
    .cptb-grid__item--featured .cptb-thumbnail {
        flex: none;
        max-width: 100%;
    }
    .cptb-grid__item--featured .cptb-thumbnail img {
        min-height: 220px;
    }
    .cptb-grid__item--featured .cptb-body {
        padding: 1.25rem;
    }
}

/* ── Ratios de imagen ── */
.cptb-thumbnail.cptb-ratio-1x1 img  { height: auto; aspect-ratio: 1 / 1; }
.cptb-thumbnail.cptb-ratio-4x3 img  { height: auto; aspect-ratio: 4 / 3; }
.cptb-thumbnail.cptb-ratio-3x2 img  { height: auto; aspect-ratio: 3 / 2; }
.cptb-thumbnail.cptb-ratio-16x9 img { height: auto; aspect-ratio: 16 / 9; }
.cptb-thumbnail.cptb-ratio-21x9 img { height: auto; aspect-ratio: 21 / 9; }

.cptb-news__thumb.cptb-ratio-1x1 img  { height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.cptb-news__thumb.cptb-ratio-4x3 img  { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cptb-news__thumb.cptb-ratio-3x2 img  { height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.cptb-news__thumb.cptb-ratio-16x9 img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cptb-news__thumb.cptb-ratio-21x9 img { height: auto; aspect-ratio: 21 / 9; object-fit: cover; }

/* ── Badges de taxonomía ── */
.cptb-terms-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cptb-term-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cptb-accent, #0066cc);
    background: color-mix(in srgb, var(--cptb-accent, #0066cc) 8%, transparent);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.55rem;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
    line-height: 1.5;
}

.cptb-term-badge:hover,
.cptb-term-badge:focus {
    background: var(--cptb-accent, #0066cc);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── Enlace "Leer más" ── */
.cptb-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cptb-accent, #0066cc);
    text-decoration: none;
    border: 1.5px solid var(--cptb-accent, #0066cc);
    border-radius: 6px;
    padding: 0.45rem 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.02em;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
/* Sweep fill on hover */
.cptb-read-more::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cptb-accent, #0066cc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}
.cptb-read-more:hover::before,
.cptb-read-more:focus::before { transform: scaleX(1); }

.cptb-read-more:hover,
.cptb-read-more:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
/* Icon arrow slide on hover */
.cptb-read-more .cptb-rm-icon {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-read-more:hover .cptb-rm-icon { transform: translateX(3px); }

/* Variante relleno */
.cptb-read-more--filled {
    background: var(--cptb-accent, #0066cc);
    color: #fff;
}
.cptb-read-more--filled::before { background: rgba(255,255,255,0.15); }
.cptb-read-more--filled:hover,
.cptb-read-more--filled:focus {
    color: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--cptb-accent, #0066cc) 40%, transparent);
}

/* Variante solo texto */
.cptb-read-more--text {
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
}
.cptb-read-more--text::before { display: none; }
.cptb-read-more--text:hover,
.cptb-read-more--text:focus {
    background: transparent;
    color: var(--cptb-accent, #0066cc);
    text-decoration: none;
}
.cptb-read-more--text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--cptb-accent, #0066cc);
    transition: width 0.3s ease;
}
.cptb-read-more--text:hover::after { width: 100%; }

/* ── Separador decorativo ── */
hr.cptb-divider {
    border: none;
    border-top: 3px solid var(--cptb-accent, #0066cc);
    margin: 0 0 1rem;
}

/* ── Tiempo de lectura ── */
.cptb-reading-time {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}
.cptb-reading-time::before {
    content: '⏱ ';
}

/* ── Navegación anterior / siguiente ─────────────────────────────────── */
.cptb-post-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.cptb-post-nav__prev,
.cptb-post-nav__next {
    display: flex;
    flex-direction: column;
    max-width: 48%;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.18s, background 0.18s;
    gap: 0.25rem;
}

.cptb-post-nav__prev--empty,
.cptb-post-nav__next--empty {
    visibility: hidden;
    pointer-events: none;
}

.cptb-post-nav__prev:hover,
.cptb-post-nav__next:hover {
    border-color: var(--cptb-accent, #0066cc);
    background: color-mix(in srgb, var(--cptb-accent, #0066cc) 5%, transparent);
}

.cptb-post-nav__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
}

.cptb-post-nav__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.4;
}

.cptb-post-nav__next {
    text-align: right;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Variantes de padding de tarjeta (panel 🃏 Estilo de tarjeta)
   Se aplican como clase en <article> cuando el usuario elige un preset.
───────────────────────────────────────────────────────────────────────────── */
.cptb-padding-compact  .cptb-body { padding: 0.75rem !important; }
.cptb-padding-normal   .cptb-body { padding: 1.25rem !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   Equal Height – fuerza filas iguales en grid
───────────────────────────────────────────────────────────────────────────── */
.cptb-equal-height {
    grid-auto-rows: 1fr;
}
.cptb-equal-height .cptb-grid__item,
.cptb-equal-height .cptb-news__item {
    height: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Max Rows – overflow oculto (CSS de respaldo, el PHP ya limita los items)
───────────────────────────────────────────────────────────────────────────── */
.cptb-max-rows {
    overflow: hidden;
}
.cptb-padding-spacious .cptb-body { padding: 2rem    !important; }

.cptb-padding-compact  .cptb-thumb { margin-bottom: 0; }
.cptb-padding-spacious .cptb-thumb { margin-bottom: 0; }

.cptb-post-nav__next {
    margin-left: auto;
    text-align: right;
}

.cptb-post-nav__prev:hover,
.cptb-post-nav__next:hover {
    border-color: var(--cptb-accent, #0066cc);
    background: #f0f6ff;
}

.cptb-post-nav__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cptb-accent, #0066cc);
}

.cptb-post-nav__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.cptb-post-nav__prev--empty,
.cptb-post-nav__next--empty {
    visibility: hidden;
}

.cptb-news--has-featured .cptb-news__item--featured .cptb-news__body {
    flex: 1;
}

.cptb-news--has-featured .cptb-news__item--featured .cptb-news__title {
    font-size: 1.4rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT VARIANTE: LISTA  (.cptb-news-layout-news-list)
════════════════════════════════════════════════════════════════════════════ */
.cptb-news-layout-news-list .cptb-news {
    grid-template-columns: 1fr;
}

.cptb-news-layout-news-list .cptb-news__item {
    flex-direction: row;
}

.cptb-news-layout-news-list .cptb-news__thumb {
    flex: 0 0 200px;
    max-width: 200px;
    aspect-ratio: unset;
    min-height: 120px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT VARIANTE: PERIÓDICO  (.cptb-news-layout-news-newspaper)
   Destacada a la izquierda, el resto en una columna a la derecha
════════════════════════════════════════════════════════════════════════════ */
.cptb-news-layout-news-newspaper .cptb-news {
    grid-template-columns: 1fr 320px;
    grid-template-rows: auto;
    align-items: start;
}

.cptb-news-layout-news-newspaper .cptb-news__item--featured {
    grid-row: 1 / span 99;
    flex-direction: column;
}

.cptb-news-layout-news-newspaper .cptb-news__item--featured .cptb-news__thumb {
    flex: none;
    max-width: 100%;
    aspect-ratio: 3 / 2;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT VARIANTE: COMPACTO  (.cptb-news-layout-news-compact)
════════════════════════════════════════════════════════════════════════════ */
.cptb-news-layout-news-compact .cptb-news__item {
    box-shadow: none;
    border: 1px solid var(--cptb-border);
    border-radius: 4px;
}

.cptb-news-layout-news-compact .cptb-news__body {
    padding: 0.75rem;
}

.cptb-news-layout-news-compact .cptb-news__thumb {
    aspect-ratio: 2 / 1;
}

.cptb-news-layout-news-compact .cptb-news__title {
    font-size: 0.9rem;
}

/* ── Alineaciones wide/full para el bloque de noticias ── */
.wp-block-cpt-blocks-news-by-category.alignwide {
    max-width: var(--wp--style--global--wide-size, 1200px);
}

.wp-block-cpt-blocks-news-by-category.alignfull {
    max-width: 100%;
    padding-left: var(--wp--style--root--padding-left, 1rem);
    padding-right: var(--wp--style--root--padding-right, 1rem);
}

/* ── Mobile responsive ── */
@media (max-width: 680px) {
    .cptb-news {
        grid-template-columns: 1fr !important;
    }

    .cptb-news--has-featured .cptb-news__item--featured,
    .cptb-news-layout-news-list .cptb-news__item,
    .cptb-news-layout-news-newspaper .cptb-news {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .cptb-news--has-featured .cptb-news__item--featured .cptb-news__thumb,
    .cptb-news-layout-news-list .cptb-news__thumb {
        flex: none;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }
}
/* =============================================================================
   MEJORAS PRO — single-item (Elementor/Kadence level)
============================================================================= */

/* ── object-position configurable via CSS custom property ── */
.cptb-thumbnail img,
.cptb-news__thumb img {
    object-position: var(--cptb-img-position, center);
}

/* ── Hero: min-height configurable, gradiente mejorado ── */
.cptb-single.cptb-layout-hero {
    min-height: var(--cptb-hero-min-height, 420px);
}

/* overlay personalizable mediante custom property */
.cptb-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--cptb-hero-overlay-bg, transparent);
    opacity: var(--cptb-hero-overlay-opacity, 0.5);
}

/* ── Align wide/full para bloque hero ── */
.wp-block-cpt-blocks-single-item.alignwide .cptb-single.cptb-layout-hero,
.wp-block-cpt-blocks-single-item.alignfull .cptb-single.cptb-layout-hero {
    border-radius: 0;
}

/* ── image fit modes ── */
.cptb-thumbnail.cptb-fit-contain img {
    object-fit: contain;
    background: #f5f5f5;
}

.cptb-thumbnail.cptb-fit-fill img {
    object-fit: fill;
}

/* ── Overflow de tarjeta ── */
.cptb-single.cptb-overflow-visible {
    overflow: visible;
}

/* ── Post Nav responsive ── */
@media (max-width: 560px) {
    .cptb-post-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    .cptb-post-nav__prev,
    .cptb-post-nav__next {
        max-width: 100%;
        text-align: left;
    }
    .cptb-post-nav__next {
        text-align: left;
    }
}

/* ── Responsive tablet para grid ── */
@media (max-width: 1024px) {
    .cptb-grid {
        grid-template-columns: var(--cptb-cols-tablet, repeat(2, 1fr));
    }
}

@media (max-width: 768px) {
    .cptb-grid {
        grid-template-columns: var(--cptb-cols-mobile, 1fr);
    }
    .cptb-single.cptb-layout-hero {
        min-height: var(--cptb-hero-min-height-mobile, 280px);
    }
}

/* ── Variante de tarjeta: sin overflow (para imágenes que sobresalen) ── */
.cptb-card-overflow-visible {
    overflow: visible !important;
}
.cptb-card-overflow-visible .cptb-thumbnail {
    border-radius: inherit;
    overflow: hidden;
}

/* ── Padding spacious ── */
.cptb-padding-spacious .cptb-body { padding: 2rem !important; }

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: viewMode variants (masonry, mini-card, horizontal)
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Masonry ── */
.cptb-layout-masonry {
    display: columns;
    columns: var(--cptb-cols, 3);
    column-gap: var(--cptb-gap, 1.5rem);
}
@supports (column-count: 3) {
    .cptb-layout-masonry {
        display: block;
        column-count: var(--cptb-cols, 3);
        column-gap: var(--cptb-gap, 1.5rem);
    }
}
.cptb-layout-masonry .cptb-grid__item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: var(--cptb-gap, 1.5rem);
}

/* ── Mini ficha ── */
.cptb-layout-mini-card {
    grid-template-columns: repeat(var(--cptb-cols, 3), 1fr);
}
.cptb-layout-mini-card .cptb-grid__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}
.cptb-layout-mini-card .cptb-thumbnail {
    flex: 0 0 60px;
    max-width: 60px;
}
.cptb-layout-mini-card .cptb-thumbnail img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.cptb-layout-mini-card .cptb-body {
    padding: 0;
    flex: 1;
    min-width: 0;
}
.cptb-layout-mini-card .cptb-title {
    font-size: 0.9rem;
    margin: 0 0 0.15rem;
}
.cptb-layout-mini-card .cptb-excerpt,
.cptb-layout-mini-card .cptb-subtitle {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
}
.cptb-layout-mini-card .cptb-meta {
    font-size: 0.7rem;
}

/* ── Tarjeta horizontal ── */
.cptb-layout-horizontal {
    grid-template-columns: 1fr;
}
.cptb-layout-horizontal .cptb-grid__item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    align-items: stretch;
}
.cptb-layout-horizontal .cptb-thumbnail {
    grid-row: 1 / -1;
}
.cptb-layout-horizontal .cptb-thumbnail img {
    height: 100%;
    object-fit: cover;
}
.cptb-layout-horizontal .cptb-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
}
@media (max-width: 768px) {
    .cptb-layout-horizontal .cptb-grid__item {
        grid-template-columns: 1fr;
    }
    .cptb-layout-horizontal .cptb-thumbnail img {
        height: 200px;
    }
    .cptb-layout-masonry {
        column-count: 1 !important;
    }
}
@media (max-width: 1024px) {
    .cptb-layout-masonry {
        column-count: 2 !important;
    }
    .cptb-layout-horizontal .cptb-grid__item {
        grid-template-columns: 200px 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: Taxonomy list
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
}
.cptb-taxonomy-list--pills .cptb-taxonomy-list__item {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--cptb-tax-bg, #f0f0f0);
    color: var(--cptb-tax-color, #333);
    border-radius: 1rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-size: inherit;
}
.cptb-taxonomy-list--pills .cptb-taxonomy-list__item:hover {
    background: var(--cptb-tax-hover-bg, #333);
    color: var(--cptb-tax-hover-color, #fff);
}
.cptb-taxonomy-list--inline {
    gap: 0.15rem;
}
.cptb-taxonomy-list--inline .cptb-taxonomy-list__item {
    text-decoration: none;
    color: var(--cptb-tax-color, #666);
}
.cptb-taxonomy-list--inline .cptb-taxonomy-list__item:not(:last-child)::after {
    content: ', ';
    color: #999;
}
.cptb-taxonomy-list--inline .cptb-taxonomy-list__item:hover {
    color: var(--cptb-tax-hover-color, #000);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: Custom fields / Meta fields
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-custom-fields {
    margin: 0.75rem 0;
}
.cptb-custom-fields--list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cptb-custom-fields--list .cptb-cf-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.85rem;
}
.cptb-custom-fields--list .cptb-cf-item:last-child {
    border-bottom: none;
}
.cptb-cf-label {
    font-weight: 600;
    color: var(--cptb-cf-label-color, #555);
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.cptb-cf-value {
    color: var(--cptb-cf-color, #333);
}
.cptb-cf-icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    opacity: 0.6;
}
.cptb-custom-fields--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}
.cptb-custom-fields--grid .cptb-cf-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.02);
    border-radius: 0.35rem;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: Gallery
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-gallery {
    margin-top: 2rem;
}
.cptb-gallery .cptb-gallery__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.cptb-gallery__grid {
    display: grid;
    grid-template-columns: repeat(var(--cptb-gallery-cols, 3), 1fr);
    gap: var(--cptb-gallery-gap, 0.75rem);
}
.cptb-gallery__grid img {
    width: 100%;
    height: auto;
    border-radius: var(--cptb-gallery-radius, 0.5rem);
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.cptb-gallery__grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
@media (max-width: 768px) {
    .cptb-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v3: Related posts — full PRO with slider, card variants, effects
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-related {
    margin-top: 2.5rem;
    position: relative;
}
.cptb-related .cptb-related__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.cptb-related__grid {
    display: grid;
    grid-template-columns: repeat(var(--cptb-related-cols, 3), 1fr);
    gap: var(--cptb-related-gap, 1.25rem);
}
.cptb-related__item {
    background: var(--cptb-related-bg, #fff);
    border-radius: var(--cptb-related-radius, 0.5rem);
    box-shadow: var(--cptb-related-shadow, 0 1px 4px rgba(0,0,0,0.08));
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.cptb-related__item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.cptb-related__item img,
.cptb-related__thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.cptb-related__name {
    display: block;
    padding: 0.75rem;
    font-size: var(--cptb-related-title-size, 0.95rem);
    color: var(--cptb-related-title-color, inherit);
    font-weight: 600;
    line-height: 1.3;
}
/* PRO: Card variant — overlay */
.cptb-related--overlay .cptb-grid__item {
    position: relative;
    overflow: hidden;
}
.cptb-related--overlay .cptb-grid__item .cptb-thumb {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.cptb-related--overlay .cptb-grid__item .cptb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cptb-related--overlay .cptb-grid__item .cptb-card__body {
    position: relative;
    z-index: 1;
    background: var(--cptb-overlay-gradient, linear-gradient(0deg, rgba(0,0,0,0.75) 0%, transparent 100%));
    color: #fff;
    padding: 1.5rem 1rem 1rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.cptb-related--overlay .cptb-grid__item .cptb-title a { color: #fff; }
.cptb-related--overlay .cptb-grid__item .cptb-meta { color: rgba(255,255,255,0.8); }
.cptb-related--overlay .cptb-grid__item:hover .cptb-card__body {
    background: var(--cptb-overlay-hover, linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%));
}
/* PRO: Card variant — minimal */
.cptb-related--minimal .cptb-grid__item {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
}
.cptb-related--minimal .cptb-grid__item .cptb-card__body {
    padding: 0.5rem 0;
}
/* PRO: Card variant — horizontal */
.cptb-related--horizontal .cptb-grid__item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}
.cptb-related--horizontal .cptb-grid__item .cptb-thumb {
    flex: 0 0 35%;
    max-width: 35%;
}
.cptb-related--horizontal .cptb-grid__item .cptb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cptb-related--horizontal .cptb-grid__item .cptb-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 1rem;
}
/* PRO: Slider mode */
.cptb-related--slider {
    display: block !important;
    overflow: hidden;
}
.cptb-related__track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.cptb-related--slider .cptb-grid__item {
    flex: 0 0 calc(100% / var(--cptb-related-cols, 3));
    max-width: calc(100% / var(--cptb-related-cols, 3));
    padding: 0 0.5rem;
    box-sizing: border-box;
}
.cptb-related__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.cptb-related__arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cptb-related__arrow--prev { left: -12px; }
.cptb-related__arrow--next { right: -12px; }
.cptb-related__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}
.cptb-related__dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.cptb-related__dots button.active {
    background: var(--cptb-accent, #0066cc);
    transform: scale(1.3);
}
/* PRO: Hover effects */
.cptb-hover-lift .cptb-grid__item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.cptb-hover-zoom .cptb-grid__item:hover .cptb-thumb img {
    transform: scale(1.08);
}
.cptb-hover-zoom .cptb-grid__item .cptb-thumb img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-hover-glow .cptb-grid__item:hover {
    box-shadow: 0 0 20px rgba(var(--cptb-accent-rgb, 0,102,204), 0.3);
}
/* PRO: Entrance effects — CSS-only fallback + JS-driven */
.cptb-entrance-fade .cptb-grid__item {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.cptb-entrance-fade .cptb-grid__item.cptb-visible {
    opacity: 1;
}
.cptb-entrance-slide-up .cptb-grid__item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.cptb-entrance-slide-up .cptb-grid__item.cptb-visible {
    opacity: 1;
    transform: translateY(0);
}
.cptb-entrance-cascade .cptb-grid__item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.cptb-entrance-cascade .cptb-grid__item.cptb-visible {
    opacity: 1;
    transform: translateY(0);
}
.cptb-entrance-cascade .cptb-grid__item:nth-child(1) { transition-delay: 0s; }
.cptb-entrance-cascade .cptb-grid__item:nth-child(2) { transition-delay: 0.08s; }
.cptb-entrance-cascade .cptb-grid__item:nth-child(3) { transition-delay: 0.16s; }
.cptb-entrance-cascade .cptb-grid__item:nth-child(4) { transition-delay: 0.24s; }
.cptb-entrance-cascade .cptb-grid__item:nth-child(5) { transition-delay: 0.32s; }
.cptb-entrance-cascade .cptb-grid__item:nth-child(6) { transition-delay: 0.4s; }
/* PRO: Empty state */
.cptb-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}
.cptb-empty-state__icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}
.cptb-empty-state__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #374151;
}
.cptb-empty-state__text {
    font-size: 0.9rem;
    margin: 0;
    color: #9ca3af;
}
/* PRO: Responsive */
@media (max-width: 768px) {
    .cptb-related__grid {
        grid-template-columns: 1fr;
    }
    .cptb-related--slider .cptb-grid__item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .cptb-related__arrow--prev { left: 4px; }
    .cptb-related__arrow--next { right: 4px; }
    .cptb-related--horizontal .cptb-grid__item .cptb-thumb {
        flex: 0 0 30%;
        max-width: 30%;
    }
}
/* PRO: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cptb-related__track,
    .cptb-related .cptb-grid__item,
    .cptb-entrance-fade .cptb-grid__item,
    .cptb-entrance-slide-up .cptb-grid__item,
    .cptb-entrance-cascade .cptb-grid__item {
        transition: none !important;
    }
    .cptb-entrance-fade .cptb-grid__item,
    .cptb-entrance-slide-up .cptb-grid__item,
    .cptb-entrance-cascade .cptb-grid__item {
        opacity: 1 !important;
        transform: none !important;
    }
}
/* PRO: Dark mode */
@media (prefers-color-scheme: dark) {
    .cptb-related__arrow {
        background: rgba(30,30,30,0.9);
        border-color: rgba(255,255,255,0.15);
        color: #e5e5e5;
    }
    .cptb-related__dots button {
        background: rgba(255,255,255,0.25);
    }
    .cptb-empty-state__title { color: #e5e5e5; }
    .cptb-empty-state__text { color: #9ca3af; }
    .cptb-empty-state__icon { color: #9ca3af; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: CTA section
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-cta {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: var(--cptb-cta-bg, #f8f9fa);
    border-radius: var(--cptb-cta-radius, 0.75rem);
    text-align: center;
}
.cptb-cta__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--cptb-cta-text-color, inherit);
}
.cptb-cta__text {
    font-size: 0.95rem;
    color: var(--cptb-cta-text-color, #555);
    margin: 0 0 1rem;
}
.cptb-cta__btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: var(--cptb-cta-btn-bg, #2271b1);
    color: var(--cptb-cta-btn-color, #fff);
    border-radius: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}
.cptb-cta__btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: Documents
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-documents {
    margin-top: 2rem;
}
.cptb-documents .cptb-documents__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.cptb-documents__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cptb-documents__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cptb-documents__item:last-child {
    border-bottom: none;
}
.cptb-documents__item a {
    text-decoration: none;
    color: #2271b1;
    font-weight: 500;
    font-size: 0.9rem;
}
.cptb-documents__item a:hover {
    text-decoration: underline;
}
.cptb-documents__ext {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    background: #e0e0e0;
    border-radius: 0.2rem;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: FAQs (accordion)
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-faqs {
    margin-top: 2rem;
}
.cptb-faqs .cptb-faqs__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.cptb-faqs__item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.cptb-faqs__item:last-child {
    border-bottom: none;
}
.cptb-faqs__item summary,
.cptb-faqs__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    list-style: none;
    user-select: none;
}
.cptb-faqs__item summary::-webkit-details-marker {
    display: none;
}
.cptb-faqs__item summary::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 400;
    color: #999;
    transition: transform 0.2s;
}
.cptb-faqs__item[open] summary::after {
    content: '−';
}
.cptb-faqs__answer {
    padding: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PRO v2: Icon
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-icon {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.cptb-icon.dashicons {
    width: var(--cptb-icon-size, 1.5rem);
    height: var(--cptb-icon-size, 1.5rem);
    font-size: var(--cptb-icon-size, 1.5rem);
    color: var(--cptb-icon-color, currentColor);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * BLOQUE: Portada Magazine (cpt-blocks/news-magazine)
 * ═══════════════════════════════════════════════════════════════════════════ */
.cptb-magazine {
    --cptb-primary:    var(--wp--preset--color--contrast,     #1a1a1a);
    --cptb-accent:     var(--wp--preset--color--primary,      #0066cc);
    --cptb-text:       var(--wp--preset--color--contrast-2,   #444444);
    --cptb-subtle:     var(--wp--preset--color--base-2,       #f5f5f5);
    --cptb-border:     #e5e7eb;
    --cptb-radius:     8px;
    --cptb-shadow:     0 2px 12px rgba(0, 0, 0, 0.08);
    --cptb-shadow-h:   0 8px 24px rgba(0, 0, 0, 0.14);
    --cptb-gap:        1.5rem;
    --cptb-pad:        1.25rem;
    --cptb-card-bg:    #ffffff;
    --cptb-transition: 0.22s ease;
}

/* ── Header sección ─────────────────────────────────────────────── */
.cptb-magazine__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--cptb-accent);
    padding-bottom: 0.5rem;
}
.cptb-magazine__section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--cptb-primary);
}

/* ── Tabs ────────────────────────────────────────────────────────── */
.cptb-magazine__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--cptb-border);
    padding-bottom: 0;
}
.cptb-magazine__tab {
    background: none;
    border: none;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cptb-text);
    cursor: pointer;
    position: relative;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    line-height: 1.4;
    opacity: 0.72;
}
.cptb-magazine__tab.is-active {
    opacity: 1;
}
.cptb-magazine__tab:hover {
    color: var(--cptb-accent);
    opacity: 1;
}

/* Tab estilo: underline */
.cptb-tabs--underline .cptb-magazine__tab {
    padding-bottom: 0.75rem;
}
.cptb-tabs--underline .cptb-magazine__tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 3px;
    background: var(--cptb-accent);
    border-radius: 3px 3px 0 0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-tabs--underline .cptb-magazine__tab.is-active {
    color: var(--cptb-accent);
    font-weight: 600;
}
.cptb-tabs--underline .cptb-magazine__tab.is-active::after {
    left: 0;
    right: 0;
}
.cptb-tabs--underline .cptb-magazine__tab:hover::after {
    left: 20%;
    right: 20%;
}
.cptb-tabs--underline .cptb-magazine__tab.is-active:hover::after {
    left: 0;
    right: 0;
}

/* Tab estilo: pills */
.cptb-tabs--pills {
    border-bottom: none;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--cptb-subtle, #f3f4f6);
    border-radius: 24px;
}
.cptb-tabs--pills .cptb-magazine__tab {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.8;
}
.cptb-tabs--pills .cptb-magazine__tab:hover {
    background: rgba(0, 0, 0, 0.04);
    opacity: 1;
}
.cptb-tabs--pills .cptb-magazine__tab.is-active {
    background: var(--cptb-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
    font-weight: 600;
}
.cptb-tabs--pills .cptb-magazine__tab.is-active:hover {
    background: var(--cptb-accent);
    filter: brightness(1.08);
}

/* Tab estilo: background */
.cptb-tabs--background {
    gap: 2px;
}
.cptb-tabs--background .cptb-magazine__tab {
    padding: 0.6rem 1.25rem;
    border-radius: 6px 6px 0 0;
    margin-bottom: -2px;
}
.cptb-tabs--background .cptb-magazine__tab:hover {
    background: var(--cptb-subtle, #f3f4f6);
}
.cptb-tabs--background .cptb-magazine__tab.is-active {
    background: var(--cptb-card-bg, #fff);
    color: var(--cptb-accent);
    font-weight: 600;
    border: 2px solid var(--cptb-border);
    border-bottom-color: var(--cptb-card-bg, #fff);
    opacity: 1;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}

/* ── Layout Magazine: hero + sidebar ──────────────────────────── */
.cptb-magazine__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cptb-gap);
}
.cptb-magazine__grid > .cptb-magazine__item--hero {
    grid-row: 1 / -1;
}
.cptb-magazine__sidebar {
    display: flex;
    flex-direction: column;
    gap: calc(var(--cptb-gap) * 0.75);
}

/* ── Layout Grid simple ──────────────────────────────────────── */
.cptb-magazine__grid--flat {
    grid-template-columns: repeat(3, 1fr);
}
.cptb-magazine__grid--flat > .cptb-magazine__item--hero {
    grid-row: auto;
}

/* ── Layout Destacado + Grid ─────────────────────────────────── */
.cptb-magazine__featured-grid {
    display: flex;
    flex-direction: column;
    gap: var(--cptb-gap);
}
.cptb-magazine__featured-main {
    width: 100%;
}
.cptb-magazine__featured-main .cptb-magazine__item {
    box-shadow: var(--cptb-shadow);
}
.cptb-magazine__featured-main .cptb-magazine__thumb img {
    aspect-ratio: 21 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.cptb-magazine__featured-main .cptb-magazine__title,
.cptb-magazine__featured-main .cptb-news__title {
    font-size: 1.6rem;
}
.cptb-magazine__featured-below {
    display: grid;
    gap: var(--cptb-gap);
}

/* ── Layout Lista Horizontal ─────────────────────────────────── */
.cptb-magazine__list {
    display: flex;
    flex-direction: column;
    gap: var(--cptb-gap);
}
.cptb-magazine__item--list {
    flex-direction: row !important;
    gap: var(--cptb-gap);
    background: var(--cptb-card-bg);
    border-radius: var(--cptb-radius);
    box-shadow: var(--cptb-shadow);
    overflow: hidden;
}
.cptb-magazine__item--list .cptb-magazine__thumb,
.cptb-magazine__item--list .cptb-news__thumb {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}
.cptb-magazine__item--list .cptb-magazine__thumb img,
.cptb-magazine__item--list .cptb-news__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cptb-magazine__item--list .cptb-magazine__body,
.cptb-magazine__item--list .cptb-news__body {
    padding: var(--cptb-pad);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.cptb-magazine__item--list .cptb-magazine__title,
.cptb-magazine__item--list .cptb-news__title {
    font-size: 1.2rem;
}

/* ── Layout Titulares Compactos ──────────────────────────────── */
.cptb-magazine__headlines {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cptb-magazine__headline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cptb-border);
    transition: background var(--cptb-transition);
}
.cptb-magazine__headline-item:last-child {
    border-bottom: none;
}
.cptb-magazine__headline-item:hover {
    background: var(--cptb-subtle);
}
.cptb-magazine__headline-bullet {
    display: block;
    width: 4px;
    min-width: 4px;
    min-height: 100%;
    background: var(--cptb-accent);
    border-radius: 2px;
    margin-top: 2px;
    flex-shrink: 0;
}
.cptb-magazine__headline-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}
.cptb-magazine__headline-body .cptb-magazine__title,
.cptb-magazine__headline-body .cptb-news__title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}
.cptb-magazine__headline-body .cptb-meta {
    font-size: 0.75rem;
    color: var(--cptb-text);
    opacity: 0.7;
}
.cptb-magazine__headline-excerpt {
    font-size: 0.82rem;
    color: var(--cptb-text);
    line-height: 1.4;
    margin: 0;
    opacity: 0.85;
}
.cptb-magazine__headline-body .cptb-news__title a:hover {
    color: var(--cptb-accent);
}

/* ── Items ────────────────────────────────────────────────────── */
.cptb-magazine__item {
    display: flex;
    flex-direction: column;
    background: var(--cptb-card-bg);
    border-radius: var(--cptb-radius);
    overflow: hidden;
    transition: box-shadow var(--cptb-transition), transform var(--cptb-transition);
}
.cptb-magazine__item:hover {
    box-shadow: var(--cptb-shadow-h);
    transform: translateY(-2px);
}

/* Hero */
.cptb-magazine__item--hero {
    box-shadow: var(--cptb-shadow);
}
.cptb-magazine__item--hero .cptb-magazine__thumb img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Sidebar item */
.cptb-magazine__item--sidebar {
    flex-direction: row;
    gap: 0.75rem;
    padding: 0;
    background: transparent;
    border-bottom: 1px solid var(--cptb-border);
    border-radius: 0;
    padding-bottom: calc(var(--cptb-gap) * 0.5);
}
.cptb-magazine__item--sidebar:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.cptb-magazine__item--sidebar:hover {
    box-shadow: none;
    transform: none;
}
.cptb-magazine__item--sidebar:hover .cptb-magazine__thumb img,
.cptb-magazine__item--sidebar:hover .cptb-news__thumb img {
    transform: none;
}
.cptb-magazine__item--sidebar .cptb-magazine__thumb,
.cptb-magazine__item--sidebar .cptb-news__thumb {
    width: 120px;
    min-width: 120px;
    flex-shrink: 0;
}
.cptb-magazine__item--sidebar .cptb-magazine__thumb img,
.cptb-magazine__item--sidebar .cptb-news__thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: calc(var(--cptb-radius) * 0.5);
}
.cptb-magazine__item--sidebar .cptb-magazine__body,
.cptb-magazine__item--sidebar .cptb-news__body {
    padding: 0;
    flex: 1;
}
.cptb-magazine__item--sidebar .cptb-news__title {
    font-size: 0.9rem;
    line-height: 1.35;
}
.cptb-magazine__item--sidebar .cptb-meta {
    font-size: 0.75rem;
}

/* Card normal */
.cptb-magazine__item--card {
    box-shadow: var(--cptb-shadow);
}

/* ── Thumb ────────────────────────────────────────────────────── */
.cptb-magazine__thumb {
    overflow: hidden;
}
.cptb-magazine__thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--cptb-transition);
    object-fit: cover;
}
.cptb-magazine__item:hover .cptb-magazine__thumb img {
    transform: scale(1.05);
}

/* ── Body ─────────────────────────────────────────────────────── */
.cptb-magazine__body {
    padding: var(--cptb-pad);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

/* ── Title ────────────────────────────────────────────────────── */
.cptb-magazine__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.cptb-magazine__title a {
    color: var(--cptb-primary);
    text-decoration: none;
    transition: color var(--cptb-transition);
}
.cptb-magazine__title a:hover {
    color: var(--cptb-accent);
}

/* Hero title bigger */
.cptb-magazine__item--hero .cptb-magazine__title,
.cptb-magazine__item--hero .cptb-news__title {
    font-size: 1.5rem;
}

/* ── Excerpt ──────────────────────────────────────────────────── */
.cptb-magazine__excerpt {
    color: var(--cptb-text);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

/* ── Bottom row ────────────────────────────────────────────────── */
.cptb-magazine__bottom {
    display: grid;
    gap: var(--cptb-gap);
    margin-top: var(--cptb-gap);
    padding-top: var(--cptb-gap);
    border-top: 1px solid var(--cptb-border);
}
.cptb-magazine__bottom.cptb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cptb-magazine__bottom.cptb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cptb-magazine__bottom.cptb-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Bottom compact */
.cptb-magazine__bottom--compact .cptb-magazine__item {
    flex-direction: row;
    gap: 0.75rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid var(--cptb-border);
    padding-bottom: 0.75rem;
}
.cptb-magazine__bottom--compact .cptb-magazine__item:hover {
    transform: none;
    box-shadow: none;
}
.cptb-magazine__bottom--compact .cptb-magazine__thumb,
.cptb-magazine__bottom--compact .cptb-news__thumb {
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
}
.cptb-magazine__bottom--compact .cptb-magazine__thumb img,
.cptb-magazine__bottom--compact .cptb-news__thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.cptb-magazine__bottom--compact .cptb-magazine__body,
.cptb-magazine__bottom--compact .cptb-news__body {
    padding: 0;
}

/* Bottom card */
.cptb-magazine__bottom--card .cptb-magazine__item {
    box-shadow: var(--cptb-shadow);
    border-radius: var(--cptb-radius);
    overflow: hidden;
}
.cptb-magazine__bottom--card .cptb-magazine__thumb img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.cptb-magazine__bottom--card .cptb-magazine__body,
.cptb-magazine__bottom--card .cptb-news__body {
    padding: var(--cptb-pad);
}
.cptb-magazine__bottom--card .cptb-news__title {
    font-size: 0.95rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cptb-magazine__grid {
        grid-template-columns: 1fr 1fr;
    }
    .cptb-magazine__item--sidebar .cptb-magazine__thumb,
    .cptb-magazine__item--sidebar .cptb-news__thumb {
        width: 100px;
        min-width: 100px;
    }
    .cptb-magazine__item--sidebar .cptb-magazine__thumb img,
    .cptb-magazine__item--sidebar .cptb-news__thumb img {
        width: 100px;
        height: 70px;
    }
    .cptb-magazine__featured-below {
        grid-template-columns: repeat(2, 1fr);
    }
    .cptb-magazine__item--list .cptb-magazine__thumb,
    .cptb-magazine__item--list .cptb-news__thumb {
        width: 200px;
        min-width: 200px;
    }
    .cptb-magazine__bottom.cptb-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .cptb-magazine__bottom.cptb-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .cptb-magazine__grid {
        grid-template-columns: 1fr;
    }
    .cptb-magazine__grid > .cptb-magazine__item--hero {
        grid-row: auto;
    }
    .cptb-magazine__sidebar {
        gap: 0.75rem;
    }
    .cptb-magazine__grid--flat {
        grid-template-columns: 1fr;
    }
    .cptb-magazine__featured-below {
        grid-template-columns: 1fr;
    }
    .cptb-magazine__featured-main .cptb-magazine__title,
    .cptb-magazine__featured-main .cptb-news__title {
        font-size: 1.2rem;
    }
    .cptb-magazine__item--list {
        flex-direction: column !important;
    }
    .cptb-magazine__item--list .cptb-magazine__thumb,
    .cptb-magazine__item--list .cptb-news__thumb {
        width: 100%;
        min-width: 100%;
    }
    .cptb-magazine__item--list .cptb-magazine__thumb img,
    .cptb-magazine__item--list .cptb-news__thumb img {
        aspect-ratio: 16 / 9;
        height: auto;
    }
    .cptb-magazine__bottom.cptb-cols-2,
    .cptb-magazine__bottom.cptb-cols-3,
    .cptb-magazine__bottom.cptb-cols-4 {
        grid-template-columns: 1fr;
    }
    .cptb-magazine__tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8px, #000 calc(100% - 24px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 8px, #000 calc(100% - 24px), transparent 100%);
        scroll-snap-type: x mandatory;
    }
    .cptb-magazine__tabs::-webkit-scrollbar {
        display: none;
    }
    .cptb-magazine__tab {
        scroll-snap-align: start;
    }
    .cptb-magazine__item--hero .cptb-magazine__title,
    .cptb-magazine__item--hero .cptb-news__title {
        font-size: 1.2rem;
    }
}

/* ── Tab content transitions ─────────────────────────────────── */
.cptb-magazine__tab-content {
    animation: cptbMagFadeIn 0.25s ease;
}
@keyframes cptbMagFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Focus visible for tab keyboard nav ──────────────────────── */
.cptb-magazine__tab:focus-visible {
    outline: 2px solid var(--cptb-accent);
    outline-offset: -2px;
    border-radius: 3px;
}

/* ── Hero overlay support ────────────────────────────────────── */
.cptb-magazine__item--hero {
    position: relative;
}
.cptb-magazine__item--hero.cptb-hero-overlay .cptb-magazine__thumb {
    position: relative;
}
.cptb-magazine__item--hero.cptb-hero-overlay .cptb-magazine__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cptb-hero-overlay, rgba(0,0,0,0.3));
    pointer-events: none;
    transition: opacity var(--cptb-transition);
}

/* ── No posts message ────────────────────────────────────────── */
.cptb-magazine .cptb-no-posts {
    text-align: center;
    padding: 2rem;
    color: var(--cptb-text);
    opacity: 0.6;
    font-style: italic;
    border: 1px dashed var(--cptb-border);
    border-radius: var(--cptb-radius);
}

/* ── Dark mode support ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cptb-magazine {
        --cptb-border: #374151;
        --cptb-card-bg: #1f2937;
        --cptb-subtle: #111827;
        --cptb-text: #d1d5db;
        --cptb-primary: #f9fafb;
        --cptb-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
        --cptb-shadow-h: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}
/* WP dark theme class support */
.is-dark-theme .cptb-magazine,
.editor-styles-wrapper.is-dark-theme .cptb-magazine {
    --cptb-border: #374151;
    --cptb-card-bg: #1f2937;
    --cptb-subtle: #111827;
    --cptb-text: #d1d5db;
    --cptb-primary: #f9fafb;
    --cptb-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    --cptb-shadow-h: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Editorial Layout
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine__editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cptb-gap, 20px);
}
.cptb-magazine__editorial-col {
    display: flex;
    flex-direction: column;
    gap: var(--cptb-gap, 20px);
}
.cptb-magazine__editorial-col .cptb-magazine__item--hero {
    flex: 0 0 auto;
}
.cptb-magazine__editorial-col .cptb-magazine__item--card {
    flex: 0 0 auto;
}
@media (max-width: 768px) {
    .cptb-magazine__editorial { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Mosaic Layout
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine__mosaic {
    display: grid;
    gap: var(--cptb-gap, 20px);
}
/* Pattern 2-1-1: first item spans 2 rows in first column */
.cptb-magazine__mosaic--2-1-1 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
}
.cptb-magazine__mosaic--2-1-1 > .cptb-magazine__item:first-child {
    grid-row: 1 / 3;
}
/* Pattern 1-2-1: middle item large */
.cptb-magazine__mosaic--1-2-1 {
    grid-template-columns: 1fr 2fr 1fr;
}
.cptb-magazine__mosaic--1-2-1 > .cptb-magazine__item:nth-child(2) {
    grid-row: 1 / 3;
}
/* Pattern 1-1-2: last item spans 2 rows */
.cptb-magazine__mosaic--1-1-2 {
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
}
.cptb-magazine__mosaic--1-1-2 > .cptb-magazine__item:last-child {
    grid-row: 1 / 3;
    grid-column: 2;
}
@media (max-width: 768px) {
    .cptb-magazine__mosaic,
    .cptb-magazine__mosaic--2-1-1,
    .cptb-magazine__mosaic--1-2-1,
    .cptb-magazine__mosaic--1-1-2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .cptb-magazine__mosaic > .cptb-magazine__item {
        grid-row: auto !important;
        grid-column: auto !important;
    }
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Title & Excerpt line clamping
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine[style*="--cptb-title-lines"] .cptb-magazine__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--cptb-title-lines);
    overflow: hidden;
}
.cptb-magazine[style*="--cptb-sidebar-title-lines"] .cptb-magazine__sidebar .cptb-magazine__title {
    -webkit-line-clamp: var(--cptb-sidebar-title-lines);
}
.cptb-magazine[style*="--cptb-excerpt-lines"] .cptb-magazine__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--cptb-excerpt-lines);
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Image crop position
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine[style*="--cptb-crop"] .cptb-news__thumb img {
    object-position: var(--cptb-crop, center center);
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Gradient Overlay (bottom-to-top)
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine__item--hero.cptb-hero-overlay--gradient .cptb-magazine__thumb::after {
    background: linear-gradient(
        to top,
        var(--cptb-hero-overlay, rgba(0,0,0,0.7)) 0%,
        transparent 70%
    ) !important;
}

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Visual Labels
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine__label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    border-radius: 3px;
    background: var(--cptb-label-bg, #e11d48);
    color: var(--cptb-label-color, #fff);
    pointer-events: none;
}
/* Ensure thumb container is positioned for the label */
.cptb-magazine__thumb { position: relative; }

/* ══════════════════════════════════════════════════════════════════
 * MAGAZINE PRO — Post Counter / Numbering
 * ══════════════════════════════════════════════════════════════════ */
.cptb-magazine__counter {
    display: none;
}
.cptb-magazine--counter .cptb-magazine__counter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 1;
    color: var(--cptb-counter-color, #e11d48);
    background: var(--cptb-counter-bg, transparent);
    z-index: 2;
}
/* Style: number (default) — large number left of body */
.cptb-magazine--counter-number .cptb-magazine__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.cptb-magazine--counter-number .cptb-magazine__counter {
    flex: 0 0 auto;
    font-size: 2.4rem;
    opacity: 0.35;
}
/* Style: circle — overlaid on thumbnail */
.cptb-magazine--counter-circle .cptb-magazine__counter {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    background: var(--cptb-counter-bg, rgba(0,0,0,0.65));
    color: var(--cptb-counter-color, #fff);
}
.cptb-magazine--counter-circle .cptb-magazine__thumb { position: relative; }
/* Style: line — accent left border + number */
.cptb-magazine--counter-line .cptb-magazine__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 3px solid var(--cptb-counter-color, #e11d48);
    padding-left: 12px;
}
.cptb-magazine--counter-line .cptb-magazine__counter {
    flex: 0 0 auto;
    font-size: 1.6rem;
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * CAROUSEL BLOCK  —  CSS scroll-snap, zero dependencies
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-carousel {
    --cptb-c-per-view: 3;
    --cptb-c-gap: 20px;
    --cptb-c-peek: 0px;
    --cptb-c-pad: 0px;
    position: relative;
    width: 100%;
    overflow: visible !important;
}
.cptb-carousel__track {
    display: flex;
    gap: var(--cptb-c-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}
.cptb-carousel__track::-webkit-scrollbar { display: none; }

.cptb-carousel__slide {
    will-change: transform;
    flex: 0 0 calc(
        ( 100% - var(--cptb-c-peek) * 2 - var(--cptb-c-gap) * ( var(--cptb-c-per-view) - 1 ) - var(--cptb-c-pad) * 2 )
        / var(--cptb-c-per-view)
    );
    scroll-snap-align: start;
    border-radius: var(--cptb-radius, 8px);
    background: var(--cptb-card-bg, #fff);
    box-shadow: var(--cptb-shadow, 0 1px 4px rgba(0,0,0,.08));
    overflow: hidden;
    border: 1px solid var(--cptb-border, #e5e7eb);
    transition: box-shadow var(--cptb-transition), transform var(--cptb-transition), border-color var(--cptb-transition);
}
.cptb-carousel__slide:hover {
    box-shadow: var(--cptb-shadow-h, 0 4px 16px rgba(0,0,0,.12));
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--cptb-accent, #0066cc) 25%, var(--cptb-border, #e5e7eb));
}

/* ── Fade effect ── */
.cptb-carousel--fade .cptb-carousel__track {
    overflow: hidden;
    scroll-snap-type: none;
    position: relative;
}
.cptb-carousel--fade .cptb-carousel__slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.cptb-carousel--fade .cptb-carousel__slide--active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* ── Center mode ── */
.cptb-carousel--center .cptb-carousel__slide {
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    opacity: 0.7;
}
.cptb-carousel--center .cptb-carousel__slide--center {
    transform: scale(var(--cptb-center-scale, 1.08));
    opacity: 1;
    z-index: 2;
}

/* ── Equal heights ── */
.cptb-carousel--equal-h .cptb-carousel__slide {
    display: flex;
    flex-direction: column;
}
.cptb-carousel--equal-h .cptb-carousel__slide .cptb-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cptb-carousel--equal-h .cptb-carousel__slide .cptb-meta {
    margin-top: auto;
}

/* ── Drag cursor ── */
.cptb-carousel--draggable .cptb-carousel__track { cursor: grab; }
.cptb-carousel--draggable .cptb-carousel__track:active { cursor: grabbing; }

/* ── Arrows ── */
.cptb-carousel__arrow {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 50%;
    background: rgba(255,255,255,.95) !important;
    color: #333 !important;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 0;
    -webkit-appearance: none;
    appearance: none;
}
.cptb-carousel__arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    pointer-events: none;
}
.cptb-carousel__arrow:hover {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    transform: translateY(-50%) scale(1.1);
}
.cptb-carousel__arrow:active { transform: translateY(-50%) scale(0.95); }
.cptb-carousel__arrow:disabled { opacity: .3; pointer-events: none; }
.cptb-carousel__arrow--prev { left: 12px; }
.cptb-carousel__arrow--next { right: 12px; }

/* Arrow style: square */
.cptb-carousel--arrow-square .cptb-carousel__arrow { border-radius: 6px; }
/* Arrow style: minimal */
.cptb-carousel--arrow-minimal .cptb-carousel__arrow {
    background: transparent !important;
    border: none !important;
    box-shadow: none;
    backdrop-filter: none;
}
.cptb-carousel--arrow-minimal .cptb-carousel__arrow:hover { background: rgba(0,0,0,.06) !important; }
/* Arrow position: outside */
.cptb-carousel--arrow-outside .cptb-carousel__arrow--prev { left: -52px; }
.cptb-carousel--arrow-outside .cptb-carousel__arrow--next { right: -52px; }
/* Arrow position: bottom */
.cptb-carousel--arrow-bottom .cptb-carousel__arrow {
    position: relative !important;
    top: auto;
    transform: none;
}
.cptb-carousel--arrow-bottom .cptb-carousel__nav-bottom {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* ── Dots ── */
.cptb-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 4px 0;
}
.cptb-carousel__dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}
.cptb-carousel__dot--active,
.cptb-carousel__dot:hover { background: var(--cptb-accent, #333); transform: scale(1.25); }
.cptb-carousel__dot:focus-visible { outline: 2px solid #0073aa; outline-offset: 2px; }
.cptb-carousel__dot--active { border-radius: 10px; width: 24px; }

/* Dot style: lines */
.cptb-carousel--dots-lines .cptb-carousel__dot {
    width: 24px;
    height: 3px;
    border-radius: 2px;
}
.cptb-carousel--dots-lines .cptb-carousel__dot--active { width: 40px; }
/* Dot style: numbers */
.cptb-carousel--dots-numbers .cptb-carousel__dot {
    width: auto;
    height: auto;
    min-width: 28px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 14px;
    background: rgba(0,0,0,0.08);
    color: #555;
}
.cptb-carousel--dots-numbers .cptb-carousel__dot--active {
    background: var(--cptb-accent, #333);
    color: #fff;
    width: auto;
}
/* Dots position: inside-bottom */
.cptb-carousel--dots-inside .cptb-carousel__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 5;
}
.cptb-carousel--dots-inside .cptb-carousel__dot { background: rgba(255,255,255,0.5); }
.cptb-carousel--dots-inside .cptb-carousel__dot--active { background: #fff; }

/* ── Progress bar ── */
.cptb-carousel__progress {
    height: var(--cptb-progress-h, 3px);
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}
.cptb-carousel__progress-bar {
    height: 100%;
    background: var(--cptb-progress-color, var(--cptb-accent, #0066cc));
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ── Counter ── */
.cptb-carousel__counter {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Hero variant ── */
.cptb-carousel--hero .cptb-carousel__slide {
    border: none;
    box-shadow: none;
    background: #000;
}
.cptb-carousel--hero .cptb-carousel__slide:hover {
    transform: none;
    box-shadow: none;
}
.cptb-carousel--hero .cptb-carousel__slide {
    position: relative;
    overflow: hidden;
}
.cptb-carousel__hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}
.cptb-carousel__slide:hover .cptb-carousel__hero-bg { transform: scale(1.04); }
.cptb-carousel__hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.cptb-carousel__hero-content {
    position: absolute;
    z-index: 2;
    padding: 2rem;
    max-width: 70%;
    color: #fff;
}
/* Content positions */
.cptb-carousel__hero-content--bottom-left { bottom: 0; left: 0; }
.cptb-carousel__hero-content--bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); text-align: center; }
.cptb-carousel__hero-content--center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.cptb-carousel__hero-content--center-left { top: 50%; left: 0; transform: translateY(-50%); }
.cptb-carousel--hero .cptb-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.cptb-carousel--hero .cptb-title a { color: inherit; text-decoration: none; }
.cptb-carousel--hero .cptb-title a:hover { text-decoration: underline; }
.cptb-carousel--hero .cptb-excerpt {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.cptb-carousel--hero .cptb-meta {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ── Mini-cards variant ── */
.cptb-carousel--mini-cards .cptb-carousel__slide {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}
.cptb-carousel__mini-card {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}
.cptb-carousel__mini-card--column {
    flex-direction: column;
    text-align: center;
}
.cptb-carousel__mini-card-img {
    flex-shrink: 0;
    border-radius: calc(var(--cptb-radius, 8px) - 2px);
    overflow: hidden;
}
.cptb-carousel__mini-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cptb-carousel__mini-card-body {
    flex: 1;
    min-width: 0;
}
.cptb-carousel__mini-card-body .cptb-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px;
}
.cptb-carousel__mini-card-body .cptb-title a { color: inherit; text-decoration: none; }
.cptb-carousel__mini-card-body .cptb-title a:hover { text-decoration: underline; }
.cptb-carousel__mini-card-body .cptb-date {
    font-size: 0.75rem;
    color: #888;
}

/* ── Logo variant ── */
.cptb-carousel--logo .cptb-carousel__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    background: #fff;
}
.cptb-carousel--logo .cptb-carousel__slide:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cptb-carousel--logo .cptb-carousel__slide img {
    max-height: var(--cptb-logo-max-h, 60px);
    width: auto;
    object-fit: contain;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.cptb-carousel--logo-grayscale .cptb-carousel__slide img {
    filter: grayscale(100%);
    opacity: 0.7;
}
.cptb-carousel--logo-grayscale .cptb-carousel__slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ── Category variant ── */
.cptb-carousel--category .cptb-carousel__slide {
    text-align: center;
    padding: 0;
}
.cptb-carousel__cat-card { display: block; text-decoration: none; color: inherit; }
.cptb-carousel__cat-card:hover { text-decoration: none; }
.cptb-carousel__cat-img {
    width: 100%;
    height: 140px;
    overflow: hidden;
}
.cptb-carousel__cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.cptb-carousel__cat-card:hover .cptb-carousel__cat-img img { transform: scale(1.06); }
.cptb-carousel__cat-info { padding: 14px 12px; }
.cptb-carousel__cat-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: block;
}
.cptb-carousel__cat-count {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
    display: block;
}

/* ── Carousel card internals ── */
.cptb-carousel__slide .cptb-thumb { margin: 0; overflow: hidden; }
.cptb-carousel__slide .cptb-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-carousel__slide:hover .cptb-thumb img { transform: scale(1.06); }
.cptb-carousel__slide .cptb-card-body { padding: 16px; }
.cptb-carousel__slide .cptb-title { margin: 0 0 .5rem; }
.cptb-carousel__slide .cptb-excerpt { margin: 0 0 .75rem; }
.cptb-carousel__slide .cptb-meta { margin-top: auto; font-size: .8rem; color: #888; }

/* Slide entrance animation */
.cptb-carousel__slide {
    opacity: 0;
    transform: translateY(12px);
    animation: cptbCarouselSlideIn 0.5s ease forwards;
}
.cptb-carousel__slide:nth-child(1) { animation-delay: 0s; }
.cptb-carousel__slide:nth-child(2) { animation-delay: 0.08s; }
.cptb-carousel__slide:nth-child(3) { animation-delay: 0.16s; }
.cptb-carousel__slide:nth-child(4) { animation-delay: 0.24s; }
@keyframes cptbCarouselSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Force arrows visible above any parent clipping */
.wp-block-cpt-blocks-carousel { overflow: visible !important; }

/* Peek: reveal partial next/prev slides */
.cptb-carousel[data-peek]:not([data-peek="0px"]) .cptb-carousel__track {
    padding-left: var(--cptb-c-peek);
    padding-right: var(--cptb-c-peek);
}

/* Responsive */
@media (max-width: 768px) {
    .cptb-carousel__arrow { width: 36px; height: 36px; }
    .cptb-carousel__arrow svg { width: 16px; height: 16px; }
    .cptb-carousel__dots { margin-top: 12px; }
    .cptb-carousel--arrow-outside .cptb-carousel__arrow--prev { left: -40px; }
    .cptb-carousel--arrow-outside .cptb-carousel__arrow--next { right: -40px; }
    .cptb-carousel__hero-content { max-width: 90%; padding: 1.25rem; }
    .cptb-carousel--hero .cptb-title { font-size: clamp(1.1rem, 5vw, 1.5rem); }
    .cptb-carousel__cat-img { height: 100px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * RELATED POSTS BLOCK  —  Posts relacionados (PRO integration)
 * ═══════════════════════════════════════════════════════════════════════════════ */
/* Section title decoration for related posts */
.cptb-related + .cptb-section-header,
.cptb-section-header + .cptb-related { margin-top: 0; }
.cptb-related .cptb-grid__item {
    transition: transform var(--cptb-transition), box-shadow var(--cptb-transition);
}
.cptb-related .cptb-grid__item .cptb-thumb { overflow: hidden; }
.cptb-related .cptb-grid__item .cptb-thumb img { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.cptb-related .cptb-grid__item:hover .cptb-thumb img { transform: scale(1.06); }
/* List layout */
.cptb-related--list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cptb-related--list .cptb-grid__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}
.cptb-related--list .cptb-grid__item .cptb-thumb {
    flex: 0 0 120px;
    margin: 0;
}
.cptb-related--list .cptb-grid__item .cptb-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--cptb-radius, 6px);
}
.cptb-related--list .cptb-grid__item .cptb-card__body {
    flex: 1;
    min-width: 0;
}
.cptb-related--list .cptb-grid__item .cptb-title {
    font-size: .95rem;
    margin: 0 0 .25rem;
}
.cptb-related--list .cptb-grid__item .cptb-meta {
    font-size: .78rem;
}
/* PRO: Reading time badge */
.cptb-related .cptb-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}
.cptb-related .cptb-reading-time svg {
    width: 14px;
    height: 14px;
}
@media (max-width: 768px) {
    .cptb-related--list .cptb-grid__item .cptb-thumb {
        flex: 0 0 80px;
    }
    .cptb-related--list .cptb-grid__item .cptb-thumb img {
        width: 80px;
        height: 60px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * TABLE OF CONTENTS BLOCK PRO  —  Índice automático de encabezados
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-toc {
    --toc-bg:           #f9fafb;
    --toc-border:       #e5e7eb;
    --toc-radius:       8px;
    --toc-border-w:     1px;
    --toc-title-color:  inherit;
    --toc-title-size:   1.05rem;
    --toc-title-weight: 600;
    --toc-link:         var(--cptb-accent, #0066cc);
    --toc-link-hover:   var(--cptb-primary, #003d7a);
    --toc-active:       var(--cptb-primary, #1a1a1a);
    --toc-font-size:    0.9rem;
    --toc-lh:           1.8;
    --toc-pad:          1.25rem;
    --toc-max-w:        100%;
    --toc-counter:      var(--cptb-accent, #0066cc);
    --toc-accent:       var(--cptb-accent, #0066cc);
    --toc-progress:     var(--toc-accent);
    --toc-sticky-offset: 80px;

    position: relative;
    overflow: hidden;
    background: var(--toc-bg);
    border: var(--toc-border-w) solid var(--toc-border);
    border-radius: var(--toc-radius);
    padding: var(--toc-pad);
    max-width: var(--toc-max-w);
    margin: 1.5rem 0;
    font-size: var(--toc-font-size);
    line-height: var(--toc-lh);
}

/* ── Style variants ────────────────────────────────────────────────── */
.cptb-toc--minimal {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
}
.cptb-toc--bordered { /* default — uses CSS vars above */ }
.cptb-toc--card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.cptb-toc--floating {
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .1);
}

/* ── Header ────────────────────────────────────────────────────────── */
.cptb-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.cptb-toc__header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cptb-toc__title {
    font-size: var(--toc-title-size);
    font-weight: var(--toc-title-weight);
    color: var(--toc-title-color);
    margin: 0;
}
.cptb-toc__count {
    font-size: 0.75rem;
    opacity: 0.6;
    background: color-mix(in srgb, var(--toc-accent) 12%, transparent);
    color: var(--toc-accent);
    border-radius: 10px;
    padding: 1px 8px;
    font-weight: 500;
}

/* ── Toggle ────────────────────────────────────────────────────────── */
.cptb-toc__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.25s;
    line-height: 1;
}
.cptb-toc__toggle:hover { opacity: 1; }
.cptb-toc--collapsed .cptb-toc__toggle { transform: rotate(-90deg); }

/* ── List + collapse animation ─────────────────────────────────────── */
.cptb-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}
.cptb-toc--collapsed .cptb-toc__list {
    max-height: 0;
    opacity: 0;
}

/* ── Numbered style variants ───────────────────────────────────────── */
.cptb-toc--numbered .cptb-toc__item::before {
    counter-increment: toc-counter;
    content: counter(toc-counter) '. ';
    color: var(--toc-counter);
    font-weight: 500;
    margin-right: 0.3em;
}
.cptb-toc--num-roman .cptb-toc__item::before {
    content: counter(toc-counter, upper-roman) '. ';
}
.cptb-toc--num-alpha .cptb-toc__item::before {
    content: counter(toc-counter, lower-alpha) ') ';
}

/* ── Bullets style ─────────────────────────────────────────────────── */
.cptb-toc--bullets .cptb-toc__item::before {
    content: '•';
    color: var(--toc-counter);
    margin-right: 0.5em;
}
.cptb-toc--plain .cptb-toc__item::before { content: none; }

/* ── Icon styles (before links) ────────────────────────────────────── */
.cptb-toc--icon-chevron .cptb-toc__link::before { content: '› '; color: var(--toc-accent); font-weight: 700; }
.cptb-toc--icon-arrow .cptb-toc__link::before { content: '→ '; color: var(--toc-accent); }
.cptb-toc--icon-dot .cptb-toc__link::before { content: '● '; color: var(--toc-accent); font-size: 0.5em; vertical-align: middle; }

/* ── Items & indentation ────────────────────────────────────────────── */
.cptb-toc__item {
    position: relative;
    padding-left: calc(var(--toc-indent, 0) * 1.25em);
    padding-top: 0.15em;
    padding-bottom: 0.15em;
    transition: background 0.2s, padding-left 0.2s, transform 0.2s;
    border-radius: 4px;
    margin-bottom: 1px;
}

/* ── Links ──────────────────────────────────────────────────────────── */
.cptb-toc__link {
    color: var(--toc-link);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    display: inline-block;
}
.cptb-toc__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--toc-link-hover);
    transition: width 0.25s ease;
}
.cptb-toc__link:hover { color: var(--toc-link-hover); text-decoration: none; }
.cptb-toc__link:hover::after { width: 100%; }

/* ── Active scroll-spy ──────────────────────────────────────────────── */
.cptb-toc__link--active,
.cptb-toc__link--active:hover {
    color: var(--toc-active);
    font-weight: 600;
}
.cptb-toc__item--active {
    border-left: 3px solid var(--toc-accent);
    padding-left: calc(var(--toc-indent, 0) * 1.25em + 0.5em);
    margin-left: -3px;
    background: color-mix(in srgb, var(--toc-accent) 8%, transparent);
}

/* ── Hover effects ──────────────────────────────────────────────────── */
.cptb-toc--hover-highlight .cptb-toc__item:hover {
    background: color-mix(in srgb, var(--toc-accent) 6%, transparent);
}
.cptb-toc--hover-slide .cptb-toc__item:hover {
    transform: translateX(6px);
}

/* ── Progress bar ───────────────────────────────────────────────────── */
.cptb-toc__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--toc-progress);
    border-radius: var(--toc-radius) var(--toc-radius) 0 0;
    transition: width 0.15s ease;
    width: 0;
    z-index: 1;
}

/* ── Sticky ─────────────────────────────────────────────────────────── */
.cptb-toc--sticky {
    position: sticky;
    top: var(--toc-sticky-offset);
    z-index: 10;
    align-self: start;
}

/* ── Back to top ────────────────────────────────────────────────────── */
.cptb-toc__back-top {
    text-align: center;
    margin-top: 0.75rem;
    border-top: 1px solid var(--toc-border);
    padding-top: 0.5rem;
}
.cptb-toc__back-top-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--toc-accent);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.cptb-toc__back-top-btn:hover {
    background: color-mix(in srgb, var(--toc-accent) 10%, transparent);
}

/* ── Entrance animations ────────────────────────────────────────────── */
@keyframes cptbTocFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cptbTocSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.cptb-toc--entrance-fade { animation: cptbTocFadeIn 0.5s ease both; }
.cptb-toc--entrance-slide-up { animation: cptbTocSlideUp 0.5s ease both; }

/* ── Dark mode ──────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cptb-toc {
        --toc-bg: #1e293b;
        --toc-border: #374151;
    }
    .cptb-toc--floating {
        background: rgba(30, 41, 59, .75);
        border-color: rgba(255, 255, 255, .1);
    }
    .cptb-toc__count {
        background: color-mix(in srgb, var(--toc-accent) 20%, transparent);
    }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cptb-toc,
    .cptb-toc__list,
    .cptb-toc__item,
    .cptb-toc__link,
    .cptb-toc__link::after,
    .cptb-toc__toggle,
    .cptb-toc__progress {
        animation: none !important;
        transition: none !important;
    }
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cptb-toc { font-size: 0.85rem; padding: 1rem; }
    .cptb-toc--sticky { position: relative; top: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * AJAX FILTERS BLOCK  —  Filtrado dinámico con búsqueda, taxonomía, sort
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-ajax-filters {
    --af-bg:             transparent;
    --af-filter-bg:      #f3f4f6;
    --af-filter-active:  var(--cptb-accent, #0066cc);
    --af-filter-txt:     var(--cptb-text, #444);
    --af-filter-atxt:    #fff;
    --af-filter-radius:  6px;
    --af-cols:           3;
    --af-cols-t:         2;
    --af-cols-m:         1;
    --af-gap:            1.5rem;

    background: var(--af-bg);
}

/* Filter bar */
.cptb-af__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.cptb-af__search {
    flex: 1 1 200px;
    min-width: 160px;
}
.cptb-af__search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: var(--af-filter-radius);
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.2s;
}
.cptb-af__search-input:focus {
    outline: none;
    border-color: var(--af-filter-active);
}
.cptb-af__filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cptb-af__filter-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: var(--af-filter-radius);
    background: var(--af-filter-bg);
    color: var(--af-filter-txt);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.cptb-af__filter-btn:hover {
    border-color: var(--af-filter-active);
    color: var(--af-filter-active);
}
.cptb-af__filter-btn.is-active {
    background: var(--af-filter-active);
    color: var(--af-filter-atxt);
    border-color: var(--af-filter-active);
}
.cptb-af__filter-btn .cptb-af__count {
    font-size: 0.75em;
    opacity: 0.7;
}
.cptb-af__filter-select,
.cptb-af__sort-select {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: var(--af-filter-radius);
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}
.cptb-af__sort { margin-left: auto; }

/* Meta / counter */
.cptb-af__meta {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--cptb-text, #666);
}

/* Grid results */
.cptb-af__grid {
    display: grid;
    grid-template-columns: repeat(var(--af-cols), 1fr);
    gap: var(--af-gap);
}

/* Animation for new items */
.cptb-af--animate {
    animation: cptbFadeIn 0.4s ease both;
}
@keyframes cptbFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Loading state */
.cptb-af--loading .cptb-af__grid {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Footer / Load more */
.cptb-af__footer {
    text-align: center;
    margin-top: 1.5rem;
}
.cptb-af__load-more {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--af-filter-active);
    border-radius: var(--af-filter-radius);
    background: transparent;
    color: var(--af-filter-active);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.cptb-af__load-more:hover {
    background: var(--af-filter-active);
    color: #fff;
}

/* Pagination numbers */
.cptb-af__pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}
.cptb-af__page {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: 4px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.cptb-af__page:hover { border-color: var(--af-filter-active); color: var(--af-filter-active); }
.cptb-af__page.is-current {
    background: var(--af-filter-active);
    color: #fff;
    border-color: var(--af-filter-active);
    cursor: default;
}

/* No results */
.cptb-af__no-results {
    text-align: center;
    padding: 2rem;
    color: var(--cptb-text, #666);
    font-style: italic;
}

/* Offcanvas (mobile) */
.cptb-af__offcanvas-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: var(--af-filter-radius);
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
}
.cptb-af__offcanvas { display: contents; }

@media (max-width: 768px) {
    .cptb-af__grid { grid-template-columns: repeat(var(--af-cols-m), 1fr); }

    .cptb-af__offcanvas-toggle { display: inline-flex; }
    .cptb-af__offcanvas {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0,0,0,0.4);
    }
    .cptb-af__offcanvas.is-open { display: flex; justify-content: flex-end; }
    .cptb-af__offcanvas-inner {
        background: #fff;
        width: 300px;
        max-width: 85vw;
        height: 100%;
        padding: 1.5rem;
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    .cptb-af__offcanvas-inner .cptb-af__bar {
        flex-direction: column;
        align-items: stretch;
    }
    .cptb-af__offcanvas-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        line-height: 1;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .cptb-af__grid { grid-template-columns: repeat(var(--af-cols-t), 1fr); }
}

body.cptb-offcanvas-open { overflow: hidden; }

/* PRO: Search input with icon */
.cptb-af__search {
    position: relative;
}\n.cptb-af__search-input {\n    padding-left: 2.25rem;\n}\n.cptb-af__search::before {\n    content: '';\n    position: absolute;\n    left: 0.75rem;\n    top: 50%;\n    transform: translateY(-50%);\n    width: 16px;\n    height: 16px;\n    background: currentColor;\n    opacity: 0.4;\n    -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E\") center/contain no-repeat;\n    mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E\") center/contain no-repeat;\n}

/* PRO: Filter button pill effect */
.cptb-af__filter-btn {
    position: relative;
    overflow: hidden;
}
.cptb-af__filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--af-filter-active);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: -1;
}
.cptb-af__filter-btn:hover::before { opacity: 0.08; }
.cptb-af__filter-btn.is-active::before { opacity: 1; }

/* PRO: Active filter badges */
.cptb-af__active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.cptb-af__active-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: color-mix(in srgb, var(--af-filter-active) 12%, transparent);
    color: var(--af-filter-active);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.cptb-af__active-tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
}
.cptb-af__active-tag button:hover { opacity: 1; }

/* PRO: Results counter badge */
.cptb-af__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cptb-af__count {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    background: var(--af-filter-bg);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* PRO: Skeleton loading */
.cptb-af--loading .cptb-ajax-item {
    position: relative;
    overflow: hidden;
}
.cptb-af--loading .cptb-ajax-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: cptbSkeleton 1.2s ease infinite;
}
@keyframes cptbSkeleton {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* PRO: Card hover in grid results */
.cptb-af__grid .cptb-grid__item {
    transition: transform var(--cptb-transition), box-shadow var(--cptb-transition);
}
.cptb-af__grid .cptb-grid__item:hover {
    transform: translateY(-6px);
    box-shadow: var(--cptb-shadow-h);
}
.cptb-af__grid .cptb-grid__item .cptb-thumb { overflow: hidden; }
.cptb-af__grid .cptb-grid__item .cptb-thumb img { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.cptb-af__grid .cptb-grid__item:hover .cptb-thumb img { transform: scale(1.06); }

/* PRO: Load more button animation */
.cptb-af__load-more {
    position: relative;
    overflow: hidden;
}
.cptb-af__load-more::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--af-filter-active);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}
.cptb-af__load-more:hover::after { transform: scaleX(1); }
.cptb-af__load-more:hover { color: #fff; border-color: var(--af-filter-active); }

/* ── PRO: Multi-select checkbox indicator ── */
.cptb-af__filter-group--multi .cptb-af__filter-btn::before {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--af-text);
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -2px;
    transition: background var(--cptb-transition), border-color var(--cptb-transition);
}
.cptb-af__filter-group--multi .cptb-af__filter-btn.is-active::before {
    background: var(--af-filter-active);
    border-color: var(--af-filter-active);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5L12 4l1 1z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── PRO: Hierarchical term tree ── */
.cptb-af__term-tree { display: flex; flex-direction: column; gap: 2px; }
.cptb-af__term-children { margin-left: 1.2rem; border-left: 2px solid rgba(0,0,0,0.08); padding-left: 0.5rem; }
.cptb-af__term-tree .cptb-af__filter-btn { justify-content: flex-start; }

/* ── PRO: Active filter badges ── */
.cptb-af__active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.5rem 0;
}
.cptb-af__active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--af-filter-active);
    color: #fff;
    border-radius: 20px;
    line-height: 1.3;
    animation: cptb-af-tagIn 0.25s ease;
}
.cptb-af__active-tag button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1em;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.cptb-af__active-tag button:hover { opacity: 1; }
@keyframes cptb-af-tagIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── PRO: Reset button ── */
.cptb-af__reset {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    cursor: pointer;
    color: var(--af-text);
    transition: background var(--cptb-transition), color var(--cptb-transition);
}
.cptb-af__reset:hover { background: #f44336; color: #fff; border-color: #f44336; }

/* ── PRO: Skeleton card placeholders ── */
.cptb-af__skeleton {
    display: none;
}
.cptb-af--loading .cptb-af__skeleton {
    display: grid;
    grid-template-columns: var(--af-cols);
    gap: var(--af-gap, 1.2rem);
}
.cptb-af__skeleton-card {
    border-radius: var(--cptb-card-radius, 12px);
    overflow: hidden;
    background: #f0f0f0;
}
.cptb-af__skeleton-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
    background-size: 200% 100%;
    animation: cptb-shimmer 1.5s ease infinite;
}
.cptb-af__skeleton-text {
    padding: 1rem;
}
.cptb-af__skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
    background-size: 200% 100%;
    animation: cptb-shimmer 1.5s ease infinite;
    margin-bottom: 8px;
}
.cptb-af__skeleton-line:first-child { width: 75%; height: 16px; }
.cptb-af__skeleton-line:nth-child(2) { width: 100%; }
.cptb-af__skeleton-line:last-child { width: 40%; }

/* ── PRO: Date filter inputs ── */
.cptb-af__date-range {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cptb-af__date-input {
    padding: 6px 10px;
    border: 1px solid var(--af-filter-bg, #eee);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--af-text);
    background: #fff;
    flex: 1;
    min-width: 120px;
}
.cptb-af__date-input:focus {
    outline: none;
    border-color: var(--af-filter-active);
    box-shadow: 0 0 0 2px rgba(var(--af-filter-active-rgb, 66,133,244), 0.15);
}

/* ── PRO: Show more toggle ── */
.cptb-af__show-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--af-filter-active);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.cptb-af__show-more:hover { background: rgba(0,0,0,0.04); }

/* ── PRO: Filter badge counter (offcanvas toggle) ── */
.cptb-af__filter-badge {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: var(--af-filter-active, #d32f2f);
    color: #fff;
    border-radius: 10px;
}
.cptb-af__offcanvas-toggle { position: relative; }

/* ── PRO: Pagination prev/next & ellipsis ── */
.cptb-af__page--prev,
.cptb-af__page--next {
    font-size: 1.2em;
    padding: 6px 10px;
}
.cptb-af__page--ellipsis {
    cursor: default;
    opacity: 0.5;
    padding: 6px 4px;
}

/* ── PRO: Infinite scroll sentinel ── */
.cptb-af__infinite-sentinel {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}
.cptb-af__infinite-sentinel::after {
    content: '';
    width: 28px; height: 28px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--af-filter-active);
    border-radius: 50%;
    animation: cptb-spin 0.7s linear infinite;
}
@keyframes cptb-spin { to { transform: rotate(360deg); } }

/* ── PRO: Results count ── */
.cptb-af__results-count {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.5);
    font-weight: 500;
}

/* ── PRO: Filter layout vertical ── */
.cptb-af__filter-group[data-layout="vertical"] .cptb-af__filter-buttons {
    flex-direction: column;
    align-items: stretch;
}

/* ── PRO: No results styling ── */
.cptb-af__no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(0,0,0,0.5);
    font-size: 0.95rem;
}
.cptb-af__no-results svg {
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * HERO HEADER BLOCK PRO  —  Video, shape dividers, CTA, search, parallax
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-hero {
    --hero-min-h:          300px;
    --hero-max-w:          800px;
    --hero-pad-v:          4rem;
    --hero-pad-h:          2rem;
    --hero-align:          center;
    --hero-v-align:        center;
    --hero-title-color:    #ffffff;
    --hero-title-size:     clamp(1.75rem, 4vw, 3rem);
    --hero-title-weight:   700;
    --hero-title-font:     inherit;
    --hero-title-ls:       normal;
    --hero-title-tt:       none;
    --hero-sub-color:      rgba(255,255,255,0.85);
    --hero-sub-size:       1.1rem;
    --hero-sub-font:       inherit;
    --hero-sub-weight:     400;
    --hero-bc-color:       rgba(255,255,255,0.7);
    --hero-bc-link:        rgba(255,255,255,0.9);
    --hero-count-color:    rgba(255,255,255,0.7);
    --hero-bg-color:       #1a1a2e;
    --hero-overlay:        rgba(0,0,0,0.5);
    --hero-border-bottom:  none;
    --hero-kb-dur:         18s;

    position: relative;
    display: flex;
    align-items: var(--hero-v-align);
    justify-content: center;
    min-height: var(--hero-min-h);
    padding: var(--hero-pad-v) var(--hero-pad-h);
    text-align: var(--hero-align);
    overflow: hidden;
    border-bottom: var(--hero-border-bottom);
}

/* ── Background variants ── */
.cptb-hero--bg-color   { background: var(--hero-bg-color); }
.cptb-hero--bg-gradient { background: var(--hero-bg-gradient, var(--hero-bg-color)); }
.cptb-hero--bg-image {
    background: var(--hero-bg-img) no-repeat var(--hero-bg-pos, center center) / var(--hero-bg-size, cover);
    background-attachment: var(--hero-bg-attach, scroll);
}
.cptb-hero--bg-video { background: #000; }

/* ── Video background ── */
.cptb-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ── Overlay ── */
.cptb-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
}
.cptb-hero--overlay-gradient .cptb-hero__overlay {
    background: var(--hero-overlay-gradient, var(--hero-overlay));
}

/* Pattern overlays */
.cptb-hero--overlay-pattern .cptb-hero__overlay { background: var(--hero-overlay); }
.cptb-hero--overlay-pattern .cptb-hero__overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    z-index: 1;
}
.cptb-hero--pattern-dots .cptb-hero__overlay::after {
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}
.cptb-hero--pattern-lines .cptb-hero__overlay::after {
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.2) 0, rgba(255,255,255,0.2) 1px, transparent 1px, transparent 10px);
}
.cptb-hero--pattern-diagonal .cptb-hero__overlay::after {
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.15) 0, rgba(255,255,255,0.15) 1px, transparent 1px, transparent 12px);
}
.cptb-hero--pattern-grid .cptb-hero__overlay::after {
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 30px);
}

/* ── Ken Burns ── */
.cptb-hero--bg-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    animation: cptbKenBurns var(--hero-kb-dur) ease-in-out alternate infinite;
    z-index: 0;
}
.cptb-hero--no-kb::before { animation: none; }
.cptb-hero--bg-image .cptb-hero__overlay { z-index: 1; }

@keyframes cptbKenBurns {
    0%   { transform: scale(1)   translate(0, 0); }
    100% { transform: scale(1.08) translate(-1%, -1%); }
}

/* ── Inner content ── */
.cptb-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--hero-max-w);
    width: 100%;
}

/* ── Title ── */
.cptb-hero__title {
    color: var(--hero-title-color);
    font-size: var(--hero-title-size);
    font-weight: var(--hero-title-weight);
    font-family: var(--hero-title-font);
    letter-spacing: var(--hero-title-ls);
    text-transform: var(--hero-title-tt);
    margin: 0 0 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* ── Subtitle ── */
.cptb-hero__subtitle {
    color: var(--hero-sub-color);
    font-size: var(--hero-sub-size);
    font-family: var(--hero-sub-font);
    font-weight: var(--hero-sub-weight);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

/* ── Breadcrumbs ── */
.cptb-hero__breadcrumbs {
    font-size: 0.85rem;
    color: var(--hero-bc-color);
    margin-bottom: 0.75rem;
}
.cptb-hero__breadcrumbs a {
    color: var(--hero-bc-link);
    text-decoration: none;
    padding: 0.15em 0.5em;
    border-radius: 4px;
    transition: opacity 0.2s, background 0.2s;
}
.cptb-hero__breadcrumbs a:hover {
    background: rgba(255,255,255,0.15);
    opacity: 1;
    text-decoration: none;
}
.cptb-hero__sep { margin: 0 0.4em; opacity: 0.6; }

/* ── Badge ── */
.cptb-hero__badge {
    display: inline-block;
    padding: 0.3em 1em;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hero-badge-color, #fff);
    background: var(--hero-badge-bg, rgba(255,255,255,0.15));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-bottom: 0.75rem;
}

/* ── Post count ── */
.cptb-hero__count {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--hero-count-color);
    margin-top: 0.25rem;
    background: rgba(255,255,255,0.12);
    padding: 0.25em 0.75em;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── CTA Buttons ── */
.cptb-hero__ctas {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.cptb-hero[style*="text-align:center"] .cptb-hero__ctas,
.cptb-hero .cptb-hero__inner[style*="text-align:center"] .cptb-hero__ctas {
    justify-content: center;
}
.cptb-hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.7em 1.8em;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    cursor: pointer;
}
.cptb-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.cptb-hero__cta--solid {
    background: var(--hero-cta1-bg, #fff);
    color: var(--hero-cta1-color, #1a1a2e);
    border: none;
}
.cptb-hero__cta--outline {
    background: transparent;
    border: 2px solid currentColor;
}
.cptb-hero__cta--ghost {
    background: transparent;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cptb-hero__cta--primary { color: var(--hero-cta1-color, #1a1a2e); }
.cptb-hero__cta--primary.cptb-hero__cta--solid { background: var(--hero-cta1-bg, #fff); }
.cptb-hero__cta--primary.cptb-hero__cta--outline,
.cptb-hero__cta--primary.cptb-hero__cta--ghost { color: var(--hero-cta1-color, #fff); }
.cptb-hero__cta--secondary { color: var(--hero-cta2-color, #fff); }
.cptb-hero__cta--secondary.cptb-hero__cta--solid { background: var(--hero-cta2-bg, transparent); }

/* ── Search Bar ── */
.cptb-hero__search {
    display: flex;
    max-width: 480px;
    margin: 1.25rem auto 0;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}
.cptb-hero__search--rounded { border-radius: 8px; }
.cptb-hero__search--pill    { border-radius: 50px; }
.cptb-hero__search--flat    { border-radius: 0; }
.cptb-hero__search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.7em 1.2em;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}
.cptb-hero__search-input::placeholder { color: rgba(255,255,255,0.6); }
.cptb-hero__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border: none;
    padding: 0 1em;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.cptb-hero__search-btn:hover { background: rgba(255,255,255,0.25); }

/* ── Shape Dividers ── */
.cptb-hero__shape {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
    overflow: hidden;
}
.cptb-hero__shape svg {
    display: block;
    width: 100%;
}
.cptb-hero__shape--top {
    top: 0;
    height: var(--hero-shape-top-h, 60px);
}
.cptb-hero__shape--top svg {
    height: var(--hero-shape-top-h, 60px);
    fill: var(--hero-shape-top-color, #fff);
}
.cptb-hero__shape--bottom {
    bottom: 0;
    height: var(--hero-shape-bot-h, 60px);
    transform: rotate(180deg);
}
.cptb-hero__shape--bottom svg {
    height: var(--hero-shape-bot-h, 60px);
    fill: var(--hero-shape-bot-color, #fff);
}

/* ── Scroll Indicator ── */
.cptb-hero__scroll {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: rgba(255,255,255,0.7);
    animation: cptbHeroScrollBounce 2s ease-in-out infinite;
}
.cptb-hero__scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    position: relative;
}
.cptb-hero__scroll-wheel {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: cptbHeroWheel 1.5s ease-in-out infinite;
}
.cptb-hero__scroll-arrow,
.cptb-hero__scroll-chevron { opacity: 0.7; }

@keyframes cptbHeroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}
@keyframes cptbHeroWheel {
    0%   { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 20px; }
}

/* ── Entrance animations from CSS (stagger children) ── */
.cptb-hero--anim-fadeUp .cptb-hero__breadcrumbs,
.cptb-hero--anim-fadeUp .cptb-hero__badge,
.cptb-hero--anim-fadeUp .cptb-hero__title,
.cptb-hero--anim-fadeUp .cptb-hero__subtitle,
.cptb-hero--anim-fadeUp .cptb-hero__count,
.cptb-hero--anim-fadeUp .cptb-hero__ctas,
.cptb-hero--anim-fadeUp .cptb-hero__search {
    animation: cptbHeroFadeUp 0.7s ease both;
}
.cptb-hero--anim-fadeUp .cptb-hero__breadcrumbs { animation-delay: 0s; }
.cptb-hero--anim-fadeUp .cptb-hero__badge       { animation-delay: 0.08s; }
.cptb-hero--anim-fadeUp .cptb-hero__title        { animation-delay: 0.15s; }
.cptb-hero--anim-fadeUp .cptb-hero__subtitle     { animation-delay: 0.25s; }
.cptb-hero--anim-fadeUp .cptb-hero__count        { animation-delay: 0.33s; }
.cptb-hero--anim-fadeUp .cptb-hero__ctas         { animation-delay: 0.4s; }
.cptb-hero--anim-fadeUp .cptb-hero__search       { animation-delay: 0.48s; }

@keyframes cptbHeroFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* fadeIn variant */
.cptb-hero--anim-fadeIn .cptb-hero__inner {
    animation: cptbHeroFadeIn 0.8s ease both;
}
@keyframes cptbHeroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* zoom variant */
.cptb-hero--anim-zoom .cptb-hero__inner {
    animation: cptbHeroZoom 0.7s ease both;
}
@keyframes cptbHeroZoom {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .cptb-hero__ctas { justify-content: center; }
    .cptb-hero__search { max-width: 400px; }
}
@media (max-width: 768px) {
    .cptb-hero {
        padding: 2.5rem 1.25rem;
    }
    .cptb-hero__title { font-size: clamp(1.4rem, 5vw, 2rem); }
    .cptb-hero__ctas { flex-direction: column; align-items: center; }
    .cptb-hero__cta { width: 100%; max-width: 280px; justify-content: center; }
    .cptb-hero__search { max-width: 100%; }
    .cptb-hero__shape--top,
    .cptb-hero__shape--bottom { height: 30px !important; }
    .cptb-hero__shape--top svg,
    .cptb-hero__shape--bottom svg { height: 30px !important; }
    /* Hide video on mobile for performance */
    .cptb-hero__video { display: none; }
    .cptb-hero--bg-video { background: var(--hero-bg-color, #1a1a2e); }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    .cptb-hero--bg-image::before,
    .cptb-hero__scroll,
    .cptb-hero__scroll-wheel,
    .cptb-hero--anim-fadeUp .cptb-hero__breadcrumbs,
    .cptb-hero--anim-fadeUp .cptb-hero__badge,
    .cptb-hero--anim-fadeUp .cptb-hero__title,
    .cptb-hero--anim-fadeUp .cptb-hero__subtitle,
    .cptb-hero--anim-fadeUp .cptb-hero__count,
    .cptb-hero--anim-fadeUp .cptb-hero__ctas,
    .cptb-hero--anim-fadeUp .cptb-hero__search,
    .cptb-hero--anim-fadeIn .cptb-hero__inner,
    .cptb-hero--anim-zoom .cptb-hero__inner {
        animation: none !important;
    }
}

/* ── Focus visible for CTA & search ── */
.cptb-hero__cta:focus-visible,
.cptb-hero__search-input:focus-visible,
.cptb-hero__search-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

/* ── Dark mode hints ── */
@media (prefers-color-scheme: dark) {
    .cptb-hero__search { background: rgba(255,255,255,0.1); }
}

/* ═══ Hero Metadata (PRO) ══════════════════════════════════════════════════ */
.cptb-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    color: var(--hero-meta-color, rgba(255,255,255,0.75));
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.cptb-hero__meta a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    transition: border-color 0.2s;
}
.cptb-hero__meta a:hover { border-color: currentColor; }
.cptb-hero__meta-sep { opacity: 0.5; }
.cptb-hero__meta--above-title { margin-bottom: 0.5rem; }
.cptb-hero__meta--below-subtitle { margin-top: 0.25rem; }

/* Animation stagger for metadata */
.cptb-hero--anim-fadeUp .cptb-hero__meta {
    animation: cptbHeroFadeUp 0.7s ease both;
    animation-delay: 0.2s;
}
.cptb-hero--anim-fadeUp .cptb-hero__meta--above-title  { animation-delay: 0.08s; }
.cptb-hero--anim-fadeUp .cptb-hero__meta--below-title  { animation-delay: 0.2s; }
.cptb-hero--anim-fadeUp .cptb-hero__meta--below-subtitle { animation-delay: 0.3s; }

/* ═══ Hero Style Variants (PRO) ═══════════════════════════════════════════ */

/* -- Clean (default / centered) -- */
.cptb-hero--style-clean .cptb-hero__inner {
    text-align: var(--hero-align, center);
    align-items: center;
}

/* -- Magazine (left-aligned + accent bar) -- */
.cptb-hero--style-magazine .cptb-hero__inner {
    text-align: left;
    align-items: flex-start;
    max-width: var(--hero-max-w, 800px);
}
.cptb-hero--style-magazine .cptb-hero__title {
    position: relative;
    padding-left: 1rem;
}
.cptb-hero--style-magazine .cptb-hero__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.1em;
    bottom: 0.1em;
    width: 4px;
    background: var(--hero-meta-color, rgba(255,255,255,0.75));
    border-radius: 2px;
}
.cptb-hero--style-magazine .cptb-hero__ctas { justify-content: flex-start; }
.cptb-hero--style-magazine .cptb-hero__meta { justify-content: flex-start; }

/* -- Split (content left + image right visual) -- */
.cptb-hero--style-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
.cptb-hero--style-split .cptb-hero__overlay,
.cptb-hero--style-split .cptb-hero__video {
    grid-column: 1 / -1;
    grid-row: 1;
}
.cptb-hero--style-split .cptb-hero__inner {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
    align-items: flex-start;
    z-index: 2;
    padding: var(--hero-pad-v, 4rem) var(--hero-pad-h, 2rem);
}
.cptb-hero--style-split .cptb-hero__shape { grid-column: 1 / -1; }
.cptb-hero--style-split .cptb-hero__scroll { grid-column: 1 / -1; }
.cptb-hero--style-split .cptb-hero__ctas { justify-content: flex-start; }
@media (max-width: 768px) {
    .cptb-hero--style-split {
        display: flex;
        flex-direction: column;
    }
    .cptb-hero--style-split .cptb-hero__inner { text-align: center; align-items: center; }
    .cptb-hero--style-split .cptb-hero__ctas { justify-content: center; }
}

/* -- Banner (slim, minimal height) -- */
.cptb-hero--style-banner {
    min-height: auto !important;
    --hero-min-h: auto;
    padding: 2rem var(--hero-pad-h, 2rem) !important;
}
.cptb-hero--style-banner .cptb-hero__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.cptb-hero--style-banner .cptb-hero__title {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    margin: 0;
}
.cptb-hero--style-banner .cptb-hero__subtitle {
    font-size: 0.95rem;
    margin: 0;
}
.cptb-hero--style-banner .cptb-hero__ctas {
    margin-top: 0;
    margin-left: auto;
}
.cptb-hero--style-banner .cptb-hero__breadcrumbs {
    flex-basis: 100%;
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .cptb-hero--style-banner .cptb-hero__inner { flex-direction: column; text-align: center; }
    .cptb-hero--style-banner .cptb-hero__ctas { margin-left: 0; }
}

/* ═══ TOC Hierarchical Numbering (PRO) ═════════════════════════════════════ */
.cptb-toc--hierarchical .cptb-toc__list {
    padding-left: 0;
    list-style: none;
    counter-reset: toc-h;
}
.cptb-toc--hierarchical .cptb-toc__list > li {
    counter-increment: toc-h;
}
.cptb-toc--hierarchical .cptb-toc__list > li > .cptb-toc__link::before {
    content: counter(toc-h) ". ";
    font-weight: 600;
    color: var(--toc-counter, var(--toc-accent, inherit));
}
.cptb-toc--hierarchical .cptb-toc__sublist {
    padding-left: 1.25em;
    list-style: none;
    counter-reset: toc-sub;
    margin: 0.15em 0;
}
.cptb-toc--hierarchical .cptb-toc__sublist > li {
    counter-increment: toc-sub;
}
.cptb-toc--hierarchical .cptb-toc__sublist > li > .cptb-toc__link::before {
    content: counters(toc-h, ".") "." counter(toc-sub) " ";
    font-weight: 500;
    color: var(--toc-counter, var(--toc-accent, inherit));
    font-size: 0.92em;
}
/* 3rd-level nesting */
.cptb-toc--hierarchical .cptb-toc__sublist .cptb-toc__sublist {
    counter-reset: toc-sub2;
}
.cptb-toc--hierarchical .cptb-toc__sublist .cptb-toc__sublist > li {
    counter-increment: toc-sub2;
}
.cptb-toc--hierarchical .cptb-toc__sublist .cptb-toc__sublist > li > .cptb-toc__link::before {
    content: counters(toc-h, ".") "." counter(toc-sub) "." counter(toc-sub2) " ";
    font-weight: 400;
    font-size: 0.88em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * MASONRY GALLERY BLOCK PRO — Galería tipo Pinterest con CSS columns
 * Card variants · Filter bar · Lightbox · Hover fx · Entrance fx · Pagination
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-masonry {
    --mas-cols:   3;
    --mas-cols-t: 2;
    --mas-cols-m: 1;
    --mas-gap:    1.25rem;
}
.cptb-masonry__grid {
    column-count: var(--mas-cols);
    column-gap: var(--mas-gap);
}

/* ── Item base ── */
.cptb-masonry__item {
    break-inside: avoid;
    margin-bottom: var(--mas-gap);
    display: inline-block;
    width: 100%;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s cubic-bezier(.4,0,.2,1);
    border-radius: var(--cptb-radius, 0);
    overflow: hidden;
}

/* ── Card base inside masonry ── */
.cptb-masonry__item .cptb-card {
    background: var(--cptb-card-bg, #fff);
    border-radius: var(--cptb-radius, 0);
    box-shadow: var(--cptb-shadow, none);
    padding: var(--cptb-padding, 0);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.cptb-masonry__item .cptb-title { color: var(--cptb-title-color, inherit); font-size: var(--cptb-title-size, 1.1rem); }
.cptb-masonry__item .cptb-excerpt,
.cptb-masonry__item .cptb-content { color: var(--cptb-text-color, inherit); }
.cptb-masonry__item .cptb-meta { color: var(--cptb-meta-color, #888); }

/* Image natural height */
.cptb-masonry__item .cptb-thumb { overflow: hidden; position: relative; }
.cptb-masonry__item .cptb-thumb img {
    width: 100%; height: auto; display: block;
    border-radius: var(--cptb-radius, 0) var(--cptb-radius, 0) 0 0;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}

/* ── Hover Effects ── */
.cptb-masonry--hover-lift .cptb-masonry__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--cptb-shadow-h, 0 10px 28px rgba(0,0,0,0.13));
}
.cptb-masonry--hover-zoom .cptb-masonry__item:hover .cptb-thumb img {
    transform: scale(1.07);
}
.cptb-masonry--hover-glow .cptb-masonry__item:hover {
    box-shadow: 0 0 20px 4px rgba(var(--cptb-accent-rgb, 0,115,170), 0.25);
}
.cptb-masonry--hover-none .cptb-masonry__item:hover {
    transform: none; box-shadow: var(--cptb-shadow, none);
}

/* Overlay gradient on hover */
.cptb-masonry__item .cptb-thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--mas-ov-color, rgba(0,0,0,0.4)) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.cptb-masonry--ov-gradient .cptb-masonry__item:hover .cptb-thumb::after { opacity: 1; }

/* Title accent on hover */
.cptb-masonry__item .cptb-title a { transition: color 0.25s ease; }
.cptb-masonry__item:hover .cptb-title a { color: var(--cptb-accent, #0073aa); }

/* ── Card Variant: Overlay ── */
.cptb-masonry--overlay .cptb-masonry__item .cptb-card {
    position: relative;
}
.cptb-masonry--overlay .cptb-masonry__item .cptb-card-body {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1.2rem; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    color: #fff;
}
.cptb-masonry--overlay .cptb-masonry__item .cptb-title,
.cptb-masonry--overlay .cptb-masonry__item .cptb-title a { color: #fff; }
.cptb-masonry--overlay .cptb-masonry__item .cptb-meta { color: rgba(255,255,255,0.8); }

/* ── Card Variant: Minimal ── */
.cptb-masonry--minimal .cptb-masonry__item .cptb-card {
    background: transparent; box-shadow: none; padding: 0;
}
.cptb-masonry--minimal .cptb-masonry__item { box-shadow: none; }
.cptb-masonry--minimal .cptb-masonry__item .cptb-thumb img { border-radius: var(--cptb-radius, 6px); }

/* ── Filter Bar ── */
.cptb-masonry__filters {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-bottom: 1.25rem; justify-content: center;
}
.cptb-masonry__filter {
    cursor: pointer; border: none; font-size: 0.88rem;
    padding: 0.4em 1em; transition: all 0.25s ease;
    background: transparent;
    color: var(--mas-filt-txt, #555);
}
.cptb-masonry__filter:focus-visible {
    outline: 2px solid var(--mas-filt-active, var(--cptb-accent, #0073aa));
    outline-offset: 2px;
}
/* Pills */
.cptb-masonry__filters--pills .cptb-masonry__filter {
    border-radius: 999px; background: #f0f0f0;
}
.cptb-masonry__filters--pills .cptb-masonry__filter.active {
    background: var(--mas-filt-act-bg, var(--cptb-accent, #0073aa));
    color: var(--mas-filt-active, #fff);
}
/* Underline */
.cptb-masonry__filters--underline .cptb-masonry__filter {
    border-bottom: 2px solid transparent; border-radius: 0; padding-left: 0.5em; padding-right: 0.5em;
}
.cptb-masonry__filters--underline .cptb-masonry__filter.active {
    border-bottom-color: var(--mas-filt-act-bg, var(--cptb-accent, #0073aa));
    color: var(--mas-filt-active, var(--cptb-accent, #0073aa));
}
/* Buttons */
.cptb-masonry__filters--buttons .cptb-masonry__filter {
    border: 1px solid #ddd; border-radius: var(--cptb-radius, 4px);
}
.cptb-masonry__filters--buttons .cptb-masonry__filter.active {
    border-color: var(--mas-filt-act-bg, var(--cptb-accent, #0073aa));
    background: var(--mas-filt-act-bg, var(--cptb-accent, #0073aa));
    color: var(--mas-filt-active, #fff);
}
/* Filter hide / show */
.cptb-masonry__item--hidden {
    display: none !important;
}

/* ── Lightbox ── */
.cptb-masonry__lightbox {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--mas-lb-bg, rgba(0,0,0,0.92));
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.cptb-masonry__lightbox.open { opacity: 1; pointer-events: auto; }
.cptb-masonry__lightbox img {
    max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px;
}
.cptb-masonry__lb-close,
.cptb-masonry__lb-prev,
.cptb-masonry__lb-next {
    position: absolute; background: rgba(255,255,255,0.15); color: #fff;
    border: none; font-size: 1.5rem; cursor: pointer; border-radius: 50%;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.cptb-masonry__lb-close:hover,
.cptb-masonry__lb-prev:hover,
.cptb-masonry__lb-next:hover { background: rgba(255,255,255,0.3); }
.cptb-masonry__lb-close:focus-visible,
.cptb-masonry__lb-prev:focus-visible,
.cptb-masonry__lb-next:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cptb-masonry__lb-close { top: 1rem; right: 1rem; }
.cptb-masonry__lb-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.cptb-masonry__lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.cptb-masonry__lb-caption {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.85); font-size: 0.9rem; text-align: center; max-width: 70%;
}

/* Lightbox cursor hint */
.cptb-masonry--lightbox .cptb-masonry__item { cursor: zoom-in; }

/* ── Entrance animations ── */
.cptb-masonry__item--hidden { opacity: 0; transform: translateY(24px) scale(0.96); }
.cptb-masonry__item--visible { opacity: 1; transform: translateY(0) scale(1); }
.cptb-masonry__item--stagger,
.cptb-masonry__item--cascade { transition: opacity 0.5s ease, transform 0.5s ease; }
.cptb-masonry__item--fade { transition: opacity 0.6s ease; transform: none !important; }

/* Fallback CSS entrance for no-JS */
.cptb-masonry--entrance-stagger .cptb-masonry__item { animation: cptbMasonryIn 0.5s ease both; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(1)  { animation-delay: 0s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(2)  { animation-delay: 0.06s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(3)  { animation-delay: 0.12s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(4)  { animation-delay: 0.18s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(5)  { animation-delay: 0.24s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(6)  { animation-delay: 0.30s; }
.cptb-masonry--entrance-stagger .cptb-masonry__item:nth-child(n+7){ animation-delay: 0.36s; }
@keyframes cptbMasonryIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Pagination ── */
.cptb-masonry__loadmore {
    display: block; margin: 1.5rem auto 0; padding: 0.65em 2em;
    border: 1px solid var(--cptb-accent, #0073aa); border-radius: var(--cptb-radius, 4px);
    background: transparent; color: var(--cptb-accent, #0073aa);
    font-size: 0.95rem; cursor: pointer; transition: all 0.25s;
}
.cptb-masonry__loadmore:hover {
    background: var(--cptb-accent, #0073aa); color: #fff;
}
.cptb-masonry__loadmore:focus-visible {
    outline: 2px solid var(--cptb-accent, #0073aa); outline-offset: 2px;
}
.cptb-masonry__infinite-sentinel {
    display: flex; justify-content: center; padding: 1rem 0; min-height: 44px;
}
.cptb-masonry__infinite-spinner {
    width: 28px; height: 28px; border: 3px solid #ddd;
    border-top-color: var(--cptb-accent, #0073aa);
    border-radius: 50%; animation: cptbSpin 0.7s linear infinite;
}
@keyframes cptbSpin { to { transform: rotate(360deg); } }

/* ── Reading time badge ── */
.cptb-masonry__reading-time {
    font-size: 0.78rem; color: var(--cptb-meta-color, #888); margin-top: 0.25em;
}

/* ── Responsive ── */
@media (min-width: 769px) and (max-width: 1024px) {
    .cptb-masonry__grid { column-count: var(--mas-cols-t); }
}
@media (max-width: 768px) {
    .cptb-masonry__grid { column-count: var(--mas-cols-m); }
    .cptb-masonry__filters { gap: 0.35rem; }
    .cptb-masonry__filter { font-size: 0.82rem; padding: 0.3em 0.75em; }
    .cptb-masonry__lb-prev,
    .cptb-masonry__lb-next { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .cptb-masonry__item,
    .cptb-masonry__item .cptb-thumb img { transition: none !important; animation: none !important; }
    .cptb-masonry__item--hidden { opacity: 1; transform: none; }
    .cptb-masonry__lightbox { transition: none; }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    .cptb-masonry__filters--pills .cptb-masonry__filter { background: rgba(255,255,255,0.08); }
    .cptb-masonry__filters--buttons .cptb-masonry__filter { border-color: rgba(255,255,255,0.15); }
    .cptb-masonry__loadmore { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * STICKY SIDEBAR PRO  —  Contenedor fijo al scroll
 *   Variantes: default / bordered / elevated / glass / accent
 *   Animaciones stuck: slide-down / fade / scale / none
 *   Barra de progreso, acento configurable, hover/entrance effects
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-sticky-sidebar {
    --sticky-bg:            transparent;
    --sticky-border:        transparent;
    --sticky-radius:        0;
    --sticky-border-w:      0;
    --sticky-pad:           0;
    --sticky-shadow:        none;
    --sticky-max-w:         100%;
    --sticky-accent:        var(--cptb-accent, #0073aa);
    --sticky-accent-w:      2px;
    --sticky-progress:      var(--sticky-accent);
    --sticky-stuck-bg:      '';
    --sticky-stuck-shadow:  0 4px 20px rgba(0,0,0,0.1);

    position: relative;
    background: var(--sticky-bg);
    border: var(--sticky-border-w) solid var(--sticky-border);
    border-radius: var(--sticky-radius);
    padding: var(--sticky-pad);
    box-shadow: var(--sticky-shadow);
    max-width: var(--sticky-max-w);
    transition: box-shadow 0.3s cubic-bezier(0.4,0,0.2,1),
                background 0.3s cubic-bezier(0.4,0,0.2,1),
                transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Style variants ─────────────────────────────────────────────────────── */
.cptb-sticky--bordered {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 1rem;
}
.cptb-sticky--elevated {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1.25rem;
}
.cptb-sticky--glass {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 1rem;
}
.cptb-sticky--accent {
    border-left: 3px solid var(--sticky-accent);
    padding: 1rem 1rem 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
}

/* ── Stuck state ────────────────────────────────────────────────────────── */
.cptb-sticky--stuck {
    box-shadow: var(--sticky-stuck-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.cptb-sticky--stuck[style*="--sticky-stuck-bg"] {
    background: var(--sticky-stuck-bg);
}

/* Stuck animations: slide-down (default) */
.cptb-sticky--stuck[data-stuck-anim="slide-down"] {
    animation: cptbStickySlide 0.35s ease both;
}
@keyframes cptbStickySlide {
    from { transform: translateY(-10px); opacity: 0.8; }
    to   { transform: translateY(0); opacity: 1; }
}
/* Stuck animations: fade */
.cptb-sticky--stuck[data-stuck-anim="fade"] {
    animation: cptbStickyFade 0.4s ease both;
}
@keyframes cptbStickyFade {
    from { opacity: 0.3; }
    to   { opacity: 1; }
}
/* Stuck animations: scale */
.cptb-sticky--stuck[data-stuck-anim="scale"] {
    animation: cptbStickyScale 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes cptbStickyScale {
    from { transform: scale(0.95); opacity: 0.7; }
    to   { transform: scale(1); opacity: 1; }
}

/* ── Accent bar (when stuck) — defaults to top ─────────────────────────── */
.cptb-sticky--stuck::before {
    content: '';
    position: absolute;
    background: var(--sticky-accent);
    border-radius: 0 0 2px 2px;
    top: 0; left: 0; right: 0;
    height: var(--sticky-accent-w);
    width: auto;
}
/* Accent bottom */
.cptb-sticky--accent-bottom.cptb-sticky--stuck::before {
    top: auto; bottom: 0; left: 0; right: 0;
    height: var(--sticky-accent-w);
    width: auto;
    border-radius: 2px 2px 0 0;
}
/* Accent left */
.cptb-sticky--accent-left.cptb-sticky--stuck::before {
    top: 0; bottom: 0; left: 0; right: auto;
    width: var(--sticky-accent-w);
    height: auto;
    border-radius: 0 2px 2px 0;
}
/* Accent right */
.cptb-sticky--accent-right.cptb-sticky--stuck::before {
    top: 0; bottom: 0; right: 0; left: auto;
    width: var(--sticky-accent-w);
    height: auto;
    border-radius: 2px 0 0 2px;
}

/* ── Scroll progress bar ────────────────────────────────────────────────── */
.cptb-sticky__progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.06);
    overflow: hidden;
    border-radius: 2px 2px 0 0;
    z-index: 1;
}
.cptb-sticky__progress-bar {
    height: 100%;
    width: 0;
    background: var(--sticky-progress);
    transition: width 0.1s linear;
    border-radius: inherit;
}

/* ── Hover effects ──────────────────────────────────────────────────────── */
.cptb-sticky--hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.cptb-sticky--hover-glow:hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sticky-accent) 25%, transparent),
                0 4px 16px rgba(0,0,0,0.08);
}

/* ── Entrance animations ────────────────────────────────────────────────── */
.cptb-sticky--entrance-fade {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.cptb-sticky--entrance-fade.cptb-visible {
    opacity: 1;
}
.cptb-sticky--entrance-slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.cptb-sticky--entrance-slide-up.cptb-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive: disable sticky on mobile ───────────────────────────────── */
@media (max-width: 768px) {
    .cptb-sticky--stuck::before { display: none; }
    .cptb-sticky__progress { display: none; }
}

/* ── Dark mode ──────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cptb-sticky--bordered { border-color: rgba(255,255,255,0.15); }
    .cptb-sticky--glass {
        background: rgba(30,30,30,0.7);
        border-color: rgba(255,255,255,0.1);
    }
    .cptb-sticky--stuck { backdrop-filter: blur(12px); }
    .cptb-sticky__progress { background: rgba(255,255,255,0.08); }
}
.is-dark-theme .cptb-sticky--bordered { border-color: rgba(255,255,255,0.15); }
.is-dark-theme .cptb-sticky--glass {
    background: rgba(30,30,30,0.7);
    border-color: rgba(255,255,255,0.1);
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cptb-sticky-sidebar,
    .cptb-sticky--stuck,
    .cptb-sticky--hover-lift,
    .cptb-sticky--hover-glow,
    .cptb-sticky--entrance-fade,
    .cptb-sticky--entrance-slide-up {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * HOTSPOT IMAGE PRO v2.0 — Tooltip / Popover / Panel, responsive, dinámico
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Base wrapper ─────────────────────────────────────────────────────────── */
.cptb-hotspot {
    position: relative;
    display: block;
    max-width: 100%;
    line-height: 0;
}
.cptb-hotspot__canvas {
    position: relative;
    display: block;
    overflow: hidden;
}
.cptb-hotspot__picture {
    display: block;
    width: 100%;
    line-height: 0;
}
.cptb-hotspot__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--hs-img-radius, 0);
    box-shadow: var(--hs-img-shadow, none);
    transition: transform 0.6s ease;
}
.cptb-hotspot--hover .cptb-hotspot__image {
    cursor: crosshair;
}
.cptb-hotspot--hover:hover .cptb-hotspot__image {
    transform: scale(1.02);
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.cptb-hotspot__overlay {
    position: absolute;
    inset: 0;
    background: var(--hs-overlay-color, transparent);
    opacity: var(--hs-overlay-opacity, 0);
    pointer-events: none;
    z-index: 1;
    border-radius: var(--hs-img-radius, 0);
    transition: opacity 0.3s;
}
.cptb-hotspot--overlay .cptb-hotspot__overlay {
    opacity: var(--hs-overlay-opacity, 0.3);
}

/* ── Dot (punto) ──────────────────────────────────────────────────────────── */
.cptb-hotspot__dot {
    position: absolute;
    width: var(--hs-dot-size, 24px);
    height: var(--hs-dot-size, 24px);
    border-radius: 50%;
    background: var(--hs-dot-bg, #0066cc);
    border: var(--hs-dot-border-w, 2px) solid var(--hs-dot-border, #fff);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s, background 0.25s;
    z-index: 3;
    padding: 0;
    opacity: var(--hs-dot-opacity, 1);
    -webkit-appearance: none;
    appearance: none;
}
.cptb-hotspot__dot:hover,
.cptb-hotspot__dot:focus-visible {
    transform: translate(-50%, -50%) scale(var(--hs-dot-hover-scale, 1.2));
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    outline: none;
}
.cptb-hotspot__dot:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}
.cptb-hotspot__dot[aria-expanded="true"] {
    z-index: 5;
}

/* Dot with hover color */
.cptb-hotspot__dot:hover,
.cptb-hotspot__dot:focus-visible {
    background: var(--hs-dot-hover-bg, var(--hs-dot-bg, #0066cc));
}

/* ── Dot shapes ───────────────────────────────────────────────────────────── */
.cptb-hotspot--dot-square .cptb-hotspot__dot { border-radius: 4px; }
.cptb-hotspot--dot-diamond .cptb-hotspot__dot {
    border-radius: 4px;
    transform: translate(-50%, -50%) rotate(45deg);
}
.cptb-hotspot--dot-diamond .cptb-hotspot__dot:hover,
.cptb-hotspot--dot-diamond .cptb-hotspot__dot:focus-visible {
    transform: translate(-50%, -50%) rotate(45deg) scale(var(--hs-dot-hover-scale, 1.2));
}
.cptb-hotspot--dot-diamond .cptb-hotspot__icon {
    transform: rotate(-45deg);
}
/* Per-dot shape overrides */
.cptb-hotspot__dot[data-shape="square"] { border-radius: 4px; }
.cptb-hotspot__dot[data-shape="diamond"] {
    border-radius: 4px;
    transform: translate(-50%, -50%) rotate(45deg);
}
.cptb-hotspot__dot[data-shape="diamond"]:hover,
.cptb-hotspot__dot[data-shape="diamond"]:focus-visible {
    transform: translate(-50%, -50%) rotate(45deg) scale(var(--hs-dot-hover-scale, 1.2));
}
.cptb-hotspot__dot[data-shape="diamond"] .cptb-hotspot__icon {
    transform: rotate(-45deg);
}

/* ── Icon ─────────────────────────────────────────────────────────────────── */
.cptb-hotspot__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--hs-dot-icon-size, 10px);
    line-height: 1;
    pointer-events: none;
}
.cptb-hotspot__icon svg {
    width: var(--hs-dot-icon-size, 12px);
    height: var(--hs-dot-icon-size, 12px);
    fill: currentColor;
}
.cptb-hotspot__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ── Dot animations (pulse / bounce / ping / glow) ────────────────────────── */
.cptb-hotspot--anim-pulse .cptb-hotspot__dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--hs-dot-bg, #0066cc);
    animation: cptbHsPulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes cptbHsPulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(1.8); opacity: 0; }
}
.cptb-hotspot--anim-bounce .cptb-hotspot__dot {
    animation: cptbHsBounce 2s ease infinite;
}
@keyframes cptbHsBounce {
    0%, 100% { transform: translate(-50%, -50%); }
    50%      { transform: translate(-50%, calc(-50% - 6px)); }
}
.cptb-hotspot--anim-ping .cptb-hotspot__dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--hs-dot-bg, #0066cc);
    animation: cptbHsPing 1.4s cubic-bezier(0,0,.2,1) infinite;
    pointer-events: none;
}
@keyframes cptbHsPing {
    0%   { transform: scale(1); opacity: 0.6; }
    75%, 100% { transform: scale(2); opacity: 0; }
}
.cptb-hotspot--anim-glow .cptb-hotspot__dot {
    animation: cptbHsGlow 2s ease-in-out infinite;
}
@keyframes cptbHsGlow {
    0%, 100% { box-shadow: 0 0 4px 2px rgba(0,102,204,0.3); }
    50%      { box-shadow: 0 0 16px 6px rgba(0,102,204,0.6); }
}

/* ── Tooltip / Popover content ─────────────────────────────────────────────── */
.cptb-hotspot__content {
    position: absolute;
    z-index: 10;
    background: var(--hs-tt-bg, #fff);
    color: var(--hs-tt-color, #333);
    border-radius: var(--hs-tt-radius, 8px);
    box-shadow: var(--hs-tt-shadow, 0 4px 20px rgba(0,0,0,0.18));
    max-width: var(--hs-tt-max-w, 260px);
    width: max-content;
    padding: var(--hs-tt-pad, 14px 16px);
    line-height: 1.5;
    font-size: var(--hs-tt-font, 14px);
    border: var(--hs-tt-border-w, 0) solid var(--hs-tt-border-c, transparent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    pointer-events: none;
    /* Default: below dot center */
    left: 50%;
    top: calc(100% + 12px);
    translate: -50% 0;
}
.cptb-hotspot__content.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Arrow */
.cptb-hotspot__content::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-bottom-color: var(--hs-tt-bg, #fff);
}
.cptb-hotspot--no-arrow .cptb-hotspot__content::before { display: none; }

/* Position: above */
.cptb-hotspot__content--above {
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateY(-8px);
}
.cptb-hotspot__content--above.is-visible { transform: translateY(0); }
.cptb-hotspot__content--above::before {
    bottom: auto; top: 100%;
    border-bottom-color: transparent;
    border-top-color: var(--hs-tt-bg, #fff);
}

/* Position: left */
.cptb-hotspot__content--left {
    left: auto; right: calc(100% + 12px);
    top: 50%; translate: 0 -50%;
    transform: translateX(8px);
}
.cptb-hotspot__content--left.is-visible { transform: translateX(0); }
.cptb-hotspot__content--left::before {
    bottom: auto; left: 100%; top: 50%;
    margin-left: 0; margin-top: -6px;
    border-bottom-color: transparent;
    border-left-color: var(--hs-tt-bg, #fff);
}

/* Position: right */
.cptb-hotspot__content--right {
    left: calc(100% + 12px); right: auto;
    top: 50%; translate: 0 -50%;
    transform: translateX(-8px);
}
.cptb-hotspot__content--right.is-visible { transform: translateX(0); }
.cptb-hotspot__content--right::before {
    bottom: auto; right: 100%; left: auto; top: 50%;
    margin-left: 0; margin-top: -6px;
    border-bottom-color: transparent;
    border-right-color: var(--hs-tt-bg, #fff);
}

/* ── Popover variant (larger card) ─────────────────────────────────────────── */
.cptb-hotspot__content--popover {
    max-width: var(--hs-tt-max-w, 360px);
    min-width: 240px;
    padding: 0;
    overflow: hidden;
}
.cptb-hotspot__content--popover .cptb-hotspot__img {
    width: 100%;
    display: block;
}
.cptb-hotspot__content--popover .cptb-hotspot__title,
.cptb-hotspot__content--popover .cptb-hotspot__text,
.cptb-hotspot__content--popover .cptb-hotspot__cta {
    padding-left: 16px;
    padding-right: 16px;
}
.cptb-hotspot__content--popover .cptb-hotspot__text {
    padding-bottom: 12px;
}

/* ── Content elements ──────────────────────────────────────────────────────── */
.cptb-hotspot__title {
    display: block;
    margin-bottom: 4px;
    font-family: var(--hs-tt-title-font, inherit);
    font-size: var(--hs-tt-title-size, 1em);
    font-weight: var(--hs-tt-title-weight, 700);
    color: var(--hs-tt-title-color, inherit);
    line-height: 1.3;
}
.cptb-hotspot__title::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--hs-dot-bg, #0066cc);
    margin-top: 4px;
    border-radius: 2px;
}
.cptb-hotspot__text {
    display: block;
    margin-top: 4px;
    opacity: 0.85;
    line-height: 1.5;
}
.cptb-hotspot__img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--hs-tt-img-radius, 6px);
    margin-bottom: 8px;
}
.cptb-hotspot__cta {
    display: inline-block;
    margin-top: 8px;
    color: var(--hs-dot-bg, #0066cc);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}
.cptb-hotspot__cta:hover { text-decoration: underline; }
.cptb-hotspot__cta--button {
    display: inline-block;
    padding: 6px 14px;
    background: var(--hs-dot-bg, #0066cc);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    transition: opacity 0.2s, transform 0.2s;
}
.cptb-hotspot__cta--button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

/* ── Close button ──────────────────────────────────────────────────────────── */
.cptb-hotspot__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
    z-index: 2;
}
.cptb-hotspot__close:hover { background: rgba(0,0,0,0.2); }
.cptb-hotspot__close svg { width: 10px; height: 10px; }

/* ── Tooltip animations ────────────────────────────────────────────────────── */
/* Spring */
.cptb-hotspot__content.is-visible {
    animation: cptbHsSpring 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cptbHsSpring {
    from { opacity: 0; transform: translateY(12px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Fade */
.cptb-hotspot[data-anim="fade"] .cptb-hotspot__content.is-visible {
    animation: cptbHsFade 0.3s ease forwards;
}
@keyframes cptbHsFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Slide */
.cptb-hotspot[data-anim="slide"] .cptb-hotspot__content.is-visible {
    animation: cptbHsSlide 0.3s ease forwards;
}
@keyframes cptbHsSlide {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Scale */
.cptb-hotspot[data-anim="scale"] .cptb-hotspot__content.is-visible {
    animation: cptbHsScale 0.3s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes cptbHsScale {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Panel (side drawer) ───────────────────────────────────────────────────── */
.cptb-hotspot__panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--hs-panel-w, 360px);
    max-width: 90vw;
    height: 100vh;
    background: var(--hs-panel-bg, #fff);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cptb-hotspot--panel-left .cptb-hotspot__panel {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.cptb-hotspot__panel.is-open {
    transform: translateX(0);
}
.cptb-hotspot__panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background 0.2s;
}
.cptb-hotspot__panel-close:hover { background: rgba(0,0,0,0.12); }
.cptb-hotspot__panel-close svg { width: 14px; height: 14px; }
.cptb-hotspot__panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 48px 24px 24px;
    -webkit-overflow-scrolling: touch;
}
.cptb-hotspot__panel-item {
    display: none;
    animation: cptbHsFade 0.25s ease;
}
.cptb-hotspot__panel-item.is-active { display: block; }
.cptb-hotspot__panel-item .cptb-hotspot__img {
    width: 100%;
    border-radius: var(--hs-tt-img-radius, 6px);
    margin-bottom: 16px;
}
.cptb-hotspot__panel-item .cptb-hotspot__title {
    font-size: 1.25em;
    margin-bottom: 8px;
}
.cptb-hotspot__panel-item .cptb-hotspot__text {
    font-size: 0.95em;
    line-height: 1.6;
}
.cptb-hotspot__panel-item .cptb-hotspot__cta {
    margin-top: 16px;
}

/* Panel overlay */
.cptb-hotspot__panel-overlay {
    position: fixed;
    inset: 0;
    background: var(--hs-panel-overlay, rgba(0,0,0,0.5));
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer;
}
.cptb-hotspot__panel-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── SVG Connectors ────────────────────────────────────────────────────────── */
.cptb-hotspot__connectors {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}
.cptb-hotspot__connectors line {
    stroke: var(--hs-conn-color, rgba(0,0,0,0.2));
    stroke-width: 1.5;
    stroke-linecap: round;
}
.cptb-hotspot--conn-dashed .cptb-hotspot__connectors line {
    stroke-dasharray: 6 4;
}
.cptb-hotspot--conn-dotted .cptb-hotspot__connectors line {
    stroke-dasharray: 2 4;
}

/* ── Entrance animations ───────────────────────────────────────────────────── */
.cptb-hotspot--entrance-stagger .cptb-hotspot__dot,
.cptb-hotspot--entrance-pop .cptb-hotspot__dot {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}
.cptb-hotspot--entrance-stagger .cptb-hotspot__dot.cptb-hs-entered,
.cptb-hotspot--entrance-pop .cptb-hotspot__dot.cptb-hs-entered {
    animation: cptbHsDotPop 0.45s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes cptbHsDotPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    to   { opacity: var(--hs-dot-opacity, 1); transform: translate(-50%, -50%) scale(1); }
}

.cptb-hotspot--entrance-fade .cptb-hotspot__dot {
    opacity: 0;
}
.cptb-hotspot--entrance-fade .cptb-hotspot__dot.cptb-hs-entered {
    animation: cptbHsDotFade 0.4s ease forwards;
}
@keyframes cptbHsDotFade {
    from { opacity: 0; }
    to   { opacity: var(--hs-dot-opacity, 1); }
}

.cptb-hotspot--entrance-slide .cptb-hotspot__dot {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 20px));
}
.cptb-hotspot--entrance-slide .cptb-hotspot__dot.cptb-hs-entered {
    animation: cptbHsDotSlide 0.4s ease forwards;
}
@keyframes cptbHsDotSlide {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
    to   { opacity: var(--hs-dot-opacity, 1); transform: translate(-50%, -50%); }
}

/* Diamond entrance overrides */
.cptb-hotspot--dot-diamond.cptb-hotspot--entrance-stagger .cptb-hotspot__dot,
.cptb-hotspot--dot-diamond.cptb-hotspot--entrance-pop .cptb-hotspot__dot {
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
}
.cptb-hotspot--dot-diamond .cptb-hotspot__dot.cptb-hs-entered {
    animation-name: cptbHsDotPopDiamond;
}
@keyframes cptbHsDotPopDiamond {
    from { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0); }
    to   { opacity: var(--hs-dot-opacity, 1); transform: translate(-50%, -50%) rotate(45deg) scale(1); }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cptb-hotspot__content {
        max-width: min(var(--hs-tt-max-w, 220px), 80vw);
        font-size: 13px;
    }
    .cptb-hotspot__panel {
        width: min(var(--hs-panel-w, 300px), 90vw);
    }
}
@media (max-width: 480px) {
    .cptb-hotspot__dot {
        width: calc(var(--hs-dot-size, 24px) * 0.8);
        height: calc(var(--hs-dot-size, 24px) * 0.8);
    }
    .cptb-hotspot__content {
        max-width: min(var(--hs-tt-max-w, 200px), 85vw);
        padding: 10px 12px;
    }
    .cptb-hotspot__content--popover {
        min-width: 180px;
    }
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cptb-hotspot__dot,
    .cptb-hotspot__content,
    .cptb-hotspot__panel,
    .cptb-hotspot__panel-overlay,
    .cptb-hotspot__image {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    .cptb-hotspot--anim-pulse .cptb-hotspot__dot::after,
    .cptb-hotspot--anim-bounce .cptb-hotspot__dot,
    .cptb-hotspot--anim-ping .cptb-hotspot__dot::after,
    .cptb-hotspot--anim-glow .cptb-hotspot__dot {
        animation: none !important;
    }
    .cptb-hotspot--entrance-stagger .cptb-hotspot__dot,
    .cptb-hotspot--entrance-pop .cptb-hotspot__dot,
    .cptb-hotspot--entrance-fade .cptb-hotspot__dot,
    .cptb-hotspot--entrance-slide .cptb-hotspot__dot {
        opacity: var(--hs-dot-opacity, 1);
        transform: translate(-50%, -50%);
    }
}

/* ── Dark mode hints ───────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cptb-hotspot__content { --hs-tt-bg: #1e1e2e; --hs-tt-color: #e0e0e0; }
    .cptb-hotspot__panel   { --hs-panel-bg: #1e1e2e; color: #e0e0e0; }
    .cptb-hotspot__close   { background: rgba(255,255,255,0.1); color: #e0e0e0; }
}


/* ═══════════════════════════════════════════════════════════════════════
 * NEWS TICKER PRO
 * ═══════════════════════════════════════════════════════════════════════ */

/* ── Base wrapper ───────────────────────────────────────────────────── */
.cptb-ticker {
    display: flex;
    align-items: center;
    background: var(--tk-bg, #1e293b);
    color: var(--tk-color, #f1f5f9);
    font-size: var(--tk-size, 0.9rem);
    font-weight: var(--tk-weight, 500);
    height: var(--tk-height, 44px);
    border-radius: var(--tk-radius, 0);
    overflow: hidden;
    position: relative;
    line-height: 1.4;
    font-family: var(--tk-font, inherit);
    width: 100%;
}

/* ── PRO: Ticker styles ─────────────────────────────────────────────── */
.cptb-ticker--gradient {
    background: linear-gradient(135deg, var(--tk-bg, #1e293b), var(--tk-bg2, #334155));
}
.cptb-ticker--glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cptb-ticker--outline {
    background: transparent;
    border: 2px solid var(--tk-bg, #1e293b);
    color: var(--tk-bg, #1e293b);
}
.cptb-ticker--outline .cptb-ticker__link,
.cptb-ticker--outline .cptb-ticker__text {
    color: var(--tk-bg, #1e293b);
}
.cptb-ticker--outline .cptb-ticker__link:hover {
    color: var(--tk-hover, #fbbf24);
}

/* ── PRO: Label position right ──────────────────────────────────────── */
.cptb-ticker--label-right {
    flex-direction: row-reverse;
}
.cptb-ticker--label-right .cptb-ticker__label::after {
    right: auto;
    left: -10px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

/* ── Label ──────────────────────────────────────────────────────────── */
.cptb-ticker__label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 0 16px;
    height: 100%;
    background: var(--tk-label-bg, #dc2626);
    color: var(--tk-label-color, #fff);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* Triangular edge on label */
.cptb-ticker__label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: inherit;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ── PRO: Label pulse ───────────────────────────────────────────────── */
.cptb-ticker__label--pulse {
    gap: 8px;
}
.cptb-ticker__pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: cptbTickerPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes cptbTickerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

.cptb-ticker__icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.cptb-ticker__icon svg {
    display: block;
}

.cptb-ticker__label-text {
    display: inline-block;
}

/* ── Track (overflow container) ─────────────────────────────────────── */
.cptb-ticker__track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 12px;
}

/* ── SCROLL mode ────────────────────────────────────────────────────── */
.cptb-ticker__scroll {
    display: flex;
    width: max-content;
    will-change: transform;
}

.cptb-ticker__scroll.is-running {
    animation: var(--tk-anim-name, cptbTickerLeft) var(--tk-anim-dur, 20s) linear infinite;
}

.cptb-ticker__scroll-inner {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 0;
}

@keyframes cptbTickerLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes cptbTickerRight {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ── Items ──────────────────────────────────────────────────────────── */
.cptb-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 0 4px;
}

.cptb-ticker__link {
    color: var(--tk-color, #f1f5f9);
    text-decoration: none;
    transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-ticker__link:hover,
.cptb-ticker__link:focus-visible {
    color: var(--tk-hover, #fbbf24);
    text-decoration: none;
}

.cptb-ticker__text {
    color: var(--tk-color, #f1f5f9);
}

.cptb-ticker__date {
    font-size: 0.78em;
    opacity: 0.7;
    font-weight: 400;
    margin-right: 4px;
}

.cptb-ticker__sep {
    display: inline-block;
    padding: 0 12px;
    opacity: 0.4;
    color: var(--tk-sep-color, currentColor);
    user-select: none;
}

/* ── FADE mode ──────────────────────────────────────────────────────── */
.cptb-ticker__single {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.cptb-ticker__slide {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cptb-ticker__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* ── TYPING mode ────────────────────────────────────────────────────── */
.cptb-ticker--typing .cptb-ticker__slide.is-active .cptb-ticker__link,
.cptb-ticker--typing .cptb-ticker__slide.is-active .cptb-ticker__text {
    border-right: 2px solid var(--tk-color, #f1f5f9);
    padding-right: 2px;
    animation: cptbTickerBlink 0.7s step-end infinite;
}

@keyframes cptbTickerBlink {
    0%, 100% { border-color: var(--tk-color, #f1f5f9); }
    50%      { border-color: transparent; }
}

/* ── SLIDE-UP mode ──────────────────────────────────────────────────── */
.cptb-ticker--slide-up .cptb-ticker__slide {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-ticker--slide-up .cptb-ticker__slide.is-active {
    transform: translateY(-50%);
    opacity: 1;
}
.cptb-ticker--slide-up .cptb-ticker__slide.is-exit {
    transform: translateY(-200%);
    opacity: 0;
}

/* ── HIGHLIGHT mode ─────────────────────────────────────────────────── */
.cptb-ticker--highlight .cptb-ticker__slide {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cptb-ticker--highlight .cptb-ticker__slide.is-active {
    opacity: 1;
}
.cptb-ticker--highlight .cptb-ticker__slide.is-highlight .cptb-ticker__link,
.cptb-ticker--highlight .cptb-ticker__slide.is-highlight .cptb-ticker__text {
    animation: cptbTickerHighlight 0.8s ease;
}

@keyframes cptbTickerHighlight {
    0%   { background-size: 0 100%; }
    30%  { background-size: 100% 100%; }
    100% { background-size: 100% 100%; }
}

.cptb-ticker--highlight .cptb-ticker__slide .cptb-ticker__link,
.cptb-ticker--highlight .cptb-ticker__slide .cptb-ticker__text {
    background-image: linear-gradient(90deg, var(--tk-hover, #fbbf24) 0%, var(--tk-hover, #fbbf24) 100%);
    background-repeat: no-repeat;
    background-position: 0 85%;
    background-size: 0 30%;
    padding-bottom: 2px;
    transition: background-size 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cptb-ticker--highlight .cptb-ticker__slide.is-active .cptb-ticker__link,
.cptb-ticker--highlight .cptb-ticker__slide.is-active .cptb-ticker__text {
    background-size: 100% 30%;
}

/* ── FLIP mode ──────────────────────────────────────────────────────── */
.cptb-ticker--flip .cptb-ticker__single {
    perspective: 600px;
}
.cptb-ticker--flip .cptb-ticker__slide {
    opacity: 0;
    transform: translateY(-50%) rotateX(90deg);
    transform-origin: center center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}
.cptb-ticker--flip .cptb-ticker__slide.is-active {
    opacity: 1;
    transform: translateY(-50%) rotateX(0deg);
}
.cptb-ticker--flip .cptb-ticker__slide.is-exit {
    opacity: 0;
    transform: translateY(-50%) rotateX(-90deg);
}

/* ── PRO: Progress bar ──────────────────────────────────────────────── */
.cptb-ticker__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.cptb-ticker__progress-bar {
    height: 100%;
    width: 0%;
    background: var(--tk-progress-color, var(--tk-hover, #fbbf24));
    transition: width 0.1s linear;
    will-change: width;
}
.cptb-ticker__progress-bar.is-animating {
    transition: none;
    animation: cptbTickerProgress var(--tk-progress-dur, 4s) linear;
}
@keyframes cptbTickerProgress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

/* ── PRO: Item count ────────────────────────────────────────────────── */
.cptb-ticker__count {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    padding: 0 12px;
    height: 100%;
    font-size: 0.75rem;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── PRO: Entrance effects ──────────────────────────────────────────── */
.cptb-ticker--entrance-slide-down {
    animation: cptbTickerSlideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes cptbTickerSlideDown {
    0%   { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.cptb-ticker--entrance-fade {
    animation: cptbTickerFadeIn 0.8s ease both;
}
@keyframes cptbTickerFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* ── Nav arrows ─────────────────────────────────────────────────────── */
.cptb-ticker__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 0 8px;
    height: 100%;
}

.cptb-ticker__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: var(--tk-arrow-color, var(--tk-color, #f1f5f9));
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    line-height: 1;
    font-size: 1.1rem;
}
.cptb-ticker__arrow svg {
    stroke: currentColor;
    pointer-events: none;
}
.cptb-ticker__arrow:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}

.cptb-ticker__arrow:focus-visible {
    outline: 2px solid var(--tk-hover, #fbbf24);
    outline-offset: 1px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cptb-ticker {
        font-size: 0.8rem;
        height: 38px;
    }
    .cptb-ticker__label {
        padding: 0 10px;
        font-size: 0.7rem;
    }
    .cptb-ticker__label::after {
        right: -7px;
        width: 7px;
    }
    .cptb-ticker__sep {
        padding: 0 8px;
    }
    .cptb-ticker__nav {
        padding: 0 4px;
    }
    .cptb-ticker__arrow {
        width: 24px;
        height: 24px;
    }
    .cptb-ticker__count {
        padding: 0 8px;
        font-size: 0.7rem;
    }
    .cptb-ticker__pulse-dot {
        width: 6px;
        height: 6px;
    }
}

/* ── Dark mode ──────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cptb-ticker {
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }
    .cptb-ticker--outline {
        border-color: var(--tk-color, #f1f5f9);
    }
    .cptb-ticker--outline .cptb-ticker__link,
    .cptb-ticker--outline .cptb-ticker__text {
        color: var(--tk-color, #f1f5f9);
    }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cptb-ticker__scroll.is-running {
        animation: none;
    }
    .cptb-ticker__slide {
        transition: none;
        transform: none !important;
    }
    .cptb-ticker--typing .cptb-ticker__slide.is-active .cptb-ticker__link,
    .cptb-ticker--typing .cptb-ticker__slide.is-active .cptb-ticker__text {
        animation: none;
        border-right: none;
    }
    .cptb-ticker--highlight .cptb-ticker__slide .cptb-ticker__link,
    .cptb-ticker--highlight .cptb-ticker__slide .cptb-ticker__text {
        animation: none;
        background-image: none;
    }
    .cptb-ticker--flip .cptb-ticker__slide {
        transform: translateY(-50%) !important;
    }
    .cptb-ticker--slide-up .cptb-ticker__slide {
        transform: translateY(-50%) !important;
    }
    .cptb-ticker__pulse-dot {
        animation: none;
    }
    .cptb-ticker--entrance-slide-down,
    .cptb-ticker--entrance-fade {
        animation: none;
    }
    .cptb-ticker__progress-bar.is-animating {
        animation: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * AUTHOR BOX  —  Información del autor del post
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-author-box {
    --ab-accent: var(--cptb-accent, #3b82f6);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--cptb-card-bg, #fff);
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: var(--cptb-shadow, 0 1px 3px rgba(0,0,0,.06));
    transition: box-shadow .3s ease, transform .3s ease;
    position: relative;
    overflow: hidden;
}

/* Box styles */
.cptb-author-box--flat {
    border: none;
    box-shadow: none;
}
.cptb-author-box--elevated {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.cptb-author-box--glass {
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.3);
}

/* Hover effects */
.cptb-author-box--hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.cptb-author-box--hover-glow:hover {
    box-shadow: 0 0 0 3px var(--ab-accent), 0 4px 16px rgba(0,0,0,.1);
}

/* Entrance effects */
.cptb-author-box--entrance-fade {
    animation: cptbAbFadeIn .6s ease both;
}
.cptb-author-box--entrance-slide-up {
    animation: cptbAbSlideUp .6s ease both;
}
@keyframes cptbAbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cptbAbSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Cover image */
.cptb-author-box__cover {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 12px 12px 0 0;
    z-index: 0;
}
.cptb-author-box:has(.cptb-author-box__cover) {
    padding-top: 0;
    flex-direction: column;
    align-items: center;
}
.cptb-author-box:has(.cptb-author-box__cover) .cptb-author-box__avatar {
    margin-top: calc(var(--ab-cover-h, 120px) - 40px);
    z-index: 1;
    position: relative;
}
.cptb-author-box:has(.cptb-author-box__cover) .cptb-author-box__content {
    z-index: 1;
    text-align: center;
}

.cptb-author-box--vertical {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cptb-author-box__avatar {
    flex-shrink: 0;
}
.cptb-author-box__avatar img {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ab-accent);
    transition: transform .3s ease;
}
.cptb-author-box:hover .cptb-author-box__avatar img {
    transform: scale(1.05);
}
.cptb-author-box__content {
    flex: 1;
    min-width: 0;
}

/* Role badge */
.cptb-author-box__role {
    display: inline-block;
    margin-bottom: .35rem;
    padding: .15rem .6rem;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ab-accent);
    background: color-mix(in srgb, var(--ab-accent) 12%, transparent);
    border-radius: 999px;
}

.cptb-author-box__name {
    margin: 0 0 .4rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}
.cptb-author-box__name a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.cptb-author-box__name a:hover {
    color: var(--ab-accent);
}
.cptb-author-box__bio {
    margin: 0 0 .6rem;
    font-size: .92rem;
    color: var(--cptb-text, #4b5563);
    line-height: 1.6;
}

/* Meta line */
.cptb-author-box__meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}
.cptb-author-box--vertical .cptb-author-box__meta {
    justify-content: center;
}
.cptb-author-box__url {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--ab-accent);
    text-decoration: none;
    transition: opacity .2s;
}
.cptb-author-box__url:hover { opacity: .75; }
.cptb-author-box__url svg { flex-shrink: 0; }
.cptb-author-box__count {
    display: inline-block;
    padding: .15rem .6rem;
    font-size: .78rem;
    color: var(--cptb-text, #6b7280);
    background: var(--cptb-subtle, #f3f4f6);
    border-radius: 999px;
}

/* Social links */
.cptb-author-box__social {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .5rem 0;
}
.cptb-author-box--vertical .cptb-author-box__social {
    justify-content: center;
}
.cptb-author-box__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    color: var(--cptb-text, #6b7280);
    background: var(--cptb-subtle, #f3f4f6);
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}
.cptb-author-box__social-link:hover {
    background: var(--ab-accent);
    color: #fff;
    transform: translateY(-2px);
}
.cptb-author-box__social--pill .cptb-author-box__social-link {
    width: auto;
    border-radius: 999px;
    padding: .3rem .75rem;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 500;
}
.cptb-author-box__social-link svg {
    flex-shrink: 0;
}

/* Archive button */
.cptb-author-box__archive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: .75rem;
    padding: .55rem 1.25rem;
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
    background: var(--ab-accent);
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.cptb-author-box__archive-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Latest posts */
.cptb-author-box__latest {
    margin: .75rem 0 0;
    padding: 0;
    list-style: none;
}
.cptb-author-box__latest li {
    padding: .25rem 0;
    font-size: .85rem;
    border-top: 1px solid var(--cptb-border, #e5e7eb);
}
.cptb-author-box__latest li:first-child { border-top: none; padding-top: 0; }
.cptb-author-box__latest a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.cptb-author-box__latest a:hover {
    color: var(--ab-accent);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .cptb-author-box--glass {
        background: rgba(30,30,30,.6);
        border-color: rgba(255,255,255,.1);
    }
    .cptb-author-box__social-link {
        background: rgba(255,255,255,.1);
        color: #d1d5db;
    }
    .cptb-author-box__role {
        background: color-mix(in srgb, var(--ab-accent) 20%, transparent);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cptb-author-box,
    .cptb-author-box__avatar img,
    .cptb-author-box__social-link,
    .cptb-author-box__archive-btn {
        transition: none;
    }
    .cptb-author-box--entrance-fade,
    .cptb-author-box--entrance-slide-up {
        animation: none;
    }
}

@media (max-width: 600px) {
    .cptb-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cptb-author-box__meta {
        justify-content: center;
    }
    .cptb-author-box__social {
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO  —  Botones para compartir en redes sociales
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-social-share {
    --ss-accent: var(--cptb-accent, #3b82f6);
    display: flex;
    align-items: center;
    gap: var(--ss-gap, .75rem);
    flex-wrap: wrap;
}
.cptb-social-share--vertical {
    flex-direction: column;
    align-items: flex-start;
}
.cptb-social-share__label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--cptb-text, #374151);
    white-space: nowrap;
}
.cptb-social-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ss-gap, .5rem);
}
.cptb-social-share--vertical .cptb-social-share__buttons {
    flex-direction: column;
}

/* ── Button base ─────────────────────────────────────────── */
.cptb-social-share__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    border: none;
    border-radius: var(--ss-radius, 8px);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, background .2s ease, box-shadow .2s ease;
    color: #fff;
    line-height: 1.3;
    position: relative;
    overflow: hidden;
}
.cptb-social-share__btn:hover {
    transform: translateY(-2px);
    opacity: .9;
}
.cptb-social-share__btn:active {
    transform: translateY(0);
}
.cptb-social-share__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cptb-social-share__icon svg {
    width: var(--ss-icon, 18px);
    height: var(--ss-icon, 18px);
}
.cptb-social-share__text {
    white-space: nowrap;
}

/* ── text-only / icon-only ──── */
.cptb-social-share--text-only .cptb-social-share__icon { display: none; }
.cptb-social-share--icon-only .cptb-social-share__text { display: none; }
.cptb-social-share--icon-only .cptb-social-share__btn { padding: .55rem; }

/* ── Sizes ────────────────────────────────────────────────── */
.cptb-social-share--small .cptb-social-share__btn  { padding: .3rem .6rem; font-size: .78rem; }
.cptb-social-share--small .cptb-social-share__icon svg { width: 14px; height: 14px; }
.cptb-social-share--large .cptb-social-share__btn  { padding: .6rem 1.1rem; font-size: .95rem; }
.cptb-social-share--large .cptb-social-share__icon svg { width: 22px; height: 22px; }

/* ── Native brand colors ──────────────────────────────────── */
.cptb-social-share--native .cptb-social-share__btn--whatsapp { background: #25D366; }
.cptb-social-share--native .cptb-social-share__btn--x        { background: #000;    }
.cptb-social-share--native .cptb-social-share__btn--facebook  { background: #1877F2; }
.cptb-social-share--native .cptb-social-share__btn--linkedin  { background: #0A66C2; }
.cptb-social-share--native .cptb-social-share__btn--telegram  { background: #26A5E4; }
.cptb-social-share--native .cptb-social-share__btn--email     { background: #6b7280; }
.cptb-social-share--native .cptb-social-share__btn--copy      { background: #8b5cf6; }
.cptb-social-share--native .cptb-social-share__btn--print     { background: #374151; }

/* ── Non-native fallback ─── */
.cptb-social-share:not(.cptb-social-share--native) .cptb-social-share__btn {
    background: var(--ss-accent);
}

/* ── Copied state ──── */
.cptb-social-share__btn--copied {
    background: #10b981 !important;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Button styles
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Outline */
.cptb-social-share--outline .cptb-social-share__btn {
    background: transparent !important;
    border: 2px solid currentColor;
}
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--whatsapp { color: #25D366; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--x        { color: #000;    }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--facebook  { color: #1877F2; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--linkedin  { color: #0A66C2; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--telegram  { color: #26A5E4; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--email     { color: #6b7280; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--copy      { color: #8b5cf6; }
.cptb-social-share--outline.cptb-social-share--native .cptb-social-share__btn--print     { color: #374151; }
.cptb-social-share--outline:not(.cptb-social-share--native) .cptb-social-share__btn { color: var(--ss-accent); }
.cptb-social-share--outline .cptb-social-share__btn:hover { background: currentColor !important; color: #fff; }

/* Gradient */
.cptb-social-share--gradient .cptb-social-share__btn {
    background-image: linear-gradient(135deg, color-mix(in srgb, currentColor 30%, transparent), currentColor) !important;
    border: none;
}
.cptb-social-share--gradient .cptb-social-share__btn:hover { filter: brightness(1.1); }

/* Pill */
.cptb-social-share--pill .cptb-social-share__btn {
    border-radius: 999px !important;
    padding-inline: 1.2em;
}

/* Minimal */
.cptb-social-share--minimal .cptb-social-share__btn {
    background: transparent !important;
    border: none;
    padding: .35rem .5rem;
}
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--whatsapp { color: #25D366; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--x        { color: #000;    }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--facebook  { color: #1877F2; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--linkedin  { color: #0A66C2; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--telegram  { color: #26A5E4; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--email     { color: #6b7280; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--copy      { color: #8b5cf6; }
.cptb-social-share--minimal.cptb-social-share--native .cptb-social-share__btn--print     { color: #374151; }
.cptb-social-share--minimal:not(.cptb-social-share--native) .cptb-social-share__btn { color: var(--ss-accent); }
.cptb-social-share--minimal .cptb-social-share__btn:hover { background: color-mix(in srgb, currentColor 10%, transparent) !important; }

/* ── Button spacing ─── */
.cptb-social-share--spacing-compact .cptb-social-share__buttons { gap: .25rem; }
.cptb-social-share--spacing-wide .cptb-social-share__buttons    { gap: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Floating mode
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-social-share--floating {
    position: fixed;
    top: var(--ss-float-offset, 50%);
    transform: translateY(-50%);
    z-index: 999;
    flex-direction: column;
    gap: .35rem;
}
.cptb-social-share--float-left  { left: 0; border-radius: 0 8px 8px 0; }
.cptb-social-share--float-right { right: 0; border-radius: 8px 0 0 8px; }
.cptb-social-share--floating .cptb-social-share__label { display: none; }
.cptb-social-share--floating .cptb-social-share__buttons { flex-direction: column; gap: .25rem; }
.cptb-social-share--floating .cptb-social-share__btn { padding: .55rem; }
.cptb-social-share--floating .cptb-social-share__text { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Hover effects
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-social-share--hover-lift .cptb-social-share__btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.cptb-social-share--hover-scale .cptb-social-share__btn:hover {
    transform: scale(1.12);
}
.cptb-social-share--hover-shine .cptb-social-share__btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transition: left .45s ease;
    pointer-events: none;
}
.cptb-social-share--hover-shine .cptb-social-share__btn:hover::after { left: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Entrance effects
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-social-share--entrance-fade .cptb-social-share__btn {
    opacity: 0;
    transition: opacity .5s ease, transform .15s ease;
}
.cptb-social-share--entrance-fade.cptb-visible .cptb-social-share__btn { opacity: 1; }

.cptb-social-share--entrance-slide-up .cptb-social-share__btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}
.cptb-social-share--entrance-slide-up.cptb-visible .cptb-social-share__btn { opacity: 1; transform: translateY(0); }

.cptb-social-share--entrance-pop .cptb-social-share__btn {
    opacity: 0;
    transform: scale(.5);
    transition: opacity .4s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.cptb-social-share--entrance-pop.cptb-visible .cptb-social-share__btn { opacity: 1; transform: scale(1); }

/* Staggered entrance */
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(2) { transition-delay: .05s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(3) { transition-delay: .1s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(4) { transition-delay: .15s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(5) { transition-delay: .2s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(6) { transition-delay: .25s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(7) { transition-delay: .3s; }
.cptb-social-share[class*="--entrance-"]:not(.cptb-social-share--entrance-none) .cptb-social-share__btn:nth-child(8) { transition-delay: .35s; }

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Tooltips
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-social-share--tooltips .cptb-social-share__btn[data-tooltip] {
    position: relative;
}
.cptb-social-share--tooltips .cptb-social-share__btn[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(.8);
    padding: .25rem .55rem;
    background: #1f2937;
    color: #fff;
    font-size: .72rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 10;
}
.cptb-social-share--tooltips .cptb-social-share__btn[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * SOCIAL SHARE PRO — Copy animation
 * ═══════════════════════════════════════════════════════════════════════════════ */
@keyframes cptbCopyPulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.15); }
    60%  { transform: scale(.95); }
    100% { transform: scale(1); }
}
.cptb-social-share__btn--copy-animate {
    animation: cptbCopyPulse .5s ease;
}

/* ── Share count ─── */
.cptb-social-share__count {
    font-size: .78rem;
    color: var(--cptb-text-muted, #6b7280);
    margin-inline-start: .25rem;
}
.cptb-social-share__count-num {
    font-weight: 700;
    color: var(--ss-accent);
}

/* ── Dark mode ─── */
@media (prefers-color-scheme: dark) {
    .cptb-social-share__label { color: #d1d5db; }
    .cptb-social-share--outline .cptb-social-share__btn:hover { color: #111; }
    .cptb-social-share--tooltips .cptb-social-share__btn[data-tooltip]::before { background: #374151; }
    .cptb-social-share__count { color: #9ca3af; }
}

/* ── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .cptb-social-share__btn,
    .cptb-social-share__btn::after { transition: none !important; animation: none !important; }
    .cptb-social-share[class*="--entrance-"] .cptb-social-share__btn { opacity: 1 !important; transform: none !important; }
}

/* ── Responsive: floating off on small screens ─── */
@media (max-width: 768px) {
    .cptb-social-share--floating {
        position: static;
        transform: none;
        flex-direction: row;
        border-radius: var(--ss-radius, 8px);
    }
    .cptb-social-share--floating .cptb-social-share__buttons { flex-direction: row; }
    .cptb-social-share--floating .cptb-social-share__label { display: block; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO v3 — Load More / Infinite Scroll / Empty State
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Load More ─── */
.cptb-load-more-wrap {
    text-align: center;
    margin-top: 2rem;
}
.cptb-load-more-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cptb-accent, #3b82f6);
    background: transparent;
    border: 2px solid var(--cptb-accent, #3b82f6);
    border-radius: var(--cptb-radius, 8px);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    line-height: 1.4;
}
.cptb-load-more-btn:hover {
    background: var(--cptb-accent, #3b82f6);
    color: #fff;
    transform: translateY(-1px);
}
.cptb-load-more-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* ── Infinite Scroll ─── */
.cptb-infinite-wrap {
    text-align: center;
    margin-top: 1.5rem;
    min-height: 2rem;
}
.cptb-infinite-sentinel {
    height: 1px;
    width: 100%;
}
.cptb-infinite-spinner {
    padding: 1rem 0;
}
.cptb-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--cptb-accent, #3b82f6);
    border-radius: 50%;
    animation: cptb-spin 0.6s linear infinite;
}
@keyframes cptb-spin {
    to { transform: rotate(360deg); }
}

/* ── Empty State ─── */
.cptb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: var(--cptb-radius, 8px);
    background: #fafafa;
    color: #6b7280;
    gap: 0.75rem;
}
.cptb-empty-state__icon {
    opacity: 0.5;
}
.cptb-empty-state__icon svg {
    width: 32px;
    height: 32px;
}
.cptb-empty-state__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: GLOBAL FOCUS-VISIBLE — Accessibility ring on keyboard navigation
 * Same quality as Kadence/Elementor/GenerateBlocks
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-title a:focus-visible,
.cptb-news__title a:focus-visible,
.cptb-read-more:focus-visible,
.cptb-news__read-more:focus-visible,
.cptb-term-badge:focus-visible,
.cptb-news__cat-badge:focus-visible,
.cptb-news__see-all:focus-visible,
.cptb-post-nav__prev:focus-visible,
.cptb-post-nav__next:focus-visible,
.cptb-toc__toggle:focus-visible,
.cptb-toc__link:focus-visible,
.cptb-af__filter-btn:focus-visible,
.cptb-af__load-more:focus-visible,
.cptb-af__page:focus-visible,
.cptb-carousel__arrow:focus-visible,
.cptb-carousel__dot:focus-visible,
.cptb-hotspot__dot:focus-visible,
.cptb-pagination a.page-numbers:focus-visible {
    outline: 2px solid var(--cptb-accent, #0066cc);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: GLOBAL DARK MODE — All content blocks
 * Matches Kadence/Elementor dark theme support
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    .cptb-single,
    .cptb-grid,
    .cptb-news,
    .cptb-carousel,
    .cptb-related,
    .cptb-toc,
    .cptb-masonry,
    .cptb-hotspot,
    .cptb-sticky-sidebar,
    .cptb-af,
    .cptb-author-box,
    .cptb-social-share {
        --cptb-primary:    #f3f4f6;
        --cptb-accent:     #60a5fa;
        --cptb-text:       #d1d5db;
        --cptb-subtle:     #1f2937;
        --cptb-border:     #374151;
        --cptb-card-bg:    #1f2937;
        --cptb-shadow:     0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.15);
        --cptb-shadow-h:   0 8px 30px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
        color: var(--cptb-text);
    }
    .cptb-toc {
        --toc-bg:      #1f2937;
        --toc-border:  #374151;
    }
    .cptb-hero {
        --hero-bg-color: #111827;
    }
    .cptb-af {
        --af-filter-bg: #374151;
    }
    .cptb-pagination > ul.page-numbers > li > a.page-numbers,
    .cptb-pagination > ul.page-numbers > li > span.page-numbers {
        background: #1f2937 !important;
        border-color: #374151 !important;
        color: #d1d5db !important;
    }
    .cptb-no-posts {
        border-color: #374151;
        color: #9ca3af;
    }
}

/* WP editor + frontend dark theme class support */
.is-dark-theme .cptb-single,
.is-dark-theme .cptb-grid,
.is-dark-theme .cptb-news,
.is-dark-theme .cptb-carousel,
.is-dark-theme .cptb-related,
.is-dark-theme .cptb-toc,
.is-dark-theme .cptb-masonry,
.is-dark-theme .cptb-hotspot,
.is-dark-theme .cptb-sticky-sidebar,
.is-dark-theme .cptb-af,
.is-dark-theme .cptb-author-box,
.is-dark-theme .cptb-social-share,
.editor-styles-wrapper.is-dark-theme .cptb-single,
.editor-styles-wrapper.is-dark-theme .cptb-grid,
.editor-styles-wrapper.is-dark-theme .cptb-news {
    --cptb-primary:    #f3f4f6;
    --cptb-accent:     #60a5fa;
    --cptb-text:       #d1d5db;
    --cptb-subtle:     #1f2937;
    --cptb-border:     #374151;
    --cptb-card-bg:    #1f2937;
    --cptb-shadow:     0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.15);
    --cptb-shadow-h:   0 8px 30px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
    color: var(--cptb-text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: SMOOTH SCROLL — For TOC anchor links and in-page navigation
 * ═══════════════════════════════════════════════════════════════════════════════ */
html:has(.cptb-toc) {
    scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: PREFERS-REDUCED-MOTION — Accessibility for motion-sensitive users
 * THE mark of a professional builder. Kadence/Elementor/GenerateBlocks all have this.
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    /* Kill ALL animations */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Specifically reset transforms so no hover lifts/zooms */
    .cptb-grid__item:hover,
    .cptb-single:hover,
    .cptb-news__item:hover,
    .cptb-carousel__slide:hover,
    .cptb-related .cptb-grid__item:hover,
    .cptb-masonry__item:hover,
    .cptb-af__grid .cptb-grid__item:hover {
        transform: none;
    }
    .cptb-grid__item:hover .cptb-thumbnail img,
    .cptb-single:hover .cptb-thumbnail img,
    .cptb-news__item:hover .cptb-news__thumb img,
    .cptb-carousel__slide:hover .cptb-thumb img,
    .cptb-masonry__item:hover .cptb-thumb img {
        transform: none;
    }

    /* No overlays that fade in */
    .cptb-thumbnail::after,
    .cptb-news__thumb::after,
    .cptb-masonry__item .cptb-thumb::after {
        display: none;
    }

    /* Hero Ken Burns disabled */
    .cptb-hero--bg-image::before {
        animation: none;
    }

    /* Carousel entrance disabled - show immediately */
    .cptb-carousel__slide {
        opacity: 1;
        transform: none;
    }
    .cptb-masonry__item {
        opacity: 1;
        transform: none;
    }
    .cptb-hotspot__dot {
        opacity: 1;
    }

    /* TOC smooth scroll disabled */
    html:has(.cptb-toc) {
        scroll-behavior: auto;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: BREADCRUMBS  —  Migas de pan dentro de single-item
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: .85rem;
    line-height: 1.4;
    color: var(--cptb-text, #6b7280);
    margin-bottom: 1rem;
}
.cptb-breadcrumbs a {
    color: var(--cptb-accent, #3b82f6);
    text-decoration: none;
    transition: color .2s;
}
.cptb-breadcrumbs a:hover {
    color: var(--cptb-accent-h, #2563eb);
    text-decoration: underline;
}
.cptb-breadcrumbs__sep {
    margin: 0 .3em;
    color: var(--cptb-text, #9ca3af);
    user-select: none;
}
.cptb-breadcrumbs__current {
    color: var(--cptb-text, #374151);
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: SHARE BUTTONS (inline)  —  Botones compartir en single-item zones
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-share {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.cptb-share__label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--cptb-text, #374151);
    white-space: nowrap;
}
.cptb-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.cptb-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .4rem;
    border-radius: 6px;
    color: var(--cptb-text, #6b7280);
    background: var(--cptb-subtle, #f3f4f6);
    text-decoration: none;
    transition: all .2s ease;
    line-height: 1;
    cursor: pointer;
    border: none;
    font-size: .85rem;
}
.cptb-share__btn:hover {
    background: var(--cptb-accent, #3b82f6);
    color: #fff;
    transform: translateY(-1px);
}
.cptb-share__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
/* Platform colors on hover */
.cptb-share__btn--twitter:hover   { background: #000; }
.cptb-share__btn--facebook:hover  { background: #1877f2; }
.cptb-share__btn--linkedin:hover  { background: #0a66c2; }
.cptb-share__btn--whatsapp:hover  { background: #25d366; }
.cptb-share__btn--email:hover     { background: #6b7280; }
.cptb-share__btn--copy:hover      { background: #8b5cf6; }

/* Style: text */
.cptb-share--text .cptb-share__btn {
    padding: .4rem .75rem;
}
/* Style: icons-text */
.cptb-share--icons-text .cptb-share__btn {
    padding: .4rem .65rem;
}
.cptb-share--icons-text .cptb-share__btn span,
.cptb-share--text .cptb-share__btn span {
    font-size: .82rem;
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * PRO: AUTHOR BOX (single-item variants)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.cptb-single .cptb-author-box--card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--cptb-card-bg, #f9fafb);
    border: 1px solid var(--cptb-border, #e5e7eb);
    border-radius: 12px;
    margin: 1.5rem 0;
}
.cptb-single .cptb-author-box--minimal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 0;
    border-top: 1px solid var(--cptb-border, #e5e7eb);
    margin: 1.5rem 0;
    background: transparent;
}
.cptb-single .cptb-author-box--minimal .cptb-author-box__avatar-wrap img {
    width: 48px;
    height: 48px;
}
.cptb-single .cptb-author-box--compact {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .4rem .75rem;
    background: var(--cptb-subtle, #f3f4f6);
    border-radius: 999px;
    margin: 1rem 0;
}
.cptb-single .cptb-author-box--compact .cptb-author-box__avatar-wrap img {
    width: 32px;
    height: 32px;
}
.cptb-single .cptb-author-box--compact .cptb-author-box__bio,
.cptb-single .cptb-author-box--compact .cptb-author-box__more {
    display: none;
}
.cptb-author-box__avatar-wrap {
    flex-shrink: 0;
}
.cptb-author-box__avatar-wrap img {
    display: block;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.cptb-author-box__info {
    flex: 1;
    min-width: 0;
}
.cptb-author-box__name {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.cptb-author-box__name:hover {
    color: var(--cptb-accent, #3b82f6);
}
.cptb-author-box__bio {
    margin: .35rem 0 .5rem;
    font-size: .9rem;
    color: var(--cptb-text, #6b7280);
    line-height: 1.55;
}
.cptb-author-box__more {
    display: inline-block;
    font-size: .82rem;
    color: var(--cptb-accent, #3b82f6);
    text-decoration: none;
    font-weight: 500;
    transition: opacity .2s;
}
.cptb-author-box__more:hover {
    opacity: .75;
}
