/* ==========================================================
   UAD TESTIMONI
   Responsive slider:
   - Desktop: 3 card terlihat
   - Card tengah aktif
   - Card kiri/kanan transparan + border abu-abu
   - Ukuran card proporsional
   - Tablet/mobile otomatis menyesuaikan
   ========================================================== */

.uad-testimoni {
    --uad-testimoni-blue: #0645c7;
    --uad-testimoni-border: #c7c7c7;
    --uad-testimoni-active-border: #174f9a;
    --uad-testimoni-text: #333;
    --uad-testimoni-muted: #c8c8c8;
    --uad-testimoni-star: #ffcf19;

    position: relative;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 72px;
    box-sizing: border-box;
}

.uad-testimoni *,
.uad-testimoni *::before,
.uad-testimoni *::after {
    box-sizing: border-box;
}

.uad-testimoni-viewport {
    width: 100%;
    overflow: hidden;
    padding: 10px 0 16px;
}

.uad-testimoni-track {
    position: relative;
    min-height: 480px;
}

/* ==========================================================
   CARD
   ========================================================== */

.uad-testimoni-card {
    position: absolute;
    top: 0;
    left: 50%;

    width: min(500px, 36%);
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;

    padding: 20px;

    overflow: hidden;

    border: 2px solid var(--uad-testimoni-border);
    border-radius: 20px;

    /* Card aktif putih; card samping akan dibuat transparan */
    background: #fff;

    color: var(--uad-testimoni-text);
    text-align: center;

    box-shadow: none;

    opacity: 0;
    transform: translateX(-50%) scale(.94);

    transition:
        transform .65s cubic-bezier(.22, 1, .36, 1),
        opacity .65s ease,
        background-color .65s ease,
        border-color .65s ease,
        box-shadow .65s ease;

    pointer-events: none;
    z-index: 1;
}

/* ==========================================================
   CARD AKTIF
   ========================================================== */

.uad-testimoni-card.is-active {
    opacity: 1;

    transform:
        translateX(-50%)
        scale(1);

    background: #fff;
    border-color: var(--uad-testimoni-active-border);

    box-shadow:
        0 12px 22px rgba(0, 0, 0, .18);

    z-index: 3;
    pointer-events: auto;
}

/* ==========================================================
   CARD KIRI
   ========================================================== */

.uad-testimoni-card.is-prev {
    opacity: .48;

    transform:
        translateX(calc(-50% - 31vw))
        scale(.94);

    background: rgba(255, 255, 255, .38);
    border-color: #c7c7c7;

    box-shadow: none;

    z-index: 2;
}

/* ==========================================================
   CARD KANAN
   ========================================================== */

.uad-testimoni-card.is-next {
    opacity: .48;

    transform:
        translateX(calc(-50% + 31vw))
        scale(.94);

    background: rgba(255, 255, 255, .38);
    border-color: #c7c7c7;

    box-shadow: none;

    z-index: 2;
}

.uad-testimoni-card.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================
   QUOTE
   ========================================================== */

.uad-testimoni-quote {
    width: 100%;
    height: 32px;

    text-align: left;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 60px;
    font-weight: 900;
    line-height: .82;

    color: #000;

    overflow: hidden;
}

.uad-testimoni-card:not(.is-active) .uad-testimoni-quote {
    color: #b8b8b8;
}

/* ==========================================================
   FOTO
   ========================================================== */

.uad-testimoni-photo {
    width: 105px;
    height: 105px;

    margin: 0 auto 18px;

    border-radius: 50%;
    overflow: hidden;

    background: #e7e7e7;

    flex: 0 0 105px;
}

.uad-testimoni-image,
.uad-testimoni-photo img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    object-fit: cover !important;
    object-position: center center;

    border-radius: 50% !important;
    margin: 0 !important;
}

.uad-testimoni-photo-placeholder {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            135deg,
            #e5e5e5,
            #cfcfcf
        );
}

/* ==========================================================
   TEXT
   ========================================================== */

.uad-testimoni-text {
    min-height: 0;
    max-height: 112px;

    margin: 0 auto 13px;

    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;

    text-align: left;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.uad-testimoni-card:not(.is-active) .uad-testimoni-text {
    color: var(--uad-testimoni-muted);
}

/* ==========================================================
   RATING
   ========================================================== */

.uad-testimoni-rating {
    margin: 0 0 11px;

    font-size: 22px;
    line-height: 1;

    letter-spacing: 0;

    color: var(--uad-testimoni-star);
}

.uad-testimoni-card:not(.is-active) .uad-testimoni-rating {
    opacity: .35;
}

/* ==========================================================
   NAME
   ========================================================== */

.uad-testimoni-name {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.uad-testimoni-position {
    margin-top: 3px;

    font-size: 16px;
    line-height: 1.25;
    font-weight: 500;
}

.uad-testimoni-card:not(.is-active) .uad-testimoni-name,
.uad-testimoni-card:not(.is-active) .uad-testimoni-position {
    color: var(--uad-testimoni-muted);
}

/* ==========================================================
   ARROW
   Ukuran sedang dan proporsional
   ========================================================== */

.uad-testimoni-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;

    width: 40px;
    height: 40px;

    margin-top: -29px;
    padding: 0;

    border: 2px solid #1254c7;
    border-radius: 8px;

    background: #ddd;
    color: #000;

    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;

    text-align: center;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}

.uad-testimoni-arrow:hover {
    background: var(--uad-testimoni-blue);
    color: #fff;
}

.uad-testimoni-arrow:focus-visible {
    outline: 3px solid rgba(6, 69, 199, .35);
    outline-offset: 3px;
}

.uad-testimoni-prev {
    left: 8px;
}

.uad-testimoni-next {
    right: 8px;
}

.uad-testimoni-prev:hover {
    transform: translateX(-3px);
}

.uad-testimoni-next:hover {
    transform: translateX(3px);
}

.uad-testimoni-notice {
    padding: 18px 20px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .uad-testimoni {
        padding: 0 62px;
    }

    .uad-testimoni-track {
        min-height: 445px;
    }

    .uad-testimoni-card {
        width: min(440px, 46%);
        height: 360px !important;
        min-height: 360px !important;
        max-height: 360px !important;

        padding: 20px;
    }

    .uad-testimoni-card.is-prev {
        transform:
            translateX(calc(-50% - 34vw))
            scale(.88);
    }

    .uad-testimoni-card.is-next {
        transform:
            translateX(calc(-50% + 34vw))
            scale(.88);
    }

    .uad-testimoni-text {
        font-size: 17px;
        line-height: 1.6;
    }

    .uad-testimoni-photo {
        width: 96px;
        height: 96px;
        flex-basis: 96px;
    }

    .uad-testimoni-arrow {
        width: 54px;
        height: 54px;

        margin-top: -27px;

        font-size: 40px;
        line-height: 44px;
    }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    .uad-testimoni {
        padding: 0 44px;
    }

    .uad-testimoni-viewport {
        padding-bottom: 10px;
    }

    .uad-testimoni-track {
        min-height: 420px;
    }

    .uad-testimoni-card {
        width: calc(100% - 4px);
        height: 340px !important;
        min-height: 340px !important;
        max-height: 340px !important;

        padding: 20px;

        border-radius: 16px;
    }

    /* Pada mobile hanya card aktif yang tampil */
    .uad-testimoni-card.is-prev,
    .uad-testimoni-card.is-next {
        opacity: 0;

        transform:
            translateX(-50%)
            scale(.94);

        pointer-events: none;
    }

    .uad-testimoni-quote {
        height: 30px;
        font-size: 40px;
    }

    .uad-testimoni-photo {
        width: 80px;
        height: 80px;
        flex-basis: 80px;

        margin-bottom: 16px;
    }

    .uad-testimoni-text {
        min-height: 0;
        max-height: 96px;

        font-size: 12px;
        line-height: 1.55;
    }

    .uad-testimoni-rating {
        font-size: 18px;
    }

    .uad-testimoni-name {
        font-size: 15px;
    }

    .uad-testimoni-position {
        font-size: 13px;
    }

    .uad-testimoni-arrow {
        width: 30px;
        height: 34px;

        margin-top: -25px;

        border-radius: 7px;

        font-size: 28px;
        line-height: 30px;
    }

    .uad-testimoni-prev {
        left: 0;
    }

    .uad-testimoni-next {
        right: 0;
    }
}

/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 420px) {

    .uad-testimoni {
        padding: 0 40px;
    }

    .uad-testimoni-card {
        height: 390px !important;
        min-height: 390px !important;
        max-height: 390px !important;
        padding: 22px 18px 18px;
    }

    .uad-testimoni-track {
        min-height: 400px;
    }

    .uad-testimoni-text {
        font-size: 15px;
    }

    .uad-testimoni-arrow {
        width: 42px;
        height: 46px;

        margin-top: -23px;

        font-size: 31px;
        line-height: 35px;
    }
}

/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .uad-testimoni-card,
    .uad-testimoni-arrow {
        transition: none !important;
    }
}
