/* =====================================================================
   AVORCMS v2 — SERVICES OVERVIEW
   Enterprise medical billing / RCM service showcase
   ===================================================================== */

.v2-services {
    position: relative;
    overflow: hidden;

    /*
     * Full viewport section on modern browsers.
     * 100svh prevents mobile browser chrome from creating layout jumps.
     */
    min-height: 100svh;

    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(126, 66, 220, 0.22),
            transparent 31%
        ),
        radial-gradient(
            circle at 5% 88%,
            rgba(255, 87, 87, 0.08),
            transparent 28%
        ),
        #391D77;

    color: #fff;

    font-family: var(--v2-font);

    display: flex;
    align-items: center;

    padding: clamp(58px, 5vw, 78px) 0;

    isolation: isolate;
}

/* ================================================================
   Ambient glows
   ================================================================ */

.v2-services__glow {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(1px);

    z-index: -1;
}

.v2-services__glow--one {
    width: 430px;
    height: 430px;

    top: -230px;
    left: -170px;

    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 0 0 45px rgba(255, 255, 255, 0.018),
        0 0 0 90px rgba(255, 255, 255, 0.012);
}

.v2-services__glow--two {
    width: 360px;
    height: 360px;

    right: -180px;
    bottom: -210px;

    border: 1px solid rgba(255, 87, 87, 0.13);
}

/* ================================================================
   Container
   ================================================================ */

.v2-services__inner {
    width: 100%;

    max-width: 1280px;

    margin: 0 auto;

    padding:
        0
        clamp(20px, 4vw, 48px);

    position: relative;
    z-index: 2;
}

/* ================================================================
   Section header
   ================================================================ */

.v2-services__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 45px;

    margin-bottom: clamp(22px, 2.5vw, 32px);

    opacity: 0;
    transform: translateY(22px);

    transition:
        opacity 0.75s ease,
        transform 0.75s ease;
}

.v2-services__header.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.v2-services__heading-wrap {
    flex: 1;
    min-width: 0;
}

/* ================================================================
   Eyebrow
   ================================================================ */

.v2-services__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 12px;

    padding: 7px 13px;

    border: 1px solid rgba(255, 255, 255, 0.16);

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.07);

    color: rgba(255, 255, 255, 0.88);

    font-size: 9.5px;
    font-weight: 800;

    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.v2-services__eyebrow::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--v2-secondary);

    box-shadow:
        0 0 0 4px rgba(255, 87, 87, 0.12);
}

/* ================================================================
   Heading
   ================================================================ */

.v2-services__title {
    margin: 0;

    max-width: 690px;

    font-size: clamp(30px, 3.15vw, 44px);

    line-height: 1.08;

    letter-spacing: -1.5px;

    font-weight: 800;

    color: #fff;
}

.v2-services__title span {
    color: #d9c8ff;
}

/* ================================================================
   Subheading
   ================================================================ */

.v2-services__subheading {
    width: min(390px, 100%);

    margin: 0;

    color: rgba(255, 255, 255, 0.70);

    font-size: 13px;

    line-height: 1.65;

    font-weight: 500;
}

/* ================================================================
   Services grid
   ================================================================ */

.v2-services__grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px;
}

/* ================================================================
   Service card
   ================================================================ */

.v2-service-card {
    position: relative;

    min-width: 0;

    min-height: 185px;

    padding: 17px 19px 16px;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.105),
            rgba(255, 255, 255, 0.045)
        );

    border: 1px solid rgba(255, 255, 255, 0.105);

    border-radius: 17px;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07);

    overflow: hidden;

    opacity: 0;
    transform: translateY(25px);

    transition:
        opacity 0.65s ease,
        transform 0.65s ease,
        border-color 0.3s ease,
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.v2-service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Top highlight line */

.v2-service-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 19px;
    right: 19px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.24),
            transparent
        );

    opacity: 0.8;
}

/* Hover glow */

.v2-service-card::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    right: -75px;
    bottom: -90px;

    border-radius: 50%;

    background: rgba(98, 34, 213, 0.22);

    filter: blur(20px);

    opacity: 0;

    transition: opacity 0.35s ease;

    pointer-events: none;
}

.v2-service-card:hover {
    transform: translateY(-5px);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.065)
        );

    border-color: rgba(255, 255, 255, 0.22);

    box-shadow:
        0 18px 40px rgba(20, 8, 53, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.v2-service-card:hover::after {
    opacity: 1;
}

/* ================================================================
   Featured card
   ================================================================ */

.v2-service-card--featured {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.15),
            rgba(98, 34, 213, 0.13)
        );

    border-color: rgba(255, 255, 255, 0.20);

    box-shadow:
        0 12px 35px rgba(20, 8, 53, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}


/* ================================================================
   Card top
   ================================================================ */

.v2-service-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 13px;
}

.v2-service-card__number {
    color: rgba(255, 255, 255, 0.28);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1px;
}

.v2-service-card__icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: #fff;

    background: rgba(255, 255, 255, 0.09);

    border: 1px solid rgba(255, 255, 255, 0.13);

    transition:
        transform 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.v2-service-card__icon svg {
    width: 19px;
    height: 19px;
}

.v2-service-card:hover .v2-service-card__icon {
    transform: translateY(-2px) rotate(-3deg);

    background: rgba(255, 87, 87, 0.15);

    border-color: rgba(255, 87, 87, 0.28);
}

/* ================================================================
   Card content
   ================================================================ */

.v2-service-card__title {
    margin: 0 0 8px;

    color: #fff;

    font-size: clamp(15px, 1.25vw, 17px);

    line-height: 1.25;

    letter-spacing: -0.35px;

    font-weight: 800;
}

.v2-service-card__text {
    margin: 0;

    color: rgba(255, 255, 255, 0.62);

    font-size: 10.5px;

    line-height: 1.55;

    font-weight: 500;
}

/* ================================================================
   Service link
   ================================================================ */

.v2-service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    width: fit-content;

    margin-top: auto;
    padding-top: 12px;

    color: rgba(255, 255, 255, 0.90);

    font-size: 10px;

    font-weight: 800;

    text-decoration: none;

    transition:
        color 0.25s ease,
        gap 0.25s ease;
}

.v2-service-card__link svg {
    width: 14px;
    height: 14px;

    transition:
        transform 0.25s ease;
}

.v2-service-card__link:hover {
    color: #ffaaa7;

    gap: 9px;
}

.v2-service-card__link:hover svg {
    transform: translateX(2px);
}

/* ================================================================
   Footer CTA
   ================================================================ */

.v2-services__footer {
    display: flex;
    justify-content: center;

    margin-top: 19px;

    opacity: 0;
    transform: translateY(12px);

    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
}

.v2-services__footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.v2-services__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 11px 21px;

    border-radius: 999px;

    background: var(--v2-secondary);

    color: #fff;

    font-size: 12px;

    font-weight: 800;

    text-decoration: none;

    box-shadow:
        0 10px 25px rgba(255, 87, 87, 0.23);

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

.v2-services__button svg {
    width: 15px;
    height: 15px;

    transition: transform 0.25s ease;
}

.v2-services__button:hover {
    color: #fff;

    background: #ff6d6d;

    transform: translateY(-3px);

    box-shadow:
        0 14px 30px rgba(255, 87, 87, 0.30);
}

.v2-services__button:hover svg {
    transform: translateX(3px);
}

/* ================================================================
   Desktop height optimization
   ================================================================ */

@media (min-width: 992px) and (max-height: 820px) {

    .v2-services {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .v2-services__header {
        margin-bottom: 18px;
    }

    .v2-services__eyebrow {
        margin-bottom: 8px;
        padding: 6px 11px;
    }

    .v2-services__title {
        font-size: 34px;
    }

    .v2-services__grid {
        gap: 9px;
    }

    .v2-service-card {
        min-height: 164px;
        padding: 13px 16px 12px;
    }

    .v2-service-card__top {
        margin-bottom: 8px;
    }

    .v2-service-card__icon {
        width: 34px;
        height: 34px;
    }

    .v2-service-card__icon svg {
        width: 17px;
        height: 17px;
    }

    .v2-service-card__title {
        margin-bottom: 5px;
        font-size: 14px;
    }

    .v2-service-card__text {
        font-size: 9.5px;
        line-height: 1.45;
    }

    .v2-service-card__link {
        padding-top: 7px;
        font-size: 9px;
    }

    .v2-services__footer {
        margin-top: 12px;
    }
}

/* ================================================================
   Tablet
   ================================================================ */

@media (max-width: 991.98px) {

    .v2-services {
        min-height: auto;

        padding:
            75px
            0
            80px;
    }

    .v2-services__header {
        align-items: flex-start;
        flex-direction: column;

        gap: 17px;

        margin-bottom: 30px;
    }

    .v2-services__subheading {
        width: min(600px, 100%);
    }

    .v2-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .v2-service-card {
        min-height: 205px;
    }

    .v2-service-card__text {
        font-size: 11px;
    }
}

/* ================================================================
   Mobile
   ================================================================ */

@media (max-width: 767.98px) {

    .v2-services {
        padding:
            65px
            0
            70px;
    }

    .v2-services__inner {
        padding:
            0
            18px;
    }

    .v2-services__header {
        gap: 14px;

        margin-bottom: 25px;
    }

    .v2-services__eyebrow {
        font-size: 9px;

        padding: 7px 11px;
    }

    .v2-services__title {
        font-size: clamp(30px, 8vw, 38px);

        line-height: 1.08;

        letter-spacing: -1.1px;
    }

    .v2-services__subheading {
        font-size: 13px;

        line-height: 1.65;
    }

    .v2-services__grid {
        grid-template-columns: 1fr;

        gap: 11px;
    }

    .v2-service-card {
        min-height: 0;

        padding: 17px 17px 16px;

        border-radius: 16px;
    }

    .v2-service-card__top {
        margin-bottom: 12px;
    }

    .v2-service-card__icon {
        width: 41px;
        height: 41px;
    }

    .v2-service-card__title {
        font-size: 16px;
    }

    .v2-service-card__text {
        font-size: 11px;

        line-height: 1.6;
    }

    .v2-service-card__link {
        margin-top: 14px;

        padding-top: 0;

        font-size: 10.5px;
    }

    .v2-services__footer {
        margin-top: 25px;
    }

    .v2-services__button {
        padding: 12px 21px;

        font-size: 12px;
    }
}

/* ================================================================
   Small phones
   ================================================================ */

@media (max-width: 420px) {

    .v2-services {
        padding:
            55px
            0
            60px;
    }

    .v2-services__title {
        font-size: 29px;
    }

    .v2-service-card {
        padding: 15px;
    }

    .v2-service-card__text {
        font-size: 10.5px;
    }
}

/* ================================================================
   Reduced motion
   ================================================================ */

@media (prefers-reduced-motion: reduce) {

    .v2-services__header,
    .v2-service-card,
    .v2-services__footer {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .v2-service-card:hover,
    .v2-services__button:hover {
        transform: none;
    }

    .v2-service-card:hover .v2-service-card__icon {
        transform: none;
    }
}