@media (max-width: 767.98px) {
    #home-hero .hero-slide,
    #home-hero .home-hero-thumbnail {
        height: 0;
        padding-bottom: 36.7857%;
    }

    #home-hero .hero-stage {
        background-color: #f2f2f2;
    }

    #home-hero .hero-stage img {
        object-fit: contain;
        object-position: center;
    }
}

/* Refreshed topic/service cards */
#topic {
    background-color: #f7f4f8;
    background-image: none;
}

#topic .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    text-align: left;
}

#topic .topic-logo {
    margin: 0;
    max-width: 330px;
}

#topic .topic-heading {
    flex: 1;
}

#topic .topic-heading h2 {
    color: #70277d;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px;
}

#topic .topic-heading p {
    color: #666;
    font-size: 17px;
    margin: 0;
}

#topic .home-topic-grid {
    gap: 16px;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 2px 22px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-color: #70277d #e5dce7;
    scrollbar-width: thin;
}

#topic .home-topic-grid .topic-card {
    flex: 0 0 calc(33.333333% - 11px);
    max-width: calc(33.333333% - 11px);
    padding-left: 0;
    scroll-snap-align: start;
}

#topic .topic-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

#topic .topic-control {
    align-items: center;
    background: #fff;
    border: 1px solid #ded2e1;
    border-radius: 50%;
    color: #70277d;
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    transition: background-color .2s ease, color .2s ease;
    width: 44px;
}

#topic .topic-control:hover {
    background: #70277d;
    color: #fff;
}

#topic .home-topic-grid .topic-content {
    background-color: #3f1749;
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(63, 23, 73, .12);
    margin-bottom: 0;
    min-height: 230px;
    transform: translateY(0);
    transition: box-shadow .2s ease, transform .2s ease;
}

#topic .home-topic-grid .topic-content:hover {
    box-shadow: 0 12px 28px rgba(63, 23, 73, .24);
    transform: translateY(-4px);
}

#topic .home-topic-grid .topic-pic {
    bottom: 76px;
    height: auto;
    inset: 0 0 76px;
    padding-top: 0;
    position: absolute;
}

#topic .home-topic-grid .topic-pic::after {
    background: linear-gradient(180deg, rgba(45, 14, 52, .02), rgba(45, 14, 52, .15));
    content: "";
    inset: 0;
    position: absolute;
}

#topic .home-topic-grid .topic-pic img {
    object-fit: cover;
}

#topic .home-topic-grid .topic-overlay {
    background: transparent;
    clip-path: none;
}

#topic .home-topic-grid .topic-body {
    background: #4d1d59;
    bottom: 0;
    display: flex;
    flex-direction: row;
    height: 76px;
    inset: auto 0 0;
    justify-content: flex-start;
    padding: 12px 14px;
}

#topic .home-topic-grid .topic-icon {
    background: rgba(255, 255, 255, .14);
    border-radius: 50%;
    flex: 0 0 42px;
    height: 42px;
    margin: auto 10px auto 0;
    object-fit: contain;
    padding: 8px;
    width: 42px;
}

#topic .home-topic-grid .topic-label {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

#topic .home-topic-grid .topic-title {
    display: -webkit-box;
    font-size: 18px;
    line-height: 1.25;
    overflow: hidden;
    text-shadow: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#topic .home-topic-grid .topic-arrow {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: #70277d;
    display: flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

@media (max-width: 767.98px) {
    #topic .section-header {
        align-items: center;
        display: grid;
        gap: 10px 12px;
        grid-template-columns: 1fr auto;
        margin-bottom: 24px;
    }

    #topic .topic-logo {
        grid-column: 1 / -1;
        max-width: 250px;
    }

    #topic .topic-heading h2 {
        font-size: 25px;
    }

    #topic .topic-heading p {
        font-size: 15px;
    }

    #topic .home-topic-grid {
        gap: 10px;
    }

    #topic .home-topic-grid .topic-card {
        flex: 0 0 min(78vw, 290px);
        max-width: min(78vw, 290px);
    }

    #topic .topic-control {
        height: 40px;
        width: 40px;
    }

    #topic .home-topic-grid .topic-content {
        border-radius: 10px;
        min-height: 205px;
    }

    #topic .home-topic-grid .topic-body {
        height: 72px;
        padding: 10px 12px;
    }

    #topic .home-topic-grid .topic-pic {
        bottom: 72px;
        inset: 0 0 72px;
    }

    #topic .home-topic-grid .topic-icon {
        display: none;
    }

    #topic .home-topic-grid .topic-title {
        font-size: 16px;
    }

    #topic .home-topic-grid .topic-arrow {
        flex-basis: 31px;
        font-size: 18px;
        height: 31px;
        width: 31px;
    }
}
