/* ===== WRAPPER ===== */
.asp-scroll-wrapper {
    overflow: hidden;
    width: 100%;
}

/* ===== CONTAINER FRECCE ===== */
.asp-container {
    position: relative;
    padding: 0 12px;
}

/* ===== SCROLL ORIZZONTALE ===== */
.asp-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    align-items: stretch;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
}

/* ===== CARD ===== */
.asp-card {
    flex: 0 0 calc((100% - 48px) / 3) !important;
    width: calc((100% - 48px) / 3) !important;
    max-width: calc((100% - 48px) / 3) !important;
    min-width: calc((100% - 48px) / 3) !important;
    background: #fff;
    border: 1px solid #e6e6e6;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
    box-sizing: border-box;
}

.asp-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ===== IMMAGINE (FIX ALTEZZA) ===== */
.asp-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f3f3;
    position: relative;
}

.asp-img img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

/* ===== CONTENUTO ===== */
.asp-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ===== TITOLO ALLINEATO ===== */
.asp-body h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
	text-align: justify;
}

/* ===== TESTO ALLINEATO ===== */
.asp-body p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px 0;
    min-height: 84px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== LINK SEMPRE IN BASSO ===== */
.asp-body > a {
    margin-top: auto;
    font-size: 13px;
    color: #2a6ebb;
    text-decoration: none;
    font-weight: 500;
    user-select: none;
}

.asp-body h3 a {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    text-decoration: none;
}

.asp-body h3 a:hover {
    text-decoration: underline;
}

.asp-date {
    font-size: 12px;
    color: #6c757d; /* grigio elegante */
    margin-bottom: 6px;
}

/* ===== STATO DRAG ===== */
.asp-scroll.dragging {
    cursor: grabbing;
}

/* ===== FRECCE ===== */
.asp-prev,
.asp-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* hover */
.asp-prev:hover,
.asp-next:hover {
    background: #f5f5f5;
}

/* posizione */
.asp-prev {
    left: -22px;
}

.asp-next {
    right: -22px;
}

/* stato normale */
.asp-prev,
.asp-next {
    background: #fff;
}

/* quando clicchi */
.asp-prev:active,
.asp-next:active {
    background: #e9ecef; /* grigio chiaro elegante */
}

/* quando hanno focus (click/tastiera) */
.asp-prev:focus,
.asp-next:focus {
    outline: none;
    background: #f1f3f5;
}

/* focus accessibile (solo tastiera) */
.asp-prev:focus-visible,
.asp-next:focus-visible {
    outline: 2px solid #6c757d;
    background: #f1f3f5;
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
    .asp-card {
        flex: 0 0 calc((100% - 24px) / 2) !important;
        width: calc((100% - 24px) / 2) !important;
        max-width: calc((100% - 24px) / 2) !important;
        min-width: calc((100% - 24px) / 2) !important;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {

    /* 1 card per volta */
    .asp-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    /* togli frecce */
    .asp-prev,
    .asp-next {
        display: none !important;
    }

    /* scroll più naturale */
    .asp-scroll {
        overflow-x: auto;
        padding: 10px 0;
    }
}

