﻿/*
 * «Сервис» — сервисный портал. Благородная палитра: глубокий гранат
 * вместо кричащего оранжево-красного, тёплый песочный фон карточек,
 * сдержанные акценты. Плитки сервисов — приглушённые, как в справочнике.
 *
 * Полностью перекрывает прежние правила servis.css для своего дизайна.
 */

html[data-design="servis"] {
    --d-radius: 14px;
    --d-radius-s: 10px;
    --d-radius-xs: 7px;

    --d-bg: #fbfaf7;
    --d-surface: #ffffff;
    --d-surface-2: #f4f1ec;
    --d-text: #1f1b17;
    --d-muted: #736b62;
    --d-line: #e7e1d8;

    /* Гранат — благородный, не кислотный */
    --d-accent: #8e2233;
    --d-accent-ink: #ffffff;
    --d-accent-soft: #f7eaec;
    --d-accent-hover: #74192a;

    /* Вспомогательные: бронза и хвоя */
    --d-bronze: #a9763f;
    --d-bronze-soft: #f7efe3;
    --d-sage: #4f6b52;
    --d-sage-soft: #eef3ee;

    --d-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --d-shadow-s: 0 1px 2px rgba(31, 27, 23, .05);
    --d-shadow-m: 0 4px 16px -4px rgba(31, 27, 23, .12);
    --d-shadow-l: 0 18px 44px -12px rgba(31, 27, 23, .22);
}

html[data-design="servis"] .d-body {
    background: var(--d-bg);
    font-size: 15px;
    color: var(--d-text);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Типографика и ссылки ---------- */

html[data-design="servis"] .d-main a:not(.btn):not([class*="hp-"]) {
    color: var(--d-accent);
    text-decoration: none;
    transition: color .15s;
}

html[data-design="servis"] .d-main a:not(.btn):not([class*="hp-"]):hover {
    color: var(--d-accent-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

html[data-design="servis"] .d-main h1 {
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--d-text);
}

html[data-design="servis"] .d-main h2 {
    font-weight: 750;
    letter-spacing: -.02em;
}

html[data-design="servis"] .d-main p {
    line-height: 1.62;
}

html[data-design="servis"] .d-main .muted,
html[data-design="servis"] .d-main .small {
    color: var(--d-muted);
}

html[data-design="servis"] .d-main strong {
    font-weight: 750;
}

/* Тонкая линия над заголовками разделов */
html[data-design="servis"] .d-main .page-head h1 {
    position: relative;
    padding-left: 13px;
}

html[data-design="servis"] .d-main .page-head h1::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 3px;
    border-radius: 2px;
    background: var(--d-accent);
}

/* ---------- Шапка ---------- */

.d-servis .d-header {
    background: #fff;
    border-bottom: 1px solid var(--d-line);
    box-shadow: 0 1px 0 rgba(31, 27, 23, .02);
}

.d-servis .d-header-top {
    min-height: 68px;
}

.d-servis .d-logo-mark {
    background: linear-gradient(140deg, #a63a4d 0%, var(--d-accent) 55%, #6f1826 100%);
    border-radius: 9px;
    font-size: 12.5px;
    box-shadow: 0 3px 12px -3px rgba(142, 34, 51, .5);
}

.d-servis .d-logo-text {
    font-weight: 800;
    letter-spacing: -.035em;
}

.d-servis .d-city > summary {
    border-radius: 9px;
    background: var(--d-surface-2);
    border-color: transparent;
}

.d-servis .d-city > summary::before {
    background: var(--d-accent);
}

.d-servis .d-search {
    border: 1.5px solid var(--d-line);
    border-radius: 11px;
    background: #fff;
    padding: 2px 2px 2px 14px;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .d-search:focus-within {
    border-color: var(--d-accent);
    box-shadow: 0 0 0 3px var(--d-accent-soft);
}

.d-servis .d-search button {
    background: var(--d-accent);
    border-radius: 9px;
    transition: background .15s;
}

.d-servis .d-search button:hover {
    background: var(--d-accent-hover);
}

.d-servis .d-nav {
    border-top: 0;
}

.d-servis .d-nav-inner {
    padding-top: 2px;
    padding-bottom: 8px;
}

.d-servis .d-nav-inner a {
    font-size: 14px;
    font-weight: 550;
    color: var(--d-text);
    padding: 7px 2px;
    transition: color .15s;
}

.d-servis .d-nav-inner a:hover {
    color: var(--d-accent);
    text-decoration: none;
}

.d-servis .d-nav-inner a.is-active {
    background: transparent;
    color: var(--d-accent);
    box-shadow: inset 0 -2px 0 var(--d-accent);
    border-radius: 0;
    font-weight: 700;
}

.d-servis .d-cta-btn {
    background: var(--d-accent);
    border-radius: 9px;
    box-shadow: 0 3px 12px -4px rgba(142, 34, 51, .55);
    transition: background .15s, transform .12s;
}

.d-servis .d-cta-btn:hover {
    background: var(--d-accent-hover);
    transform: translateY(-1px);
}

.d-servis .d-footer {
    background: var(--d-surface-2);
    border-top: 1px solid var(--d-line);
}

.d-servis .d-footer-grid strong {
    color: var(--d-text);
}

/* ---------- Главная ---------- */

.d-servis .d-main {
    padding-top: 22px;
}

.d-servis .hp-top {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
}

.d-servis .hp-hero {
    border: 1px solid var(--d-line);
    box-shadow: none;
    padding: 28px;
    border-radius: var(--d-radius);
    background:
        radial-gradient(620px 260px at 100% 0%, rgba(142, 34, 51, .055), transparent 68%),
        radial-gradient(420px 200px at 0% 100%, rgba(169, 118, 63, .05), transparent 70%),
        #fff;
}

.d-servis .hp-hero::after {
    display: none;
}

.d-servis .hp-hero h1 {
    font-size: clamp(24px, 2.7vw, 33px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.18;
}

.d-servis .hp-eyebrow {
    color: var(--d-accent);
    font-weight: 650;
    letter-spacing: .02em;
}

.d-servis .hp-search {
    border: 1.5px solid var(--d-line);
    border-radius: 11px;
    padding: 2px 2px 2px 14px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .hp-search:focus-within {
    border-color: var(--d-accent);
    box-shadow: 0 0 0 3px var(--d-accent-soft);
}

.d-servis .hp-search > button {
    border-radius: 9px;
    padding: 10px 20px;
    background: var(--d-accent);
}

.d-servis .hp-tags a {
    background: var(--d-surface-2);
    color: var(--d-muted);
    border-radius: 8px;
    transition: background .15s, color .15s;
}

.d-servis .hp-tags a:hover {
    background: var(--d-accent-soft);
    color: var(--d-accent);
    text-decoration: none;
}

.d-servis .hp-wx {
    box-shadow: none;
    border-color: var(--d-line);
    border-radius: var(--d-radius);
}

/* Сервисы: приглушённые плитки в два ряда */
.d-servis .hp-services {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 24px;
}

.d-servis .hp-service {
    flex-direction: row;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--d-line);
    box-shadow: none;
    background: #fff;
    padding: 12px;
    border-radius: 11px;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .hp-service::after {
    display: none;
}

.d-servis .hp-service:hover {
    background: #fff;
    border-color: #d9cfc2;
    box-shadow: var(--d-shadow-m);
    transform: none;
}

.d-servis .hp-service-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: var(--d-surface-2);
    font-size: 17px;
    box-shadow: none;
}

/* Сдержанные оттенки вместо ярких */
.d-servis .hp-service:nth-child(1) .hp-service-icon { background: #f0e7e9; }
.d-servis .hp-service:nth-child(2) .hp-service-icon { background: var(--d-bronze-soft); }
.d-servis .hp-service:nth-child(3) .hp-service-icon { background: var(--d-sage-soft); }
.d-servis .hp-service:nth-child(4) .hp-service-icon { background: #efe9f0; }
.d-servis .hp-service:nth-child(5) .hp-service-icon { background: #eae8f2; }
.d-servis .hp-service:nth-child(6) .hp-service-icon { background: #e6eef0; }

.d-servis .hp-service-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--d-text);
}

.d-servis .hp-service-meta {
    font-size: 11.5px;
    color: var(--d-muted);
}

.d-servis .hp-head h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.d-servis .hp-head a {
    color: var(--d-accent);
    font-weight: 600;
}

/* Новости */
.d-servis .hp-news-lead {
    grid-template-columns: 268px minmax(0, 1fr);
    border-radius: var(--d-radius);
    box-shadow: none;
    border: 1px solid var(--d-line);
    overflow: hidden;
}

.d-servis .hp-news-lead-img { min-height: 180px; }
.d-servis .hp-news-lead-img img { min-height: 180px; }
.d-servis .hp-news-lead-body { padding: 20px 24px; }

.d-servis .hp-news-lead-body strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.3;
}

.d-servis .hp-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.d-servis .hp-news-card {
    box-shadow: none;
    border-color: var(--d-line);
    padding: 11px;
    border-radius: 11px;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .hp-news-card:hover {
    transform: none;
    box-shadow: var(--d-shadow-m);
    border-color: #d9cfc2;
}

.d-servis .hp-news-card strong {
    font-size: 14.5px;
    line-height: 1.35;
}

.d-servis .hp-chip {
    background: var(--d-accent-soft);
    color: var(--d-accent);
    border-radius: 7px;
    font-weight: 600;
}

/* Объявления на главной */
.d-servis .hp-cards { gap: 13px; }

.d-servis .hp-card {
    box-shadow: none;
    padding: 10px;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .hp-card:hover {
    transform: none;
    box-shadow: var(--d-shadow-m);
    border-color: #d9cfc2;
}

.d-servis .hp-card-price {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--d-text);
}

/* Почта */
.d-servis .hp-mail {
    border-radius: var(--d-radius);
    box-shadow: none;
    border: 1px solid var(--d-line);
    background:
        radial-gradient(560px 240px at 0% 0%, rgba(142, 34, 51, .05), transparent 70%),
        var(--d-surface-2);
    padding: 26px;
}

.d-servis .hp-mail h2 {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.d-servis .hp-mail-domain { color: var(--d-accent); }

.d-servis .hp-mail-benefits li {
    background: #fff;
    border-color: transparent;
    border-radius: 11px;
}

.d-servis .hp-mail-ico {
    background: var(--d-accent-soft);
    color: var(--d-accent);
    border-radius: 9px;
}

.d-servis .hp-mail-pick input { border-radius: 11px; }
.d-servis .hp-btn { border-radius: 9px; }

.d-servis .hp-btn-primary {
    background: var(--d-accent);
    border-color: var(--d-accent);
}

.d-servis .hp-btn-primary:hover {
    background: var(--d-accent-hover);
    border-color: var(--d-accent-hover);
}

/* Панели и мини-карточки */
.d-servis .hp-panel {
    box-shadow: none;
    border-color: var(--d-line);
    border-radius: var(--d-radius);
}

.d-servis .hp-mini {
    box-shadow: none;
    border-color: var(--d-line);
    padding: 9px;
    border-radius: 11px;
    transition: border-color .15s, box-shadow .15s;
}

.d-servis .hp-mini:hover {
    transform: none;
    box-shadow: var(--d-shadow-m);
}

.d-servis .hp-filter input,
.d-servis .hp-filter select {
    border-radius: 9px;
}

.d-servis .hp-filter button {
    border-radius: 9px;
    background: var(--d-accent);
}

.d-servis .hp-chips a {
    border-radius: 7px;
    background: var(--d-surface-2);
    transition: background .15s, color .15s;
}

.d-servis .hp-chips a:hover {
    background: var(--d-accent-soft);
    color: var(--d-accent);
}

.d-servis .hp-cities a {
    border-radius: 9px;
    border-color: var(--d-line);
}

.d-servis .hp-ticker { border-radius: 11px; }
.d-servis .hp-rubrics a { border-radius: 7px; }
.d-servis .hp-film-poster { border-radius: 9px; }

/* ---------- Внутренние страницы ---------- */

html[data-design="servis"] .d-main .btn {
    border-radius: 9px;
    font-weight: 600;
}

html[data-design="servis"] .d-main .btn-primary,
html[data-design="servis"] .d-admin-main .btn-primary {
    background: var(--d-accent);
    border-color: var(--d-accent);
}

html[data-design="servis"] .d-main .btn-primary:hover,
html[data-design="servis"] .d-admin-main .btn-primary:hover {
    background: var(--d-accent-hover);
    border-color: var(--d-accent-hover);
}

html[data-design="servis"] .d-main .btn-ghost {
    border-color: var(--d-line);
    color: var(--d-text);
}

html[data-design="servis"] .d-main .btn-ghost:hover {
    background: var(--d-surface-2);
    border-color: #d9cfc2;
}

html[data-design="servis"] .d-main .chip {
    border-radius: 7px;
}

html[data-design="servis"] .d-main .chip-active {
    background: var(--d-accent-soft);
    border-color: #e6c9ce;
    color: var(--d-accent);
}

html[data-design="servis"] .d-admin-side a.is-active {
    background: var(--d-accent);
}

html[data-design="servis"] .d-main .panel {
    border-radius: var(--d-radius);
    border-color: var(--d-line);
    box-shadow: none;
}

/* ---------- Адаптив ---------- */

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

@media (max-width: 980px) {
    .d-servis .hp-top { grid-template-columns: minmax(0, 1fr); }
    .d-servis .hp-news-lead { grid-template-columns: minmax(0, 1fr); }
    .d-servis .hp-news-lead-img { min-height: 200px; }
    .d-servis .hp-news-lead-img img { min-height: 200px; }
}

@media (max-width: 640px) {
    .d-servis .hp-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .d-servis .hp-service { flex-direction: column; align-items: flex-start; gap: 7px; }
    .d-servis .hp-news-grid { grid-template-columns: minmax(0, 1fr); }
    .d-servis .hp-hero { padding: 19px 16px; }
    .d-servis .hp-hero h1 { font-size: 21px; }
    .d-servis .hp-mail { padding: 19px 16px; }
}
