#teachers {
    width: 100%;
    background: url("../../images/bg-gallery.png") no-repeat center;
    background-size: 100% 100%;
}

#teachers .container {
    margin-top: 100px;
}

#teachers-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#teachers h3 {
    color: #d94443;
    font-size: 40px;
    text-align: center;
    margin-bottom: 60px;
}

#slider-frame {
    overflow: hidden;
}

#teachers-card {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#teachers-card li div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
}

#teachers-card h4 {
    font-family: yekan, sans-serif;
    font-size: 20px;
    margin: 8px 0 0 0;
    color: #6D4C41;
}

#teachers-card .description {
    height: 120px;
    overflow-y: scroll;
    scrollbar-width: none;
    display: none;
}

#teachers-card p {
    font-size: 14px;
    margin: 0;
    width: 250px;
    color: #a6813b;
    text-align: center;
}

#btn-backward {
    cursor: pointer;
    transform: scaleX(-1);
    -webkit-user-drag: none;
    user-select: none;
}

#btn-forward {
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
}

#teachers-card li {
    background-color: #fdf3e7;
    border: 1px solid #d4af37;
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
    flex-grow: 0;
    flex-shrink: 0;
    width: 270px;
    height: 400px;
}

.center-card {
    width: 300px !important;
    height: 550px !important;
}

#teachers-card li div img {
    width: 100%;
    height: 330px;
}

.center-img {
    height: 350px !important;
}

#card-sm {
    display: none;
}


@media only screen and (max-width:1200px) {

    #slider-frame {
        width: 600px !important;
    }

    #teachers-card h4 {
        font-size: 18px;
    }

    #teachers-card li {
        width: 185px;
        height: 330px;
    }

    .center-card {
        width: 200px !important;
        height: 400px !important;
    }

    #teachers-card li div img {
        width: 100%;
        height: 270px;
    }

    .center-img {
        height: 260px !important;
    }

    #teachers-card h4 {
        font-size: 16px;
        margin: 5px 0 0 0;
    }

    #teachers-card .description {
        height: 80px;
        overflow-y: scroll;
        scrollbar-width: none;
        display: none;
    }

    #teachers-card p {
        font-size: 11px;
        width: 180px;
        margin-top: 2px;
    }
}

@media only screen and (max-width:992px) {

    #btn-backward {
        width: 45px;
        height: 45px;
    }

    #btn-forward {
        width: 45px;
        height: 45px;
    }

    #slider-frame {
        width: 495px !important;
    }

    #teachers-card {
        gap: 5px;
    }

    #teachers-card h4 {
        font-size: 15px !important;
        margin: 0 !important;
    }

    #teachers-card li {
        width: 150px;
        height: 210px;
    }

    #teachers-card li div img {
        width: 100%;
        height: 170px;
    }

    .center-card {
        width: 180px !important;
        height: 300px !important;
    }

    .center-img {
        height: 200px !important;
    }

    #teachers-card li div {
        gap: 2px;
    }

    #teachers-card h4 {
        font-size: 16px;
        margin: 5px 0 0 0;
    }

    #teachers-card .description {
        height: 60px;
        overflow-y: scroll;
        scrollbar-width: none;
        display: none;
    }

    #teachers-card p {
        font-size: 10px;
        width: 140px;
        margin-top: 0;
    }

}

@media only screen and (max-width:768px) {

    #teachers {
        display: none;
    }

    #card-sm {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 50px;
        flex-direction: column;
    }

    #card-sm h3 {
        font-size: 25px;
        font-family: blabeloo,sans-serif;
        color: #D94443;
        margin-bottom: 30px;
    }

    #card-sm .container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 300px;
        overflow: hidden;
    }

    #teachers-card-sm {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 0;
        margin: 0;
        overflow-x: scroll;
        scrollbar-width: none;
    }

    #teachers-card-sm li {
        width: 210px;
        height: 400px;
        background-color: #fdf3e7;
        border: 1px solid #d4af37;
        border-radius: 10px;
        overflow: hidden;
        display: inline-block;
        flex-grow: 0;
        flex-shrink: 0;
    }

    #teachers-card-sm h4 {
        font-family: yekan, sans-serif;
        font-size: 18px;
        margin: 0;
        color: #6D4C41;
    }

    #teachers-card-sm .description {
        height: 85px;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    #teachers-card-sm p {
        font-size: 12px;
        margin: 0;
        color: #a6813b;
        width: 180px;
        text-align: center;
    }

    #teachers-card-sm li div {
       display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 5px;
    }

    #teachers-card-sm li div img {
        width: 100%;
        height: 250px;
    }

    #scroll-x-icon {
        margin-top: 20px;
        width: 50px;
        height: 50px;
    }
}

@media only screen and (max-width:576px) {

    #teachers {
        display: none;
    }

    #card-sm {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 50px;
        flex-direction: column;
    }

    #card-sm h3 {
        font-size: 25px;
        font-family: blabeloo,sans-serif;
        color: #D94443;
        margin-bottom: 30px;
    }

    #card-sm .container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 280px;
        overflow: hidden;
    }

    #teachers-card-sm {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        padding: 0;
        margin: 0;
        overflow-x: scroll;
        scrollbar-width: none;
    }

    #teachers-card-sm li {
        width: 170px;
        height: 340px;
        background-color: #fdf3e7;
        border: 1px solid #d4af37;
        border-radius: 10px;
        overflow: hidden;
        display: inline-block;
        flex-grow: 0;
        flex-shrink: 0;
    }


    #teachers-card-sm h4 {
        font-family: yekan, sans-serif;
        font-size: 15px;
        margin: 0;
        color: #6D4C41;
    }

    #teachers-card-sm .description {
        height: 80px;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    #teachers-card-sm p {
        direction: rtl;
        font-size: 11px;
        margin: 3px 0 0 0;
        color: #a6813b;
        width: 150px;
        text-align: center;
        line-height: 1.5;
    }

    #teachers-card-sm li div {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0;
    }

    #teachers-card-sm li div img {
        width: 100%;
        height: 220px;
    }

    #scroll-x-icon {
        margin-top: 20px;
        width: 50px;
        height: 50px;
    }

}