/**
 * Carousel immagini per articoli blog - Salute a Domicilio Srl
 */

.post-carousel {
    max-width: 820px;
    margin: 2rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    position: relative;
}

.post-carousel-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.post-carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.post-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-carousel-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.5rem;
}

.post-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.9);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.post-carousel-dot:hover,
.post-carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.post-carousel-prev,
.post-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d9488;
    font-size: 1.1rem;
    transition: background 0.3s, color 0.3s;
}

.post-carousel-prev { left: 0.75rem; }
.post-carousel-next { right: 0.75rem; }

.post-carousel-prev:hover,
.post-carousel-next:hover {
    background: #0d9488;
    color: #fff;
}

.post-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.85rem;
    z-index: 1;
}

@media (max-width: 640px) {
    .post-carousel-inner {
        aspect-ratio: 4/3;
    }
    .post-carousel-prev,
    .post-carousel-next {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}
