/* #151 service styles
 * 1. Shared by every ss_services post: FAQ accordion button reset, new layouts (checklist cards, process steps).
 * 2. Redesign look (Figma 03 Service) - only on posts with the "ss_services_redesign" toggle on
 *    (single-ss_services.php adds body class .ss-151-service).
 */

/* ---------------------------------------------------------------
 * 1a. FAQ accordion: the question is now a <button> (was <strong>).
 * Neutralise the theme's global button styles so it looks exactly as before.
 * --------------------------------------------------------------- */
.single-ss_services .ssAccordion .ssAccordionBtn,
.single-ss_services .ssAccordion .ssAccordionBtn:hover,
.single-ss_services .ssAccordion .ssAccordionBtn:focus {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: rgba(0, 0, 0, 0.80);
    font-family: inherit;
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
}

.single-ss_services .ssAccordion .ssAccordionBtn:focus:not(:focus-visible) {
    outline: none;
}

.single-ss_services .ssAccordion .ssAccordionBtn:focus-visible {
    outline: 2px solid #CC0F20;
    outline-offset: -2px;
}

@media(min-width: 992px) {
    .single-ss_services .ssAccordion .ssAccordionBtn,
    .single-ss_services .ssAccordion .ssAccordionBtn:hover,
    .single-ss_services .ssAccordion .ssAccordionBtn:focus {
        font-size: 18px;
    }
}

@media(min-width: 1310px) {
    .single-ss_services .ssAccordion .ssAccordionBtn,
    .single-ss_services .ssAccordion .ssAccordionBtn:hover,
    .single-ss_services .ssAccordion .ssAccordionBtn:focus {
        font-size: 20px;
    }
}

/* ---------------------------------------------------------------
 * 1b. Checklist cards layout ("Which Outlet Does Each Room Need?")
 * --------------------------------------------------------------- */
.ss-checklistBlock {
    background: #FAF3E0 url('../images/151/service-which-bg.jpg') center / cover no-repeat;
    color: #111111;
}

.ss-checklistBlock .ss-container {
    max-width: 1210px;
}

.ss-checklistBlock__header h2 {
    margin-bottom: 20px;
}

.ss-checklistBlock__intro {
    max-width: 860px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.5;
}

.ss-checklistBlock__intro p,
.ss-checklistBlock__foot p,
.ss-checklistBlock__text p {
    margin-bottom: 12px;
}

.ss-checklistBlock__intro p:last-child,
.ss-checklistBlock__foot p:last-child,
.ss-checklistBlock__text p:last-child {
    margin-bottom: 0;
}

.ss-checklistBlock__list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.ss-checklistBlock__item {
    background-color: #ffffff;
    padding: 20px;
    margin: 0;
    font-size: 16px;
    line-height: 26px;
}

.ss-checklistBlock__icon {
    display: block;
    width: 20px;
    height: 20px;
    margin-bottom: 12px;
}

.ss-checklistBlock__foot {
    margin-top: 24px;
    font-size: 16px;
    line-height: 26px;
}

@media(min-width: 768px) {
    .ss-checklistBlock__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .ss-checklistBlock__item {
        padding: 28px;
        min-height: 166px;
    }

    .ss-checklistBlock__intro {
        font-size: 18px;
        line-height: 28px;
    }
}

@media(min-width: 992px) {
    .ss-checklistBlock__header h2 {
        margin-bottom: 28px;
    }

    .ss-checklistBlock__list,
    .ss-checklistBlock__foot {
        margin-top: 28px;
    }
}

/* ---------------------------------------------------------------
 * 1c. Process steps layout ("How Our Outlet Installation Works")
 * Mobile/tablet: vertical timeline. >=1200px: horizontal "circuit" with cards alternating above/below.
 * --------------------------------------------------------------- */
.ss-processBlock {
    background-color: #F3F3F3;
}

.ss-processBlock__header h2 {
    margin-bottom: 32px;
}

.ss-processBlock__list {
    --ss-steps: 5;
    position: relative;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 720px;
}

/* the wire */
.ss-processBlock__list:before {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 39px;
    width: 2px;
    background: linear-gradient(180deg, rgba(204, 15, 32, 0.25), #CC0F20);
}

/* no theme list bullets (.site-inner li:before) */
.ss-processBlock__list > .ss-processStep:before,
.ss-checklistBlock__list > .ss-checklistBlock__item:before {
    content: none;
    display: none;
}

.ss-processStep {
    position: relative;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
    margin: 0;
    padding: 0;
}

.ss-processStep:not(:last-child) {
    margin-bottom: 24px;
}

.ss-processStep__card {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    background-color: #ffffff;
    border-top: 3px solid #CC0F20;
    padding: 20px 20px 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.07);
}

.ss-processStep__card h3 {
    font-size: 20px;
    line-height: 26px;
    font-weight: 700;
    color: #000000;
    text-transform: none;
    margin: 0 0 10px;
}

.ss-processStep__card p {
    font-size: 15px;
    line-height: 24px;
    color: rgba(17, 17, 17, 0.70);
    margin: 0;
}

.ss-processStep__node {
    grid-column: 1;
    grid-row: 1;
    position: relative;
}

.ss-processStep__medallion {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid rgba(204, 15, 32, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ss-processStep__core {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #111111;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.ss-processStep__num {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #CC0F20;
    border: 3px solid #F3F3F3;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media(min-width: 992px) {
    .ss-processBlock__header h2 {
        margin-bottom: 40px;
    }
}

@media(min-width: 1200px) {
    .ss-processBlock__list {
        max-width: none;
        display: grid;
        grid-template-columns: repeat(var(--ss-steps), minmax(0, 1fr));
        grid-template-rows: minmax(221px, auto) 120px minmax(221px, auto);
    }

    .ss-processBlock__list:before {
        content: none;
        display: none;
    }

    .ss-processStep {
        grid-row: 1 / span 3;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: subgrid;
        column-gap: 0;
        padding: 0 8px;
    }

    .ss-processStep:not(:last-child) {
        margin-bottom: 0;
    }

    /* medallion row: wire segment + flow chevron + medallion */
    .ss-processStep__node {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 -8px;
    }

    .ss-processStep__node:before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 2px;
        margin-top: -1px;
        background: linear-gradient(90deg, rgba(204, 15, 32, 0.25), #CC0F20);
        background-size: calc(var(--ss-steps) * 100%) 100%;
        background-position: calc(var(--ss-step, 0) / (var(--ss-steps) - 1) * 100%) 0;
    }

    .ss-processStep:first-child .ss-processStep__node:before {
        clip-path: inset(0 0 0 50%);
    }

    .ss-processStep:last-child .ss-processStep__node:before {
        clip-path: inset(0 50% 0 0);
    }

    .ss-processStep:only-child .ss-processStep__node:before {
        display: none;
    }

    .ss-processStep + .ss-processStep .ss-processStep__node:after {
        content: '\e902';
        font-family: 'icomoon' !important;
        speak: never;
        position: absolute;
        z-index: 1;
        left: 0;
        top: 50%;
        width: 26px;
        height: 26px;
        margin: -13px 0 0 -13px;
        border-radius: 50%;
        border: 1px solid rgba(204, 15, 32, 0.35);
        background-color: #F3F3F3;
        color: #CC0F20;
        font-size: 11px;
        line-height: 24px;
        text-align: center;
    }

    .ss-processStep__card {
        grid-column: 1;
        min-height: 189px;
        padding: 26px 24px 28px;
    }

    .ss-processStep:nth-child(odd) .ss-processStep__card {
        grid-row: 1;
        align-self: end;
        margin-bottom: 32px;
        border-top: 0;
        border-bottom: 3px solid #CC0F20;
    }

    .ss-processStep:nth-child(even) .ss-processStep__card {
        grid-row: 3;
        align-self: start;
        margin-top: 32px;
    }

    /* dotted lead from card to medallion */
    .ss-processStep__card:after {
        content: '';
        position: absolute;
        left: 50%;
        height: 32px;
        margin-left: -1px;
        border-left: 2px dotted #CC0F20;
    }

    .ss-processStep:nth-child(odd) .ss-processStep__card:after {
        top: calc(100% + 3px);
    }

    .ss-processStep:nth-child(even) .ss-processStep__card:after {
        bottom: calc(100% + 3px);
    }

    .ss-processStep__medallion {
        width: 120px;
        height: 120px;
    }

    .ss-processStep__core {
        width: 88px;
        height: 88px;
        font-size: 42px;
    }

    .ss-processStep__num {
        top: 1px;
        right: auto;
        left: 85px;
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ---------------------------------------------------------------
 * 2. Redesign (body.ss-151-service) - overrides of the existing service layouts
 * --------------------------------------------------------------- */

/* Banner */
.ss-151-service .ss-banner:before {
    background: rgba(0, 0, 0, 0.55);
}

.ss-151-service .ss-banner h1 {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

@media(min-width: 992px) {
    .ss-151-service .ss-banner:before {
        background: rgba(0, 0, 0, 0.5);
    }

    .ss-151-service .ss-banner .ss-btn {
        margin-top: 24px;
    }
}

@media(min-width: 1310px) {
    .ss-151-service .ss-banner {
        padding: 80px 0;
    }

    .ss-151-service .ss-banner h1 {
        font-size: 60px;
        line-height: 72px;
        margin-bottom: 0;
    }
}

/* Intro (two columns) */
.ss-151-service .ss-twoCol .ss-item-content {
    color: #111111 !important;
    font-size: 16px;
    line-height: 1.6;
}

.ss-151-service .ss-twoCol .ss-item-content p {
    margin-bottom: 20px;
}

.ss-151-service .ss-twoCol .ss-item-content p:last-of-type {
    margin-bottom: 0;
}

.ss-151-service .ss-twoCol .ss-item-content a:not(.ss-btn) {
    color: #CC0F20;
    text-decoration: underline;
}

.ss-151-service .ss-twoCol .ss-item-content a:not(.ss-btn):hover {
    text-decoration: none;
}

.ss-151-service .ss-twoCol .ss-item-content .ss-btn {
    margin-top: 20px !important;
}

.ss-151-service .ss-item-media figure {
    margin: 0;
}

.ss-151-service .ss-item-media img {
    display: block;
    width: 100%;
    aspect-ratio: 500 / 440;
    object-fit: cover;
}

@media(min-width: 992px) {
    .ss-151-service .ss-twoCol .ss-item-content {
        font-size: 18px;
        line-height: 28px;
    }
}

@media(min-width: 1310px) {
    .ss-151-service .ss-twoCol {
        flex-wrap: nowrap;
        column-gap: 64px;
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }

    .ss-151-service .ss-twoCol .ss-item-media {
        width: 500px !important;
        flex-shrink: 0;
    }

    .ss-151-service .ss-twoCol .ss-item-content {
        width: auto !important;
        flex: 1 1 auto;
        padding-left: 0 !important;
    }
}

/* About (dark icon cards) */
.ss-151-service .ss-iconCardBlock__header p {
    margin-bottom: 0;
}

@media(min-width: 1310px) {
    .ss-151-service .ss-iconCardBlock__header h2 {
        max-width: 1140px;
        margin: 0 auto 15px;
    }

    .ss-151-service .ss-iconCardBlock__header {
        margin-bottom: 32px;
    }
}

/* Benefits (photo cards): title + red accent always visible, text revealed on hover (desktop) */
.ss-151-service .ss-hoverCard__body h3:before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    margin-bottom: 12px;
    background-color: #CC0F20;
}

.ss-151-service .ss-hoverCard__body {
    color: rgba(255, 255, 255, 0.85);
    line-height: 20px;
    padding: 24px 16px 16px;
}

@media(min-width: 992px) {
    .ss-151-service .ss-hoverCard {
        overflow: hidden;
    }

    .ss-151-service .ss-hoverCard__media:after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, 0.78) 84%, rgba(0, 0, 0, 0.92) 100%);
    }

    .ss-151-service .ss-hoverCard__body,
    .ss-151-service .ss-hoverCard:hover .ss-hoverCard__body {
        top: 0;
    }

    .ss-151-service .ss-hoverCard__body h3 {
        margin-bottom: 0;
        transition: margin .5s ease-in-out;
    }

    .ss-151-service .ss-hoverCard__body > :not(h3) {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height .5s ease-in-out, opacity .5s ease-in-out;
    }

    .ss-151-service .ss-hoverCard:hover .ss-hoverCard__body h3,
    .ss-151-service .ss-hoverCard:focus-within .ss-hoverCard__body h3 {
        margin-bottom: 8px;
    }

    .ss-151-service .ss-hoverCard:hover .ss-hoverCard__body > :not(h3),
    .ss-151-service .ss-hoverCard:focus-within .ss-hoverCard__body > :not(h3) {
        max-height: 200px;
        opacity: 1;
    }
}

/* Why choose: centred copy straight on the darkened photo */
.ss-151-service .ssWhy-choose .ss-block-bg:before {
    background-color: rgba(0, 0, 0, 0.70);
}

.ss-151-service .ssWhy-choose__inner {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    text-align: center;
    font-size: 16px;
    line-height: 26px;
    color: #ffffff;
}

.ss-151-service .ssWhy-choose__inner h2 {
    margin-bottom: 24px;
}

.ss-151-service .ssWhy-choose__inner > p {
    margin-bottom: 24px;
}

.ss-151-service .ssWhy-choose__inner > p:last-of-type {
    margin-bottom: 0;
}

.ss-151-service .ssWhy-choose__inner > p a {
    font-weight: 400;
    color: #FF7A85;
    text-decoration: underline;
}

.ss-151-service .ssWhy-choose__inner > p a:hover {
    color: #ffffff;
}

@media(min-width: 992px) {
    .ss-151-service .ssWhy-choose__inner h2 {
        font-size: 36px;
        line-height: 1.2;
    }
}

@media(min-width: 1310px) {
    .ss-151-service .ssWhy-choose .ss-block-bg {
        padding-top: 120px;
        padding-bottom: 120px;
    }

    .ss-151-service .ssWhy-choose__inner h2 {
        font-size: 44px;
    }
}

/* FAQs */
.ss-151-service .ss-faqSection .ss-title h2 {
    text-transform: uppercase;
}

.ss-151-service .ssAccordion .ssAccordionBtn,
.ss-151-service .ssAccordion .ssAccordionBtn:hover,
.ss-151-service .ssAccordion .ssAccordionBtn:focus {
    color: #000000;
}

.ss-151-service .ssAccordionBody {
    color: rgba(17, 17, 17, 0.75);
}

.ss-151-service .ssAccordionBody a {
    color: #CC0F20;
    text-decoration: underline;
}

.ss-151-service .ssAccordionBody a:hover {
    text-decoration: none;
}

@media(min-width: 992px) {
    .ss-151-service .ss-faqSection .ss-header-mb {
        margin-bottom: 40px;
    }

    .ss-151-service .ssAccordion-item:not(:last-child) {
        margin-bottom: 16px;
    }

    .ss-151-service .ssAccordionBody {
        line-height: 26px;
    }
}

@media(min-width: 1310px) {
    .ss-151-service .ssAccordion .ssAccordionBtn {
        line-height: 26px;
    }
}
