/* Home page services (template-parts/front-page/service-cards.php):
   two bands, each a teal (menu colour) band card beside its service cards. On phones the
   band card sits above its services. Theme colours only. */

.sb-services {
    --sb-fg: #191937;
    --sb-muted: #62748a;
    --sb-line: #e1e4eb;
    --sb-accent: #ff0055;
    text-align: left;
}

.sb-services-band {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.sb-services-band + .sb-services-band {
    margin-top: 32px;
}

.sb-services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    min-width: 0;
}

/* ---------- Band card ---------- */

.sb-band-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 28px 24px 24px;
    overflow: hidden;
    border-radius: 18px;
    color: #fff;
    /* Sidebar menu font colour (rgba(50, 239, 240, .5) on the #191937 sidebar), with the theme polygon pattern */
    background: #268494 url(../uploads/bg-page-title.png) center / cover no-repeat;
    background-blend-mode: soft-light;
    box-shadow: 0 16px 40px rgba(38, 132, 148, 0.3);
}

.sb-band-label {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(25, 25, 55, 0.3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

#site .sb-band-title {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    color: #fff;
}

#site .sb-band-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

#site .sb-band-best {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
}

#site .sb-band-best strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #191937;
}

.sb-band-count {
    align-self: flex-start;
    margin-top: auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: #191937;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

/* ---------- Service cards ---------- */

.sb-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(25, 25, 55, 0.08);
    scroll-margin-top: 100px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Colour bar along the top edge */
.sb-service-card::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--sb-accent), rgba(255, 0, 85, 0.35));
}

.sb-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(255, 0, 85, 0.2);
}

/* Image on the left (on top on phones). The featured images carry their own titles and
   labels, so they are shown whole rather than cropped. */
.sb-service-media {
    position: relative;
    aspect-ratio: 768 / 706;
    overflow: hidden;
    background: #fff;
}

#site .sb-service-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.sb-service-card:hover .sb-service-media img {
    transform: scale(1.05);
}

.sb-service-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 24px 20px 20px;
}

.sb-service-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.sb-service-key {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 0, 85, 0.1);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--sb-accent);
}

#site .sb-service-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--sb-fg);
}

#site .sb-service-title a {
    color: inherit;
}

#site .sb-service-title a:hover {
    color: var(--sb-accent);
}

#site .sb-service-promise {
    margin: 0;
    color: var(--sb-muted);
}

#site .sb-service-points {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#site .sb-service-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--sb-fg);
}

/* Bullets are small ticks */
#site .sb-service-points li::before {
    content: "";
    flex: none;
    position: static;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(255, 0, 85, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23191937' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.sb-service-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--sb-line);
}

#site .sb-service-foot a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid rgba(255, 0, 85, 0.35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--sb-accent);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#site .sb-service-card:hover .sb-service-foot a,
#site .sb-service-foot a:hover,
#site .sb-service-foot a:focus-visible {
    border-color: var(--sb-accent);
    background: var(--sb-accent);
    color: #fff;
}

/* ---------- Wider screens ---------- */

/* Services stack vertically; from tablet up the image is on the left, the information on the right */
@media (min-width: 700px) {
    .sb-service-card.has-image {
        display: grid;
        grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
        align-items: stretch;
    }

    /* A clearfix pseudo-element from the theme would otherwise add an empty grid row */
    .sb-service-card::after {
        content: none;
    }

    .sb-service-media {
        height: auto;
        aspect-ratio: auto;
        min-height: 260px;
    }

    .sb-service-body {
        padding: 30px 28px 26px;
    }
}

/* Band card beside its stack of services */
@media (min-width: 1100px) {
    .sb-services-band {
        grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
        align-items: start;
    }

    /* The band card is only as tall as its text and stays in view while its
       services scroll past; it leaves with the last service of the band. */
    .sb-band-card {
        position: sticky;
        top: 24px;
    }

    .sb-band-count {
        margin-top: 6px;
    }
}

@media (max-width: 699px) {
    .sb-band-card {
        padding: 24px 20px 20px;
    }

    #site .sb-band-title {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-service-card {
        transition: none;
    }

    .sb-service-card:hover {
        transform: none;
    }
}

/* Breathing room between the banner and the section heading */
#site .services-section-title {
    padding-top: 70px;
}

@media (max-width: 699px) {
    #site .services-section-title {
        padding-top: 44px;
    }
}

/* Section title and intro: use the theme typography colours instead of inheriting white. */
#site .services-section-title.vc_separator.wpb_content_element h4 {
    color: #191937;
    font-size: 1.25rem;
    line-height: 1.35em;
}

#site .services-section-title {
    margin-bottom: 0;
}

#site .services-section-title .vc_sep_line {
    border-color: rgba(25, 25, 55, 0.12);
}

#site .services-section-desc {
    max-width: 720px;
    margin: 12px auto 0;
    text-align: center;
    color: #62748a;
}

#site .services-section-desc p {
    margin: 0;
    color: inherit;
}

/* The theme hides overflow on html, body and #site, which makes them scroll containers
   and stops position: sticky from working. Clipping gives the same visual result
   without that side effect. (This stylesheet loads on the home page only.) */
body {
    overflow-x: clip;
}

body #site.site {
    overflow: clip;
}
