/* ==========================================================
   PUBLIC SERVICES PAGE
========================================================== */

.public-services-page {
    background: #f4f8fb;
    color: var(--be-navy);
}

.public-services-page .page-container {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

/* ==========================================================
   HERO
========================================================== */

.services-hero {
    padding: 64px 0 36px;
    background:
        radial-gradient(
            circle at top right,
            rgba(30, 196, 126, 0.14),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f4f8fb 100%
        );
}

.services-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: stretch;
}

.services-hero-content {
    padding: 18px 0;
}

.services-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--be-green-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.services-hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    color: var(--be-navy);
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.services-hero-content > p {
    max-width: 760px;
    margin: 0;
    color: var(--be-muted);
    font-size: 17px;
    line-height: 1.7;
}

.services-hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.services-hero-notes {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.services-hero-notes span {
    color: var(--be-navy);
    font-size: 12px;
    font-weight: 700;
}

.services-hero-panel {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(16, 181, 112, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(8, 54, 83, 0.98),
            rgba(4, 38, 60, 0.98)
        );
    box-shadow: 0 20px 50px rgba(8, 40, 64, 0.12);
}

.services-hero-panel-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--be-green);
    color: #fff;
    font-size: 26px;
}

.services-hero-panel > span {
    color: #82e3b5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.services-hero-panel h2 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: 26px;
    line-height: 1.2;
}

.services-hero-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.65;
}

.services-hero-panel-link {
    margin-top: 20px;
    color: #8ae7bb;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.services-hero-panel-link:hover {
    color: #fff;
}

/* ==========================================================
   STATS
========================================================== */

.services-stats {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.services-stat {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--be-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(8, 40, 64, 0.045);
}

.services-stat strong {
    display: block;
    margin-bottom: 3px;
    color: var(--be-navy);
    font-size: 20px;
}

.services-stat span {
    color: var(--be-muted);
    font-size: 11px;
}

/* ==========================================================
   CATALOG SECTION
========================================================== */

.services-catalog-section {
    padding: 58px 0 72px;
}

.services-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
}

.services-section-head.centered {
    justify-content: center;
    text-align: center;
}

.services-section-head h2 {
    margin: 0 0 7px;
    color: var(--be-navy);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.services-section-head p {
    margin: 0;
    color: var(--be-muted);
    font-size: 14px;
    line-height: 1.6;
}

.services-guided-link {
    color: var(--be-green-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

/* ==========================================================
   TOOLBAR
========================================================== */

.services-toolbar {
    margin-bottom: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--be-border);
    border-radius: 18px;
    background: #fff;
}

.services-search {
    position: relative;
}

.services-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--be-muted);
    font-size: 20px;
    pointer-events: none;
}

.services-search input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 46px;
    border: 1px solid #d7e1e8;
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--be-navy);
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.services-search input:focus {
    border-color: var(--be-green);
    box-shadow: 0 0 0 4px rgba(18, 182, 111, 0.1);
}

.services-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--be-muted);
    font-size: 20px;
    text-decoration: none;
}

.services-sort label {
    display: block;
    margin-bottom: 6px;
    color: var(--be-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.services-sort select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #d7e1e8;
    border-radius: 12px;
    background: #fff;
    color: var(--be-navy);
    font-size: 13px;
    outline: none;
}

.services-search-button {
    height: 50px;
    min-width: 110px;
}

/* ==========================================================
   MOBILE CATEGORY
========================================================== */

.services-mobile-category {
    display: none;
    margin-bottom: 18px;
}

.services-mobile-category label {
    display: block;
    margin-bottom: 6px;
    color: var(--be-muted);
    font-size: 11px;
    font-weight: 800;
}

.services-mobile-category select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--be-border);
    border-radius: 12px;
    background: #fff;
    color: var(--be-navy);
}

/* ==========================================================
   CATALOG LAYOUT
========================================================== */

.services-catalog-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ==========================================================
   SIDEBAR
========================================================== */

.services-sidebar {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.services-sidebar-card,
.services-sidebar-help {
    border: 1px solid var(--be-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(8, 40, 64, 0.04);
}

.services-sidebar-card {
    padding: 18px;
}

.services-sidebar-card h3 {
    margin: 0 0 14px;
    color: var(--be-navy);
    font-size: 16px;
}

.services-category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.services-category-link {
    min-height: 46px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--be-navy);
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.services-category-link:hover {
    background: #f3f8fa;
    transform: translateX(2px);
}

.services-category-link.active {
    border-color: rgba(20, 181, 111, 0.28);
    background: var(--be-mint);
    color: var(--be-green-dark);
}

.category-link-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.category-link-main > span:last-child {
    overflow: hidden;
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
}

.category-link-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #edf3f7;
    font-size: 14px;
}

.services-category-link.active .category-link-icon {
    background: #fff;
}

.services-category-link b {
    min-width: 25px;
    height: 25px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #edf3f7;
    color: var(--be-muted);
    font-size: 10px;
}

.services-category-link.active b {
    background: #fff;
    color: var(--be-green-dark);
}

.services-sidebar-help {
    padding: 20px;
    text-align: center;
}

.services-sidebar-help-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--be-mint);
    color: var(--be-green-dark);
    font-weight: 900;
}

.services-sidebar-help h3 {
    margin: 0 0 7px;
    color: var(--be-navy);
    font-size: 15px;
}

.services-sidebar-help p {
    margin: 0 0 15px;
    color: var(--be-muted);
    font-size: 11px;
    line-height: 1.55;
}

/* ==========================================================
   RESULTS
========================================================== */

.services-results {
    min-width: 0;
}

.services-results-head {
    margin-bottom: 16px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.services-results-head h3 {
    margin: 0 0 3px;
    color: var(--be-navy);
    font-size: 20px;
}

.services-results-head p {
    margin: 0;
    color: var(--be-muted);
    font-size: 11px;
}

.services-reset {
    color: var(--be-green-dark);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

/* ==========================================================
   SERVICES GRID
========================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.public-service-card {
    min-width: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--be-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 40, 64, 0.045);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.public-service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 181, 111, 0.3);
    box-shadow: 0 18px 38px rgba(8, 40, 64, 0.09);
}

.service-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.service-card-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #edf4f8;
    color: var(--be-navy);
    font-size: 22px;
}

.service-card-icon.has-image {
    background: #fff;
}

.service-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-category {
    max-width: 160px;
    padding: 6px 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--be-mint);
    color: var(--be-green-dark);
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-card-content {
    margin-top: 16px;
}

.service-card-content h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.25;
}

.service-card-content h3 a {
    color: var(--be-navy);
    text-decoration: none;
}

.service-card-content h3 a:hover {
    color: var(--be-green-dark);
}

.service-card-content p {
    min-height: 62px;
    margin: 0;
    color: var(--be-muted);
    font-size: 12px;
    line-height: 1.55;
}

.service-card-meta {
    margin-top: auto;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid #edf2f5;
    border-bottom: 1px solid #edf2f5;
}

.service-card-meta > div {
    min-width: 0;
}

.service-card-meta small {
    display: block;
    margin-bottom: 4px;
    color: var(--be-muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.service-card-meta strong {
    color: var(--be-navy);
    font-size: 15px;
}

.service-card-price strong {
    color: var(--be-green);
    font-size: 20px;
}

.service-card-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.service-card-actions .btn {
    min-height: 42px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
}

/* ==========================================================
   EMPTY STATE
========================================================== */

.services-empty-state {
    grid-column: 1 / -1;
    padding: 60px 30px;
    border: 1px dashed #cbd8e1;
    border-radius: 22px;
    background: #fff;
    text-align: center;
}

.services-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: #eef4f8;
    color: var(--be-navy);
    font-size: 26px;
}

.services-empty-state h3 {
    margin: 0 0 7px;
    color: var(--be-navy);
}

.services-empty-state p {
    margin: 0 0 18px;
    color: var(--be-muted);
    font-size: 13px;
}

/* ==========================================================
   PAGINATION
========================================================== */

.services-pagination {
    margin-top: 28px;
}

.services-pagination nav {
    display: flex;
    justify-content: center;
}

.services-pagination .pagination {
    gap: 6px;
}

.services-pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--be-border);
    border-radius: 10px;
    background: #fff;
    color: var(--be-navy);
}

.services-pagination .page-item.active .page-link {
    border-color: var(--be-green);
    background: var(--be-green);
    color: #fff;
}

/* ==========================================================
   PROCESS
========================================================== */

.services-process {
    padding: 68px 0;
    background: #fff;
}

.services-process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.services-process-item {
    padding: 23px;
    border: 1px solid var(--be-border);
    border-radius: 18px;
    background: #f8fbfd;
}

.services-process-item > span {
    width: 42px;
    height: 42px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--be-mint);
    color: var(--be-green-dark);
    font-weight: 900;
}

.services-process-item h3 {
    margin: 0 0 7px;
    color: var(--be-navy);
    font-size: 16px;
}

.services-process-item p {
    margin: 0;
    color: var(--be-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* ==========================================================
   FINAL CTA
========================================================== */

.services-final-section {
    padding: 38px 0 76px;
}

.services-final-cta {
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    border-radius: 24px;
    background:
        linear-gradient(
            135deg,
            var(--be-navy),
            #083f63
        );
    box-shadow: 0 20px 50px rgba(7, 39, 61, 0.16);
}

.services-final-copy {
    display: flex;
    gap: 17px;
    align-items: center;
}

.services-final-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--be-green);
    color: #fff;
    font-size: 24px;
}

.services-final-copy h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 22px;
}

.services-final-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1180px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .services-hero-grid {
        grid-template-columns: 1fr;
    }

    .services-catalog-layout {
        grid-template-columns: 1fr;
    }

    .services-sidebar {
        display: none;
    }

    .services-mobile-category {
        display: block;
    }

    .services-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .services-hero {
        padding: 38px 0 24px;
    }

    .services-hero h1 {
        font-size: 38px;
    }

    .services-toolbar {
        grid-template-columns: 1fr;
    }

    .services-search-button {
        width: 100%;
    }

    .services-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-stats {
        grid-template-columns: 1fr 1fr;
    }

    .services-process-grid {
        grid-template-columns: 1fr;
    }

    .services-final-cta {
        padding: 23px;
        align-items: stretch;
        flex-direction: column;
    }

    .services-final-cta .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .public-services-page .page-container {
        width: min(100% - 22px, 1320px);
    }

    .services-hero h1 {
        font-size: 32px;
    }

    .services-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .services-stats {
        grid-template-columns: 1fr;
    }

    .services-hero-panel {
        padding: 22px;
    }

    .service-card-actions {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================
   COMPACT PAGINATION
========================================================== */

.services-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.services-pagination nav {
    width: auto;
}

.services-pagination .pagination {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.services-pagination .page-item {
    margin: 0;
}

.services-pagination .page-link {
    width: auto;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--be-border);
    border-radius: 10px !important;
    background: #fff;
    color: var(--be-navy);
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

.services-pagination .page-link:hover {
    border-color: var(--be-green);
    background: var(--be-mint);
    color: var(--be-green-dark);
}

.services-pagination .page-item.active .page-link {
    border-color: var(--be-green);
    background: var(--be-green);
    color: #fff;
}

.services-pagination .page-item.disabled .page-link {
    background: #f1f5f7;
    color: #9aabb6;
    opacity: 0.7;
    pointer-events: none;
}

/* Защита от глобальных стилей SVG */
.services-pagination svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
}