/* Раздел ЛОР-хирургии: инфографика (views/surgery-list.php, views/operation.php).
   Подключается только там, через extraCss в templates/head.php — как kids.css.
   Цвета — из assets/scss/base/variables.scss. */

:root {
    --sg-blue: #246FFE;
    --sg-blue-soft: #EAF1FF;
    --sg-accent: #1E3868;
    --sg-grey: #6C6C6C;
    --sg-tile: #F5F7FB;
    --sg-orange: #FCA120;
}

/* Плашки и цена стоят и внутри .service (шапка страницы), поэтому шрифт задаём им самим. */
.sg-block, .sg-price, .sg-chips, .sg-zones { font-family: Raleway, sans-serif; color: var(--sg-accent); }

.sg-block {
    box-sizing: border-box;
    width: calc(100% - 20px);
    /* как у .service.service-solo: 1100px + внутренние отступы (без border-box) */
    max-width: 1190px;
    align-self: center;
    margin: 15px 10px 0;
    padding: 40px 60px;
    background: #fff;
    border-radius: 20px;
    color: var(--sg-accent);
    font-family: Raleway, sans-serif;
}

.sg-block *, .sg-block *::before, .sg-block *::after { box-sizing: border-box; }

.sg-block h2 {
    margin: 0 0 24px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
}

.sg-note {
    margin: 20px 0 0;
    color: var(--sg-grey);
    font-size: 14px;
    line-height: 1.5;
}

.sg-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sg-blue-soft);
    color: var(--sg-blue);
}

/* --- Плитки фактов --- */
.sg-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sg-fact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 16px;
    background: var(--sg-tile);
}

.sg-fact small {
    color: var(--sg-grey);
    font-size: 13px;
    font-weight: 500;
}

.sg-fact b {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

/* --- Что входит в цену --- */
.sg-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
}

.sg-price-sum {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sg-price-sum small { color: var(--sg-grey); font-size: 14px; font-weight: 500; }
.sg-price-sum b { color: var(--sg-orange); font-size: 30px; font-weight: 700; }

.sg-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 8px 10px;
    border-radius: 100px;
    background: var(--sg-blue-soft);
    color: var(--sg-blue);
    font-size: 14px;
    font-weight: 600;
}

.sg-chip svg { width: 18px; height: 18px; }
.sg-chip.off { background: var(--sg-tile); color: var(--sg-grey); font-weight: 500; }
.sg-chips-label { color: var(--sg-grey); font-size: 14px; margin-left: 4px; }

/* --- Шаги лечения --- */
.sg-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sg-steps::before {
    content: "";
    position: absolute;
    top: 22px;
    left: 12%;
    right: 12%;
    border-top: 2px dashed #C9D8FB;
}

.sg-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.sg-step > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sg-step .sg-ico { background: var(--sg-blue); color: #fff; box-shadow: 0 0 0 6px #fff; }
.sg-step .sg-num { color: var(--sg-blue); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.sg-step b { font-size: 16px; font-weight: 700; }
.sg-step span { color: var(--sg-grey); font-size: 14px; line-height: 1.45; }

/* --- Восстановление --- */
.sg-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 28px;
    list-style: none;
}

.sg-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 7px;
    border-left: 2px solid #C9D8FB;
}

.sg-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 0 0 22px;
}

.sg-timeline li:last-child { padding-bottom: 0; }

.sg-timeline li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -28px;
    width: 16px;
    height: 16px;
    border: 3px solid var(--sg-blue);
    border-radius: 50%;
    background: #fff;
}

.sg-timeline b { color: var(--sg-blue); font-size: 15px; font-weight: 700; }
.sg-timeline span { font-size: 15px; line-height: 1.5; }

/* --- Сравнение --- */
.sg-compare-wrap { overflow-x: auto; }

.sg-compare {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    line-height: 1.45;
}

.sg-compare th, .sg-compare td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ECEEF2;
}

.sg-compare thead th { background: var(--sg-blue-soft); color: var(--sg-blue); font-weight: 700; }
.sg-compare thead th:first-child { border-radius: 12px 0 0 12px; background: transparent; }
.sg-compare thead th:last-child { border-radius: 0 12px 12px 0; }
.sg-compare tbody th { color: var(--sg-grey); font-weight: 600; width: 26%; }
.sg-compare .here { background: #FAFCFF; font-weight: 600; }

/* --- Группы операций в разделе --- */
.sg-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sg-zone {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 10px;
    border-radius: 100px;
    background: var(--sg-tile);
    color: var(--sg-accent);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.sg-zone small { color: var(--sg-grey); font-weight: 500; }

.services .sg-zone-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1024px) {
    .sg-block { padding: 28px 20px; }
    .sg-block h2 { font-size: 24px; }
    .sg-facts { grid-template-columns: repeat(2, 1fr); }
    .sg-fact { padding: 14px; }
    .sg-steps { grid-template-columns: 1fr; gap: 16px; }
    .sg-steps::before { top: 22px; bottom: 22px; left: 21px; right: auto; border-top: 0; border-left: 2px dashed #C9D8FB; }
    .sg-step { flex-direction: row; flex-wrap: wrap; align-items: flex-start; text-align: left; column-gap: 14px; row-gap: 2px; }
    .sg-step .sg-ico { order: 0; }
    .sg-step > div { flex: 1; align-items: flex-start; gap: 4px; }
    .sg-timeline li { grid-template-columns: 1fr; gap: 2px; }
    .sg-price-sum b { font-size: 26px; }
    .sg-compare { min-width: 0; font-size: 13px; }
    .sg-compare th, .sg-compare td { padding: 10px 8px; }
    .sg-compare tbody th { width: 30%; }
}

/* Дубль общего фикса из assets/scss/pages/service.scss (main.css?v=23):
   пока он не выложен, страницы хирургии чинят переполнение сами. */
@media (max-width: 1024px) {
    .service.service-solo { box-sizing: border-box; width: calc(100% - 20px); }
}
