/* ==========================================================
   SERVICE TABS
   ========================================================== */

.aws-service-tabs {
    --tabs-bg: rgba(255, 255, 255, 0.12);
    --tabs-active-bg: #ffffff;

    --text-dark: #313b48;
    --text-muted: #747b83;

    --blue: #00aeef;

    width: 100%;
}


/* ==========================================================
   TAB NAVIGATION
   ========================================================== */

.aws-service-tabs__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px ;
    margin-bottom: 8rem;
    border-radius: 100px;
    background: #FFFFFF1A;
}


body .aws-service-tabs__nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2.4rem 15px;
    border: 0;
    font-weight: 400;
    font-size: 2.4rem;
    line-height: 3rem;
    letter-spacing: 0;
    color: #FFFFFF80;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}
body .aws-service-tabs__nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
}
body .aws-service-tabs__nav-item.is-active {
    background: var(--tabs-active-bg);
    color: #008ac4;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.06);
}
body .aws-service-tabs__nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
}


body .aws-service-tabs__nav-icon i,
body .aws-service-tabs__nav-icon svg {
    width: 26px;
    height: 26px;
    font-size:26px;
    stroke:currentColor;
    color: currentColor;
}
body .aws-service-tabs__nav-icon svg * {
    stroke:currentColor;
}
body .aws-service-tabs__nav-item.is-active .aws-service-tabs__nav-icon svg, 
body .aws-service-tabs__nav-item.is-active .aws-service-tabs__nav-icon svg * {
    stroke:currentColor;
    color: currentColor;
}


body .aws-service-tabs__nav-title {
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================================
   PANELS
   ========================================================== */

.aws-service-tabs__panels {
    position: relative;

    width: 100%;
    margin: 0 auto;

    overflow: hidden;

    transition:
        height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}


.aws-service-tabs__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
}


.aws-service-tabs__panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}


/* ==========================================================
   CARD
   ========================================================== */

.aws-service-tabs__card {
    display: flex;
    flex-wrap: wrap;
    min-height: 354px;
    overflow: hidden;
    border-radius: 4rem;
    background: #fff;
    padding: 10px;
}


/* ==========================================================
   IMAGE
   ========================================================== */

.aws-service-tabs__media {
    position: relative;
    min-width: 0;
    min-height: 354px;
    overflow: hidden;
    border-radius: 3rem;
    box-shadow:
    9.33px -12px 33.33px rgba(0, 0, 0, 0.10),
    38.67px -48px 61.33px rgba(0, 0, 0, 0.09),
    86.67px -108px 82.67px rgba(0, 0, 0, 0.05),
    153.33px -192px 98.67px rgba(0, 0, 0, 0.01),
    238.67px -300px 108px rgba(0, 0, 0, 0);
    width: 45%;
}


.aws-service-tabs__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* ==========================================================
   CONTENT
   ========================================================== */

.aws-service-tabs__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0px 6rem 0 8.3rem;
    width: 55%;
}

.aws-service-tabs__content .aw-eyebrow{
    margin-bottom: 12px;
}

.aws-service-tabs__heading {
    margin: 0 0 12px;
    color: #323D48;
}


.aws-service-tabs__description {
    margin-bottom: 4.8rem;
    font-family: var( --e-global-typography-33838b9-font-family ), Sans-serif;
    font-size: var( --e-global-typography-33838b9-font-size );
    font-weight: var( --e-global-typography-33838b9-font-weight );
    line-height: var( --e-global-typography-33838b9-line-height );
    letter-spacing: var( --e-global-typography-33838b9-letter-spacing );
    color: #323D48;
}


.aws-service-tabs__description p {
    margin: 0;
}


.aws-service-tabs__description p + p {
    margin-top: 12px;
}
.aws-service-tabs__button {
    text-align: left;
    margin: 0;
}


/* ==========================================================
   TABLET / SMALL DESKTOP
   ========================================================== */

@media (max-width: 1100px) {

    /*
     * Horizontally scrollable tabs.
     *
     * Do NOT force every tab to 180px.
     * Let labels determine the width.
     */
    .aws-service-tabs__nav {
        justify-content: flex-start;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 8px;

        margin-bottom: 5rem;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;

        scroll-behavior: smooth;

        scroll-snap-type: x proximity;
    }


    .aws-service-tabs__nav::-webkit-scrollbar {
        display: none;
    }


    body .aws-service-tabs__nav-item {
        /*
         * Fits more tabs where space is available,
         * but still allows horizontal scrolling.
         */
        flex: 0 0 clamp(145px, 20vw, 210px);
        width: auto;
        min-width: 0;
        padding:1.8rem 14px;
        font-size: 1.8rem;
        line-height: 2.4rem;
        scroll-snap-align: start;
        flex-direction: column;
    }


    body .aws-service-tabs__nav-icon {
        width: 22px;
        height: 22px;
    }


    body .aws-service-tabs__nav-icon i,
    body .aws-service-tabs__nav-icon svg {
        width: 20px;
        height: 20px;

        font-size: 20px;
    }


    .aws-service-tabs__panels {
        width: 100%;
    }


    .aws-service-tabs__card {
        min-height: 330px;
    }


    .aws-service-tabs__media {
        min-height: 330px;

        width: 48%;
    }


    .aws-service-tabs__content {
        width: 52%;

        padding:
            35px
            3rem;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    /*
     * Keep same tabs.
     * Do NOT switch to accordion.
     */
    .aws-service-tabs__nav {
        display: flex;

        width: 100%;

        margin-bottom: 32px;

        padding: 5px;

        border-radius: 100px;

        overflow-x: auto;

        background: #FFFFFF1A;

        scroll-snap-type: x mandatory;
        gap:4px;
    }


    body .aws-service-tabs__nav-item {
        /*
         * Figma shows:
         *
         * active tab fully visible
         * + good portion of next tab
         */
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        padding:8px 16px;
        gap:4px;
        font-size: 14px;
        line-height: 20px;
        scroll-snap-align: start;
        background: #ffffff33;
    }


    body .aws-service-tabs__nav-item.is-active {
        padding-left: 20px;
        padding-right: 20px;
    }


    body .aws-service-tabs__nav-icon {
        width: 18px;
        height: 18px;
    }


    body .aws-service-tabs__nav-icon i,
    body .aws-service-tabs__nav-icon svg {
        width: 18px;
        height: 18px;

        font-size: 18px;
    }


    /*
     * Content wrapper
     */
    .aws-service-tabs__panels {
        display: block;

        width: 100%;

        margin: 0;

        overflow: hidden;
    }


    /*
     * Vertical card like Figma
     */
    .aws-service-tabs__card {
        display: block;

        min-height: 0;

        padding: 7px;

        border-radius: 24px;

        background: #fff;
    }


    /*
     * Image
     */
    .aws-service-tabs__media {
        width: 100%;

        min-height: 0;

        height: auto;

        aspect-ratio: 1.45 / 1;

        border-radius: 18px;

        overflow: hidden;

        box-shadow:
            9.33px -12px 33.33px rgba(0, 0, 0, 0.10),
            38.67px -48px 61.33px rgba(0, 0, 0, 0.09),
            86.67px -108px 82.67px rgba(0, 0, 0, 0.05),
            153.33px -192px 98.67px rgba(0, 0, 0, 0.01);
    }


    .aws-service-tabs__image {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }


    /*
     * Content
     */
    .aws-service-tabs__content {
        width: 100%;

        padding:
            28px
            16px
            20px;
    }


    .aws-service-tabs__content .aw-eyebrow {
        margin-bottom: 22px;
    }


    .aws-service-tabs__heading {
        margin-bottom: 14px;

        font-size: 28px;
        line-height: 1.08;
    }


    .aws-service-tabs__description {
        margin-bottom: 36px;

        font-size: 16px;
        line-height: 1.45;
    }


    /*
     * CTA fills most of card width like Figma.
     */
    .aws-service-tabs__button {
        display: block;

        width: 100%;

        margin: 0;
    }


    .aws-service-tabs__button .btn {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;

        min-height: 52px;

        padding:
            14px
            18px;
    }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 480px) {

    .aws-service-tabs__nav {
        margin-bottom: 30px;
        gap: 3px;
    }


    body .aws-service-tabs__nav-item {
        font-size: 12px;
    }


    /*
     * For very narrow devices keep enough
     * of second tab visible.
     */
    /* body .aws-service-tabs__nav-item {
        max-width: 190px;
        width: 50%;
    } */

    .aws-service-tabs__nav {
        position: relative;

        display: flex;
        justify-content: flex-start;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x proximity;
        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .aws-service-tabs__nav::-webkit-scrollbar {
        display: none;
    }


    body .aws-service-tabs__nav-item {
        /*
         * Two tabs + part of third tab visible.
         */
        flex: 0 0 43%;
        width: 43%;
        min-width: 0;
        max-width: none;
        padding: 8px 12px;
        scroll-snap-align: start;        
    }


    body .aws-service-tabs__nav-item.is-active {
        padding-left: 12px;
        padding-right: 12px;
    }

    /*************/


    .aws-service-tabs__card {
        border-radius: 22px;
    }


    .aws-service-tabs__media {
        border-radius: 17px;

        aspect-ratio: 1.45 / 1;
    }


    .aws-service-tabs__content {
        padding:
            27px
            15px
            18px;
    }


    .aws-service-tabs__heading {
        font-size: 26px;
    }


    .aws-service-tabs__description {
        margin-bottom: 32px;

        font-size: 15px;
    }

}