/* post-carousel.css */

.post-carousel-section {
    margin-bottom: 40px;
    padding: 20px 0;
}

.post-carousel-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
}

.post-carousel-slider-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    /*max-width: 1600px;*/
    padding: 0px;
}

.post-carousel-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/*NUOVO: Stile per il drag*/
.post-carousel-slider.is-dragging {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

/*Larghezza delle card controllata da CSS*/
.post-carousel-card {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 10px;
    width: 100%;
}
@media (min-width: 768px) {
    .post-carousel-card {
        width: 50%;
    }
}
@media (min-width: 1024px) {
    .post-carousel-card {
        width: 25%; /*4 card visibili */
    }
}

.post-carousel-image {
    width: 100%;
    overflow: hidden;
}

.post-carousel-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.post-carousel-content {
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.post-carousel-card-title {
    font-size: 1.2em;
    margin: 0 0 10px 0;
}

.post-carousel-card-title a {
    text-decoration: none;
    color: inherit;
}
.post-carousel-card-title a:hover {
    color: var(--rosso-primario);
}

.post-carousel-excerpt {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.post-carousel-readmore {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--rosso-primario);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
}

/* Navigazione */
.post-carousel-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    line-height: 1;
}
.post-carousel-nav:hover {
    background-color: var(--rosso-primario);
}

.post-carousel-prev {
    left: 0px;
}

.post-carousel-next {
    right: 0px;
}

.post-carousel-dots {
    text-align: center;
    margin-top: 20px;
}

.post-carousel-dots .dot {
	display: inline-block;
	width: 20px;
	height: 20px;
	margin: 0 5px;
	background-color: #ccc;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
	border: none;
}

.post-carousel-dots .dot.active {
    background-color: var(--rosso-primario);
}
