/* ==========================================================================
   BLOG DETAIL - Estilos EspecÃ­ficos para GalerÃ­as, Carruseles y Slides
   ========================================================================== */

/* ---- Smooth scroll for the whole page (ensures back-to-top works smoothly) */
html {
    scroll-behavior: smooth !important;
}

.addon-imagen-background__blog-list {
    position: absolute;
    width: 100%;
    height: 50%;
    left: 0px;
    top: 0px;
    background-image: url(/static/images/addons/addon_detalle_blog.png);
    background-repeat: repeat-x;
    background-size: 54%;
    background-color: rgba(255, 255, 255, 0.85);
    background-blend-mode: overlay;
    filter: brightness(0.95);
    z-index: 0;
    overflow: hidden;
    background-position: center center;
}

/* ==========================================================================
   1. SLIDES (bloques :::slides) â€“ CARRUSEL DE IMÃGENES CON TÃTULO Y DESCRIPCIÃ“N
   ========================================================================== 
   DiseÃ±o responsive que se adapta al contenido:
   - Mobile (â‰¤767px): Imagen arriba, caption abajo, apilados verticalmente
   - Desktop (â‰¥768px): Caption izquierda (35%), imagen derecha (65%) lado a lado
   - El contenedor se expande segÃºn el slide activo (sin altura fija)
   - El caption siempre visible, con tipografÃ­a clara y sin cortes
   ========================================================================== */
.slides-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    background: #fff;
    height: auto;
    transition: min-height 0.4s ease;
    /* Padding inferior para dar espacio a la navegaciÃ³n en todos los tamaÃ±os */
    padding-bottom: 4.5rem;
}

/* -- Slide base (inactivo: oculto pero con position absolute) -- */
.slides-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
}

/* â”€â”€ Slide activo (ocupa espacio real, expande el contenedor) â”€â”€ */
.slides-container .slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    position: relative;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* â”€â”€ Imagen dentro del slide â”€â”€ */
.slides-container .slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    border-radius: 8px 8px 0 0;
    display: block;
    object-fit: contain;
    object-position: top;
}

/* â”€â”€ Caption (tÃ­tulo + descripciÃ³n) â”€â”€ */
.slide-caption {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    font-family: 'Montserrat', sans-serif;
    text-align: left;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

.slide-caption strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.1rem;
    line-height: 1.3;
    display: block;
}

.slide-caption span {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
    display: block;
}

/* â”€â”€ DESKTOP (â‰¥768px): lado a lado â”€â”€ */
@media (min-width: 768px) {
    .slides-container .slide.active {
        flex-direction: row;
        align-items: stretch;
    }

    .slides-container .slide {
        flex-direction: row;
        align-items: stretch;
    }

    .slides-container .slide img {
        flex: 0 0 60%;
        max-width: 60%;
        max-height: 75vh;
        border-radius: 8px 0 0 8px;
        object-position: center;
    }

    .slide-caption {
        flex: 1;
        max-width: none;
        padding: 1.75rem 1.75rem 1.75rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.5rem;
        border-top: none;
        border-left: 1px solid #f3f4f6;
        background: #fafbfc;
    }

    .slide-caption strong {
        font-size: 1.35rem;
        line-height: 1.35;
        margin-bottom: 0;
    }

    .slide-caption span {
        font-size: 1.05rem;
        line-height: 1.55;
        color: #4b5563;
    }

    /* En desktop, la navegaciÃ³n estÃ¡ sobre un fondo mÃ¡s grande */
    .slides-container {
        padding-bottom: 4rem;
    }
}


/* â”€â”€ PANTALLAS MUY GRANDES (â‰¥1200px) â”€â”€ */
@media (min-width: 1200px) {
    .slides-container .slide img {
        flex: 0 0 65%;
        max-width: 65%;
    }

    .slide-caption {
        padding: 2rem 2rem 2rem 1.75rem;
    }

    .slide-caption strong {
        font-size: 1.5rem;
    }

    .slide-caption span {
        font-size: 1.1rem;
    }

    /* ---------------------------------------------------------------
   Back to Top button (used on blog detail page)
   --------------------------------------------------------------- */
    /* Base style: hidden by default */
    .back-to-top {
        position: fixed;
        right: 1rem;
        bottom: 1rem;
        width: 48px;
        height: 48px;
        /* Gradient matching the blog theme */
        background: linear-gradient(135deg, #6f42c1, #e84a5f);
        color: #fff;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
        z-index: 1000;
    }

    /* Show state for back-to-top button */
    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    /* Visible when the .show class is added via JS */
    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    /* Hover effect */
    .back-to-top:hover {
        /* Hover gradient (slightly darker) */
        background: linear-gradient(135deg, #5a33a0, #d73a5c);
    }
}

/* NavegaciÃ³n del slider */
.slides-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.slides-nav button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 1.1rem;
    color: #4b5563;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;

    &.slide-dot {
        width: 15px;
        height: 15px;
    }
}

.slides-nav button:hover {
    background: #6f42c1;
    color: #fff;
    transform: scale(1.05);
}

.slides-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    padding: 0;
    border: none;
}

.slide-dot:hover {
    background: #8b5cf6;
    transform: scale(1.2);
}

.slide-dot.active {
    background: #6f42c1;
    transform: scale(1.2);
}

.slides-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    margin-left: auto;
    margin-right: 0.5rem;
    white-space: nowrap;
    align-self: center;
}

/* ==========================================================================
   2. GALERÃA POPUP
   ========================================================================== */

@media (max-width: 767px) {
    .slides-nav {
        bottom: 0.25rem;
    }

    .slide-caption {
        max-width: 100%;
    }

    .slides-container .slide img {
        max-height: 50vh;
    }
}

.popup-gallery-container {
    margin: 1.5rem 0;
    display: inline-block;
    max-width: 100%;
}

.gallery-preview {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.gallery-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.95), rgba(232, 74, 94, 0.95));
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.gallery-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4);
}

.gallery-badge i {
    font-size: 0.85rem;
}

.gallery-badge .gallery-eye {
    font-size: 0.75rem;
    opacity: 0.9;
}

.gallery-preview:hover .gallery-badge {
    background: linear-gradient(135deg, rgba(111, 66, 193, 1), rgba(232, 74, 94, 1));
}

.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-modal.visible {
    opacity: 1;
}

.gallery-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-nav.prev {
    left: 1.25rem;
}

.gallery-modal-nav.next {
    right: 1.25rem;
}

.gallery-modal-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 16px;
    background: #1a1a2e;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.gallery-modal-image-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

/* â”€â”€ Info panel: tÃ­tulo + descripciÃ³n con fondo oscuro â”€â”€ */
#gallery-modal-info {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.5rem 1.25rem;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, #1a1a2e 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

#gallery-modal-title {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

#gallery-modal-desc {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-top: 0.15rem;
}

/* En pantallas grandes, mÃ¡s espacio para la info */
@media (min-width: 768px) {
    #gallery-modal-info {
        padding: 1.25rem 2rem 1.5rem;
    }

    #gallery-modal-title {
        font-size: 1.35rem;
    }

    #gallery-modal-desc {
        font-size: 1rem;
    }

    .gallery-modal-image-wrapper img {
        max-height: 65vh;
    }
}

.gallery-modal-counter {
    position: absolute;
    top: 1rem;
    /* right: 1rem; */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    font-family: 'Montserrat', sans-serif;
}

/* ==========================================================================
   3. ESTILOS DE COMENTARIOS - BotÃ³n de colapso/expansiÃ³n de respuestas
   ========================================================================== */

/* Estilo para el botÃ³n que muestra/oculta respuestas - clase jd-toggle-replies-btn */
.jd-toggle-replies-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    cursor: pointer;
    margin-top: 0.75rem;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.jd-toggle-replies-btn:hover {
    background: #e5e7eb;
    color: #6f42c1;
    border-color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.15);
}

.jd-toggle-replies-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* Skeleton animado para comentario pendiente (efecto shimmer) */
/* Skeleton simple para comentario pendiente (mÃ¡s compacto) */
.sk-comment {
    display: flex;
    gap: 14px;
    padding: 0.6rem 0;
    /* reducciÃ³n del espacio vertical */
    border-bottom: 1px solid #f3f4f6;
    animation: fadeIn 400ms ease;
    position: relative;
}

.sk-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    flex-shrink: 0;
}

.sk-comment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

/* LÃ­neas del skeleton simple */
.sk-line {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f3f4f6 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
}

.sk-line-short {
    width: 25%;
    height: 16px;
}

.sk-line-medium {
    width: 55%;
    margin-top: 0.5rem;
}

.sk-line-long {
    width: 90%;
    margin-top: 0.5rem;
}

.sk-comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.sk-line-btn {
    width: 60px;
    height: 20px;
    border-radius: 10px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Mensaje descriptivo debajo del skeleton */
.sk-pending-msg {
    color: #5d6673;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.sk-pending-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.sk-pending-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #92400e;
    line-height: 1.4;
}

/* Skeleton loader para scroll infinito */
.comment-skeleton {
    display: flex;
    gap: 14px;
    width: 100%;
}

.comment-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease infinite;
    flex-shrink: 0;
}

.comment-skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.comment-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease infinite;
}

.comment-skeleton-line.short {
    width: 30%;
}

.comment-skeleton-line.medium {
    width: 60%;
}

.comment-skeleton-line.long {
    width: 85%;
}






/* ===========================================
   SKELETON PROFESIONAL - VIBRANTE
   =========================================== */

/* â”€â”€ Shimmer principal - barrido diagonal brillante â”€â”€ */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* â”€â”€ Pulso suave en el badge â”€â”€ */
@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 0.85;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* â”€â”€ Entrada con bounce sutil â”€â”€ */
@keyframes skeleton-enter {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CARD SKELETON (ajustado para comentarios)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/*
   Se redujo el padding y el margen para que el skeleton no ocupe tanto
   espacio vertical cuando sÃ³lo representa una lÃ­nea de texto. AdemÃ¡s,
   se mantiene la animaciÃ³n shimmer y el borde institucional.
*/
.comment-skeleton {
    position: relative;
    overflow: hidden;
    animation: skeleton-enter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    margin-bottom: 0.75rem;
    /* reducciÃ³n del espacio inferior */
    padding: 0;
    border-radius: 12px;
    /* ligeramente menos redondeado */
    background: #fafbfc;
    border: 1.5px solid #e5e9f0;
    border-left: 5px solid;
    border-left-color: #6f42c1;
    box-shadow:
        0 3px 12px rgba(111, 66, 193, 0.07),
        0 1px 3px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

/* â”€â”€ Overlay shimmer amplificado â”€â”€ */
.comment-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
            transparent 30%,
            rgba(255, 255, 255, 0.6) 45%,
            rgba(255, 255, 255, 0.9) 50%,
            rgba(255, 255, 255, 0.6) 55%,
            transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
    border-radius: 14px;
}

/* â”€â”€ Gradiente base de las lÃ­neas + badge â”€â”€ */
.comment-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(200, 195, 220, 0.08) 0%,
            rgba(111, 66, 193, 0.04) 50%,
            rgba(200, 195, 220, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
    border-radius: 14px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   HEADER - Badge vibrante
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* Header del skeleton: se reduce el padding para que sea mÃ¡s compacto */
.comment-skeleton-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.75rem 0.2rem;
    position: relative;
    z-index: 2;
}

.comment-skeleton-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 100px;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 50%, #f3e8ff 100%);
    background-size: 200% 100%;
    animation:
        skeleton-shimmer 2s ease-in-out infinite,
        skeleton-pulse 2.5s ease-in-out infinite;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5b21b6;
    letter-spacing: 0.01em;
    border: 1px solid rgba(111, 66, 193, 0.15);
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.10);
    position: relative;
    z-index: 2;
}

.comment-skeleton-badge i {
    font-size: 0.9rem;
    color: #6f42c1;
    filter: drop-shadow(0 1px 2px rgba(111, 66, 193, 0.3));
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BODY - LÃ­neas shimmer con gradiente
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* Body del skeleton: padding reducido */
.comment-skeleton-body {
    padding: 0.2rem 0.75rem 0.4rem;
    position: relative;
    z-index: 2;
}

/* LÃ­neas del skeleton: altura ligeramente menor y margen compacto */
.comment-skeleton-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8e6f0 25%, #d6d2e6 50%, #e8e6f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s ease-in-out infinite;
    margin-bottom: 0.4rem;
    position: relative;
    overflow: hidden;
}

/* â”€â”€ Mini brillo interno en cada lÃ­nea â”€â”€ */
.comment-skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 30%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border-radius: 8px;
}

.comment-skeleton-line.short {
    width: 35%;
}

.comment-skeleton-line.medium {
    width: 58%;
}

.comment-skeleton-line.long {
    width: 78%;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FOOTER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.comment-skeleton-footer {
    padding: 0.15rem 1.25rem 1rem;
    position: relative;
    z-index: 2;
}

.comment-skeleton-footer .comment-skeleton-line {
    height: 9px;
    width: 25%;
    margin-bottom: 0;
    border-radius: 6px;
}









@keyframes skeletonPulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Loader para el botÃ³n de submit del formulario de comentarios */
.jd-btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.jd-btn-submit .spinner-loading {
    display: none;
}

.jd-btn-submit.loading .spinner-loading {
    display: inline-block;
}

.jd-btn-submit.loading .btn-text-normal {
    display: none;
}

.jd-btn-submit .btn-text-normal {
    display: inline;
}

/* COMENTADO 09/06/2026 - HU-011.12: Clases Alpine sin uso tras refactor a classList.toggle
   No se eliminan para mantener trazabilidad historica (regla de oro: no borrar codigo existente).
   Si en el futuro se quiere volver a transiciones con Alpine, basta con descomentar.
.jd-replies {
    overflow: hidden;
}

.jd-transition {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.jd-transition-start {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
}

.jd-transition-end {
    opacity: 1;
    transform: translateY(0) scale(1);
}
*/

/* ==========================================================================
   3. ZOOM DE IMÃGENES (excluye imÃ¡genes dentro de slides)
   ========================================================================== */
.blog-content img:not(.slides-container img) {
    cursor: zoom-in !important;
    transition: transform 220ms ease;
    position: relative;
    z-index: 5;
    pointer-events: all !important;
}

.blog-content img:not(.slides-container img):hover {
    transform: scale(1.01);
}

/* Las imÃ¡genes dentro de slides NO deben tener zoom ni lupa */
.slides-container .slide img {
    cursor: default !important;
    pointer-events: auto !important;
    transition: none;
    transform: none;
}

#image-zoom-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 95vw;
    max-height: 95vh;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    animation: modalIn 250ms ease;
}

#image-zoom-modal::backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

#image-zoom-modal img {
    display: block;
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox animaciones */
@keyframes lightbox-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lightbox-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spinner de carga mientras se descarga la imagen del modal */
.modal-lightbox-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    z-index: 100001;
}

.modal-lightbox-spinner.show {
    display: block;
}

/* Wrapper del contenido del modal */
.modal-lightbox-wrapper {
    position: relative;
    padding: 4rem 1rem 1rem 1rem;
}

/* Botones de navegación del lightbox */
.modal-lightbox-close,
.modal-lightbox-prev,
.modal-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-lightbox-close {
    top: 1rem;
    right: 1rem;
    transform: none;
}

.modal-lightbox-prev {
    left: 1rem;
    transform: translateY(-50%);
}

.modal-lightbox-next {
    right: 1rem;
    transform: translateY(-50%);
}

.modal-lightbox-close:hover,
.modal-lightbox-prev:hover,
.modal-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

.modal-lightbox-close:focus-visible,
.modal-lightbox-prev:focus-visible,
.modal-lightbox-next:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
}

.modal-lightbox-prev.hidden,
.modal-lightbox-next.hidden {
    display: none;
}

/* Contador de imágenes */
.modal-lightbox-counter {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    display: none;
    z-index: 100001;
}

.modal-lightbox-counter.show {
    display: block;
}

#image-zoom-modal[open] .modal-lightbox-wrapper {
    animation: lightbox-scale-in 0.3s ease-out;
}

/* ==========================================================================
    4. BARRA LATERAL FLOTANTE (Reacciones)
    ========================================================================== */
.floating-reaction-bar {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    transition: opacity 0.3s ease;
}


.floating-reaction-bar .d-flex {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* ==========================================================================
   5. BARRA FLOTANTE DERECHA (NavegaciÃ³n)
   ========================================================================== */
.floating-right-nav {
    z-index: 99999;
    transition: opacity 0.3s ease;
    width: 114px;
}

.float-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.float-nav-btn:hover {
    background: #6f42c1;
    color: #fff;
    border-color: #6f42c1;
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(111, 66, 193, 0.3);
}

.float-nav-btn i {
    font-size: 1rem;
}

/* ==========================================================================
   6. BARRA DE PROGRESO DE LECTURA
   ========================================================================== */
.reading-progress-bar {
    position: fixed;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    z-index: 1000;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.reading-progress-bar.visible {
    opacity: 1;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #6f42c1, #e84a5f);
    width: 0%;
    transition: width 0.2s ease;
}

/* ==========================================================================
   7. RESPONSIVE - OCULTAR BARRAS EN MÃ“VIL
   ========================================================================== */
@media (max-width: 1024px) {
    .floating-reaction-bar {
        display: none !important;
    }

    .floating-right-nav {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        left: auto !important;
        transform: none !important;
        z-index: 99999 !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
    }

    .floating-right-nav .float-nav-btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    .floating-right-nav .float-nav-btn .d-none {
        display: inline !important;
    }

    .floating-right-nav .float-nav-btn .d-lg-block {
        display: none !important;
    }
}

/* ==========================================================================
   8. HEADER DEL ARTÃCULO
   ========================================================================== */
.jd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 1.5px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.jd-back-link:hover {
    color: #6f42c1;
    border-bottom-color: #6f42c1;
    text-decoration: none;
}

.jd-article-header {
    padding-bottom: 0;
}

.jd-article-title {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: #111827;
    margin-bottom: 1.5rem;
}

.jd-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.jd-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
}

.jd-meta-item i {
    font-size: 0.85rem;
    color: #9ca3af;
}

.jd-meta-divider {
    width: 1px;
    height: 20px;
    background: #e5e7eb;
}

.jd-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.jd-author-name {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.2;
}

.jd-author-role {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.2;
}

.jd-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.jd-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1.5px solid;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.jd-tag:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.jd-tag i {
    font-size: 0.7rem;
}

.jd-header-rule {
    height: 1.5px;
    background: linear-gradient(to right, #6f42c1 0%, #e84a5f 40%, transparent 100%);
    border: none;
    margin-top: 1.5rem;
    margin-bottom: 0;
    border-radius: 2px;
}

/* ==========================================================================
   9. COMPARTIR
   ========================================================================== */
.jd-share-section {
    margin: 3rem 0 2.5rem;
}

.jd-share-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.jd-share-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.jd-share-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.jd-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.jd-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jd-share-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.jd-share-btn i {
    font-size: 0.9rem;
}

.jd-share-linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
    color: #fff;
    box-shadow: 0 4px 16px rgba(10, 102, 194, 0.3);
}

.jd-share-x:hover {
    background: #111;
    border-color: #111;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.jd-share-email:hover {
    background: #ea4335;
    border-color: #ea4335;
    color: #fff;
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.3);
}

.jd-share-copy:hover {
    background: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
    box-shadow: 0 4px 16px rgba(111, 66, 193, 0.3);
}

.jd-share-whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   10. REACCIONES
   ========================================================================== */
.jd-reactions-section {
    background: #fafafa;
    border: 1.5px solid #f0e6ff;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 2.5rem 0;
    text-align: center;
}

.jd-reactions-label {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.25rem;
}

.jd-reactions-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.jd-reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.jd-reaction-btn:hover {
    transform: translateY(-3px);
    border-color: #6f42c1;
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.15);
}

.jd-reaction-btn.active {
    border-color: #6f42c1;
    background: #f5f0ff;
}

.jd-reaction-icon {
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.jd-reaction-btn:hover .jd-reaction-icon {
    transform: scale(1.2);
}

.jd-reaction-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
}

.jd-reaction-count {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}

/* ==========================================================================
   11. FOOTER DEL ARTÃCULO
   ========================================================================== */
.jd-article-footer {
    padding: 1.5rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.jd-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.jd-btn-back:hover {
    background: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(111, 66, 193, 0.25);
}

/* ==========================================================================
   12. SECCIÃ“N COMENTARIOS
   ========================================================================== */
.jd-comments-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1.5px solid #f3f4f6;
}

.jd-comments-header {
    margin-bottom: 1.75rem;
}

.jd-comments-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jd-comments-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.jd-comments-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #f0e6ff;
    color: #6f42c1;
    border-radius: 100px;
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- FORMULARIO --- */
.jd-comment-form-wrapper {
    margin-bottom: 2.5rem;
}

.jd-form-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s ease;
}

.jd-form-card:focus-within {
    border-color: #c4a8f5;
    box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.06);
}

.jd-form-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.jd-form-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.jd-form-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.jd-form-user-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.jd-form-user-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: #9ca3af;
}

.jd-form-lock-icon {
    font-size: 0.75rem;
    color: #d1d5db;
    margin-left: auto;
}

.jd-textarea-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.jd-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e5e7eb;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    background: #fafafa;
    color: #1f2937;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-height: 100px;
}

.jd-textarea:focus {
    background: #fff;
    border-color: #c4a8f5;
}

.jd-textarea::placeholder {
    color: #c1c7d0;
}

.jd-textarea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 10px 10px;
}

.jd-char-count,
.jd-reply-char-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: #c1c7d0;
}

.jd-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.01em;
}

.jd-btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.jd-btn-submit:active {
    transform: scale(0.97);
}

.jd-form-error {
    color: #e84a5f;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-family: 'DM Sans', sans-serif;
}

/* --- INVITACIÃ“N LOGIN --- */
.jd-login-invite {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fafafa;
    border: 1.5px dashed #e5e7eb;
    border-radius: 16px;
    transition: border-color 0.2s ease;
}

.jd-login-invite:hover {
    border-color: #c4a8f5;
}

/* ---------------------------------------------------------------
   Back to Top button (global styles)
   --------------------------------------------------------------- */
/* Base style: hidden by default */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 48px;
    height: 48px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
    z-index: 1000;
}

/* Visible when the .show class is added via JS */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Hover effect */
.back-to-top:hover {
    background-color: #555;
}

.jd-login-invite-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0e6ff;
    color: #6f42c1;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.jd-login-invite-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.4rem;
}

.jd-login-invite-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.jd-login-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.jd-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.jd-login-btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    text-decoration: none;
}

.jd-btn-google {
    background: #4285F4;
    color: #fff;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.25);
}

.jd-btn-google:hover {
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.35);
    color: #fff;
}

.jd-btn-github {
    background: #24292e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.jd-btn-github:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* --- DIVIDER: "o" entre botones sociales y login tradicional --- */
.jd-login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.75rem 0;
    padding: 0 2rem;
}

.jd-login-divider-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.jd-login-divider-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 500;
}

html[data-reading-mode="dark"] .jd-login-divider-line {
    background: #374151;
}

html[data-reading-mode="dark"] .jd-login-divider-text {
    color: #6b7280;
}

/* --- BOTÃ“N LOGIN TRADICIONAL --- */
.jd-btn-traditional {
    background: #374151;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.25rem;
}

.jd-btn-traditional:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #fff;
    background: #1f2937;
}

html[data-reading-mode="dark"] .jd-btn-traditional {
    background: #4b5563;
}

html[data-reading-mode="dark"] .jd-btn-traditional:hover {
    background: #6b7280;
}

/* --- SIN MARGEN EN FOOTER CUANDO HAY BOTÃ“N TRADICIONAL --- */
.jd-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #9ca3af;
}

.jd-login-footer i {
    color: #6f42c1;
    font-size: 0.8rem;
}

/* --- LISTA DE COMENTARIOS --- */
.jd-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.jd-comment {
    display: flex;
    gap: 14px;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f9fafb;
    animation: jdCommentIn 0.4s ease both;
}

@keyframes jdCommentIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jd-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.jd-comment-body {
    flex: 1;
    min-width: 0;
}

.jd-comment-bubble {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 0 14px 14px 14px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s ease;
}

.jd-comment-bubble:hover {
    border-color: #e5e7eb;
}

.jd-comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.jd-comment-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.jd-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
}

.jd-badge-anon {
    background: #f3f4f6;
    color: #6b7280;
}

.jd-badge-identified {
    background: #dbeafe;
    color: #1d4ed8;
}

.jd-badge-registered {
    background: #dcfce7;
    color: #15803d;
}

.jd-badge-admin {
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    color: #fff;
}

.jd-comment-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: #c1c7d0;
    margin-left: auto;
}

.jd-comment-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
    margin: 0;
}

/* --- Acciones del comentario --- */
.jd-comment-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.jd-comment-reactions {
    display: flex;
    gap: 4px;
}

.jd-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid #f0f0f0;
    background: transparent;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #9ca3af;
    transition: all 0.15s ease;
}

.jd-react-btn:hover {
    background: #f5f0ff;
    border-color: #c4a8f5;
    color: #6f42c1;
}

.jd-react-btn.active {
    background: #f0e6ff;
    border-color: #c4a8f5;
    color: #6f42c1;
    font-weight: 600;
}

.jd-react-btn i {
    font-size: 0.78rem;
}

.jd-reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #fefefe;
    margin-left: auto;
    transition: color 0.15s ease;
}

.jd-reply-toggle:hover {
    color: #e3e1e8;
    border: 1px solid #7268e6;
}

/* --- Reply inline form --- */
.jd-inline-reply {
    margin-top: 0.75rem;
    animation: jdCommentIn 0.25s ease both;
}

.jd-inline-reply-inner {
    border: 1.5px solid #c4a8f5;
    border-radius: 10px;
    background: #faf5ff;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jd-reply-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5d8ff;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    background: #fff;
    color: #1f2937;
    resize: none;
    outline: none;
    min-height: 60px;
    transition: border-color 0.15s ease;
}

.jd-reply-textarea:focus {
    border-color: #6f42c1;
}

.jd-reply-textarea::placeholder {
    color: #c1c7d0;
}

.jd-inline-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.jd-btn-cancel-reply {
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid #e5e7eb;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jd-btn-cancel-reply:hover {
    background: #f3f4f6;
}

.jd-btn-send-reply {
    padding: 6px 14px;
    border-radius: 100px;
    border: none;
    background: #6f42c1;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jd-btn-send-reply:hover {
    background: #5a32a3;
}

/* --- Respuestas anidadas --- */
.jd-replies {
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid #f0e6ff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* HU-011.12 - Estado abierto del toggle de respuestas
   (sobrescribe el style='display:none' inline del HTML cuando JS anade la clase .is-open)
   Mantiene el display:flex para preservar el flex-direction: column del contenedor padre. */
.jd-replies.is-open {
    display: flex;
}


.jd-reply {
    display: flex;
    gap: 10px;
}

.jd-reply-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    flex-shrink: 0;
}

.jd-reply-bubble {
    flex: 1;
    background: #f9fafb;
    border-radius: 0 10px 10px 10px;
    padding: 0.65rem 0.9rem;
    border: 1px solid #f0f0f0;
}

.jd-reply-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.jd-reply-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #111827;
}

.jd-reply-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: #c1c7d0;
    margin-left: auto;
}

.jd-reply-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
}

/* --- Estado vacÃ­o --- */
.jd-comments-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.jd-comments-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #d1d5db;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.jd-comments-empty-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.25rem;
}

.jd-comments-empty-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

/* --- End marker --- */
.jd-comments-end {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1.75rem 0 0.5rem;
    color: #d1d5db;
}

.jd-comments-end-line {
    flex: 1;
    height: 1px;
    background: #f3f4f6;
}

.jd-comments-end-icon {
    font-size: 0.85rem;
    color: #6f42c1;
}

.jd-comments-end-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #c1c7d0;
    font-weight: 500;
    white-space: nowrap;
}

/* PATCH NOTE: Updated task progress */

/* ==========================================================================
   13. RESPONSIVE MÃ“VIL
   ========================================================================== */
@media (max-width: 767px) {
    .blog-content p img {
        max-width: 100%;
        height: auto;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .jd-article-meta {
        gap: 0.75rem;
    }

    .jd-meta-divider {
        display: none;
    }

    .jd-share-buttons {
        gap: 6px;
    }

    .jd-share-btn span {
        display: none;
    }

    .jd-share-btn {
        padding: 9px 14px;
    }

    .jd-reactions-grid {
        gap: 8px;
    }

    .jd-reaction-btn {
        min-width: 70px;
        padding: 10px 12px;
    }

    /* .jd-comment-date was hidden; now show it */
    .jd-comment-date {
        display: inline-block;
        /* optional styling can be added here */
    }

    .jd-reply-date {
        display: none;
    }
}

/* ==========================================================================
   13.1. BOTÃ“N ELIMINAR COMENTARIO (solo superuser)
   ========================================================================== */
.jd-del-comment-btn {
    background: transparent;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1;
    margin-left: auto;
}

.jd-del-comment-btn:hover {
    color: #dc2626;
    background: #fee2e2;
}

/* ==========================================================================
   14. VISUAL LAYOUT - LÃ­neas verticales decorativas (bloques [vl])
   ========================================================================== */

/* LÃ­nea vertical completa - sutil */
.vl-full {
    position: relative;
    margin: 1.5rem 0;
    padding-left: 16px;
}

.vl-full::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #6f42c1, #e84a5f);
    border-radius: 1px;
}

/* LÃ­nea vertical limitada - altura fija */
.vl-limited {
    position: relative;
    padding-left: 12px;
}

.vl-limited::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #6f42c1, #e84a5f);
    border-radius: 1px;
}

/* Bloque resaltado con barra vertical */
.vl-highlight {
    position: relative;
    padding-left: 12px;
    margin: 1rem 0;
    background: #fafafa;
    border-left: 2px solid #6f42c1;
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1rem;
}

/* Punto decorativo al inicio del pÃ¡rrafo */
.vl-bullet {
    display: inline-block;
    margin-left: 12px;
    position: relative;
    padding-left: 12px;
}

.vl-bullet::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #6f42c1, #e84a5f);
    border-radius: 50%;
}







/* ==========================================================================
   YOUTUBE VIDEO MOSAIC COMPONENT
   ========================================================================== */

/* Contenedor del mosaico de video */
.youtube-mosaic {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #000;
}

/* Efecto hover */
.youtube-mosaic:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Imagen de miniatura */
.youtube-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Zoom suave en hover */
.youtube-mosaic:hover img {
    transform: scale(1.05);
}

/* Overlay de reproducciÃ³n */
.youtube-mosaic .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mostrar overlay en hover */
.youtube-mosaic:hover .play-overlay {
    opacity: 1;
}

/* Icono de reproducciÃ³n */
.youtube-mosaic .play-icon {
    font-size: 3rem;
    color: #ff0000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
}

/* Texto opcional debajo del mosaico */
.youtube-mosaic .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    backdrop-filter: blur(4px);
}

/* AnimaciÃ³n de pulso para el icono */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* VersiÃ³n compacta para uso inline */
.youtube-mosaic.compact {
    max-width: 320px;
    aspect-ratio: 16 / 9;
}

.youtube-mosaic.compact .play-icon {
    font-size: 2.5rem;
}

/* VersiÃ³n pequeÃ±a para grids */
.youtube-mosaic.small {
    max-width: 240px;
    aspect-ratio: 16 / 9;
}

.youtube-mosaic.small .play-icon {
    font-size: 2rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .youtube-mosaic {
        max-width: 100%;
    }

    .youtube-mosaic.compact,
    .youtube-mosaic.small {
        max-width: 100%;
    }
}







.jd-pending-reply {
    padding: 10px 14px;
    background: #fffbeb;
    border-radius: 8px;
    margin-left: 30px;
    border: 1px solid #fde68a;
    animation: fadeIn 400ms ease;
}

.jd-pending-reply .sk-comment-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jd-pending-reply .sk-comment-content .sk-comment-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #c1c6ce;
    animation: pulse 1.5s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}

.jd-pending-reply .sk-comment-content .sk-comment-body {
    flex: 1;
    gap: 6px;
}

.jd-pending-reply .sk-comment-content .sk-comment-body .sk-line {
    height: 10px;
    width: 180px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f3f4f6 50%, #e0e0e0 75%);
    border-radius: 4px;
    animation: pulse 1.5s ease infinite;
}

.jd-pending-reply .sk-comment-content .sk-comment-body .sk-line {
    position: relative;
    overflow: hidden;

    height: 10px;
    width: 180px;
    border-radius: 4px;

    background: #e5e7eb;
}

.jd-pending-reply .sk-comment-content .sk-comment-body .sk-line::after {
    content: '';

    position: absolute;
    top: 0;
    left: -150px;

    width: 150px;
    height: 100%;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, .6),
            transparent);

    animation: shimmer_response 1.2s infinite;
}

.jd-pending-reply .sk-comment-content .sk-comment-body .sk-line:nth-child(2) {
    width: 110px;
}

.jd-pending-reply .sk-comment-content span {
    font-size: 1rem;
    color: #5d6673;
    white-space: nowrap;
}

.jd-pending-reply .sk-comment-content .sk-comment-avatar {
    position: relative;
    overflow: hidden;

    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;

    background: #e5e7eb;
}

.jd-pending-reply .sk-comment-content .sk-comment-avatar::after {
    content: '';

    position: absolute;
    top: 0;
    left: -100px;

    width: 100px;
    height: 100%;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, .7),
            transparent);

    animation: shimmer_response 1.2s infinite;
}


@keyframes shimmer_response {
    100% {
        transform: translateX(350px);
    }
}



















/* =========================================
   ðŸŽ¨ MODOS DE LECTURA
   ========================================= */

/* --- MODO SEPIA (Lectura claro) --- */
html[data-reading-mode="sepia"] body.home-p.blog-detail-page {
    background: #faf0e6 !important;
}

html[data-reading-mode="sepia"] .card.border-0.shadow-sm {
    background: #fdf6ee !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

html[data-reading-mode="sepia"] .blog-content {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #3d2e1e;
    max-width: 780px;
    margin: 0 auto;
}

html[data-reading-mode="sepia"] .blog-content p {
    margin-bottom: 1.5rem;
}

html[data-reading-mode="sepia"] .blog-content h2,
html[data-reading-mode="sepia"] .blog-content h3,
html[data-reading-mode="sepia"] .blog-content h4 {
    color: #2d1f0e;
}

html[data-reading-mode="sepia"] .jd-article-header h1 {
    color: #2d1f0e;
}

html[data-reading-mode="sepia"] .jd-article-meta {
    opacity: 0.7;
}

html[data-reading-mode="sepia"] .jd-tags-row,
html[data-reading-mode="sepia"] .category-badge {
    opacity: 0.75;
}

html[data-reading-mode="sepia"] .reading-mode-toggle {
    border-color: #d4a373;
    color: #8b5e3c;
    background: rgba(253, 246, 238, 0.9);
}

html[data-reading-mode="sepia"] .reading-mode-toggle:hover {
    border-color: #8b5e3c;
    color: #5a3d28;
}

/* --- MODO OSCURO --- */
html[data-reading-mode="dark"] body.home-p.blog-detail-page {
    background: #1a1a2e !important;
}

html[data-reading-mode="dark"] .card.border-0.shadow-sm {
    background: #16213e !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3) !important;
}

html[data-reading-mode="dark"] .blog-content {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #e2e8f0;
    max-width: 780px;
    margin: 0 auto;
}

html[data-reading-mode="dark"] .jd-article-meta {
    span {
        color: rgba(255, 255, 255, 0.8);
    }
}

html[data-reading-mode="dark"] .blog-content p {
    margin-bottom: 1.5rem;
}

html[data-reading-mode="dark"] .blog-content h2,
html[data-reading-mode="dark"] .blog-content h3,
html[data-reading-mode="dark"] .blog-content h4 {
    color: #f1f5f9;
}

html[data-reading-mode="dark"] .blog-content a {
    color: #93c5fd;
}

html[data-reading-mode="dark"] .blog-content code,
html[data-reading-mode="dark"] .blog-content pre {
    background: #0f3460 !important;
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .blog-content blockquote {
    border-left-color: #6366f1;
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-article-header h1 {
    color: #f1f5f9;
}

/* Texto de metadatos mÃ¡s claro en modo oscuro */
html[data-reading-mode="dark"] .jd-article-meta {
    opacity: 0.9;
    /* casi blanco */
    color: #f5f5f5 !important;
}

html[data-reading-mode="dark"] .jd-tags-row,
html[data-reading-mode="dark"] .category-badge {
    opacity: 0.7;
}

html[data-reading-mode="dark"] .reading-mode-toggle {
    border-color: #4f46e5;
    color: #a5b4fc;
    background: rgba(22, 33, 62, 0.9);
}

html[data-reading-mode="dark"] .reading-mode-toggle:hover {
    border-color: #818cf8;
    color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

html[data-reading-mode="dark"] .jd-back-link,
html[data-reading-mode="dark"] .jd-back-link span {
    color: #93c5fd;
}

html[data-reading-mode="dark"] .jd-share-section .jd-share-text {
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-share-btn {
    color: #94a3b8;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-share-btn:hover {
    color: #e2e8f0;
    border-color: #64748b;
}

html[data-reading-mode="dark"] .jd-reactions-label {
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-reaction-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-reaction-btn .jd-reaction-count {
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-reaction-btn .jd-reaction-name {
    color: #94a3b8;
}

/* MODO OSCURO: Correcciones de contraste */
html[data-reading-mode="dark"] .jd-comments-title {
    color: #f1f5f9;
}

html[data-reading-mode="dark"] .jd-comments-badge {
    background: rgba(111, 66, 193, 0.3);
    color: #c4b5fd;
}

html[data-reading-mode="dark"] .jd-form-card {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-form-user-name {
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-comment-bubble {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-comment-name {
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-comment-text {
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-btn-back {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-reactions-section {
    background: #1e293b;
    border-color: #334155;
}

/* DARK FIXES */
html[data-reading-mode="dark"] .jd-comments-title {
    color: #f1f5f9;
}

html[data-reading-mode="dark"] .jd-form-card {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-comment-bubble {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-comment-name {
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-comment-text {
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-comment-date {
    color: #64748b;
}

html[data-reading-mode="dark"] .jd-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-btn-back {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-reading-mode="dark"] .jd-btn-back:hover {
    background: #6f42c1;
    color: #fff;
}

html[data-reading-mode="dark"] .jd-reactions-section {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-login-invite {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="dark"] .jd-login-invite-title {
    color: #e2e8f0;
}

html[data-reading-mode="dark"] .jd-login-invite-text {
    color: #94a3b8;
}

html[data-reading-mode="dark"] .vl-highlight {
    background: inherit;
}
















/* ==========================================================================
   4. REPRODUCTOR DE VIDEO BLOG - Estilos atractivos y responsive
   ==========================================================================
   Contenedor estilizado con sombra, bordes redondeados y controles nativos.
   Los videos se muestran con un caption debajo y hover sutil.
   ========================================================================== */

/* â”€â”€ Contenedor principal del video â”€â”€ */
.blog-video-container {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a0a;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-video-container:hover {
    box-shadow:
        0 12px 48px rgba(111, 66, 193, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* â”€â”€ Wrapper interno â”€â”€ */
.blog-video-wrapper {
    position: relative;
    width: 100%;
}

/* â”€â”€ Reproductor de video - responsive y aspect ratio 16:9 â”€â”€ */
.blog-video-player {
    display: block;
    width: 100%;
    height: auto;
    max-height: 65vh;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 16px 16px 0 0;
}

/* â”€â”€ Controles del video - personalizaciÃ³n sutil â”€â”€ */
.blog-video-player::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.blog-video-player::-webkit-media-controls-play-button {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.blog-video-player::-webkit-media-controls-timeline {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* â”€â”€ Caption / TÃ­tulo del video â”€â”€ */
.blog-video-caption {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
    border-top: 1px solid rgba(111, 66, 193, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-video-caption::before {
    content: '-';
    font-size: 1rem;
    flex-shrink: 0;
}

.blog-video-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* â”€â”€ Focus visible para accesibilidad â”€â”€ */
.blog-video-player:focus-visible {
    outline: 3px solid #6f42c1;
    outline-offset: 2px;
    border-radius: 16px 16px 0 0;
}























/* â”€â”€ RESPONSIVE: Mobile â”€â”€ */
@media (max-width: 767px) {
    .blog-video-container {
        border-radius: 12px;
        margin: 1rem 0;
    }

    .blog-video-player {
        border-radius: 12px 12px 0 0;
        max-height: 50vh;
    }

    .blog-video-caption {
        padding: 0.6rem 1rem;
    }

    .blog-video-title {
        font-size: 0.82rem;
    }

    .blog-video-player:focus-visible {
        border-radius: 12px 12px 0 0;
    }

    .jd-comments-list {
        .jd-comment {
            flex-direction: column;
            padding: 0.5rem 0;
        }
    }
}

/* â”€â”€ RESPONSIVE: Desktop grande â”€â”€ */
@media (min-width: 1200px) {
    .blog-video-container {
        max-width: 900px;
        margin: 2rem auto;
    }

    .blog-video-player {
        max-height: 55vh;
    }
}

/* â”€â”€ Modo lectura oscuro â”€â”€ */
html[data-reading-mode="dark"] .blog-video-container {
    background: #0f172a;
    border-color: #334155;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-reading-mode="dark"] .blog-video-container:hover {
    box-shadow:
        0 12px 48px rgba(111, 66, 193, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

html[data-reading-mode="dark"] .blog-video-caption {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top-color: rgba(111, 66, 193, 0.2);
}

html[data-reading-mode="dark"] .blog-video-title {
    color: #e2e8f0;
}




















/* ==========================================================================
   HU-013 FASE 2 â€“ UTILIDADES DE MAQUETACIÃ“N PARA CONTENIDO BLOG
   ========================================================================== */

/* â”€â”€ 1. CALLOUT DANGER + SUCCESS â”€â”€ */
.callout-danger {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.callout-danger .callout-icon {
    color: #dc2626;
}

html[data-reading-mode="dark"] .callout-danger {
    background: #450a0a;
    border-left-color: #ef4444;
}

html[data-reading-mode="sepia"] .callout-danger {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.callout-success {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.callout-success .callout-icon {
    color: #16a34a;
}

html[data-reading-mode="dark"] .callout-success {
    background: #052e16;
    border-left-color: #22c55e;
}

html[data-reading-mode="sepia"] .callout-success {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

/* â”€â”€ 2. GRID UTILITIES (2, 3, 4 columnas) â”€â”€ */
.blog-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.blog-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.blog-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {

    .blog-grid-3,
    .blog-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {

    .blog-grid-2,
    .blog-grid-3,
    .blog-grid-4 {
        grid-template-columns: 1fr;
    }
}

.blog-grid-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}

.blog-grid-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

html[data-reading-mode="dark"] .blog-grid-card {
    background: #1e293b;
    border-color: #334155;
}

html[data-reading-mode="sepia"] .blog-grid-card {
    background: #fefcf5;
    border-color: #e8dcc8;
}

/* â”€â”€ 3. HIGHLIGHT BOXES (theme-aware) â”€â”€ */
.highlight-box {
    background: #f0f4ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.highlight-box::before {
    content: "ðŸ’¡";
    position: absolute;
    top: -10px;
    right: 12px;
    font-size: 1.5rem;
}

.highlight-box-info {
    background: #eff6ff;
    border-color: #93c5fd;
}

.highlight-box-info::before {
    content: "â„¹ï¸";
}

.highlight-box-warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.highlight-box-warning::before {
    content: "âš ï¸";
}

.highlight-box-success {
    background: #f0fdf4;
    border-color: #86efac;
}

.highlight-box-success::before {
    content: "âœ…";
}

html[data-reading-mode="dark"] .highlight-box {
    background: #1e3a5f;
    border-color: #3b82f6;
}

html[data-reading-mode="dark"] .highlight-box-info {
    background: #1e3a5f;
    border-color: #3b82f6;
}

html[data-reading-mode="dark"] .highlight-box-warning {
    background: #451a03;
    border-color: #f59e0b;
}

html[data-reading-mode="dark"] .highlight-box-success {
    background: #052e16;
    border-color: #22c55e;
}

html[data-reading-mode="sepia"] .highlight-box {
    background: #fef7e8;
    border-color: #d4a574;
}

/* â”€â”€ 4. BADGES INLINE â”€â”€ */
.badge-tech {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin: 0.1rem;
}

.badge-success {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin: 0.1rem;
}

.badge-warning {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin: 0.1rem;
}

.badge-danger {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin: 0.1rem;
}

html[data-reading-mode="dark"] .badge-tech {
    background: #1e3a5f;
    color: #93c5fd;
}

html[data-reading-mode="dark"] .badge-success {
    background: #052e16;
    color: #86efac;
}

html[data-reading-mode="dark"] .badge-warning {
    background: #451a03;
    color: #fbbf24;
}

html[data-reading-mode="dark"] .badge-danger {
    background: #450a0a;
    color: #fca5a5;
}

/* â”€â”€ 5. FLEX UTILITIES â”€â”€ */
.flex-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}

.gap-xl {
    gap: 2rem;
}

@media (max-width: 480px) {
    .flex-row {
        flex-direction: column;
    }
}

/* â”€â”€ 6. CODE BLOCK CON HEADER Y BOTÃ“N COPIAR â”€â”€ */
.blog-content pre {
    position: relative;
    border-radius: 12px !important;
    margin: 1.5rem 0 !important;
}

.blog-content pre .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.8rem;
    border-radius: 12px 12px 0 0;
    font-family: 'DM Sans', sans-serif;
}

html[data-reading-mode="dark"] .blog-content pre .code-header {
    background: #0f172a;
}

.blog-content pre .copy-btn {
    background: none;
    border: 1px solid #475569;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.blog-content pre .copy-btn:hover {
    background: #334155;
    color: #e2e8f0;
}

/* complementarios refactorizados desde el HTML: */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal confirmación eliminar */
#jd-confirm-delete-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    animation: modalIn 250ms ease;
}

#jd-confirm-delete-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.jd-confirm-content {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.jd-confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.jd-confirm-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.jd-confirm-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.jd-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.jd-confirm-cancel {
    padding: 10px 24px;
    border-radius: 100px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jd-confirm-cancel:hover {
    background: #f3f4f6;
}

.jd-confirm-delete {
    padding: 10px 24px;
    border-radius: 100px;
    border: none;
    background: #dc2626;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jd-confirm-delete:hover {
    background: #b91c1c;
}

/* ✅ BREADCRUMB */
.jd-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
}

.jd-breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.jd-breadcrumb-item {
    display: flex;
    align-items: center;
    color: #9ca3af;
}

.jd-breadcrumb-item+.jd-breadcrumb-item::before {
    content: "\203A";
    margin-right: 0.5rem;
    color: #d1d5db;
}

.jd-breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.jd-breadcrumb-item a:hover {
    color: #2563eb;
}

.jd-breadcrumb-current {
    color: #374151;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ✅ HU-012: ARTÍCULOS RELACIONADOS — diseño profesional */
.jd-related-section {
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1.5px solid #f3f4f6;
}

.jd-related-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jd-related-title i {
    color: #6f42c1;
    font-size: 1rem;
}

.jd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.jd-related-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.jd-related-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
    border-color: #c4b5fd;
    text-decoration: none;
}

.jd-related-img {
    height: 130px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.jd-related-body {
    padding: .85rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.jd-related-category {
    font-size: .7rem;
    font-weight: 600;
    color: #6f42c1;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: inline-block;
}

.jd-related-card-title {
    font-family: 'Syne', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jd-related-desc {
    font-size: .8rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive: 1 columna en móvil pequeño */
@media (max-width: 480px) {
    .jd-related-grid {
        grid-template-columns: 1fr;
    }

    .jd-related-img {
        height: 160px;
    }
}

/* Responsive: altura de imagen reducida en tablet */
@media (max-width: 767px) {
    .jd-related-img {
        height: 110px;
    }
}

/* ==========================================================================
   2. BLOG CONTENT IMAGES (widget de imagen del editor)
   ==========================================================================
   - .blog-content img  --> selector directo (funciona SIEMPRE, ideal
                            para artículos legacy ya publicados)
   - .blog-content-img  --> clase inyectada por process_images para
                            artículos nuevos o reprocesados
   ========================================================================== */

/* Capa 1 - Selector directo (NO depende de clase inyectada) */
.blog-content img {
    max-width: 85%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Capa 2 - Clase semantica (para personalizacion futura) */
.blog-content-img {
    max-width: 85%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}


/* ==========================================================================
   3. BLOG IMAGE GRID (mosaico de imagenes individuales)
   ==========================================================================
   Generado por blog_detail.js cuando detecta 2+ <p> con solo <img> consecutivos.
   ========================================================================== */
.blog-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 1.5rem 0;
}

.blog-image-grid-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    position: relative;
}

.blog-image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-image-grid-item:hover img {
    transform: scale(1.05);
}

.blog-image-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.blog-image-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .blog-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-image-grid[data-count="1"] {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-image-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5. LIGHTBOX ANIMACIONES (Fase 3)
   ========================================================================== */

/* Animacion de apertura: fade + scale up */
#image-zoom-modal[open] {
    animation: lightbox-fade-in 0.25s ease-out;
}

#image-zoom-modal[open] .modal-lightbox-wrapper {
    animation: lightbox-scale-in 0.3s ease-out;
}

@keyframes lightbox-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lightbox-scale-in {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Transicion al cambiar imagen en el modal */
#image-zoom-content {
    transition: opacity 0.2s ease;
}

#image-zoom-content.loading {
    opacity: 0.4;
}

/* Spinner de carga mientras se descarga la imagen del modal */
.modal-lightbox-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lightbox-spin 0.7s linear infinite;
    z-index: 99;
    display: none;
}

.modal-lightbox-spinner.show {
    display: block;
}

@keyframes lightbox-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Transicion hover en grid mejorada */
.blog-image-grid-item {
    transition: box-shadow 0.3s ease;
}

.blog-image-grid-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   6. QR CODE EN HEADER DEL ARTÍCULO (HU-029)
   ========================================================================== */
.jd-article-header-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.jd-article-header-main {
    flex: 1;
}

.jd-article-qr-container {
    flex-shrink: 0;
}

.jd-article-qr-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #f3f4f6;
    background: #fff;
}

.jd-article-qr-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(111, 66, 193, 0.2);
    border-color: #6f42c1;
}

.jd-article-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.jd-article-qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(111, 66, 193, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 1.5rem;
}

.jd-article-qr-wrapper:hover .jd-article-qr-overlay {
    opacity: 1;
}

/* Responsive: QR al lado de la categoría en móvil (misma fila) */
@media (max-width: 767.98px) {
    .jd-article-header-flex {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .jd-article-qr-container {
        align-self: auto;
    }

    .jd-article-qr-wrapper {
        width: 70px;
        height: 70px;
    }

    .jd-article-header-main {
        flex: 1;
        min-width: 0;
    }
}

/* QR Modal */
#qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

#qr-modal.visible {
    display: flex;
}

#qr-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

#qr-modal-image {
    max-width: 100%;
    max-height: 70vh;
}

#qr-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #6f42c1;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}