.testim {
    width: 100%;
    position: relative;
}
.testim .wrap {
    position: relative;
    width: 100%;
    margin: auto;
}
.testim .arrow {
    display: block;
    position: absolute;
    color: #2c3035;
    cursor: pointer;
    font-size: 2em;
    top: 50%;
    transform: translateY(-50%);
    transition: all .3s ease-in-out;
    padding: 5px;
    z-index: 22222222;
}
.testim .arrow:before {
    cursor: pointer;
}
.testim .arrow:hover {
    color: #ea830e;
}
.testim .arrow.left {
    left: 10px;
}
.testim .arrow.right {
    right: 10px;
}
.testim .dots {
    text-align: center;
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    display: block;
    z-index: 3333;
    height: 12px;
}
.testim .dots .dot {
    list-style-type: none;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f99567;
    border: 1px solid #eee;
    margin: 0 10px;
    cursor: pointer;
    transition: all .5s ease-in-out;
    position: relative;
}
.testim .dots .dot.active,
.testim .dots .dot:hover {
    background: #ea830e;
    border-color: #ea830e;
}
.testim .dots .dot.active {
    //animation: testim-scale .5s ease-in-out forwards;
}
.testim .cont {
    position: relative;
    overflow: hidden;
}
.testim .cont > div {
   text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px 0 70px 0;
    opacity: 0;
    width: 100%;
    visibility: hidden; /* Ẩn các slide không hoạt động */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
.testim .cont > div.inactive {
    opacity: 1;
}
.testim .cont > div.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}
.testim .cont div .img img {
    display: block;
    width: 100px;
    height: 100px;
    margin: auto;
    border-radius: 50%;
}
.testim .cont div h2 {
    color: #ea830e;
    font-size: 1em;
    margin: 15px 0;
}
.testim .cont div .des {
    color: #2c3035;
    font-size: 1em;
    margin: 10px 0;
    opacity: 0; /* Mặc định ẩn */
    transition: opacity 0.5s ease-in-out;
}

.testim .cont div.active .des {
    opacity: 1; /* Hiển thị khi slide active */
}
.testim .cont div h3 {
    color: #2c3035;
    font-size: 1em;
    margin: 10px 0;
    font-weight: normal;
}
.testim .cont div p {
    color: #2c3035;
    width: 80%;
    margin: auto;
    line-height: 1.5;
}
.rating {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}
.star-rating-wrapper {
    position: relative; 
    display: inline-flex; 
}
.back-stars {
    color: #000;
}
.front-stars {
    color: #FFBC0B;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden; 
    white-space: nowrap; 
}
.testim .cont div.active .img img {
    animation: testim-show .5s ease-in-out forwards;
}
.testim .cont div.active h2 {
    animation: testim-content-in .4s ease-in-out forwards;
}
.testim .cont div.active h3 {
    animation: testim-content-in .4s ease-in-out forwards;
}
.testim .cont div.active p {
    animation: testim-content-in .5s ease-in-out forwards;
}
.testim .cont div.inactive .img img {
    animation: testim-hide .5s ease-in-out forwards;
}
.testim .cont div.inactive h2 {
    animation: testim-content-out .4s ease-in-out forwards;
}
.testim .cont div.inactive h3 {
    animation: testim-content-out .4s ease-in-out forwards;
}
.testim .cont div.inactive p {
    animation: testim-content-out .5s ease-in-out forwards;
}

@-webkit-keyframes testim-scale {
    0% { box-shadow: 0px 0px 0px 0px #eee; }
    35% { box-shadow: 0px 0px 10px 5px #eee; }
    70% { box-shadow: 0px 0px 10px 5px #ea830e; }
    100% { box-shadow: 0px 0px 0px 0px #ea830e; }
}
@keyframes testim-scale {
    0% { box-shadow: 0px 0px 0px 0px #eee; }
    35% { box-shadow: 0px 0px 10px 5px #eee; }
    70% { box-shadow: 0px 0px 10px 5px #ea830e; }
    100% { box-shadow: 0px 0px 0px 0px #ea830e; }
}
@-webkit-keyframes testim-content-in {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes testim-content-in {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
@-webkit-keyframes testim-content-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-100%); }
}
@keyframes testim-content-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-100%); }
}
@-webkit-keyframes testim-show {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes testim-show {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}
@-webkit-keyframes testim-hide {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0); }
}
@keyframes testim-hide {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0); }
}

@media all and (max-width: 300px) {
    body { font-size: 14px; }
}
@media all and (max-width: 500px) {
    .testim .arrow { font-size: 1.5em; }
    .testim .cont div p { line-height: 1.3; }
}
@media only screen and (max-width: 48em) {
    .testim .dots {
        bottom: 10px;
    }
}
@media screen and (max-width: 849px) {
    .testim { padding: 20px 0; }
    .testim h2 { font-size: 20px; }
    .testim h3 { font-size: 16px; }
    .testim p { font-size: 14px; }
    .back-stars, .front-stars { gap: 0.15em; }
}