.hero-carousel {
    --hero-rotation-delay: 7s;

    position: relative;
}

.hero.hero {
    padding-top: 0;
}

.hero-carousel-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 38%),
        rgba(14, 20, 33, 0.88);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
    isolation: isolate;
}

.container.hero-carousel-content {
    max-width: 1180px;
    padding: 48px 58px;
}

.hero-carousel-card::before,
.hero-carousel-card::after {
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    content: '';
    filter: blur(12px);
    pointer-events: none;
}

.hero-carousel-card::before {
    top: -230px;
    left: 8%;
    background: rgba(124, 58, 237, 0.2);
}

.hero-carousel-card::after {
    right: -230px;
    bottom: -240px;
    background: rgba(14, 165, 233, 0.1);
}

.hero-carousel-intro {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-announcement {
    margin: 0;
    font-weight: 500;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.hero-announcement:hover {
    border-color: rgba(167, 139, 250, 0.48);
    background: rgba(124, 58, 237, 0.12);
    transform: translateY(-1px);
}

.hero-announcement-badge {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-carousel-stage {
    position: relative;
    min-height: 590px;
    touch-action: pan-y;
}

.hero-carousel-slides {
    display: grid;
}

.hero-slide[hidden],
.hero-carousel-autoplay svg[hidden] {
    display: none;
}

.hero-slide {
    --hero-accent: #a78bfa;
    --hero-accent-rgb: 167, 139, 250;

    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 50px;
    min-height: 590px;
    align-items: center;
}

.hero-slide-medications {
    --hero-accent: #fb923c;
    --hero-accent-rgb: 251, 146, 60;
}

.hero-slide-hospitals {
    --hero-accent: #4ade80;
    --hero-accent-rgb: 74, 222, 128;
}

.hero-slide-tools {
    --hero-accent: #38bdf8;
    --hero-accent-rgb: 56, 189, 248;
}

.hero-slide-nremt {
    --hero-accent: #facc15;
    --hero-accent-rgb: 250, 204, 21;
}

.hero-slide-study {
    --hero-accent: #e879f9;
    --hero-accent-rgb: 232, 121, 249;
}

.hero-slide-phrasebook {
    --hero-accent: #fb7185;
    --hero-accent-rgb: 251, 113, 133;
}

.hero-slide-ce-log {
    --hero-accent: #60a5fa;
    --hero-accent-rgb: 96, 165, 250;
}

.hero-carousel[data-enhanced='true'] .hero-slide {
    visibility: hidden;
    opacity: 0;
    transform: translateX(22px);
    transition:
        opacity 420ms ease,
        transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 480ms;
    pointer-events: none;
}

.hero-carousel[data-enhanced='true'] .hero-slide.is-active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0s;
    pointer-events: auto;
}

.hero-slide .hero-copy {
    align-self: start;
    max-width: 585px;
    padding: 72px 0 215px;
}

.hero-slide-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hero-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-slide-label::before {
    width: 24px;
    height: 1px;
    background: currentColor;
    content: '';
}

.hero-carousel .hero-slide h1,
.hero-carousel .hero-slide h2 {
    margin: 18px 0 18px;
    font-size: clamp(2.55rem, 5vw, 3.7rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.028em;
}

.hero-slide-medications .gradient-text {
    background: linear-gradient(135deg, #fed7aa, #fb923c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-hospitals .gradient-text {
    background: linear-gradient(135deg, #bbf7d0, #4ade80);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-tools .gradient-text {
    background: linear-gradient(135deg, #bae6fd, #38bdf8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-nremt .gradient-text {
    background: linear-gradient(135deg, #fef08a, #facc15);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-study .gradient-text {
    background: linear-gradient(135deg, #f5d0fe, #e879f9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-phrasebook .gradient-text {
    background: linear-gradient(135deg, #fecdd3, #fb7185);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide-ce-log .gradient-text {
    background: linear-gradient(135deg, #bfdbfe, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-carousel .hero-slide .lead {
    max-width: 555px;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.65;
}

.hero-slide-media {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 590px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 0 38px;
}

.hero-slide-media::before {
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: rgba(var(--hero-accent-rgb), 0.14);
    content: '';
    filter: blur(18px);
    pointer-events: none;
}

.hero-carousel .phone-duo,
.hero-carousel .phone-single {
    position: relative;
    z-index: 1;
}

.hero-carousel .phone-duo .phone {
    width: 210px;
}

.hero-carousel .phone-single {
    width: 244px;
    border-color: rgba(var(--hero-accent-rgb), 0.35);
    box-shadow:
        0 34px 64px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(var(--hero-accent-rgb), 0.08);
}

.hero-media-note {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 13px;
    border: 1px solid rgba(var(--hero-accent-rgb), 0.26);
    border-radius: 999px;
    background: rgba(5, 7, 11, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(10px);
}

.hero-media-note > span {
    color: var(--hero-accent);
}

.hero-conversion {
    position: absolute;
    z-index: 4;
    bottom: 12px;
    left: 0;
    width: 54%;
}

.hero-carousel .hero-conversion .price {
    margin-bottom: 14px;
}

.hero-carousel .hero-conversion .hero-trial {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 550px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.hero-carousel .hero-conversion .hero-trial-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
    color: #4ade80;
}

.hero-carousel .hero-conversion .hero-trial strong {
    color: #4ade80;
    font-weight: 600;
}

.hero-carousel .hero-conversion .store-row {
    margin-bottom: 0;
}

.hero-carousel-controls {
    position: relative;
    z-index: 5;
    display: none;
    grid-template-columns: 48px minmax(0, 1fr) 48px auto;
    gap: 10px;
    align-items: stretch;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-carousel[data-enhanced='true'] .hero-carousel-controls {
    display: grid;
}

.hero-carousel-button,
.hero-carousel-tab {
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.hero-carousel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(11, 15, 23, 0.78);
}

.hero-carousel-button:hover,
.hero-carousel-tab:hover {
    border-color: rgba(167, 139, 250, 0.42);
    color: var(--text);
    transform: translateY(-1px);
}

.hero-carousel-button:focus-visible,
.hero-carousel-tab:focus-visible,
.hero-announcement:focus-visible {
    outline: 3px solid rgba(167, 139, 250, 0.42);
    outline-offset: 3px;
}

.hero-carousel-button svg {
    width: 20px;
    height: 20px;
}

.hero-carousel-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(5, 7, 11, 0.48);
}

.hero-carousel-tab {
    position: relative;
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    padding: 8px 10px;
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
}

.hero-carousel-tab::before {
    position: absolute;
    inset: 0;
    background: currentColor;
    content: '';
    opacity: 0.1;
    transform: scaleX(0);
    transform-origin: left center;
    pointer-events: none;
}

.hero-carousel[data-playing='true']
    .hero-carousel-tab[aria-current='true']::before {
    animation: hero-tab-progress var(--hero-rotation-delay) linear forwards;
}

.hero-carousel-tab > svg,
.hero-carousel-tab > span {
    position: relative;
    z-index: 1;
}

@keyframes hero-tab-progress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.hero-carousel-tab svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.hero-carousel-tab[aria-current='true'] {
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(124, 58, 237, 0.16);
    color: #ddd6fe;
}

.hero-carousel-tab[data-slide-index='1'][aria-current='true'] {
    border-color: rgba(251, 146, 60, 0.34);
    background: rgba(251, 146, 60, 0.13);
    color: #fed7aa;
}

.hero-carousel-tab[data-slide-index='2'][aria-current='true'] {
    border-color: rgba(74, 222, 128, 0.32);
    background: rgba(74, 222, 128, 0.12);
    color: #bbf7d0;
}

.hero-carousel-tab[data-slide-index='3'][aria-current='true'] {
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
}

.hero-carousel-tab[data-slide-index='4'][aria-current='true'] {
    border-color: rgba(250, 204, 21, 0.34);
    background: rgba(250, 204, 21, 0.12);
    color: #fef08a;
}

.hero-carousel-tab[data-slide-index='5'][aria-current='true'] {
    border-color: rgba(232, 121, 249, 0.34);
    background: rgba(232, 121, 249, 0.12);
    color: #f5d0fe;
}

.hero-carousel-tab[data-slide-index='6'][aria-current='true'] {
    border-color: rgba(251, 113, 133, 0.34);
    background: rgba(251, 113, 133, 0.12);
    color: #fecdd3;
}

.hero-carousel-tab[data-slide-index='7'][aria-current='true'] {
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
}

.hero-carousel-autoplay {
    gap: 7px;
    min-width: 92px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 650;
}

.hero-carousel-autoplay svg {
    width: 17px;
    height: 17px;
}

.hero-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hero-stats .stats {
    margin-top: 50px;
}

@media (max-width: 980px) {
    .container.hero-carousel-content {
        padding-right: 52px;
        padding-left: 52px;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 0.9fr);
        gap: 30px;
    }

    .hero-carousel .hero-slide h1,
    .hero-carousel .hero-slide h2 {
        font-size: clamp(2.4rem, 5vw, 3.25rem);
    }

    .hero-carousel .phone-duo .phone {
        width: 188px;
    }

    .hero-carousel .phone-single {
        width: 228px;
    }
}

@media (max-width: 900px) {
    .container.hero-carousel-content {
        padding: 40px 48px;
    }

    .hero-carousel-intro {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-carousel-intro .eyebrow {
        justify-content: center;
    }

    .hero-carousel-stage {
        min-height: 0;
    }

    .hero-slide {
        display: flex;
        flex-direction: column;
        gap: 0;
        min-height: 0;
        align-items: center;
    }

    .hero-slide .hero-copy {
        display: contents;
        max-width: 700px;
        justify-self: center;
        padding: 38px 0 14px;
        text-align: center;
    }

    .hero-slide-label {
        order: 1;
        align-self: center;
        margin-top: 38px;
        justify-content: center;
    }

    .hero-carousel .hero-slide h1,
    .hero-carousel .hero-slide h2 {
        order: 2;
        align-self: stretch;
        margin: 18px 0;
        text-align: center;
    }

    .hero-carousel .hero-slide .lead {
        order: 4;
        align-self: center;
        margin: 18px auto 24px;
        text-align: center;
    }

    .hero-slide-media {
        order: 3;
        width: 100%;
        min-height: 440px;
        padding: 8px 0 30px;
    }

    .hero-carousel .hero-slide-media .phone-duo,
    .hero-carousel .hero-slide-media .phone-single {
        order: 0;
    }

    .hero-media-note {
        order: 1;
    }

    .hero-carousel .phone-duo .phone {
        width: 176px;
    }

    .hero-carousel .phone-single {
        width: 204px;
    }

    .hero-media-note {
        margin-top: 20px;
    }

    .hero-conversion {
        position: static;
        width: 100%;
        padding-top: 6px;
        text-align: center;
    }

    .hero-carousel .hero-conversion .hero-trial {
        justify-content: center;
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }

    .hero-carousel .hero-conversion .store-row {
        justify-content: center;
    }

    .hero-carousel-controls {
        margin-top: 24px;
    }
}

@media (max-width: 680px) {
    .container.hero-carousel-content {
        padding: 34px 40px;
    }

    .hero-announcement {
        font-size: 12px;
    }

    .hero-carousel-intro .eyebrow {
        font-size: 11px;
    }

    .hero-slide .hero-copy {
        padding-top: 32px;
    }

    .hero-carousel .hero-slide h1,
    .hero-carousel .hero-slide h2 {
        margin: 15px 0;
        font-size: clamp(2.15rem, 10.5vw, 2.8rem);
    }

    .hero-carousel .hero-slide .lead {
        font-size: 1rem;
    }

    .hero-slide-media {
        min-height: 405px;
        padding-bottom: 24px;
    }

    .hero-carousel .phone-duo .phone {
        width: 154px;
    }

    .hero-carousel .phone-duo .phone-ios {
        transform: translate(-29px, -10px);
    }

    .hero-carousel .phone-duo .phone-android {
        transform: translate(29px, 17px) scale(0.96);
    }

    .hero-carousel .phone-single {
        width: 184px;
        padding: 10px;
        border-radius: 32px;
    }

    .hero-carousel .phone-single .phone-screen {
        border-radius: 23px;
    }

    .hero-media-note {
        gap: 6px;
        padding: 7px 10px;
        font-size: 10.5px;
    }

    .hero-carousel .hero-conversion .price {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-carousel .hero-conversion .hero-trial {
        font-size: 0.82rem;
    }

    .hero-carousel-controls {
        grid-template-columns: repeat(3, auto);
        justify-content: center;
    }

    .hero-carousel-tabs {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
    }

    .hero-carousel-button[data-hero-previous] {
        grid-column: 1;
        grid-row: 2;
    }

    .hero-carousel-button[data-hero-next] {
        grid-column: 2;
        grid-row: 2;
    }

    .hero-carousel-autoplay {
        grid-column: 3;
        grid-row: 2;
    }

    .hero-carousel-tab {
        gap: 5px;
        padding: 8px 4px;
        font-size: 10.5px;
    }

    .hero-carousel-tab svg {
        width: 15px;
        height: 15px;
    }

    .hero-stats .stats {
        margin-top: 42px;
    }
}

@media (max-width: 480px) {
    .hero-carousel-tab {
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 390px) {
    .hero-announcement {
        gap: 5px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .hero-announcement-badge {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 9px;
    }

    .hero-slide-media {
        min-height: 382px;
    }

    .hero-carousel .phone-duo .phone {
        width: 143px;
    }

    .hero-carousel .phone-single {
        width: 174px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel[data-enhanced='true'] .hero-slide,
    .hero-announcement,
    .hero-carousel-button,
    .hero-carousel-tab {
        transition: none;
    }

    .hero-carousel .phone-duo,
    .hero-carousel .pulse {
        animation: none;
    }

    .hero-carousel-tab::before {
        animation: none;
    }
}
