.service-menu-page,
.services-reference-page {
    margin: 0;
    padding: 0;
    background: #fff;
}

.service-cms-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #101a31 0%, #172747 58%, #22365d 100%);
}

.service-cms-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    opacity: .14;
    background-image:
        linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 42px 42px;
}

.service-cms-hero__glow {
    position: absolute;
    z-index: -1;
    width: 250px;
    height: 250px;
    border-radius: 999px;
    filter: blur(4px);
    pointer-events: none;
}

.service-cms-hero__glow--one {
    top: -150px;
    left: 4%;
    background: rgba(220, 38, 38, .32);
}

.service-cms-hero__glow--two {
    right: 5%;
    bottom: -175px;
    background: rgba(59, 130, 246, .25);
}

.service-cms-hero__inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 44px;
    text-align: center;
}

.service-cms-hero__inner--with-image {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    align-items: center;
    gap: 38px;
    text-align: left;
}

.service-cms-hero__inner--with-image h1,
.service-cms-hero__inner--with-image p {
    margin-right: 0;
    margin-left: 0;
}

.service-cms-hero__inner--with-image .service-cms-hero__actions {
    justify-content: flex-start;
}

.service-cms-hero__media {
    height: 238px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 18px 42px rgba(4, 10, 24, .28);
}

.service-cms-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-cms-hero__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, .16);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.service-cms-hero h1 {
    max-width: 820px;
    margin: 12px auto 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.service-cms-hero p {
    max-width: 700px;
    margin: 12px auto 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.65;
}

.service-cms-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.service-cms-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.service-cms-hero__button:hover {
    transform: translateY(-2px);
}

.service-cms-hero__button--primary {
    color: #fff !important;
    background: #dc2626;
    box-shadow: 0 9px 22px rgba(220, 38, 38, .28);
}

.service-cms-hero__button--primary:hover {
    background: #b91c1c;
}

.service-cms-hero__button--secondary {
    border-color: rgba(255, 255, 255, .38);
    color: #fff !important;
    background: rgba(255, 255, 255, .08);
}

.service-cms-hero__button--secondary:hover {
    background: rgba(255, 255, 255, .16);
}

.service-cms-content {
    margin: 0;
    padding: 0;
}

.service-cms-content::after {
    display: table;
    clear: both;
    content: "";
}

.service-cms-content > :first-child {
    margin-top: 0 !important;
}

.service-cms-content > :last-child,
.service-cms-content > :last-child > :last-child {
    margin-bottom: 0 !important;
}

/* Imported service HTML sometimes includes the old page wrapper spacing. */
.service-menu-page .service-detail-page {
    padding-bottom: 0 !important;
}

/* Keep forms in imported service templates compact without changing their design. */
.service-menu-page .service-detail-hero__form,
.service-menu-page .service-detail-form,
.service-menu-page .hero-form {
    padding: 20px !important;
}

.service-menu-page .service-detail-form__grid,
.service-menu-page .hero-form .form-grid {
    gap: 10px !important;
}

.service-menu-page .service-detail-form__header,
.service-menu-page .hero-form__header {
    margin-bottom: 14px !important;
}

@media (max-width: 767px) {
    .service-cms-hero__inner {
        width: min(100% - 28px, 1160px);
        padding: 30px 0 32px;
    }

    .service-cms-hero h1 {
        font-size: 30px;
    }

    .service-cms-hero p {
        font-size: 14px;
        line-height: 1.55;
    }

    .service-cms-hero__actions {
        margin-top: 16px;
    }

    .service-cms-hero__inner--with-image {
        grid-template-columns: 1fr;
        gap: 22px;
        text-align: center;
    }

    .service-cms-hero__inner--with-image h1,
    .service-cms-hero__inner--with-image p {
        margin-right: auto;
        margin-left: auto;
    }

    .service-cms-hero__inner--with-image .service-cms-hero__actions {
        justify-content: center;
    }

    .service-cms-hero__media {
        height: 190px;
    }
}
