/* =========================================
   CARRUSEL DE ENTRADAS DEL BLOG
   Las tarjetas usan las clases del widget de blog de Frisk
   (blog-card style3, box-title, link-btn), así heredan los mismos
   colores, tipografías y animaciones que tenía el blog del inicio.
   Aquí solo va lo propio del carrusel.
   ========================================= */
.jz-carrusel {
    --jzc-claro: var(--smoke-color, #F6F5F3);
    --jzc-morado: #6326E6;
    --jzc-espacio: 24px;
    --jzc-n: 3;
    --jzc-flecha-alto: 110px;     /* rectángulo vertical, angosto */
    --jzc-flecha-ancho: 44px;
    display: grid;
    grid-template-columns: var(--jzc-flecha-ancho) minmax(0, 1fr) var(--jzc-flecha-ancho);
    grid-template-areas:
        "prev ventana next"
        ".    puntos  .";
    column-gap: 28px;
    row-gap: 48px;
    align-items: center;
}

.jz-carrusel__cuerpo { display: contents; }

.jz-carrusel__ventana {
    grid-area: ventana;
    overflow: hidden;
    margin: 0 calc(var(--jzc-espacio) / -2);
}

.jz-carrusel__pista {
    display: flex;
    align-items: stretch;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
}

.jz-carrusel__item {
    flex: 0 0 calc(100% / var(--jzc-n));
    max-width: calc(100% / var(--jzc-n));
    padding: 0 calc(var(--jzc-espacio) / 2);
    box-sizing: border-box;
    display: flex;
}

/* Tarjeta en columna: el "Ver más" siempre queda abajo, a la misma altura */
.jz-carrusel .blog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.jz-carrusel .blog-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
}
.jz-carrusel .blog-title { margin-bottom: 24px; }

/* Fecha y categoría: 15px, morado corporativo */
.jz-carrusel .blog-card .blog-meta a,
.jz-carrusel .blog-card .blog-meta span {
    font-size: 15px;
    color: var(--jzc-morado);
}
.jz-carrusel .blog-card .blog-meta a ~ a:after,
.jz-carrusel .blog-card .blog-meta span ~ a:after { background-color: var(--jzc-morado); }

/* Título: morado al pasar el mouse */
.jz-carrusel .blog-card .blog-title a { transition: color 0.3s ease; }
.jz-carrusel .blog-card .blog-title a:hover { color: var(--jzc-morado); }

/* Ver más: misma animación del tema, pero en morado al pasar el mouse */
.jz-carrusel .link-btn { transition: color 0.3s ease; }
.jz-carrusel .blog-card .link-btn:hover { color: var(--jzc-morado); }
.jz-carrusel .blog-card .link-btn:hover::before,
.jz-carrusel .blog-card .link-btn:hover::after { background: var(--jzc-morado); }
.jz-carrusel .link-btn { margin-top: auto; }

/* Todas las imágenes del mismo alto (proporción de las portadas 856×600) */
.jz-carrusel .blog-img { aspect-ratio: 856 / 600; }
.jz-carrusel .blog-img a,
.jz-carrusel .blog-img img {
    display: block;
    width: 100%;
    height: 100%;
}
.jz-carrusel .blog-img img { object-fit: cover; }

/* ---------- Flechas: rectángulo vertical semitransparente ---------- */
.jz-carrusel__flecha {
    align-self: center;   /* centradas a la altura de las tarjetas */
    width: var(--jzc-flecha-ancho);
    height: var(--jzc-flecha-alto);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--jzc-claro);
    background: rgba(246, 245, 243, 0.08);
    border: 1px solid rgba(246, 245, 243, 0.2);
    border-radius: 2px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.jz-carrusel__flecha--prev { grid-area: prev; }
.jz-carrusel__flecha--next { grid-area: next; }
.jz-carrusel__flecha svg { transition: transform 0.3s ease; }
.jz-carrusel__flecha:hover,
.jz-carrusel__flecha:focus-visible {
    background: var(--jzc-morado);
    border-color: var(--jzc-morado);
    color: #fff;
}
.jz-carrusel__flecha--prev:hover svg { transform: translateX(-3px); }
.jz-carrusel__flecha--next:hover svg { transform: translateX(3px); }
.jz-carrusel__flecha:active { background: #4f1cc0; }
.jz-carrusel__flecha:focus-visible,
.jz-carrusel__punto:focus-visible {
    outline: 2px solid var(--jzc-claro);
    outline-offset: 3px;
}

/* ---------- Bullets: círculos pequeños ---------- */
.jz-carrusel__puntos {
    grid-area: puntos;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
/* El botón mide 24px para que sea fácil de tocar; el círculo visible mide 10px */
.jz-carrusel__punto {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.jz-carrusel__punto::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    border: 1.5px solid var(--jzc-claro);
    background: transparent;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.jz-carrusel__punto:hover::before { transform: scale(1.2); }
.jz-carrusel__punto[aria-current="true"]::before {
    background: var(--jzc-morado);
    border-color: var(--jzc-morado);
}

/* Con pocas entradas (caben en una sola tanda) no hay controles */
.jz-carrusel.es-fijo .jz-carrusel__flecha,
.jz-carrusel.es-fijo .jz-carrusel__puntos { display: none; }

/* Tablet */
@media (max-width: 1199px) {
    .jz-carrusel { column-gap: 18px; --jzc-flecha-alto: 96px; --jzc-flecha-ancho: 40px; }
}

/* Celular */
@media (max-width: 767px) {
    .jz-carrusel {
        column-gap: 10px;
        row-gap: 32px;
        --jzc-flecha-alto: 80px;
        --jzc-flecha-ancho: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jz-carrusel__pista { transition-duration: 0.01s; }
}
