/**
 * Services Section Block Styles
 *
 * @package Realar Child
 */

/* Services Section */
.services-section {
    position: relative;
    width: 100%;
    background-color: #2B2B2B;
    overflow: hidden;
}

.services-section__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.services-section__container {
    position: relative;
    max-width: 1680px;
    margin: 0 auto;
    padding: 80px 20px;
    z-index: 1;
}

/* Header */
.services-section__header {
    margin-bottom: 60px;
}

.services-section__title {
    color: #EEEDE9;
    font-size: 48px;
    font-family: var(--second-family);
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* Header Row - Description left, Button right */
.services-section__header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.services-section__description {
    flex: 1;
    max-width: 1305px;
}

.services-section__description p {
    color: #EEEDE9;
    font-size: 18px;
    font-family: var(--font-family);
    line-height: 1.8;
    margin-bottom: 20px;
}

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

/* Button in header */
.services-section__button-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.services-section__button-wrapper--mobile {
    display: none;
}

.services-section__scroll-btn {
    display: none;
}

.services-section__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 21px 33px;
    background-color: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.services-section__btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.services-section__btn-text {
    color: #FFFFFF;
    font-size: 16px;
    font-family: var(--font-family);
    white-space: nowrap;
}

.services-section__btn-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-section__btn-icon svg {
    width: 100%;
    height: 100%;
}

/* Service Cards Grid */
.services-section__grid {
    display: flex;
    gap: 38px;
}

.services-section__card {
    background-color: #655442;
    border-radius: 41px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 40px 23px 15px;
}

.services-section__card-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.services-section__card-title {
    color: #EEEDE9;
    font-size: 24px;
    font-family: var(--second-family);
    font-weight: bold;
    line-height: 1.3;
}

.services-section__card-description p{
    color: #FFFFFF;
    font-size: 16px;
    font-family: var(--font-family);
    line-height: 1.6;
    text-align: justify;
}

.services-section__card-description p {
    margin-bottom: 12px;
}

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

.services-section__card-image {
    width: 100%;
    height: 327px;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 30px;
}

.services-section__card-img {
    max-width: fit-content!important;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 1600px) {
    .services-section__container {
        padding: 60px 80px;
    }

    .services-section__title {
        font-size: 40px;
    }

    .services-section__description p {
        font-size: 16px;
    }

    .services-section__card {
        padding: 30px;
    }

    .services-section__card-title {
        font-size: 22px;
    }

    .services-section__card-image {
        height: 280px;
    }

    .services-section__grid {
        gap: 25px;
    }
}

@media (max-width: 1200px) {
    .services-section {
        min-height: auto;
    }

    .services-section__container {
        padding: 50px 40px;
    }

    .services-section__header-row {
        flex-direction: column;
        gap: 30px;
    }

    .services-section__button-wrapper {
        align-self: flex-start;
    }

    .services-section__grid {
        flex-wrap: wrap;
    }

    .services-section__card {
        flex: 1 1 calc(50% - 20px);
        min-width: 300px;
    }

    .services-section__title {
        font-size: 36px;
    }

    .services-section__card-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .services-section__container {
        padding: 40px 20px;
    }

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

    .services-section__title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .services-section__description p {
        font-size: 15px;
    }

    .services-section__card {
        flex: 1 1 100%;
        padding: 25px;
        border-radius: 30px;
    }

    .services-section__card-title {
        font-size: 20px;
    }

    .services-section__card-description {
        font-size: 15px;
    }

    .services-section__card-image {
        height: 220px;
    }

    .services-section__btn {
        width: 100%;
    }
}

/* @media (max-width: 480px) {
    .services-section__container {
        padding: 30px 15px;
    }

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

    .services-section__card {
        padding: 20px;
        border-radius: 24px;
    }

    .services-section__card-image {
        height: 200px;
    }
} */

/* Mobile: max-width 550px */
@media (max-width: 550px) {

    .services-section {
        width: 100%;
        margin: 0 auto;
        min-height: auto;
    }

    .services-section__container {
        width: 100%;
        margin: 0 auto;
        padding: 60px 24px;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

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

    .services-section__header-row {
        flex-direction: column;
        gap: 8px;
    }

    .services-section__title {
        font-size: 34px;
        font-family: var(--second-family);
        font-weight: bold;
        color: rgba(238, 237, 233, 1);
        text-align: left;
        margin-bottom: 0;
    }

    .services-section__description p {
        color: rgba(255, 255, 255, 1);
        font-size: 16px;
        font-family: var(--font-family);
        text-align: left;
    }

    /* Hide desktop button, show mobile button */
    .services-section__button-wrapper--desktop {
        display: none !important;
    }

    .services-section__button-wrapper--mobile {
        display: flex !important;
        justify-content: center;
        margin: 0 auto;
        padding-top: 24px;
    }

    /* Mobile button style */
    .services-section__btn--mobile {
        background-color: rgba(101, 84, 66, 1);
        border: none;
        padding: 21px 32px;
        gap: 8px;
        border-radius: 50px;
    }

    .services-section__btn--mobile .services-section__btn-text {
        color: rgba(238, 238, 238, 1);
    }

    /* Cards wrapper with nav button */
    .services-section__cards-wrapper {
        position: relative;
    }

    .services-section__scroll-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 184px;
        height: 106px;
        min-width: 184px;
        min-height: 106px;
        padding: 0;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .services-section__scroll-btn:hover {
        opacity: 0.9;
        transform: translateY(-50%) scale(1.02);
    }

    .services-section__scroll-btn:active {
        transform: translateY(-50%) scale(0.98);
    }

    .services-section__scroll-btn svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .services-section__card {
        position: relative;
        z-index: 1;
    }

    .services-section__card.is-active {
        z-index: 3;
    }

    /* Horizontal scrollable cards */
    .services-section__grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 0 12px;
    }

    .services-section__grid::-webkit-scrollbar {
        display: none;
    }

    .services-section__card {
        flex: 0 0 315px;
        min-width: 315px;
        max-width: 315px;
        padding: 40px 23px 15px;
        border-radius: 41px;
    }

    .services-section__card-title {
        font-size: 24px;
        font-family: var(--second-family);
        font-weight: bold;
        color: rgba(238, 237, 233, 1);
    }

    .services-section__card-description p {
        color: rgba(255, 255, 255, 1);
        font-size: 16px;
    }

    .services-section__card-image {
        height: 291px;
        border-radius: 20px;
        margin-top: 0;
        margin-left: -12px;
        margin-right: -12px;
        width: calc(100% + 24px);
    }

    .services-section__card-img {
        width: 100%;
        height: 100%!important;
        object-fit: cover;
    }
}
