/* ==========================================================================
   Hero Section
   ========================================================================== */

.pagepart_wrapper_type__HeroPagePart {
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.hero__pagepart {
    --herotask-height: var(--h5-lh) * 1 + 30px;
    height: max(200px, min(calc(100vw * 3 / 4), calc(80svh - var(--header-height))));
    position: relative;
    width: 100%;
}

@media screen and (width >= 768px) {
    .hero__pagepart {
        height: max(200px, min(calc(100vw * 9 / 16), calc(80svh - var(--header-height))));
        --herotask-height: var(--h5-lh) * 2 + 30px;
        --herotask-shift: 30px;
    }
}

@media screen and (width >= 1080px) {
    .hero__pagepart {
        --herotask-height: var(--h5-lh) * 2 + 30px;
        --herotask-shift: 30px;
    }
}

.hero__pagepart.viewport-height {
    min-height: calc(100svh - var(--header-height));
}

/* --------------------------------------------------------------------------
   Media Container
   -------------------------------------------------------------------------- */

.hero__media {
    height: 100%;
}

.viewport-height .hero__media {
    height: max(320px, 100svh - var(--header-height));
}

.hero__media-track {
    height: 100%;
    overflow: clip;
    position: relative;
}

.hero__media-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Video
   -------------------------------------------------------------------------- */

.hero__video-wrapper {
    container-type: size;
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero__video-wrapper.is-ready {
    opacity: 1;
}

.hero__video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100cqw, calc(100cqh * 16 / 9));
    height: max(100cqh, calc(100cqw * 9 / 16));
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero__video-toggle {
    align-items: center;
    background: rgb(0 0 0 / 0.4);
    border: 0;
    border-radius: 50%;
    bottom: 15px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    height: 40px;
    justify-content: center;
    position: absolute;
    right: 15px;
    transition: var(--reduced-motion, 0.2s) background ease;
    width: 40px;
    z-index: 2;
}

@media screen and (width >= 768px) {
    .hero__video-toggle {
        bottom: 20px;
        right: 20px;
    }
}

[data-has-tasks="true"] .hero__video-toggle {
    bottom: 60px;
}

@media screen and (width >= 768px) {
    [data-has-tasks="true"] .hero__video-toggle {
        bottom: calc(var(--herotask-height) + var(--herotask-shift) + 20px);
    }
}

.hero__video-toggle:hover {
    background: rgb(0 0 0 / 0.6);
}

.hero__video-toggle:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

.hero__video-toggle[data-playing="true"] .hero__video-toggle-icon--play {
    display: none;
}

.hero__video-toggle[data-playing="false"] .hero__video-toggle-icon--pause {
    display: none;
}

/* --------------------------------------------------------------------------
   Text Overlay
   -------------------------------------------------------------------------- */

.hero__text {
    display: flex;
    height: 100%;
    inset: 0 0 auto 0;
    padding-block: 30px;
    padding-right: 60px;
    pointer-events: none;
    position: absolute;
    z-index: 1;
    align-items: flex-start;
}

@media screen and (width >= 500px) {
    .hero__text {
        padding-right: 150px;
    }
}

@media screen and (width >= 768px) {
    .hero__text {
        padding-right: var(--gutter);
    }
}

[data-has-tasks="true"] > .hero__text {
    height: 100%;
}

[data-has-tasks="true"].viewport-height > .hero__text {
    height: max(320px, 100svh - var(--header-height));
}

@media screen and (width >= 768px) {
    [data-has-tasks="true"].hero__pagepart > .hero__text {
        --herotext-height: (var(--herotask-height) + var(--herotask-shift));
        height: calc(100% - var(--herotext-height));
    }
}

/* Vertical alignment */
.hero__text--vertical-center {
    align-items: center;
}

.hero__text--vertical-bottom {
    align-items: flex-end;
}

/* Horizontal alignment */
.hero__text--horizontal-center {
    justify-content: center;
    text-align: center;
}

.hero__text--horizontal-right {
    justify-content: flex-end;
    text-align: right;
}

/* --------------------------------------------------------------------------
   Circle decoration (::before)
   -------------------------------------------------------------------------- */

.hero__text::before {
    background: url("../../assets/images/circle-hero.svg") no-repeat;
    background-size: cover;
    bottom: -150px;
    content: "";
    height: 500px;
    left: -80px;
    pointer-events: none;
    position: absolute;
    width: 500px;
}

@media screen and (width >= 500px) {
    .hero__text::before {
        height: 580px;
        left: -100px;
        width: 580px;
    }
}

@media screen and (width >= 768px) {
    .hero__text::before {
        bottom: -300px;
        height: 900px;
        left: -150px;
        width: 900px;
    }
}

@media screen and (width <= 767px) {
    .viewport-height[data-has-tasks="true"] .hero__text {
        height: calc(100vh - var(--header-height));
    }
}

/* --------------------------------------------------------------------------
   Text container
   -------------------------------------------------------------------------- */

.hero__text-container {
    max-width: 400px;
    width: 100%;
    z-index: 2;
}

.hero__subtitle,
.hero__title {
    color: var(--color-white);
    margin: 0;
}

.hero__title {
    hyphens: auto;
    overflow-wrap: anywhere;
}

.hero__subtitle {
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: var(--lh-body);
}

/* --------------------------------------------------------------------------
   Button / Link overlay
   -------------------------------------------------------------------------- */

.hero__btn {
    background: var(--color-red);
    color: var(--color-white);
    margin-top: var(--space-4);
    pointer-events: all;
}

.hero__btn:active,
.hero__btn:hover {
    background: var(--color-red-dark);
    color: var(--color-white);
}

.hero__linkoverlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Task Bar
   -------------------------------------------------------------------------- */

.herotask__wrapper {
    margin: 0 auto;
    width: min(100%, 1358px);
    pointer-events: none;
    position: relative;
    z-index: 1;
}

@media screen and (width >= 768px) {
    .herotask__wrapper {
        height: calc(var(--herotask-height));
        margin-top: calc((var(--herotask-shift) + var(--herotask-height)) * -1);
        padding: 0 var(--gutter);
    }
}

@media screen and (width <= 767px) {
    .herotask__wrapper {
        background: var(--color-white);
    }
}

.herotask__bar {
    align-items: flex-end;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media screen and (width >= 768px) {
    .herotask__bar {
        flex-direction: row;
        inset-inline: var(--gutter);
        position: absolute;
    }
}

@media screen and (width <= 767px) {
    .herotask__bar {
        padding: 12px 30px;
    }
}

/* --------------------------------------------------------------------------
   Task Items
   -------------------------------------------------------------------------- */

.herotask__task {
    background: var(--color-navy);
    border-radius: 50px;
    color: var(--color-white);
    margin: 0 auto;
    outline-offset: 4px;
    overflow: clip;
    padding: 0 15px;
    pointer-events: all;
    position: relative;
    text-decoration: none;
    transition: var(--reduced-motion, 0.3s) ease-in-out;
    width: 100%;
}

@media screen and (width >= 768px) {
    .herotask__task {
        border-bottom: 0;
        max-height: calc(var(--herotask-height));
        max-width: 500px;
        padding: 0 15px;
        transition: var(--reduced-motion, 0.5s) max-height ease-out;
    }
}

@media screen and (width <= 767px) {
    .herotask__task {
        margin: 6px 0;
    }
}

.herotask__task:nth-child(1n + 2) {
    margin: 0 auto;
}

@media screen and (width >= 768px) {
    .herotask__task:nth-child(1n + 2) {
        margin: 0 0 0 var(--grid-gutter);
    }

    .herotask__task:nth-child(1n + 2) {
        margin: 0 0 0 15px;
    }
}

@media screen and (width <= 767px) {
    .herotask__task:nth-child(1n + 2) {
        margin: 6px 0;
    }
}

.herotask__task:is(:hover, :focus) {
    max-height: 500px;
    transition: var(--reduced-motion, 0.5s) max-height ease-in;
}

.herotask__task.herotask__task--clickable:hover {
    background: var(--color-navy-dark);
}

/* Task count widths */
[data-taskcount="2"] > .herotask__task {
    width: 50%;
}

[data-taskcount="3"] > .herotask__task {
    width: 33.3333333333%;
}

[data-taskcount="4"] > .herotask__task {
    width: 25%;
}

/* --------------------------------------------------------------------------
   Task Title / Content
   -------------------------------------------------------------------------- */

.herotask__title {
    align-items: center;
    color: var(--color-white);
    display: flex;
    font-size: var(--h5-fs);
    font-weight: 700;
    line-height: var(--h5-lh);
    margin: 15px 0;
    overflow: hidden;
    padding-left: 9px;
    padding-right: 23px;
    position: relative;
}

@media screen and (width >= 768px) {
    .herotask__title {
        height: calc(var(--h5-lh) * 2);
        margin: 15px 0;
        padding-left: 23px;
    }
}

@media screen and (width >= 1080px) {
    .herotask__title {
        height: calc(var(--h5-lh) * 2);
        margin: 15px 0;
    }
}

.herotask__title-content {
    display: flex;
    font-weight: 700;
    justify-content: space-between;
    flex-grow: 1;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    max-height: 100%;
}

@media screen and (width >= 768px) {
    .herotask__title-content {
        -webkit-line-clamp: 2;
    }
}

@media screen and (width >= 1080px) {
    .herotask__title-content {
        -webkit-line-clamp: 2;
    }
}

.herotask__icon {
    flex-shrink: 0;
    margin-left: auto;
}

.herotask__link-overlay {
    position: absolute;
    inset: 0;
}

/* --------------------------------------------------------------------------
   Theme Variants
   -------------------------------------------------------------------------- */

.pagepart--theme-default .herotask__task {
    background: var(--color-navy);
    color: var(--color-white);
}

.pagepart--theme-green .herotask__task {
    background: var(--color-green);
    color: var(--color-white);
}

.pagepart--theme-green .herotask__task:hover {
    background: var(--color-green-dark);
}

.pagepart--theme-green .herotask___description,
.pagepart--theme-green .herotask__title,
.pagepart--theme-green .herotask__title-link {
    color: var(--color-white);
}

.pagepart--theme-yellow .herotask__task {
    background: var(--color-yellow);
    color: #000;
}

.pagepart--theme-yellow .herotask__task:hover {
    background: var(--color-yellow-dark);
}

.pagepart--theme-yellow .herotask___description,
.pagepart--theme-yellow .herotask__title,
.pagepart--theme-yellow .herotask__title-link {
    color: #000;
}

.hero__title-arrow {
    display: none;
}

.herotask__task:focus-visible {
    outline: 2px solid var(--color-white);
}

.hero__btn:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .hero__pagepart {
        --reduced-motion: 0s;
    }
}
