.tabbed-section-vertical {
    overflow: hidden;
}

.tabbed-section-vertical__top {
    margin-bottom: 65px;
}

.tabbed-section-vertical__layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
}

.tabbed-section-vertical.tab-position-right .tabbed-section-vertical__layout {
    flex-direction: row-reverse;
}

.tabbed-section-vertical__nav {
    flex: 0 0 400px;
    width: 400px;
    max-width: 100%;
    padding-right: 43px;
    display: flex;
    flex-direction: column;
}

.tabbed-section-vertical__nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
    padding: 5px 20px;
    border: 0;
    border-bottom: 1px solid #d3dce1;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--headline-color);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.tabbed-section-vertical__nav-item.is-active {
    border-bottom: 4px solid var(--primary-color);
}

.tabbed-section-vertical__mark {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.35;
}

.is-active .tabbed-section-vertical__mark {
    opacity: 1;
}

.tabbed-section-vertical__mark svg,
.tabbed-section-vertical__mark img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Inactive mark: light gray; active: primary green */
.tabbed-section-vertical__mark svg path:first-child {
    fill: var(--primary-color);
    opacity: 0.35;
    
}

.tabbed-section-vertical__nav-item.is-active .tabbed-section-vertical__mark svg path:first-child {
    fill: var(--primary-color);
    opacity: 1;
}

.tabbed-section-vertical__number {
    flex: 0 0 55px;
    min-width: 55px;
    font-weight: 700;
    font-size: 42px;
    line-height: 1;
    text-align: center;
    color: var(--headline-color);
}

.tabbed-section-vertical__nav-title {
    flex: 1 1 auto;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--headline-color);
}

.tabbed-section-vertical__nav-item.is-active .tabbed-section-vertical__nav-title {
    font-weight: 700;
}

.tabbed-section-vertical__panels {
    flex: 1 1 auto;
    min-width: 0;
}

.tabbed-section-vertical__panel {
    display: none;
}

.tabbed-section-vertical__panel.is-active {
    display: block;
}

.tabbed-section-vertical__panel-inner {
    display: flex;
    align-items: stretch;
    gap: 32px;
}

.tabbed-section-vertical__panel-content {
    flex: 1 1 auto;
    min-width: 0;
}

.tabbed-section-vertical__panel-content > *:first-child {
    margin-top: 0;
}

.tabbed-section-vertical__panel-content > *:last-child {
    margin-bottom: 0;
}

.tabbed-section-vertical__panel-image {
    position: relative;
    flex: 0 0 292px;
    width: 292px;
    max-width: 100%;
}

/* Taken out of flow so the panel height is driven by the text column only */
.tabbed-section-vertical__image-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.tabbed-section-vertical__image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: 0 0 18px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    object-fit: cover;
    -o-object-fit: cover;
    -webkit-object-fit: cover;
    -moz-object-fit: cover;
    -ms-object-fit: cover;
}

/* No text column to match, so fall back to the image's natural height */
.tabbed-section-vertical__panel-image:only-child .tabbed-section-vertical__image-wrap {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
}

.tabbed-section-vertical__panel-image:only-child .tabbed-section-vertical__image {
    height: auto;
}

.tabbed-section-vertical.bg-medium .tabbed-section-vertical__nav-item,
.tabbed-section-vertical.bg-dark .tabbed-section-vertical__nav-item {
    border-bottom-color: rgba(255, 255, 255, 0.25);
    color: var(--body-with-dark-background);
}

.tabbed-section-vertical.bg-medium .tabbed-section-vertical__nav-item.is-active,
.tabbed-section-vertical.bg-dark .tabbed-section-vertical__nav-item.is-active {
    border-bottom-color: var(--primary-color);
}

.tabbed-section-vertical.bg-medium .tabbed-section-vertical__number,
.tabbed-section-vertical.bg-medium .tabbed-section-vertical__nav-title,
.tabbed-section-vertical.bg-dark .tabbed-section-vertical__number,
.tabbed-section-vertical.bg-dark .tabbed-section-vertical__nav-title {
    color: var(--body-with-dark-background);
}

@media (max-width: 1199px) {
    .tabbed-section-vertical__layout,
    .tabbed-section-vertical.tab-position-right .tabbed-section-vertical__layout {
        flex-direction: column;
        gap: 40px;
    }

    .tabbed-section-vertical__nav {
        flex: none;
        width: 100%;
        padding-right: 0;
    }

    .tabbed-section-vertical__panels {
        width: 100%;
        min-width: 0;
    }

    .tabbed-section-vertical__panel-inner {
        flex-direction: column;
        align-items: center;
    }

    .tabbed-section-vertical__panel-content {
        width: 100%;
    }

    .tabbed-section-vertical__panel-image {
        flex: none;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .tabbed-section-vertical__image-wrap {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
    }

    .tabbed-section-vertical__image {
        height: auto;
        width: 100%;
    }
}

/* Tablet: keep images smaller than full content width. Landscape photos
   were going 100% wide; portraits were also too tall at 100cqw. */
@media (min-width: 768px) and (max-width: 1199px) {
    .tabbed-section-vertical__panel-image {
        container-type: inline-size;
        max-width: 520px;
        width: 100%;
    }

    .tabbed-section-vertical__image-wrap {
        max-height: 390px;
        overflow: hidden;
        box-shadow: 0 0 18px 0 rgba(0, 0, 0, 0.1);
    }

    .tabbed-section-vertical__image {
        box-shadow: none;
        width: 100%;
        height: 390px;
        max-height: 390px;
        object-fit: cover;
    }

    .tabbed-section-vertical__panel-image:only-child .tabbed-section-vertical__image {
        height: 390px;
    }
}

@media (max-width: 767px) {
    .tabbed-section-vertical__top {
        margin-bottom: 30px;
    }

    .tabbed-section-vertical__nav-item {
        gap: 16px;
        padding-left: 28px;
    }

    .tabbed-section-vertical__number {
        flex-basis: 40px;
        min-width: 40px;
        font-size: 32px;
    }

    .tabbed-section-vertical__nav-title {
        font-size: 14px;
    }

    .tabbed-section-vertical__mark {
        width: 28px;
        height: 20px;
        left: -6px;
    }
}
