.ils-feature-tabs {
    --ils-card-bg: #004fff;
    --ils-image-bg: #e3ffff;
    --ils-accent: #01ffff;
    --ils-nav-bg: #f9f9fa;
    --ils-card-color: #fff;
    --ils-pill-color: #101010;
    width: 100%;
    max-width: 1012px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ils-feature-tabs *,
.ils-feature-tabs *::before,
.ils-feature-tabs *::after {
    box-sizing: border-box;
}

.ils-feature-tabs__nav-viewport {
    width: 100%;
    max-width: 909px;
    margin: 0 auto 28px;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--ils-nav-bg);
    border-radius: 100px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ils-feature-tabs__nav-viewport::-webkit-scrollbar {
    display: none;
}

.ils-feature-tabs__track {
    display: flex;
    width: max-content;
    min-width: 100%;
    transition: transform 0.35s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.ils-feature-tabs__pill {
    flex: 1 0 auto;
    min-width: max-content;
    height: 55px;
    padding: 0 14px;
    border: 0;
    border-radius: 100px;
    color: var(--ils-pill-color);
    background: transparent;
    font-family: "Merriweather", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.ils-feature-tabs__pill.is-active {
    color: #fff;
    background: var(--ils-card-bg);
}

.ils-feature-tabs__pill:focus-visible,
.ils-feature-tabs__arrow:focus-visible {
    outline: 3px solid var(--ils-accent);
    outline-offset: 3px;
}

.ils-feature-tabs__mobile-controls {
    display: none;
}

.ils-feature-tabs__panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 430px;
    gap: 32px;
    width: 100%;
    min-height: 462px;
    padding: 16px;
    overflow: hidden;
    color: var(--ils-card-color);
    background: var(--ils-card-bg);
    border-radius: 40px;
    animation: ilsPanelIn 0.35s ease both;
}

.ils-feature-tabs__panel[hidden] {
    display: none !important;
}

.ils-feature-tabs__content {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: 100%;
    max-width: 433px;
    padding-right: 18px;
}

.ils-feature-tabs__title {
    margin: 0 0 22px;
    color: inherit;
    font-family: "Winter Draw", "Comic Sans MS", cursive;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.1;
}

.ils-feature-tabs__text,
.ils-feature-tabs__text p {
    color: inherit;
    font-family: "Merriweather", Georgia, serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
}

.ils-feature-tabs__text p {
    margin: 0 0 1em;
}

.ils-feature-tabs__text p:last-child {
    margin-bottom: 0;
}

.ils-feature-tabs__image {
    position: relative;
    isolation: isolate;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 430px;
    overflow: hidden;
    background: var(--ils-image-bg);
    border-radius: 30px;
}

.ils-feature-tabs__image::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: -14%;
    bottom: -20%;
    width: 128%;
    height: 62%;
    background: var(--ils-accent);
    border-radius: 50% 50% 0 0;
}

.ils-feature-tabs__image img {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 0;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: none;
    transform: translateX(-50%);
}

@keyframes ilsPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .ils-feature-tabs {
        max-width: 343px;
    }

    .ils-feature-tabs__nav-viewport {
        height: 43px;
        margin-bottom: 0;
        padding: 3px;
        overflow: hidden;
        border-radius: 69px;
    }

    .ils-feature-tabs__track {
        width: 100%;
        min-width: 100%;
    }

    .ils-feature-tabs__pill {
        flex: 0 0 calc((100% - 4px) / 2);
        min-width: 0;
        height: 37px;
        padding: 0 8px;
        border-radius: 69px;
        font-size: 12px !important;
    }

    .ils-feature-tabs__mobile-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin: 23px 0 28px;
    }

    .ils-feature-tabs__arrow {
        width: 55px;
        height: 37px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        transition: opacity 0.2s ease;
		display: flex;
		align-items: center;
		justify-content: center;
		background: none !important;
		border: none !important;
		outline: none !important;
    }

    .ils-feature-tabs__arrow img {
        display: block;
        width: 25px;
        height: auto;
    }

    .ils-feature-tabs__arrow:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .ils-feature-tabs__panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 592px;
        padding: 36px 7px 8px;
        border-radius: 25px;
    }

    .ils-feature-tabs__content {
        width: 100%;
        max-width: 293px;
        margin: 0 auto;
        padding: 0;
        text-align: center;
    }

    .ils-feature-tabs__title {
        max-width: 260px;
        margin: 0 auto 14px;
        font-size: 32px;
        line-height: 1.1;
    }

    .ils-feature-tabs__text,
    .ils-feature-tabs__text p {
        font-size: 14px;
        line-height: 1.7;
    }

    .ils-feature-tabs__image {
        flex: 0 0 299px;
        width: 100%;
        height: 299px;
        margin-top: auto;
        border-radius: 20px;
    }

    .ils-feature-tabs__image::before {
        left: -16%;
        bottom: -23%;
        width: 132%;
        height: 66%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ils-feature-tabs__track,
    .ils-feature-tabs__pill,
    .ils-feature-tabs__arrow {
        transition: none;
    }

    .ils-feature-tabs__panel {
        animation: none;
    }
}

/* Tablet: always show clear previous/next navigation.
 * The tab row remains swipe/scroll friendly when it overflows, but the arrows
 * stay visible even when the browser reports that all pills currently fit.
 */
@media (min-width: 768px) and (max-width: 1180px) {
    .ils-feature-tabs__nav-viewport {
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 8px;
        overscroll-behavior-x: contain;
    }

    .ils-feature-tabs__pill {
        scroll-snap-align: center;
        scroll-margin-inline: 8px;
    }

    .ils-feature-tabs__pill.is-active {
        scroll-snap-stop: always;
    }

    .ils-feature-tabs__mobile-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin: -8px 0 28px;
    }

    .ils-feature-tabs__arrow {
        width: 55px;
        height: 37px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .ils-feature-tabs__arrow:hover:not(:disabled) {
        transform: translateY(-1px);
    }

    .ils-feature-tabs__arrow img {
        display: block;
        width: 25px;
        height: auto;
    }

    .ils-feature-tabs__arrow:disabled {
        opacity: 0.35;
        cursor: default;
    }
}
