/**
 * Services Section Block Styles
 *
 * Full-width white section with a centered title, WYSIWYG description and a
 * carousel of service cards (image, title, "Find out more" CTA) navigated by
 * blue prev / next chevron arrows displayed on the sides.
 *
 * @package ACF Child Theme
 */

:root {
    --color-primary: #3a9bf7;
    --color-grey: #f3f3f3;
    --color-text: #252525;
    --color-white: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
}

/* Section wrapper - full-width white background
   ========================================================================== */
.services-section {
    width: 100%;
    margin: 0;
    padding: 80px 0;
    background-color: var(--color-white, #ffffff);
}

.services-section__container {
    /* max-width: var(--theme-normal-container-max-width, 1290px); */
    /* width: var(--theme-container-width, 100%); */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - centered title and description
   ========================================================================== */
.services-section__header {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto 50px auto;
}

.services-section__title {
    font-family: var(--font-primary), 'Montserrat', sans-serif;
    font-size: 45px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text, #252525);
    margin: 0 0 20px 0;
}

.services-section__description {
    font-family: var(--font-primary), 'Montserrat', sans-serif;
    font-size: 22px;
    line-height: 1.7;
    color: var(--color-text, #252525);
}

.services-section__description p {
    margin: 0 0 12px 0;
}

.services-section__description p:last-child {
    margin-bottom: 0;
}

/* Slider layout
   ========================================================================== */
.services-section__slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.services-section__viewport {
    flex: 1 1 auto;
    overflow: hidden;
    width: 100%;
}

.services-section__track {
    list-style: none;
    margin: 0;
    padding: 16px 4px;
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    transition: transform 0.45s ease;
    will-change: transform;
}

.services-section__slide {
    flex: 0 0 calc((100% - (24px * 3)) / 4);
    min-width: 0;
    max-width: calc((100% - (24px * 3)) / 4);
    display: flex;
}

.services-section--cols-3 .services-section__slide {
    flex-basis: calc((100% - (24px * 2)) / 3);
    max-width: calc((100% - (24px * 2)) / 3);
}

.services-section--cols-2 .services-section__slide {
    flex-basis: calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
}

/* Service card
   ========================================================================== */
.service-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-white, #ffffff);
    border-radius: 6px;
    padding: 24px 24px 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.service-card__image-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: var(--color-grey, #f3f3f3);
}

.service-card__image {
    display: block;
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.service-card:hover .service-card__image {
    transform: scale(1.04);
}

.service-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 18px 4px 4px;
    gap: 16px;
}

.service-card__title {
    font-family: var(--font-primary), 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text, #252525);
    margin: 0;
}

/* Card CTA button
   ========================================================================== */
.service-card__btn {
    display: inline-block;
    padding: 10px 26px;
    font-family: var(--font-primary), 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    color: var(--color-white, #ffffff);
    background-color: var(--color-primary, #3a9bf7);
    border: 2px solid var(--color-primary, #3a9bf7);
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.service-card__btn:hover,
.service-card__btn:focus-visible {
    background-color: #2a86df;
    border-color: #2a86df;
    color: var(--color-white, #ffffff);
}

/* Slider navigation arrows
   ========================================================================== */
.services-section__nav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--color-primary, #3a9bf7);
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.services-section__nav:hover,
.services-section__nav:focus-visible {
    color: #2a86df;
    outline: none;
}

.services-section__nav:focus-visible {
    box-shadow: 0 0 0 3px rgba(58, 155, 247, 0.25);
}

.services-section__nav[disabled],
.services-section__nav[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

.services-section__nav-icon {
    width: 80px;
    height: 80px;
    display: block;
}

/* Tablet
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1023px) {
    .services-section {
        padding: 60px 0;
    }

    .services-section__header {
        margin-bottom: 40px;
    }

    .services-section__title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .services-section__description {
        font-size: 14px;
    }

    /* Show 2 cards per view on tablet for any desktop column setting */
    .services-section__slide,
    .services-section--cols-2 .services-section__slide,
    .services-section--cols-3 .services-section__slide,
    .services-section--cols-4 .services-section__slide {
        flex-basis: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }

    .services-section__slider {
        gap: 8px;
    }

    .services-section__nav {
        width: 38px;
        height: 38px;
    }

    .services-section__nav-icon {
        width: 24px;
        height: 24px;
    }

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

/* Mobile
   ========================================================================== */
@media (max-width: 768px) {
    .services-section {
        padding: 48px 0;
    }

    .services-section__container {
        padding: 0 16px;
    }

    .services-section__header {
        margin-bottom: 30px;
    }

    .services-section__title {
        font-size: 24px;
        margin-bottom: 14px;
    }

    .services-section__description {
        font-size: 14px;
        line-height: 1.6;
    }

    .services-section__slider {
        gap: 4px;
    }

    .services-section__track {
        gap: 16px;
    }

    /* Single card per view on mobile */
    .services-section__slide,
    .services-section--cols-2 .services-section__slide,
    .services-section--cols-3 .services-section__slide,
    .services-section--cols-4 .services-section__slide {
        flex-basis: 100%;
        max-width: 100%;
    }

    .services-section__nav {
        width: 34px;
        height: 34px;
    }

    .services-section__nav-icon {
        width: 28px;
        height: 28px;
    }

    .service-card__body {
        padding: 16px 4px 4px;
        gap: 14px;
    }

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

    .service-card__btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}
