.pv-carousel-wrapper { 
    margin-bottom: 30px; 
}

/* =========================
   SLIDER PRINCIPAL
========================= */
.pv-carousel {
    position: relative;
    overflow: hidden;
    min-height: 550px;
    border-radius: 16px;
}

.pv-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
    z-index: 1;
}

.pv-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
    cursor: pointer;
}

.pv-slide img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
}

/* Gradiente verde oscuro sutil sobre la imagen */
.pv-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 70, 15, 0.85) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* =========================
   CAPTION - GRADIENT OVERLAY STYLE
========================= */
.pv-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 50px 50px 40px;
    border-left: none;
    pointer-events: none;
    z-index: 10;
}

.pv-caption h2 {
    margin: 0 0 15px 0;
    font-size: 42px;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    max-width: 85%;
}

/* Metadata (fecha, autor, tiempo de lectura) */
.pv-meta {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-top: 12px;
}

.pv-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pv-meta span::before {
    content: '•';
    font-size: 8px;
}

.pv-meta span:first-child::before {
    display: none;
}

/* =========================
   FLECHAS - MODERNAS
========================= */
.pv-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pv-arrow:hover { 
    background: rgba(0, 157, 33, 0.9);
    border-color: rgba(0, 157, 33, 1);
    transform: translateY(-50%) scale(1.1);
}

.pv-prev { 
    left: 25px; 
}

.pv-next { 
    right: 25px; 
}

/* =========================
   THUMBNAILS - MODERNOS
========================= */
.pv-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.pv-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 16/10;
}

.pv-thumb::before {
    content:"";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 70, 15, 0.8) 0%, 
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    opacity: .85;
    transition: opacity .3s ease;
    pointer-events: none;
}

.pv-thumb:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 157, 33, 0.25);
}

.pv-thumb:hover::before {
    opacity: 0.7;
}

.pv-thumb.active {
    box-shadow: 0 0 0 3px #009D21;
    transform: translateY(-4px);
}

.pv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pv-thumb:hover img {
    transform: scale(1.08);
}

.pv-thumb h4 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-align: left;
    z-index: 2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* =========================
   DOTS - ESTILO MODERNO
========================= */
.pv-dots {
    display: none;
}

/* =========================
   RESPONSIVE - MÓVIL
========================= */
@media (max-width: 768px) {

    /* Ocultamos flechas y thumbnails en móvil */
    .pv-arrow,
    .pv-thumbnails {
        display: none !important;
    }

    /* Mostramos dots modernos */
    .pv-dots {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 16px;
        padding: 0 20px;
    }

    .pv-dot {
        height: 6px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1;
        max-width: 40px;
    }

    .pv-dot.active {
        background: #009D21;
        flex: 1.5;
        max-width: 60px;
        box-shadow: 0 2px 8px rgba(0, 157, 33, 0.4);
    }

    /* APAGAMOS el sistema de posicionamiento absoluto */
    .pv-slide {
        position: static !important;
        inset: auto !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        display: none;
    }

    /* Solo el slide activo se muestra */
    .pv-slide.active {
        display: block;
    }

    /* Imagen móvil */
    .pv-slide img {
        width: 100%;
        height: 50vh;
        max-height: 350px;
        object-fit: cover;
        display: block;
        border-radius: 0;
    }

    /* Gradiente móvil */
    .pv-slide::before {
        display: none;
    }

    /* CAPTION DEBAJO - VERDE OSCURO SUTIL */
    .pv-caption {
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        background: linear-gradient(
            to bottom,
            rgba(0, 70, 15, 0.95) 0%,
            rgba(0, 70, 15, 1) 100%
        );
        padding: 20px 18px 24px;
        border-left: none;
        border-top: 3px solid #43A047;
        max-width: 100%;
    }

    .pv-caption h2 {
        font-size: 22px;
        line-height: 1.3;
        color: #ffffff;
        margin: 0 0 12px 0;
        font-weight: 700;
        max-width: 100%;
        text-shadow: none;
    }

    /* Metadata en móvil */
    .pv-meta {
        font-size: 13px;
        gap: 14px;
        flex-wrap: wrap;
        color: rgba(255, 255, 255, 0.8);
    }

    .pv-meta span {
        font-size: 12px;
    }

    /* El contenedor deja de forzar altura */
    .pv-carousel {
        min-height: auto !important;
        height: auto !important;
        position: relative;
        overflow: visible;
        border-radius: 0;
    }
}

/* =========================
   TABLET - Ajuste thumbnails
========================= */
@media (max-width: 1024px) and (min-width: 769px) {
    .pv-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .pv-caption h2 {
        font-size: 36px;
    }
}

/* =========================
   DESKTOP GRANDE
========================= */
@media (min-width: 1200px) {
    .pv-caption {
        padding: 60px;
    }

    .pv-caption h2 {
        font-size: 48px;
        max-width: 75%;
    }

    .pv-meta {
        font-size: 16px;
        gap: 24px;
    }
}

/* =========================
   ANIMACIONES SUAVES
========================= */
@media (prefers-reduced-motion: no-preference) {
    .pv-slide.active {
        animation: fadeInSlide 0.6s ease-out;
    }

    @keyframes fadeInSlide {
        from {
            opacity: 0;
            transform: scale(1.02);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* =========================
   ACCESIBILIDAD
========================= */
.pv-arrow:focus-visible,
.pv-thumb:focus-visible,
.pv-dot:focus-visible {
    outline: 3px solid #009D21;
    outline-offset: 2px;
}

/* Modo oscuro del sistema (bonus) */
@media (prefers-color-scheme: dark) {
    .pv-carousel-wrapper {
        background: transparent;
    }
}
