:root {
    --riteway-red: #ED1C24;
    --primary-blue: #0a1d37;
    --dark-overlay: rgba(5, 7, 42, 0.6);
    --white: #ffffff;
    --light-blue-bg: #c9e2f5;
    --text-gray: #444;
}
.services {

    section {
        padding: 40px 0;
    }

    @media (max-width: 480px) {
        section {
            padding: 35px 0;
        }
    }

    .hero {
        position: relative;
        width: 100%;
        min-height: 300px;
        text-align: center;
        padding: 68px 0 124px;

        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
                rgba(10, 8, 40, 0.5),
                rgba(5, 7, 42, 0.7)
        );
    }

    @media (max-width: 480px) {
        .hero {
            padding: 65px 0 80px;
        }
    }

    .hero__title {
        font-size: 64px;
        line-height: 72px;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: -2px;
        text-align: center;
    }

    .hero__title:not(:last-child) {
        margin-bottom: 24px;
    }

    @media (max-width: 992px) {
        .hero__title {
            font-size: 48px;
            line-height: 56px;
            margin-bottom: 16px;
        }
    }
    @media (max-width: 768px) {
        .hero__title {
            font-size: 32px;
            line-height: 40px;
        }
    }
    @media (max-width: 480px) {
        .hero__title:not(:last-child) {
            margin-bottom: 15px;
        }
    }

    .hero__content {
        position: relative;
        z-index: 1;
    }

    .hero__text {
        font-size: 20px;
        line-height: 32px;
        text-align: center;
        color: #fff;
        max-width: 800px;
        margin: 0 auto 32px;
    }

    @media (max-width: 768px) {
        .hero__text {
            font-size: 18px;
            line-height: 28px;
            margin-bottom: 24px;
        }
    }


    .hero__btn {
        text-align: center;
    }

    .content {
        position: relative;
        margin-top: -32px;
        background-color: #fff;
        border-top-left-radius: 32px;
        border-top-right-radius: 32px;
        z-index: 1;
    }

    .precision-plumbing-fixture__wrapper {
        display: grid;
        grid-template-columns: 1fr 1.15fr;
        justify-content: space-between;
        align-items: center;
        gap: 122px;
    }

    @media (max-width: 1280px) {
        .precision-plumbing-fixture__wrapper {
            gap: 80px;
        }
    }

    @media (max-width: 1100px) {
        .precision-plumbing-fixture__wrapper {
            grid-template-columns: 1fr;
            gap: 40px;
        }
    }

    .precision-plumbing-fixture__title {
        margin-bottom: 40px;
    }

    @media (max-width: 768px) {
        .precision-plumbing-fixture__title {
            margin-bottom: 24px;
        }
    }

    .precision-plumbing-fixture__text {
        font-size: 16px;
        line-height: 24px;
        @media (max-width: 480px) {
            text-align: justify;
        }
    }

.precision-plumbing-fixture__images-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "big top"
        "big bottom";
    gap: 32px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .precision-plumbing-fixture__images-grid {
        gap: 14px;
        max-width: 680px;
        margin: 0 auto;
    }
}

.image {
    position: relative;
        border-radius: 16px;
        overflow: hidden;
    }

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image--big {
    grid-area: big;
    aspect-ratio: auto;
    height: 100%;
    align-self: stretch;
}

.image--top {
    grid-area: top;
    aspect-ratio: auto;
    height: 100%;
}

.image--bottom {
    grid-area: bottom;
    aspect-ratio: auto;
    height: 100%;
}

@media (max-width: 1100px) {
    .image {
        border-radius: 14px;
    }

    .image--big {
        aspect-ratio: auto;
        height: 100%;
    }

    .image--top,
    .image--bottom {
        aspect-ratio: auto;
        height: 100%;
    }
}

@media (max-width: 600px) {
    .precision-plumbing-fixture__images-grid {
        gap: 10px;
    }

    .image {
        border-radius: 12px;
    }

    .image--big {
        aspect-ratio: auto;
        height: 100%;
    }

    .image--top,
    .image--bottom {
        aspect-ratio: auto;
        height: 100%;
    }
}
}

.services-breadcrumbs-desktop {
    display: block;
}

.services-breadcrumbs-mobile {
    display: none;
}

.services-breadcrumbs {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.services-breadcrumbs__home,
.services-breadcrumbs__search-btn {
    width: 96px;
    height: 68px;
    border: none;
    border-radius: 16px;
    background: #EDF2FF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.services-breadcrumbs__title {
    margin: 0;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 500;
    text-align: center;
    color: #1A0D0E;
}

.services-breadcrumbs__archive-link {
    color: #140101;
    text-decoration: none;
}

.services-breadcrumbs__separator {
    color: #140101;
}

.services-breadcrumbs__current {
    color: #ED1C24;
}

.services-breadcrumbs__archive-link:visited,
.services-breadcrumbs__archive-link:hover,
.services-breadcrumbs__archive-link:focus {
    color: #140101;
    text-decoration: none;
}

main.services #breadcrumbs a {
    color: #140101 !important;
}

main.services #breadcrumbs span:not(.breadcrumb_last) {
    color: #140101 !important;
}

main.services #breadcrumbs .breadcrumb_last {
    color: #ED1C24 !important;
}

.services-breadcrumbs__search {
    position: relative;
    margin-left: auto;
}

.services-breadcrumbs__search-form {
    position: absolute;
    right: 0;
    top: 0;
    width: min(420px, 70vw);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.services-breadcrumbs__search.is-open .services-breadcrumbs__search-form {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
}

.services-breadcrumbs__search-input {
    width: 100%;
    height: 68px;
    border-radius: 16px;
    border: 1px solid #D8E1F5;
    background: #fff;
    padding: 0 18px;
    font-size: 18px;
    line-height: 1.2;
    color: #1A0D0E;
    outline: none;
}

.services-breadcrumbs__search.is-error .services-breadcrumbs__search-input {
    border-color: #ED1C24;
    box-shadow: 0 0 0 1px #ED1C24 inset;
}

.services-breadcrumbs__search-list {
    display: none;
    position: absolute;
    right: 0;
    top: 76px;
    width: min(420px, 70vw);
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    border-radius: 14px;
    border: 1px solid #D8E1F5;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 24, 40, 0.14);
    z-index: 20;
}

.services-breadcrumbs__search-list.is-visible {
    display: block;
}

.services-breadcrumbs__search-item {
    margin: 0;
}

.services-breadcrumbs__search-option {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.35;
    color: var(--color-text-main);
    cursor: pointer;
}

.services-breadcrumbs__search-option:hover {
    background: #EDF2FF;
}

.services-breadcrumbs__search-empty {
    padding: 12px;
    font-size: 14px;
    line-height: 1.3;
    color: #667085;
}

@media (max-width: 768px) {
    .services-breadcrumbs {
        grid-template-columns: 84px 1fr 84px;
    }

    .services-breadcrumbs__home {
        width: 60px;
        height: 40px;
    }

    .services-breadcrumbs__search-btn {
        width: 40px;
        height: 40px;
    }

    .services-breadcrumbs__title {
        font-size: 34px;
    }

    .services-breadcrumbs__search-input {
        height: 62px;
    }
}

@media (max-width: 480px) {
    .services-breadcrumbs-desktop {
        display: none;
    }

    .services-breadcrumbs-mobile {
        display: block;
    }

    .services-breadcrumbs {
        grid-template-columns: 96px 1fr 96px;
    }

    .services-breadcrumbs__title {
        font-size: 16px;
        line-height: 24px;
        text-align: left;
        padding-left: 8px;
    }

    .services-breadcrumbs__search-form {
        top: calc(100% + 4px);
        width: calc(100vw - 32px);
    }

    .services-breadcrumbs__search-input {
        height: 56px;
        font-size: 16px;
        border-radius: 12px;
    }

    .services-breadcrumbs__search-list {
        top: calc(100% + 55px);
        width: calc(100vw - 32px);
        border-radius: 12px;
    }
}

/* --- SECTION 1: SERVICES GRID --- */
.services-section {
    text-align: center;
    background-color: #fff;
}

/* Keep service card content centered like Home section */
.services .services-section .service-overlay {
    display: block;
}

.services-section .service-overlay {
    display: block;
}

.services-section .service-item {
    position: relative;
}

.services .services-section .service-content {
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
}

.main-title {
    font-size: 42px;
    font-weight: 500;
    margin-bottom: 50px;
    color: #1a1a1a;
}


@media (max-width: 650px) {

    .main-title {
        font-size: 32px;
    }
}

.section-how-it-works__title {
    text-align: center;
    margin-bottom: 32px;
}

.section-how-it-works__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .section-how-it-works__items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .section-how-it-works__items {
        grid-template-columns: 1fr;
    }
}

/*How it works section*/
.section-how-it-works__item {
    background-color: #EDF2FF;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 33px;
    text-align: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .section-how-it-works__item {
        padding: 24px;
    }
}

.section-how-it-works__item-title {
    font-size: 20px;
    line-height: 32px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #0F172A;
}

.section-how-it-works__item-text {
    font-size: 16px;
    line-height: 24px;
    color: var(--color-text-main);
}

.section-how-it-works__icon {
    width: 64px;
    height: 64px;
    background-color: #ED1C24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.section-how-it-works__icon img {
    width: 24px;
    height: 24px;
}

.section-how-it-works__step {
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-text-main);
    font-weight: 600;
    background-color: #DBE5FF;
    border-radius: 9999px;
    padding: 4px 12px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    body.single-services .section-how-it-works__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 16px;
        align-items: start;
    }

    body.single-services .section-how-it-works__item {
        position: relative;
        min-height: 160px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 17px 13px;
        border: none;
        cursor: pointer;
        z-index: 1;
        transition: box-shadow 0.2s ease;
    }

    body.single-services .section-how-it-works__step {
        position: absolute;
        top: 17px;
        left: 13px;
        padding: 0;
        background: transparent;
        margin: 0;
        display: block;
    }

    body.single-services .section-how-it-works__step span:first-child {
        display: none;
    }

    body.single-services .section-how-it-works__step span:last-child {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #A4BEF5;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 8px;
        line-height: 1;
        font-weight: 400;
    }

    body.single-services .section-how-it-works__icon {
        width: auto;
        height: auto;
        background: transparent;
        margin-bottom: 15px;
    }

    body.single-services .section-how-it-works__icon img {
        width: 40px;
        height: 40px;
        filter: brightness(0) saturate(100%) invert(20%) sepia(99%) saturate(5128%) hue-rotate(350deg) brightness(101%) contrast(88%);
    }

    body.single-services .section-how-it-works__item-title {
        margin-bottom: 0;
        font-size: 14px;
        line-height: 20px;
    }

    body.single-services .section-how-it-works__item-text {
        display: none;
        margin-top: 14px;
        font-size: 12px;
        line-height: 24px;
    }

    body.single-services .section-how-it-works__item.is-open {
        background: #EDF2FF;
        box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
        border-radius: 12px;
        z-index: 8;
    }

    body.single-services .section-how-it-works__item.is-open .section-how-it-works__item-text {
        display: block;
    }
}

/*end of how it works section*/

/*Swiper styles for services section*/
.services-section--swiper {
    .services-section--swiper .swiper-slide {
        transition: transform 0.3s;
    }

    .services-swiper-button-next,
    .services-swiper-button-prev {
        width: 67px;
        height: 67px;
        background-color: var(--riteway-red);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    @media (max-width: 767px) {
        .services-swiper-button-next,
        .services-swiper-button-prev {
            width: 50px;
            height: 50px;
            opacity: 0.8;
        }
    }

    .services-swiper-wrapper {
        position: relative;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    @media (max-width: 767px) {
        .services-swiper-wrapper {
            padding: 0 16px;
        }
    }

    .services-swiper-button-next {
        right: calc((100vw - 1320px) / 2 - 82px);
    }

    .services-swiper-button-prev {
        left: calc((100vw - 1320px) / 2 - 82px);
    }

    @media (max-width: 1500px) {
        .services-swiper-button-next {
            right: 20px;
        }
        .services-swiper-button-prev {
            left: 20px;
        }
    }
    @media (max-width: 767px) {
         .services-swiper-button-next {
            right: 10px;
        }
        .services-swiper-button-prev {
            left: 10px;
        }
    }

    .services-swiper-button-next:hover,
    .services-swiper-button-prev:hover {
        background-color: rgba(200, 20, 30, 1);
    }
    .service-item:hover {
        transform: translateY(0px);
    }

    .service-overlay p {
        max-width: 376px;
        margin: 0 auto 15px;
    }

    .service-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .services-swiper-scrollbar {
        height: 5px;
        background: #EDF2FF;
        border-radius: 16px;
        margin: 32px auto 0;
        width: 1320px;
        max-width: 100%;
    }

    .services-swiper-scrollbar .swiper-scrollbar-drag {
        background: #2C67E6;
        border-radius: 16px;
    }

    .services-section-title {
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    body.single-services .services-section--swiper .services-swiper-button-next,
    body.single-services .services-section--swiper .services-swiper-button-prev {
        display: none;
    }

    body.single-services .services-section--swiper .services-swiper-scrollbar {
        width: 240px;
        max-width: 240px;
    }

    body.single-services .services-section--swiper .services-swiper-wrapper {
        padding: 0 8px;
    }

    body.single-services .services-section--swiper .swiper-slide {
        height: auto;
    }

    body.single-services .services-section--swiper .service-item {
        height: 94px;
        border-radius: 12px;
        overflow: hidden;
        transform: none;
        cursor: pointer;
    }

    body.single-services .services-section--swiper .service-item:hover {
        transform: none;
    }

    body.single-services .services-section--swiper .service-item.is-expanded {
        height: 94px;
        min-height: 0;
        grid-column: auto;
    }

    body.single-services .services-section--swiper .service-overlay {
        justify-content: center;
        align-items: center;
        padding: 8px;
        background: linear-gradient(0deg, rgba(6, 10, 38, 0.72), rgba(6, 10, 38, 0.72));
    }

    body.single-services .services-section--swiper .service-item:hover .service-overlay,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay {
        padding: 8px;
        background: linear-gradient(0deg, rgba(6, 10, 38, 0.72), rgba(6, 10, 38, 0.72));
    }

    body.single-services .services-section--swiper .service-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    body.single-services .services-section--swiper .service-overlay h3,
    body.single-services .services-section--swiper .service-item:hover .service-overlay h3,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay h3 {
        margin: 0;
        font-size: 14px;
        line-height: 20px;
        font-weight: 500;
    }

    body.single-services .services-section--swiper .service-overlay .divider,
    body.single-services .services-section--swiper .service-overlay p,
    body.single-services .services-section--swiper .service-overlay .service-btn-wrapper,
    body.single-services .services-section--swiper .service-overlay .btn-red {
        display: none;
    }
}
/* Add some spacing between slides */

@media (max-width: 480px) {
    .services .services-section .services-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .services .services-section .service-item {
        height: 84px;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.25s ease;
    }

    .services .services-section .service-overlay {
        padding: 8px;
        background: linear-gradient(0deg, rgba(6, 10, 38, 0.72), rgba(6, 10, 38, 0.72));
    }

    .services .services-section .service-content {
        height: 100%;
    }

    .services .services-section .service-overlay h3 {
        margin: 0;
        font-size: 14px;
        line-height: 20px;
        font-weight: 500;
    }

    .services .services-section .service-overlay .divider,
    .services .services-section .service-overlay p,
    .services .services-section .service-overlay .service-btn-wrapper {
        display: none;
    }

    .service-btn-wrapper .btn-red {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 136px;
        min-height: 34px;
        padding: 0 10px;

        font-size: 16px;
        line-height: 22px;
    }

    .services .services-section .service-item.is-expanded {
        grid-column: 1 / -1;
        min-height: 310px;
        border-radius: 16px;
    }

    @media (hover: hover) and (pointer: fine) {
        .services .services-section .service-item:hover {
            grid-column: 1 / -1;
            height: 246px;
            border-radius: 16px;
        }
    }

    .services .services-section .service-item.is-expanded .service-overlay {
        padding: 20px 23px;
        background: linear-gradient(0deg, rgba(6, 10, 38, 0.74), rgba(6, 10, 38, 0.74));
    }

    @media (hover: hover) and (pointer: fine) {
        .services .services-section .service-item:hover .service-overlay {
            padding: 20px 16px;
            background: linear-gradient(0deg, rgba(6, 10, 38, 0.74), rgba(6, 10, 38, 0.74));
        }
    }

    .services .services-section .service-item.is-expanded .service-overlay h3 {
        font-size: 26px;
        line-height: 32px;
        margin-bottom: 15px;
    }

    @media (hover: hover) and (pointer: fine) {
        .services .services-section .service-item:hover .service-overlay h3 {
            font-size: 35px;
            line-height: 42px;
            margin-bottom: 12px;
        }
    }

    .services .services-section .service-item.is-expanded .service-overlay .divider {
        display: block;
        margin-bottom: 15px;
    }

    .services .services-section .service-item.is-expanded .service-overlay p {
        display: block;
        margin-bottom: 14px;
        font-size: 14px;
        line-height: 24px;
    }

    .services .services-section .service-item.is-expanded .service-overlay .service-btn-wrapper {
        display: block;
        margin-top: 0;
    }

    @media (hover: hover) and (pointer: fine) {
        .services .services-section .service-item:hover .service-overlay .service-btn-wrapper {
            display: block;
        }
    }
}
@media (max-width: 480px) {
    body.single-services main.services .services-section--swiper .service-item,
    body.single-services .services-section--swiper .service-item {
        height: 160px !important;
        min-height: 0 !important;
    }

    body.single-services .services-section--swiper .service-item:hover,
    body.single-services .services-section--swiper .service-item.is-expanded {
        transform: none !important;
        grid-column: auto !important;
    }

    body.single-services .services-section--swiper .service-item:hover .service-overlay,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay {
        padding: 8px !important;
        background: linear-gradient(0deg, rgba(6, 10, 38, 0.72), rgba(6, 10, 38, 0.72)) !important;
    }

    body.single-services .services-section--swiper .service-item:hover .service-overlay h3,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay h3 {
        margin: 0 !important;
        font-size: 14px !important;
        line-height: 20px !important;
    }

    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay .divider,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay p,
    body.single-services .services-section--swiper .service-item.is-expanded .service-overlay .service-btn-wrapper {
        display: none !important;
    }
}

/*Text Image section*/
.image-text__wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
}
@media (max-width: 1024px) {
    .image-text__wrapper {
        gap: 30px;
    }
}
@media (max-width: 992px) {
    .image-text__wrapper {
        flex-direction: column;
        gap: 20px;
    }
}

.image-text__image {
    flex: 0 1 45%;
}

.image-text__image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.image-text__content {
    flex: 0 1 55%;
}

.image-text__title {
    margin-bottom: 38px;
}
@media (max-width: 768px) {
    .image-text__title {
        margin-bottom: 15px;
    }
}

.image-text__info p {
    font-size: 16px;
    line-height: 24px;
    color: #000000;
    margin-bottom: 20px;
}

.image-text__info p:not(:last-child) {
    margin-bottom: 16px;
}

.image-text__info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.image-text__info ul li {
    position: relative;
    font-size: 16px;
    line-height: 24px;
    color: #000000;
    margin-bottom: 12px;
}
.image-text__info ul li::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    left: -15px;
    top: 50%;
    transform: translateX(-50%);
    background-color: #ED1C24;
}

.image-text__info h3 {
    margin-bottom: 15px;
}


/* Single services: 3 centered cards + dimmed side peeks (desktop only) */
@media (min-width: 1025px) {
    body.single-services .services-section--swiper .services-swiper {
        overflow: visible;
    }

    body.single-services .services-section--swiper .services-swiper .swiper-slide .service-overlay {
        position: relative;
    }

    body.single-services .services-section--swiper .services-swiper .swiper-slide .service-overlay::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(181, 181, 189, 0.6);
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
    }

    body.single-services .services-section--swiper .services-swiper .swiper-slide.swiper-slide-visible:not(.swiper-slide-prev):not(.swiper-slide-active):not(.swiper-slide-next) .service-overlay::after {
        opacity: 1;
    }
}
