/* Styled Text Component */

.styled-text-component {
    max-width: 740px;
}

.styled-text-component h2 {
    margin: 0 0 80px;
    font-weight: 400;
    /* font-size is now set dynamically via inline styles */
}

.styled-text-section .styled-text-component h2 {
    margin-bottom: 0;
}

.styled-text-component .title.color-black {
    color: var(--global-colour-black);
}

.styled-text-component .title.color-grey {
    color: var(--global-colour-grey);
}

@media(max-width: 769px) {
    .styled-text-component {
        text-align: center !important;
    }

    .styled-text-component h2 {
        margin: 0 0 40px;
    }

    .styled-text-component h2 span {
        font-size: 25px !important;
    }
}

.styled-text-component p {
    font-weight: 400;
    font-size: 18px;
    color: var(--global-colour-grey);
}

/* Card */

.card__container,
.card {
    aspect-ratio: 421 / 300;
}

.card__container {
    flex: 1 0 0;
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.card {
    background-color: var(--global-colour-grey);
    border-radius: 32px;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: end;
    text-decoration: none;
    justify-content: end;
    padding-top: 40px;
    transition: opacity 0.3s ease;
}

.card.is-link {
    border-bottom-right-radius: 4px;
}

.card.is-link:hover,
.video-card:hover {
    opacity: .7;
}

.cards-section__large .card__container,
.cards-section__large .card {
    aspect-ratio: 421 / 600;
}

.card.card-one-third {
    aspect-ratio: 421 / 175;
    height: auto;

}

.card.card-two-third {
    aspect-ratio: 421 / 409;
    height: auto;
}

.card__text {
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-right: auto;
    padding: 0 32px;
    z-index: 2;
}

.card__text p {
    margin: 0;
}

.card__heading {
    font-size: 32px;
    font-weight: 500;
    line-height: normal;
}

.card__heading-green {
    color: var(--global-colour-green);
}

.card__subheading {
    font-size: 16px;
}

.card__description {
    font-size: 13px;
    font-weight: 400;
    line-height: normal;
}

.card__cta {
    background-color: #EBEEEF;
    border-top-left-radius: 8px;
    z-index: 2;
}

.cards-section__large .card__cta {
    margin-top: 48px;
}

.card__cta-button {
    padding-left: 8px;
    padding-top: 8px;
}

.card__cta-button-icon {
    background-color: var(--global-colour-grey);
    border-radius: 4px;
    position: relative;
    padding: 8px;
}

.card__cta-text {
    align-items: center;
    border: 1px solid #EBEEEF;
    color: var(--global-colour-black);
    display: flex;
    gap: 16px;
    padding: 16px;
    position: relative;
}

.card__cta-button-icon::after,
.card__cta-text::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background-size: contain;
}

.card__cta-button-icon::after {
    background: var(--global-caret-green-url) no-repeat center center;
}

.card__cta-text::after {
    background: var(--global-caret-url) no-repeat center center;
}

.card__image {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
}

.card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
    z-index: 1;
    pointer-events: none;
}

.card__image img {
    object-fit: cover;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    width: auto;
    min-width: 100%;
}

/* Icon Card */

.icon-card {
}

.icon-card__text {
    color: var(--global-colour-black);
}

.icon-card__heading {
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
}

.icon-card__description {
    color: var(--global-colour-grey);
    font-size: 18px;
    font-weight: 400;
    line-height: normal;
}

/* Video Card */

.video-card {
    align-items: center;
    padding-bottom: 40px;
}

.video-card .card__text {
    flex-direction: row;
}

.video__playbtn {
    aspect-ratio: 1/1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    position: relative;
    border: none;
    outline: none;
}

.video__playbtn::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background: var(--global-play-button-url) no-repeat center center;
    background-size: contain;
}

.video-card .card__text {
    align-items: center;
    display: flex;
    gap: 24px;
    height: 100%;
    padding-bottom: 0;
    padding-top: 0;
}

.video__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-details {
    align-items: center;
    display: flex;
    gap: 8px;
}

.video-details__cc {
    position: relative;
}

.video-details__cc::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background: var(--global-closed-captioning-url) no-repeat center center;
    background-size: contain;
}

@media(max-width: 1279px) {
    .card__container {
        aspect-ratio: auto;
        min-height: 450px;
    }

    .cards-section:not(.cards-section__large) .card__container {
        height: 350px;
        min-height: 0;
    }

    .card__container:nth-last-child(1):nth-child(odd) {
        grid-column: 1 / -1;
    }

    .card__container.has-video {
        display: flex;
        flex-direction: column;
    }

    .cards-section__large .card__container,
    .cards-section__large .card,
    .card.card-one-third,
    .card.card-two-third {
        aspect-ratio: auto;
        height: 100%;
    }

    .card.card-one-third,
    .card.card-two-third {
        min-height: 300px;
    }

    .card__description {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;  
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .video-card {
        height: auto;
        width: 100%;
    }
}

@media(max-width: 767px) {
    .card__container {
        flex-basis: 100%;
    }

    .card__container.has-video {
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    .card__container.has-video .card {
        width: 100%;
    }
}