﻿.card-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    scroll-margin-top: 70px;
}

.card-section .section-title > i {
    font-size: 22px;
    color: var(--secondary-color);
}


.card-section .card {
    flex-basis: 100%;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .card-section .card > .image {
        height: 200px;
        flex-shrink: 0;
    }

    .card-section .card > .card-body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex-grow: 1;
        min-height: 0;
    }


.card-section .card-img-top {
    height: 100%;
    object-fit: cover;
}

.card-section .card-title {
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.card-section .card-body h4 > a {
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-section .card-text > img {
    margin-right: 8px;
    margin-top: -5px;
}

    .card-section .badge {
        background-color: var(--secondary-color);
        border-radius: var(--button-corner);
        align-self: flex-end;
        font-size: 14px;
        line-height: inherit;
        letter-spacing: 0.08em;
        /* The top padding is dynamically calculated as 5px (4px + 1px), 
        allowing flexibility if the base value (4px) changes this to cover the escenarios with border-radius pills */
        padding: calc(4px + 1px) 12px 4px 12px;
        white-space: normal;
        word-wrap: break-word;
        text-align: left;
        display: inline-block;
        margin-top: auto;
    }

.card-section .carousel-control-prev,
.card-section .carousel-control-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 1;
}

    .card-section .carousel-control-prev svg {
        transform: rotate(180deg);
    }

    .card-section .carousel-control-prev svg,
    .card-section .carousel-control-next svg {
        border-radius: 50%;
    }

.card-section .carousel-control-prev {
    right: 70px;
    left: unset;
}

.card-section .carousel-control-next {
    right: 25px;
}

    .card-section .carousel-control-prev:hover,
    .card-section .carousel-control-next:hover {
        background-color: #d1dad9;
    }

.card-section .carousel-control-prev-icon,
.card-section .carousel-control-next-icon {
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

    .card-section .carousel-control-prev-icon svg,
    .card-section .carousel-control-next-icon svg {
        background-image: unset;
        color: var(--secondary-color);
        font-size: 30px;
    }

.card-section .carousel-control-prev[disabled] svg,
.card-section .carousel-control-next[disabled] svg {
    background-color: #f2f6f5;
    border-color: var(--secondary-color);
    opacity: 0.5;
}

.card-section .signed-for-check {
    width: 24px;
    height: 24px;
    border: 1px solid var(--secondary-color);
    right: 15px;
    bottom: 15px;
    background-color: #ffffff;
}

    .card-section .signed-for-check > i {
        margin-left: 3px;
        margin-top: -3px;
        font-size: 25px;
        color: var(--secondary-color);
    }

.card-section .carousel-inner {
    overflow: visible;
    display: flex;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .card-section .carousel-inner::-webkit-scrollbar {
        display: none;
    }

.card-section .carousel-item {
    width: 310px;
    display: flex;
    flex-direction: column;
    transition: none;
    height: 100%;
    scroll-snap-align: start;
    flex: 0 0 auto;
    margin: unset;
}

.card-section .slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.card-section .slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-section .slides {
    display: flex;
    gap: 15px;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .card-section .slides::-webkit-scrollbar {
        display: none;
    }

.card-section.slider-container .slide {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-shrink: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    transition: opacity 0.3s ease;
}

    .card-section .slide:last-child {
        padding-right: 20px;
    }

    .card-section .slide:hover {
        opacity: 0.9;
    }

.section-title {
    width: 75%;
}

    .section-title i,
    .section-title h3 {
        font-size: 22px;
    }

@media (max-width: 1024px) {
    .card-section .carousel-item {
        width: 300px;
    }
}

@media (max-width: 480px) {
    .card-section .carousel-inner, .card-section .slides {
        display: flex;
        justify-content: left;
        align-items: stretch;
    }

    .card-section .carousel-control-prev {
        right: 60px;
    }

    .card-section .carousel-control-next {
        right: 15px;
    }

    .card-section .carousel-item {
        margin: 0 auto;
        width: 100%;
    }

    .card-section .carousel-control-prev,
    .card-section .carousel-control-next {
        width: 30px;
        height: 30px;
    }

    /* The top padding is dynamically calculated as 6px (4px + 2px), 
     allowing flexibility if the base value (4px) changes this to cover the escenarios with border-radius pills for mobile view in IOS and Android platforms*/
    .card-section .badge {
        padding-top: calc(4px + 2px);
    }

    .card-section .slide {
        width: 100%;
    }
}
