section.favorite-coffee {
    margin-bottom: 100px;
}

.coffee-heading {
    margin-bottom: 40px;
    text-align: center;
    font-size: 60px;
    line-height: 125%;
    color: var(--text-dark-color);
}

.coffee-heading span {
    color: var(--text-accent-color);
}
.slider-container {
    position: relative;
    overflow-x: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    padding: 0 336px;
}

.card {
    width: 480px;
    height: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 100%;
    box-sizing: border-box;
    margin-bottom: 40px;
    margin-right: 336px;
}

.card img {
    max-width: 100%;
    height: 480px;
    object-fit: cover;
    margin-bottom: 20px;
}

.card-text *{
    width: 480px;
    text-align: center;
    margin: 0;
}

.card-text h3 {
    margin: 0;
    margin-bottom: 16px;
    font-size: 24px;
    line-height: 125%;
}

.card-text p{
    margin-bottom: 16px;
}

.card-text p:first-child{
    font-weight: 400;
}

.card-text p:last-child{
    font-size: 24px;
    line-height: 125%;
}

.arrow {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
}


.controls {
    display: flex;
    justify-content: center;
}

.control {
    width: 40px;
    height: 4px;
    background-color: var(--border-light-color);
    margin: 0 5px;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.control.darker {
    background-color: var(--border-dark-color);
}

/* Media query for screens between 768px and 1439px (tablets) */
@media screen and (max-width: 1439px) and (min-width: 768px) {
    .slider-container {
        position: relative;
        overflow-x: hidden;
    }

    .slider {
        display: flex;
        transition: transform 0.5s ease-in-out;
        padding: 0 100px;
    }

    .card {
        width: 480px;
        height: 640px;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0 0 100%;
        box-sizing: border-box;
        margin-bottom: 40px;
        margin-right: 100px;
    }

    .card img {
        max-width: 100%;
        height: 480px;
        object-fit: cover;
        margin-bottom: 20px;
    }

    .card-text *{
        width: 480px;
        text-align: center;
        margin: 0;
    }

    .card-text h3 {
        margin: 0;
        margin-bottom: 16px;
        font-size: 24px;
        line-height: 125%;
    }

    .card-text p{
        margin-bottom: 16px;
    }

    .card-text p:first-child{
        font-weight: 400;
    }

    .card-text p:last-child{
        font-size: 24px;
        line-height: 125%;
    }

}

/* Media query for screens between 380px and 767px (smaller tablets and large mobiles) */
@media screen and (max-width: 767px) and (min-width: 380px) {
    .coffee-heading {
        margin-bottom: 2rem;
        text-align: center;
        font-size: 2rem;
        line-height: 125%;
        color: var(--text-dark-color);
    }

    .slider {
        display: flex;
        transition: transform 0.5s ease-in-out;
        padding: 0;
    }
    .card {
        width: 348px;
        height: 576px;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0 0 100%;
        box-sizing: border-box;
        margin-bottom: 0;
        margin-right: 0;
    }

    .card img {
        max-width: 100%;
        height: 348px;
        object-fit: cover;
        margin-bottom: 20px;
    }

    .card-text {
        max-width: 348px;
    }

    .card-text h3 {
        margin: 0;
        margin-bottom: 1rem;
        font-size: 1.5rem;
        font-weight: 600;
        line-height: 125%;
        max-width: 348px;
        line-height: 115%;
    }

    .card-text p{
        margin-bottom: 1rem;
        max-width: 348px;
        font-weight: 400;
    }

    .card-text p:nth-child(1){
        font-weight: 400;

    }

    .card-text p:last-child{
        font-size: 1.5rem;
        font-weight: 600;
        line-height: 150%;
    }
}

/* Media query for screens below 380px (small mobiles) */
@media screen and (max-width: 379px) {
    .slider {
        padding: 0;
        margin-bottom: 60px;
    }

    .card {
        zoom:0.5;
    }
}