/* -------------------------------------------------------------------------- */
/*                               Content Wrapper                              */
/* -------------------------------------------------------------------------- */
.main-page__content__wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 164px;
}

@media (max-width: 768px) {
    .main-page__content__wrapper {
        gap: 120px;
    }
}
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*                                    News                                    */
/* -------------------------------------------------------------------------- */
.news__section {
    display: flex;
    width: 100%;
    align-self: stretch;
}

.news__section__featured,
.news__section__latest,
.news__section__latest__post {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.20);
}

.news__section__featured {
    flex: 2;
}

.news__section__featured__preview,
.news__section__latest__post__preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.news__section__featured__preview img,
.news__section__latest__post__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news__section__featured__info,
.news__section__latest__post__info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.05);
}

.news__section__featured__info {
    flex-grow: 1;
    gap: 24px;
    padding: 0 24px 32px 24px;
}

.news__section__featured__info > *:last-child {
    margin-bottom: auto;
}

.news__section__latest__post__info {
    gap: 16px;
    padding: 0 24px 24px 24px;
}

.news__section__featured__info__title,
.news__section__latest__post__info__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news__section__latest {
    flex: 1;
}

.news__section__latest__more-news {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 64px 48px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
}

.news__section__date {
    display: flex;
    padding: 8px 12px;
    align-items: center;
    gap: 8px;
    background-color: var(--main-red);
}

@media (max-width: 768px) {
    .news__section__featured__info,
    .news__section__latest__post__info {
        padding: 0 16px 16px 16px;
    }

    .news__section__latest__more-news {
        padding: 32px 48px;
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .news__section {
        flex-direction: column;
    }
}

@media (min-width: 1025px) {
    .news__section__featured:hover,
    .news__section__latest__post:hover {
        cursor: pointer;
    }

    .news__section__featured:hover .news__section__featured__preview,
    .news__section__latest__post:hover .news__section__latest__post__preview {
        box-shadow: 0 0 200px 0 rgba(255, 29, 70, 0.50) inset;
    }

    .news__section__featured:hover .news__section__featured__info__title,
    .news__section__latest__post:hover .news__section__latest__post__info__title {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
        text-decoration-color: rgba(255, 255, 255, 0.6);
    }

    .news__section__featured {
        border-right: 1px solid rgba(255, 255, 255, 0.20);
    }
}
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*                                Race results                                */
/* -------------------------------------------------------------------------- */
.results__section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 48px;
}

.results__section__title {
    margin: 0 24px;
}

.results__section__list {
    display: flex;
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
    overflow: hidden;
}

.results__section__item {
    opacity: 1;
    display: flex;
    width: 100%;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1 0 0;
    background: linear-gradient(90deg, rgba(255, 29, 70, 0.00) 0%, #FF1D46 100%);
    transition: opacity 1s ease-in-out;
}

.results__section__item__winner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.results-carousel__controls {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.results-carousel__controls__arrow,
.image-carousel__controls__arrow {
    display: flex;
    width: 48px;
    height: 48px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.results-carousel__controls__arrow {
    border: 1px solid var(--white);
    background-color: #ffffff00;
}

.results-carousel__controls__arrow:hover,
.image-carousel__controls__arrow:hover {
    cursor: pointer;
}

.results__section__item.inactive {
    opacity: 0;
}

@media (max-width: 768px) {
    .results__section {
        gap: 32px;
    }

    .results-carousel__controls {
        display: flex;
    }

    .results__section__item {
        flex: 0 0 100%;
    }
}
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*                               Image Carousel                               */
/* -------------------------------------------------------------------------- */
.image-carousel {
    width: 100%;
    height: 1080px;
    display: flex;
    padding: 24px 0;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 48px;

    background: linear-gradient(180deg, rgba(28, 28, 28, 0.00) 0%, rgba(28, 28, 28, 0.40) 100%), url('../images/news-placeholder.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: opacity 200ms ease;
    will-change: opacity;
}

.image-carousel--fading {
    opacity: 0;
}

.image-carousel__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.image-carousel__controls {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.image-carousel__controls.is-hidden {
    display: none;
}

.image-carousel__controls__arrow {
    background: var(--white);
}

.image-carousel__controls__arrow svg {
    fill: var(--black);
}

@media (max-width: 768px) {
    .image-carousel {
        height: 844px;
    }
}

@media (min-width: 1025px) {
    .image-carousel__controls__arrow:hover {
        background: var(--black);
    }

    .image-carousel__controls__arrow:hover svg {
        fill: var(--white);
    }
}
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*                                Contact Form                                */
/* -------------------------------------------------------------------------- */
.contact-form__section {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0 24px;
    gap: 24px;
}

.contact-form__section__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    flex: 1 0 0;
}

.contact-form__section__email {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 0 0;
}

.contact-form__section__email__input {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.contact-form__honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.form-consent__checkbox-wrapper {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1024px) {
    .contact-form__section {
        flex-direction: column;
    }
}
/* -------------------------------------------------------------------------- */
