/* ==========================================================================
   Anmol Digital — Team Horizontal Showcase Final V4

   Requirements:
   - All member cards remain in one horizontal flow.
   - Card spacing stays compact.
   - Every text element remains centered.
   - Desktop shows the full team row.
   - Mobile supports one-card horizontal swipe.
   ========================================================================== */

.home-page .home-team-horizontal-v4 {
    position: relative;
    padding-block: clamp(46px, 5vw, 68px) !important;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(0, 0, 0, .032),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #f7f7f3,
            #eeeeea
        );
}

.home-page
    .home-team-horizontal-v4
    > .container-fluid {
    width: min(
        calc(100% - 44px),
        1340px
    ) !important;
    max-width: none !important;
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Centered introduction
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__intro {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.home-team-horizontal-v4__eyebrow {
    width: fit-content;
    margin: 0 auto 13px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            #202020,
            #080808
        );
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .15em;
    text-transform: uppercase;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .10) inset,
        0 9px 22px rgba(0, 0, 0, .12);
}

.home-team-horizontal-v4__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .09);
}

.home-team-horizontal-v4__intro h2 {
    margin: 0;
    color: #111111;
    font-size: clamp(36px, 4.2vw, 58px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.052em;
    text-align: center;
    text-wrap: balance;
}

.home-team-horizontal-v4__description {
    max-width: 590px;
    margin: 13px auto 0;
    color: #696969;
    font-size: 14px;
    line-height: 1.68;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Horizontal member flow
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 14px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.home-team-horizontal-v4__viewport::-webkit-scrollbar {
    display: none;
}

.home-team-horizontal-v4__viewport:focus-visible {
    outline: 2px solid rgba(0, 0, 0, .28);
    outline-offset: 5px;
    border-radius: 16px;
}

.home-team-horizontal-v4__track {
    width: max-content;
    min-width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
}

.home-team-horizontal-v4__card {
    width: clamp(250px, 22vw, 305px);
    min-width: clamp(250px, 22vw, 305px);
    max-width: 305px;
    flex: 0 0 clamp(250px, 22vw, 305px);
    scroll-snap-align: center;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .095);
    border-radius: 19px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f7f7f3
        );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .98) inset,
        0 17px 40px rgba(0, 0, 0, .060);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.home-team-horizontal-v4__card:hover,
.home-team-horizontal-v4__card:focus-within {
    border-color: rgba(0, 0, 0, .16);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .98) inset,
        0 22px 48px rgba(0, 0, 0, .09);
    transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Member image
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 4.20;
    overflow: hidden;
    background: #070707;
}

.home-team-horizontal-v4__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent 64%,
            rgba(0, 0, 0, .24)
        );
    pointer-events: none;
}

.home-team-horizontal-v4__media img,
.home-team-horizontal-v4__placeholder {
    width: 100%;
    height: 100%;
}

.home-team-horizontal-v4__media img {
    display: block;
    object-fit: cover;
    object-position: center top;
    filter: none !important;
    opacity: 1 !important;
    transform: scale(1);
    transition: transform 260ms ease;
}

.home-team-horizontal-v4__card:hover
    .home-team-horizontal-v4__media img {
    transform: scale(1.025);
}

.home-team-horizontal-v4__placeholder {
    display: grid;
    place-items: center;
    background:
        linear-gradient(
            145deg,
            #1a1a1a,
            #050505
        );
    color: #ffffff;
}

.home-team-horizontal-v4__placeholder span {
    font-size: clamp(52px, 7vw, 74px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.08em;
}

/* --------------------------------------------------------------------------
   Social links centered over the image
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__socials {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.home-team-horizontal-v4__socials a {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    background: rgba(8, 8, 8, .73);
    color: #ffffff;
    font-size: 10px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        color 180ms ease;
}

.home-team-horizontal-v4__socials a:hover,
.home-team-horizontal-v4__socials a:focus-visible {
    background: #ffffff;
    color: #111111;
    outline: none;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Centered member content
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__content {
    min-height: 128px;
    padding: 17px 15px 18px;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.home-team-horizontal-v4__designation {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 9px;
    padding: 6px 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(17, 17, 17, .060);
    color: #686868;
    font-size: 7.8px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: .11em;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-team-horizontal-v4__content h3 {
    margin: 0;
    color: #111111;
    font-size: clamp(23px, 2vw, 29px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.046em;
    text-align: center;
    overflow-wrap: anywhere;
}

.home-team-horizontal-v4__bio {
    max-width: 245px;
    margin: 10px auto 0;
    display: -webkit-box;
    overflow: hidden;
    color: #686868;
    font-size: 11.5px;
    line-height: 1.58;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* --------------------------------------------------------------------------
   Compact centered footer action
   -------------------------------------------------------------------------- */

.home-team-horizontal-v4__footer {
    max-width: 860px;
    margin: 22px auto 0;
    display: grid;
    grid-template-columns:
        minmax(40px, 1fr)
        auto
        minmax(40px, 1fr);
    align-items: center;
    gap: 15px;
}

.home-team-horizontal-v4__footer > span {
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0, 0, 0, .12)
        );
}

.home-team-horizontal-v4__footer > span:last-child {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .12),
            transparent
        );
}

.home-team-horizontal-v4__link {
    min-height: 41px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 10px;
    font-weight: 820;
    line-height: 1;
    text-decoration: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .98) inset,
        0 10px 24px rgba(0, 0, 0, .045);
}

.home-team-horizontal-v4__link:hover,
.home-team-horizontal-v4__link:focus-visible {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
    outline: none;
}

/* --------------------------------------------------------------------------
   Desktop fitting
   -------------------------------------------------------------------------- */

@media (min-width: 1181px) {
    .home-team-horizontal-v4__card {
        width: calc((100vw - 116px) / 4);
        min-width: 0;
        max-width: 305px;
        flex-basis: calc((100vw - 116px) / 4);
    }
}

/* --------------------------------------------------------------------------
   Tablet and mobile horizontal swipe
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    .home-team-horizontal-v4__track {
        justify-content: flex-start;
    }

    .home-team-horizontal-v4__card {
        width: min(300px, 42vw);
        min-width: min(300px, 42vw);
        flex-basis: min(300px, 42vw);
    }
}

@media (max-width: 680px) {
    .home-page
        .home-team-horizontal-v4
        > .container-fluid {
        width: calc(100% - 24px) !important;
    }

    .home-page .home-team-horizontal-v4 {
        padding-block: 44px !important;
    }

    .home-team-horizontal-v4__intro {
        margin-bottom: 22px;
    }

    .home-team-horizontal-v4__intro h2 {
        font-size: clamp(33px, 9.5vw, 45px);
    }

    .home-team-horizontal-v4__description {
        max-width: 430px;
        font-size: 13px;
    }

    .home-team-horizontal-v4__viewport {
        margin-inline: -12px;
        padding-right: 12px;
        padding-left: 12px;
        scroll-padding-inline: 12px;
    }

    .home-team-horizontal-v4__track {
        gap: 12px;
    }

    .home-team-horizontal-v4__card {
        width: min(82vw, 310px);
        min-width: min(82vw, 310px);
        flex-basis: min(82vw, 310px);
        border-radius: 17px;
    }

    .home-team-horizontal-v4__content {
        min-height: 120px;
        padding: 16px 14px 17px;
    }

    .home-team-horizontal-v4__footer {
        margin-top: 18px;
        grid-template-columns: 1fr;
    }

    .home-team-horizontal-v4__footer > span {
        display: none;
    }

    .home-team-horizontal-v4__link {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .home-page
        .home-team-horizontal-v4
        > .container-fluid {
        width: calc(100% - 20px) !important;
    }

    .home-team-horizontal-v4__card {
        width: min(84vw, 296px);
        min-width: min(84vw, 296px);
        flex-basis: min(84vw, 296px);
    }
}

@media (hover: none) {
    .home-team-horizontal-v4__card:hover,
    .home-team-horizontal-v4__socials a:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-team-horizontal-v4__viewport {
        scroll-behavior: auto;
    }

    .home-team-horizontal-v4__card,
    .home-team-horizontal-v4__media img,
    .home-team-horizontal-v4__socials a {
        transition: none !important;
        transform: none !important;
    }
}
