/* =========================================================
   APT COURSE CAROUSEL
   ========================================================= */

.apt-carousel-band {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/*
Change these colours for each carousel section if required.
*/

.apt-carousel-band--one {
    background-color: #ffffff;
}

.apt-carousel-band--two {
    background-color: #ffffff;
}

.apt-carousel-band--three {
    background-color: #ffffff;
}


/* =========================================================
   MAIN CAROUSEL WRAPPER
   ========================================================= */

.apt-carousel {
    display: block;
    clear: both;
    float: left;
    width: 100%;
    margin: 0;
    padding: 75px 0 0;
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}


/* =========================================================
   HEADER
   ========================================================= */

.apt-carousel__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 25px;
    margin: 0 0 24px;
}

.apt-carousel__intro {
    flex: 1;
    min-width: 0;
}

.apt-carousel__heading {
    margin: 0 0 12px;
    padding: 0;
    color: #454545;
    font-family: "Open Sans", sans-serif;
    font-size: 27px;
    line-height: 1.25;
    font-weight: 800;
    text-align: left;
}

.apt-carousel__description {
    margin: 0 0 12px;
    padding: 0;
    color: #454545;
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
}


/* =========================================================
   CAROUSEL CONTROLS
   ========================================================= */

.apt-carousel__controls {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    margin-bottom: 19px;
}

.apt-carousel__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 2px solid #454545;
    border-radius: 50%;
    background-color: #ffffff;
    color: #454545;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
}

.apt-carousel__button span {
    display: block;
    position: relative;
    top: -1px;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.apt-carousel__button:hover {
    background-color: #47BAC6;
    color: #ffffff;
    border-color: #47BAC6;
}

.apt-carousel__button:focus,
.apt-carousel__button:focus-visible {
    outline: none;
    box-shadow: none;
}

.apt-carousel__button:disabled {
    opacity: 0.25;
    cursor: default;
}

.apt-carousel__button:disabled:hover {
    background-color: transparent;
    color: #454545;
    border-color: #454545;
}


/* =========================================================
   CAROUSEL LAYOUT
   ========================================================= */

.apt-carousel__viewport {
    width: 100%;
    overflow: hidden;
}

.apt-carousel__track {
    display: flex;
    align-items: stretch;
    gap: 28px;
    transition: transform 0.45s ease;
    will-change: transform;
}

/*
Shows three main cards and part of the fourth card.
*/

.apt-carousel__slide {
    flex: 0 0 calc((100% - 135px) / 3);
    min-width: 0;
    box-sizing: border-box;
}


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

.apt-carousel__card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #F6F6F6;
    border: 0;
    border-radius: 14px;
    color: #454545;
    text-decoration: none;
    box-sizing: border-box;
    padding-bottom: 12px;
    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.apt-carousel__card-link:hover {
    background-color: #ececec;
    color: #454545;
    text-decoration: none;
}

.apt-carousel__card-link:focus,
.apt-carousel__card-link:visited {
    color: #454545;
    text-decoration: none;
}


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

.apt-carousel__image {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
}


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

.apt-carousel__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 23px 30px;
    box-sizing: border-box;
}

.apt-carousel__content h2 {
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    color: #47BAC6;
    font-family: "Open Sans", sans-serif;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
    text-align: left;
}

.apt-carousel__content p {
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    color: #454545;
    font-family: "Open Sans", sans-serif;
    font-size: 14.5px;
    line-height: 1.45;
    font-weight: 400;
    text-align: left;
}


/* =========================================================
   COURSE NUMBER
   ========================================================= */

.apt-carousel__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 5px 0 22px;
    padding: 0;
    background-color: #787878;
    color: #ffffff;
    border-radius: 3px;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    box-sizing: border-box;
}


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

.apt-carousel__text-link {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-top: auto;
    color: #1967d2;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apt-carousel__card-link:hover .apt-carousel__text-link {
    color: #47BAC6;
}


/* =========================================================
   MODERN THIN ARROW
   ========================================================= */

.apt-carousel__text-arrow {
    display: inline-block;
    position: relative;
    top: 1px;
    width: 31px;
    height: 12px;
    flex-shrink: 0;
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.apt-carousel__text-arrow::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    width: 30px;
    height: 1px;
    background-color: currentColor;
}

.apt-carousel__text-arrow::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

.apt-carousel__card-link:hover .apt-carousel__text-arrow {
    transform: translateX(7px);
}


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

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

    .apt-carousel {
        padding-top: 36px;
        padding-bottom: 42px;
    }

    .apt-carousel__track {
        gap: 22px;
    }

    .apt-carousel__slide {
        flex-basis: calc((100% - 78px) / 2);
    }

    .apt-carousel__image {
        height: 165px;
    }

}


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

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

    /*
    Match the normal mobile page margin.
    */

    .apt-carousel-band .gridContainer {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-left: 23px;
        padding-right: 23px;
        box-sizing: border-box;
    }


    /*
    Putting all the vertical spacing above each carousel
    keeps the first carousel and subsequent carousels equal.
    */

    .apt-carousel {
        float: none;
        width: 100%;
        margin: 0;
        padding-top: 55px;
        padding-bottom: 0;
    }


    /* Heading and description */

    .apt-carousel__header {
        display: block;
        width: 100%;
        margin: 0;
    }

    .apt-carousel__intro {
        width: 100%;
    }

    .apt-carousel__heading {
        width: 100%;
        margin: 0 0 10px;
        padding: 0;
        font-size: 22px;
        line-height: 1.25;
    }

    .apt-carousel__description {
        width: 100%;
        margin: 0 0 30px;
        padding: 0;
        font-size: 14px;
        line-height: 1.5;
    }


    /*
    Hide desktop controls.
    Visitors swipe on mobile.
    */

    .apt-carousel__controls {
        display: none;
    }


    /*
    The grid has 23px left/right padding.
    Adding 23px to the viewport width removes the
    apparent right-hand padding from the cards,
    while retaining the 23px left alignment.
    */

    .apt-carousel__viewport {
        width: calc(100% + 23px);
        overflow: hidden;
        touch-action: pan-y;
    }

    .apt-carousel__track {
        gap: 18px;
    }

    /*
    Show most of the first card and part of the next card.
    */

    .apt-carousel__slide {
        flex-basis: calc(100% - 52px);
    }


    /* Mobile card */

    .apt-carousel__image {
        height: 155px;
    }

    .apt-carousel__content {
        padding: 19px 19px 21px;
    }

    .apt-carousel__content h2 {
        font-size: 22px;
    }

    .apt-carousel__content p {
        font-size: 15px;
        line-height: 1.45;
    }

    .apt-carousel__number {
        width: 32px;
        height: 32px;
        margin: 5px 0 12px;
        font-size: 16px;
    }

}