
/* =========================================
   СТРАНИЦА УСЛУГИ
========================================= */

.service-detail-page {
    width: 100%;
    padding: 28px 0 80px;
    background: #ffffff;
}

.service-detail-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================
   НАВИГАЦИЯ
========================================= */

.service-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.service-breadcrumbs a {
    color: #18438C;
    text-decoration: none;
}

.service-breadcrumbs a:hover {
    text-decoration: underline;
}

/* =========================================
   ВВОДНЫЙ БЛОК
========================================= */

.service-intro {
    padding: 42px 46px;
    margin-bottom: 58px;
    background: #F4F8FD;
    border: 1px solid #E2EAF5;
    border-radius: 20px;
}

.service-intro__label,
.service-intro h1 {
    max-width: 900px;
    margin: 0 0 18px;
    color: #18438C;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 750;
    line-height: 1.2;
}

.service-intro__description {
    max-width: 850px;
    margin: 0;
    color: #526174;
    font-size: 17px;
    line-height: 1.7;
}

.service-intro__text {
    max-width: 850px;
    margin-top: 18px;
    color: #334155;
    font-size: 15px;
    line-height: 1.8;
}

.service-intro__text p:last-child {
    margin-bottom: 0;
}

/* =========================================
   ЗАГОЛОВКИ РАЗДЕЛОВ
========================================= */

.service-section-heading {
    max-width: 760px;
    margin-bottom: 26px;
}

.service-section-heading .section-label {
    margin-bottom: 9px;
}

.service-section-heading h2 {
    margin: 0 0 12px;
    color: #18438C;
    font-size: 29px;
    font-weight: 750;
    line-height: 1.3;
}

.service-section-heading p {
    margin: 0;
    color: #718096;
    font-size: 15px;
    line-height: 1.7;
}

/* =========================================
   ИНФОРМАЦИОННЫЕ БЛОКИ
========================================= */

.service-information {
    margin-bottom: 65px;
}

/* Алгоритм хранится отдельными шагами, обычные текстовые разделы сохраняются. */
.service-algorithm { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.service-algorithm__step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 0 0 22px; position: relative; }
.service-algorithm__step:last-child { padding-bottom: 0; }
.service-algorithm__step:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--color-border); }
.service-algorithm__number { display: grid; place-items: center; height: 36px; border-radius: 50%; background: var(--color-light-blue); color: var(--color-primary); font-weight: 700; }
.service-algorithm__step h4 { margin: 3px 0 8px; color: var(--color-primary-dark); font-size: 17px; line-height: 1.5; }
.service-algorithm__step p { margin: 0 0 8px; line-height: 1.75; overflow-wrap: anywhere; }
.service-algorithm__step p:last-child { margin-bottom: 0; }

.service-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-info-card {
    padding: 25px 28px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 15px;
}

.service-info-card__heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.service-info-card__number {
    display: flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #EAF1FC;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
}

.service-info-card__heading h3 {
    margin: 0;
    color: #18438C;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.service-info-card__content {
    padding-left: 53px;
}

.service-info-card__text {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
}

.service-info-card__text p {
    margin: 0 0 10px;
}

.service-info-card__text p:last-child {
    margin-bottom: 0;
}

.service-info-card__empty {
    margin: 0;
    color: #8794A5;
    font-size: 14px;
    font-style: italic;
    line-height: 1.7;
}

/* =========================================
   БЛАНКИ И НОРМАТИВНЫЕ ДОКУМЕНТЫ
========================================= */

.service-documents,
.service-regulations {
    margin-top: 65px;
}

.documents-heading {
    margin: 0 0 14px;
    color: #142e50;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
}

.document-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 23px;
    min-height: 82px;
    padding: 14px 12px 14px 24px;
    background: #f6f8fb;
    border: 1px solid #e8edf3;
    border-radius: 10px;
}

.document-item__icon {
    --sheet: #60768e;
    --fold: #a6b7c9;
    position: relative;
    display: grid;
    place-items: end center;
    box-sizing: border-box;
    width: 38px;
    height: 48px;
    padding-bottom: 8px;
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    color: white;
    background: var(--sheet);
    font: bold 10px/1 Arial, sans-serif;
}
.document-item__icon::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--fold);
    border-bottom-left-radius: 2px;
}
.document-item__icon--pdf { --sheet: #dc342f; --fold: #f3887f; }
.document-item__icon--word { --sheet: #1067cb; --fold: #77b5ff; }

.document-item__info {
    display: grid;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.document-item__info strong { color: #203956; font-size: 16px; line-height: 1.35; }
.document-item__format,
.document-item__meta,
.document-item__description { color: #576a80; font-size: 13px; line-height: 1.45; }
.document-source { width: fit-content; color: var(--color-primary); text-decoration: underline; }
.document-item__action {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #246acc;
    border-radius: 8px;
    font-size: 22px;
}
.document-item__action:hover, .document-item__action:focus-visible {
    background: #e5effc;
    color: var(--color-primary);
}
.document-item__action svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================
   ПУСТЫЕ РАЗДЕЛЫ
========================================= */

.service-empty-message {
    padding: 22px 25px;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    background: #F8FAFC;
    color: #8794A5;
    font-size: 14px;
}

/* =========================================
   ГОСУСЛУГИ
========================================= */

.service-gosuslugi {
    margin-top: 65px;
    padding: 36px 40px;
    border-radius: 18px;
    background: #18438C;
}

.service-gosuslugi__content {
    max-width: 750px;
}

.service-gosuslugi .section-label {
    color: #F5B6C7;
}

.service-gosuslugi h2 {
    margin: 0 0 13px;
    color: #ffffff;
    font-size: 27px;
    line-height: 1.3;
}

.service-gosuslugi p {
    margin: 0 0 24px;
    color: #E1EAF8;
    font-size: 15px;
    line-height: 1.7;
}

.service-gosuslugi__button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 13px 21px;
    border-radius: 9px;
    background: #ffffff;
    color: #18438C;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.service-gosuslugi__button:hover {
    background: #D1E3FF;
}

.service-gosuslugi__button span {
    font-size: 19px;
}

/* =========================================
   ВОЗВРАТ В КАТАЛОГ
========================================= */

.service-back {
    margin-top: 42px;
}

.service-back__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #18438C;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.service-back__link:hover {
    text-decoration: underline;
}

.service-back__link span {
    font-size: 20px;
}

/* =========================================
   АДАПТИВНОСТЬ
========================================= */

@media (max-width: 768px) {

    .service-detail-page {
        padding-top: 20px;
    }

    .service-detail-container {
        width: min(100% - 28px, 1180px);
    }

    .service-breadcrumbs {
        margin-bottom: 22px;
        font-size: 12px;
    }

    .service-intro {
        padding: 27px 23px;
        margin-bottom: 42px;
        border-radius: 15px;
    }

    .service-intro h1 {
        font-size: 29px;
    }

    .service-intro__description {
        font-size: 15px;
    }

    .service-section-heading h2 {
        font-size: 24px;
    }

    .service-information,
    .service-documents,
    .service-regulations {
        margin-top: 45px;
        margin-bottom: 45px;
    }

    .service-info-card {
        padding: 20px;
    }

    .service-info-card__heading {
        align-items: flex-start;
        gap: 12px;
    }

    .service-info-card__heading h3 {
        font-size: 16px;
    }

    .service-info-card__content {
        padding-left: 0;
    }

    .document-item { gap: 12px; padding: 12px; }

    .service-gosuslugi {
        padding: 27px 23px;
        margin-top: 45px;
    }

    .service-gosuslugi h2 {
        font-size: 23px;
    }
}

/* Пиктограммы информационных разделов */

.service-info-card__heading {
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-info-card__icon {
    display: flex;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #EAF1FC;
    color: var(--color-primary);
}

.service-info-card__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-info-card__heading h3 {
    margin: 0;
}

@media (max-width: 768px) {
    .service-info-card__icon {
        flex-basis: 43px;
        width: 43px;
        height: 43px;
    }

    .service-info-card__icon svg {
        width: 23px;
        height: 23px;
    }
}
