/* ==========================================================================
   KM Service Detail Page Styles (news.detail / servicesPage)
   Figma Reference: Frame 8517 / Node 1:8885, Frame 8540, Frame 8553
   ========================================================================== */

/* --- Wrapper --- */
.km-service-page {
    width: 100%;
    background-color: #FFFFFF;
    color: #2B2E31;
    overflow-x: hidden;
}

/* --- Breadcrumbs Override for Service Page --- */
.km-service-breadcrumbs-wrap {
    width: 100%;
    background-color: #FFFFFF;
}

.km-service-breadcrumbs-inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 24px 64px 24px;
    box-sizing: border-box;
}

/* --- Hero Section (Frame 8540) --- */
.km-service-hero {
    width: 100%;
    background-color: #F3F3F3;
    position: relative;
    overflow: hidden;
    padding: 70px 0 64px 0;
    min-height: 280px;
    box-sizing: border-box;
}

.km-service-hero__bg-lines {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.km-service-hero__bg-lines img {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    width: 100%;
    min-width: 100%;
    right: 0;
    object-fit: cover;
    object-position: right center;
    transition: right 0.3s ease, width 0.3s ease;
}

@media (max-width: 1600px) {
    .km-service-hero__bg-lines img {
        right: -100px;
        width: calc(100% + 100px);
    }
}

@media (max-width: 1400px) {
    .km-service-hero__bg-lines img {
        right: -160px;
        width: calc(100% + 160px);
    }
}

@media (max-width: 1200px) {
    .km-service-hero__bg-lines img {
        right: -240px;
        width: calc(100% + 240px);
    }
}

@media (max-width: 992px) {
    .km-service-hero__bg-lines img {
        right: -320px;
        width: calc(100% + 320px);
    }
}

@media (max-width: 768px) {
    .km-service-hero__bg-lines img {
        right: -380px;
        width: calc(100% + 380px);
    }
}

.km-service-hero__inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 64px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.km-service-hero__badge {
    display: inline-flex;
    align-items: center;
    background-color: #CD1719;
    height: auto;
    min-height: 63px;
    max-width: min(100%, 780px);
    padding: 12px 35px 12px 24px;
    box-sizing: border-box;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
    margin-bottom: 24px;
}

.km-service-hero__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    font-size: clamp(20px, 2vw, 36px);
    line-height: 1.25;
    color: #FFFFFF;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.km-service-hero__intro {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 860px;
}

.km-service-hero__line {
    flex-shrink: 0;
    width: 40px;
    height: 29px;
    display: flex;
    align-items: center;
}

.km-service-hero__line svg {
    display: block;
    width: 40px;
    height: 4px;
}

.km-service-hero__desc {
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 28.8px;
    color: #2B2E31;
    margin: 0;
}

/* --- Content Main Section (Frame 8553) --- */
.km-service-content {
    width: 100%;
    padding: 80px 0 100px;
    box-sizing: border-box;
    background-color: #FFFFFF;
}

.km-service-content__inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 64px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.km-service-content__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    width: 100%;
}

.km-service-content__col-main {
    flex: 1 1 0;
    min-width: 0;
    max-width: 992px;
}

.km-service-content__col-side {
    flex: 0 0 540px;
    max-width: 606px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.km-service-content__row--bottom {
    align-items: center;
    gap: 40px;
}

.km-service-content__row--bottom .km-service-content__col-main {
    flex: 0 1 820px;
    max-width: 820px;
}

/* Чертеж услуги в нижнем ряду: ширина до 964px по макету Figma */
.km-service-content__col-side--image {
    flex: 1 1 880px;
    max-width: 964px;
    width: 100%;
    align-items: flex-end;
    justify-content: center;
}

.km-service-content__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.3;
    color: #2B2E31;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.km-service-content__text {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 28.8px;
    color: #2B2E31;
    margin: 0;
}

.km-service-content__text p {
    margin: 0 0 20px;
}

.km-service-content__text p:last-child {
    margin-bottom: 0;
}

.km-service-content__subtitle {
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    font-size: 26px;
    line-height: 33.8px;
    color: #2B2E31;
    margin: 0 0 24px;
}

.km-service-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-service-list__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.km-service-list__bullet {
    width: 16px;
    height: 29px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.km-service-list__bullet svg {
    display: block;
    width: 16px;
    height: 29px;
}

.km-service-list__text {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 28.8px;
    color: #2B2E31;
    margin: 0;
}

.km-service-content__note {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 28.8px;
    color: #2B2E31;
    margin: 0;
}

.km-service-expert {
    width: 100%;
    max-width: 606px;
    min-height: 345px;
    background-color: #CD1719;
    padding: 40px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    clip-path: polygon(35px 0, 100% 0, 100% calc(100% - 35px), calc(100% - 35px) 100%, 0 100%, 0 35px);
}

.km-service-expert__avatar-box {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    flex-shrink: 0;
    background-color: #FFFFFF;
}

.km-service-expert__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.km-service-expert__quote-icon {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 90px;
    height: 90px;
    pointer-events: none;
}

.km-service-expert__info {
    position: relative;
    z-index: 2;
}

.km-service-expert__name {
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    color: #FFFFFF;
    margin: 0 0 4px;
}

.km-service-expert__post {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 12px;
    line-height: 19.2px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px;
}

.km-service-expert__quote {
    font-family: 'Geologica', sans-serif;
    font-style: italic;
    font-weight: 300;
    font-size: 16px;
    line-height: 25.6px;
    color: #FFFFFF;
    margin: 0;
}

.km-service-images {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.km-service-image-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
}

.km-service-image-card img {
    width: 100%;
    max-width: 964px;
    height: auto;
    max-height: 560px;
    display: block;
    object-fit: contain;
    object-position: right center;
}

/* --- Benefits Section (Frame 8554) --- */
.km-service-benefits {
    width: 100%;
    padding: 0 0 100px;
    box-sizing: border-box;
    background-color: #FFFFFF;
}

.km-service-benefits__inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 64px;
    box-sizing: border-box;
}

.km-service-benefits__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    font-size: clamp(28px, 2.5vw, 46px);
    line-height: 1.3;
    color: #2B2E31;
    margin: 0 0 40px;
    text-transform: uppercase;
}

.km-service-benefits__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 34px 32px;
}

.km-service-benefit-item {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 100px;
}

.km-service-benefit-item__icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.km-service-benefit-item__icon img {
    width: 80px;
    height: 80px;
    display: block;
    object-fit: contain;
}

.km-service-benefit-item__text {
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    color: #2B2E31;
    margin: 0;
    max-width: 270px;
}

/* --- Responsive Adaptability --- */
@media (max-width: 1440px) {
    .km-service-content__col-side {
        flex: 0 0 440px;
        max-width: 440px;
    }
    .km-service-content__col-side--image {
        flex: 1 1 680px;
        max-width: 780px;
    }
    .km-service-expert {
        padding: 32px;
    }
    .km-service-hero__intro {
        max-width: 650px;
    }
    .km-service-hero__bg-lines {
        width: 42vw;
    }
}

@media (max-width: 1280px) {
    .km-service-content__col-side {
        flex: 0 0 380px;
        max-width: 380px;
    }
    .km-service-content__col-side--image {
        flex: 1 1 560px;
        max-width: 640px;
    }
    .km-service-expert {
        padding: 28px 24px;
    }
    .km-service-hero__intro {
        max-width: 540px;
    }
    .km-service-hero__bg-lines {
        width: 38vw;
        opacity: 0.5;
    }
}

@media (max-width: 1080px) {
    .km-service-content__inner {
        gap: 48px;
    }
    .km-service-content__row {
        flex-direction: column;
        gap: 32px;
    }
    .km-service-content__col-main,
    .km-service-content__col-side {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .km-service-expert {
        max-width: 606px;
    }

    .km-service-hero__intro {
        max-width: 100%;
    }
    .km-service-benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .km-service-breadcrumbs-inner,
    .km-service-hero__inner,
    .km-service-content__inner,
    .km-service-benefits__inner {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}

@media (max-width: 768px) {
    .km-service-hero {
        padding: 48px 0;
    }
    .km-service-content {
        padding: 48px 0 64px;
    }
    .km-service-benefits {
        padding: 0 0 64px;
    }
    .km-service-benefits__grid {
        grid-template-columns: 1fr;
    }
    .km-service-breadcrumbs-inner,
    .km-service-hero__inner,
    .km-service-content__inner,
    .km-service-benefits__inner {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .km-service-hero__badge {
        height: auto;
        padding: 12px 24px;
        clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    }
    .km-service-expert {
        padding: 24px;
        clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    }
}
