/*!
 * Medlight — Testimonial Swiper
 * Plugin: Medlight — Testimonial Swiper
 * Sviluppatore: Tribe Value (https://tribevalue.it)
 * Versione: 1.1.0
 *
 * CSS di fallback incluso nel plugin. Se il child theme o un altro plugin
 * forniscono già le stesse regole, questo file può essere disabilitato.
 * Per disabilitare: add_filter( 'medlight_ts_load_css', '__return_false' );
 */

/* ============================================
   ALLINEAMENTO ALTEZZA UGUALE TRA TUTTE LE SLIDE
   ============================================ */

/* Wrapper Swiper: assicura che ogni slide si estenda all'altezza massima */
.medlight-testimonial-widget .testimonial-swiper8 .swiper-wrapper {
    align-items: stretch;
}

/* Singola slide: deve essere flex column, h-full */
.medlight-testimonial-widget .testimonial-swiper8 .swiper-slide {
    height: auto;
    display: flex;
}

/* Card: flex column, occupa tutta l'altezza della slide */
.medlight-testimonial-widget .testimonial-1 {
    padding: 50px;
    width: 100%;
    background-color: #F6F6F6;
    position: relative;
    display: flex;
    flex-direction: column;
}
@media (max-width: 1199px) { .medlight-testimonial-widget .testimonial-1 { padding: 35px; } }
@media (max-width: 575px)  { .medlight-testimonial-widget .testimonial-1 { padding: 25px; } }

.medlight-testimonial-widget .testimonial-1::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background-image: url('data:image/svg+xml,<svg width="80" height="60" viewBox="0 0 80 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 0V60L30 30V0H0Z" fill="%236e9ed4"/><path d="M50 0V60L80 30V0H50Z" fill="%236e9ed4"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    width: 80px;
    height: 60px;
    bottom: 10%;
    right: 10%;
    z-index: 0;
}
@media (max-width: 575px) {
    .medlight-testimonial-widget .testimonial-1::after {
        width: 40px; height: 40px; bottom: 0; right: 2%;
    }
}

.medlight-testimonial-widget .testimonial-head {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.medlight-testimonial-widget .testimonial-head .title {
    margin: 0;
    font-size: 22px;
}
@media (max-width: 575px) {
    .medlight-testimonial-widget .testimonial-head .title { font-size: 20px; }
    .medlight-testimonial-widget .testimonial-head { margin-bottom: 10px; }
}

/* Blocco centrale: cresce per riempire lo spazio disponibile,
   così le card sono tutte alte uguali e nome/posizione finiscono in fondo */
.medlight-testimonial-widget .testimonial-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.medlight-testimonial-widget .testimonial-info .testimonial-text {
    margin-bottom: 0;
}
.medlight-testimonial-widget .testimonial-info .testimonial-text p {
    font-size: 16px;
    color: #000;
    opacity: 0.8;
    margin: 0;
}
@media (max-width: 1199px) {
    .medlight-testimonial-widget .testimonial-info .testimonial-text p { font-size: 16px; }
}
@media (max-width: 575px) {
    .medlight-testimonial-widget .testimonial-info .testimonial-text p { font-size: 16px; }
}

/* Nome + posizione: sempre in fondo alla card (anche se il testo è corto) */
.medlight-testimonial-widget .testimonial-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-top: auto;
    padding-top: 55px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
@media (max-width: 1199px) {
    .medlight-testimonial-widget .testimonial-detail { padding-top: 35px; }
}
@media (max-width: 575px) {
    .medlight-testimonial-widget .testimonial-detail { padding-top: 25px; }
}
.medlight-testimonial-widget .testimonial-detail .testimonial-name {
    font-size: 20px;
    color: #100820;
    margin: 0;
}
.medlight-testimonial-widget .testimonial-detail .testimonial-position {
    color: #666;
    font-size: 14px;
}

.medlight-testimonial-widget .testimonial-rating .star-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 4px;
}
.medlight-testimonial-widget .testimonial-rating .star-list li {
    color: #FFBE17;
}

/* Swiper wrapper */
.medlight-testimonial-widget .testimonial-swiper8.testimonial-wrapper8 {
    padding-bottom: 120px;
    margin-bottom: -120px;
    overflow: hidden;
}
@media only screen and (max-width: 1680px) {
    .medlight-testimonial-widget .testimonial-swiper8.testimonial-wrapper8 {
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

/* ============================================
   ANIMAZIONI DI ENTRATA (regolabili da Elementor)
   ============================================ */

.medlight-testimonial-widget .medlight-anim {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    will-change: opacity, transform;
}

/* fade semplice */
.medlight-testimonial-widget .medlight-anim--fade {
    opacity: 0;
}

/* fade + slide up/down/left/right */
.medlight-testimonial-widget .medlight-anim--fade-up {
    opacity: 0;
    transform: translateY(var(--medlight-distance, 30px));
}
.medlight-testimonial-widget .medlight-anim--fade-down {
    opacity: 0;
    transform: translateY(calc(-1 * var(--medlight-distance, 30px)));
}
.medlight-testimonial-widget .medlight-anim--fade-left {
    opacity: 0;
    transform: translateX(calc(-1 * var(--medlight-distance, 30px)));
}
.medlight-testimonial-widget .medlight-anim--fade-right {
    opacity: 0;
    transform: translateX(var(--medlight-distance, 30px));
}

/* zoom */
.medlight-testimonial-widget .medlight-anim--zoom-in {
    opacity: 0;
    transform: scale(0.85);
}
.medlight-testimonial-widget .medlight-anim--zoom-out {
    opacity: 0;
    transform: scale(1.1);
}

/* stato attivo: transizione inversa (vai a posizione naturale) */
.medlight-testimonial-widget .medlight-anim.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ============================================
   BOTTONE "LEGGI DI PIÙ" / "MOSTRA MENO"
   ============================================ */

.medlight-testimonial-widget .medlight-read-more {
    appearance: none;
    background: none;
    border: 0;
    padding: 4px 0;
    margin-top: 12px;
    font-family: var(--medlight-font-body, 'Poppins', sans-serif);
    font-size: 16px;
    font-weight: 500;
    color: #6e9ed4;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    display: inline-block;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.medlight-testimonial-widget .medlight-read-more:hover {
    color: #5b8fc4;
    border-bottom-color: #5b8fc4;
}
.medlight-testimonial-widget .medlight-read-more:focus-visible {
    outline: 2px solid #6e9ed4;
    outline-offset: 2px;
    border-radius: 2px;
}

.medlight-testimonial-widget .medlight-text-full[hidden] {
    display: none;
}
