/* Современный светлый стиль дочерних страниц (page_content / page_doctors / page_reviews).
   Подключается ПОСЛЕ style.css, header.css, reviews.css — перекрывает их.
   Единая дизайн-система с главной страницей (style_index.css). */

:root {
    --accent: #0b74c8;
    --accent-2: #2bc0e8;
    --accent-soft: #e8f4fd;
    --ink: #12263a;
    --muted: #5d7188;
    --line: #e6eef7;
    --bg: #f4f8fd;
    --card: #ffffff;
    --radius: 16px;
    --shadow-1: 0 1px 2px rgba(16, 42, 76, .06), 0 6px 18px -8px rgba(16, 42, 76, .10);
    --shadow-2: 0 4px 10px rgba(16, 42, 76, .08), 0 18px 40px -16px rgba(11, 116, 200, .22);
    --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
}

html { scroll-behavior: smooth; min-width: 350px; }

body {
    font-family: 'Inter', 'Montserrat', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ===================== Шапка ===================== */
.head_line {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s ease;
}
.head_line.scrolled { box-shadow: 0 12px 32px -20px rgba(16, 42, 76, .4); }

.head_logo { flex: 0 0 auto; width: fit-content; margin: 0; }
.head_logo > a { margin: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.head_logo > a > img { display: block; width: 92px; height: auto; }
.head_logo__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.head_logo__title {
    max-width: none;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .01em;
    color: var(--accent);
}
.head_logo__sub {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--muted);
}

.head_nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
}

.phone_sicons { flex-direction: row; align-items: center; gap: 14px; margin: 0; }
.icons_phone { margin: 0; }
.icons_phone > a {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
    transition: color .2s;
}
.icons_phone > a:hover { color: var(--accent); }

.sicons { margin: 0; display: flex; gap: 8px; }
.sicons > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid #d6e7f7;
    transition: transform .2s, background .2s, box-shadow .2s, border-color .2s;
}
.sicons > a:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-1); }
.sicons > a img { width: 18px; height: 18px; object-fit: contain; }

.icons { gap: 10px; }
.icons > div { margin: 0; padding: 0; }
.icons > div:before { display: none; }
.icons > div > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.icons > div > a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: #cfddea; }
.icons > div img { max-height: 26px; width: auto; }
.icons > div:last-child img { max-height: 26px; }

/* Кнопка для слабовидящих */
.accessibility-button {
    width: 42px;
    height: 42px;
    padding: 10px;
    background: var(--accent-soft);
    border: 1px solid #d6e7f7;
    border-radius: 50%;
    color: var(--accent);
    transition: transform .2s, box-shadow .2s;
}
.accessibility-button svg { width: 100%; height: 100%; }
.accessibility-button:hover { transform: scale(1.06); box-shadow: var(--shadow-1); }

/* Панель для слабовидящих */
.nav-pannel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-2);
    width: auto;
    max-width: 1240px;
    margin: 12px auto;
    padding: 16px 20px;
}
.nav-pannel-title { color: var(--ink); }
.nav-pannel .bvi-link { border-radius: 8px !important; box-shadow: var(--shadow-1); transition: transform .15s; }
.nav-pannel .bvi-link:hover { transform: translateY(-2px); }

/* ===================== Контент ===================== */
.unit { padding: 0 20px; }
.unit_block { max-width: 1240px; margin: 0 auto; padding: 0; }

.main_block { padding: 34px 0 10px; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 26px;
    padding: 0;
    border: 0;
    font-size: 13px;
    color: var(--muted);
}
.crumbs li {
    list-style: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
.crumbs img {
    width: 13px;
    height: 13px;
    color: #b6c6d8;
    opacity: .7;
    flex: 0 0 auto;
}
.crumbs li a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s; }
.crumbs li a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li:last-child:not(:first-child) { color: var(--ink); font-weight: 600; }

/* ===================== Типографика контента ===================== */
.content { padding: 8px 0 24px; min-width: 0; }

.content h1, .content h2, .content h3, .content h4 {
    color: var(--ink);
    line-height: 1.25;
    margin: 28px 0 14px;
    text-align: left;
}
.content h1 { font-size: 30px; }
.content h2 { font-size: 24px; }
.content h3 { font-size: 20px; }
.content h4 { font-size: 17px; }

.content p { font-size: 15.5px; line-height: 1.7; color: var(--ink); margin: 0 0 16px; }
.content a { color: var(--accent); font-weight: 500; transition: color .2s; }
.content a:hover { text-decoration: underline; }

.content ul, .content ol { margin: 0 0 18px; padding: 0 0 0 4px; }
.content ul { list-style: none; }
.content ul li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 15.5px; line-height: 1.6; }
.content ul li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--grad);
}
.content ol li { margin-bottom: 8px; font-size: 15.5px; line-height: 1.6; }

.content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.content table th, .content table td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    font-size: 14.5px;
    text-align: left;
}
.content table th { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

.content blockquote {
    margin: 0 0 18px;
    padding: 16px 22px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 12px 12px 0;
    color: var(--ink);
}

.content img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-1); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ===================== Карточки ссылок на дочерние страницы ===================== */
.chto_lechim {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}
.chto_lechim > a {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.chto_lechim > a:hover {
    background: var(--grad);
    color: #fff;
    transform: translateX(4px);
    box-shadow: var(--shadow-2);
}

.educational {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin: 26px 0;
}
.educational > a {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    min-width: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    color: var(--ink);
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.educational > a > span:first-child {
    position: absolute;
    inset: 0;
}
.educational > a > span:first-child:before { display: none; }
.educational > a > span:first-child > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.educational > a > span:first-child.no-img { background: var(--grad); }
.educational > a > span:first-child.no-img > img { display: none; }
.educational > a > span:last-child {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px 18px 15px;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    background: linear-gradient(180deg, transparent, rgba(11, 22, 40, .72));
}
.educational > a:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(11, 116, 200, .35); }
.educational > a:hover > span:first-child > img { transform: scale(1.05); }
.educational > a:nth-child(2n+2),
.educational > a:nth-child(3n+3),
.educational > a:nth-child(4n+4) { margin: 0; width: 100%; }

@media (min-width: 640px) {
    .chto_lechim { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
    .educational { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===================== Страница врачей ===================== */
.block_doctor_row { margin: 0 0 20px; justify-content: center; }

.block_doctor {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 26px;
    height: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    border: 0;
    border-top: 4px solid var(--accent);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-1);
}

.doctor_block_2 { position: static; height: auto; border: 0; margin: 0; }

.block_doctor__img {
    position: static;
    flex: 0 0 220px;
    width: 220px;
    height: 250px;
    min-width: 0;
    max-width: none;
    border-radius: 14px;
    border: 1px solid var(--line);
    background-position: center center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-color: var(--bg) !important;
}

.block_doctor__info { position: static; max-width: none; width: 100%; }

.block_doctor__info p {
    font-size: 26px !important;
    line-height: 1.3 !important;
    color: var(--ink) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
    font-weight: 600;
}
.block_doctor__info p:nth-child(2) {
    font-style: italic !important;
    color: var(--muted) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400;
    margin: 8px 0 12px !important;
}
.block_doctor__info p:nth-child(3) {
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 500;
}
.block_doctor__info p:nth-child(3) a { color: var(--accent); font-weight: 600; }

.summa { max-width: none; margin-top: 14px; }
.summa summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: background .2s, color .2s;
}
.summa summary:before { display: none; }
.summa summary:hover { background: var(--grad); color: #fff; }
.summa summary::after {
    content: "›";
    transform: rotate(90deg);
    font-size: 18px;
    line-height: 1;
    transition: transform .2s;
}
.summa details[open] summary::after { transform: rotate(-90deg); }
.summa details { margin-bottom: 34px; }
.summa details > *:not(summary) {
    margin-top: 14px;
    padding: 18px 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* Средние экраны: единая сетка ширины надписи (как на главной) */
@media (min-width: 961px) and (max-width: 1280px) {
    .head_logo__title { white-space: normal; width: 460px; max-width: 460px; font-size: 16px; }
    .head_logo__sub { white-space: normal; }
}

@media (max-width: 960px) {
    .icons { display: none; }
}

@media (min-width: 861px) and (max-width: 960px) {
    .head_logo__title { white-space: normal; width: 300px; max-width: 300px; font-size: 14px; }
    .head_logo__sub { white-space: normal; }
}

@media (min-width: 801px) and (max-width: 860px) {
    .head_logo__title { white-space: normal; width: 260px; max-width: 260px; font-size: 14px; }
    .head_logo__sub { white-space: normal; }
}

@media (min-width: 701px) and (max-width: 800px) {
    .head_logo__title { white-space: normal; width: 170px; max-width: 240px; font-size: 13px; }
    .head_logo > a > img { width: 88px; }
    .icons_phone > a { font-size: 12px; }
}

@media (min-width: 561px) and (max-width: 700px) {
    .head_logo__title { white-space: normal; width: 170px; max-width: 240px; font-size: 12px; }
    .head_logo > a > img { width: 88px; }
    .icons_phone > a { font-size: 12px; }
}

@media (max-width: 900px) {
    .block_doctor { flex-direction: column; align-items: flex-start; gap: 20px; }
    .block_doctor__img { flex: 0 0 auto; width: 100%; height: 280px; }
}

/* ===================== Страница отзывов ===================== */
.reviews_text_block {
    width: 100%;
    margin: 0 0 28px;
    padding: 20px 24px;
    background: var(--accent-soft);
    border: 1px solid #d6e7f7;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    text-align: center;
}
.reviews_text_block a { color: var(--accent); font-weight: 600; }

.reviews_wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin: 0 0 18px;
    padding: 26px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}
.reviews_wrap:nth-child(2n) .reviews_card { border: 0; }

.reviews_doctor {
    display: flex;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px;
}
.reviews_doctor_title { color: var(--accent); margin-right: 10px; }

.reviews_card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 18px 22px;
    background: var(--bg);
    border: 0;
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease;
}
.reviews_wrap:hover .reviews_card { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.reviews_sign {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 12px 0 0;
    font-family: inherit;
    color: var(--muted);
    font-size: 13.5px;
}

/* ===================== Подвал ===================== */
.footer {
    width: 100%;
    display: block;
    margin-top: 48px;
    padding: 44px 24px 36px;
    background: linear-gradient(180deg, #ffffff, #f1f6fc);
    border-top: 1px solid var(--line);
}
.footer_menu {
    width: 100%;
    max-width: 1240px;
    min-width: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}
.footer_menu > div {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border: 0;
}
.footer_menu > div > img { position: static; width: 22px; height: 22px; margin-bottom: 10px; opacity: .7; }
.footer_menu > div > p { margin: 0 0 12px; font-weight: 700; font-size: 14px; color: var(--ink); }
.footer_menu > div > a {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .2s;
}
.footer_menu > div > a:hover { color: var(--accent); }

/* ===================== Модалка и уведомления ===================== */
.modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 80px -30px rgba(16, 42, 76, .5);
}
.modal-header { border-bottom: 1px solid var(--line); }
.modal-title { font-weight: 700; color: var(--ink); }
.alert { border: 0; border-radius: 12px; box-shadow: var(--shadow-1); }

/* Мелкие экраны */
@media (max-width: 640px) {
    .unit { padding: 0 14px; }
    .content table { display: block; width: 100%; overflow-x: auto; }
    .block_doctor__info p { font-size: 22px !important; }
    .reviews_text_block { padding: 16px 18px; }
    .nav-pannel { padding: 12px 14px; }
    .nav-pannel > div { text-align: center; }
    .nav-pannel > div > div { flex-wrap: wrap; justify-content: center; }
    .footer { padding: 32px 16px 28px; }
}

@media (max-width: 560px) {
    .head_line { padding: 8px 14px; flex-wrap: wrap; row-gap: 8px; }
    .head_logo > a > img { width: 88px; }
    .head_logo__title { width: 240px; max-width: 240px; white-space: normal; font-size: 13px; }
    .icons_phone > a { font-size: 15px; }
    .block_doctor { padding: 18px; }
    .block_doctor__img { height: 220px; }
    .reviews_wrap { padding: 18px; }
    .reviews_sign { flex-direction: column; gap: 4px; }
    .summa details > *:not(summary) { padding: 14px 16px; }
    .content blockquote { padding: 14px 16px; }
    .content h1 { font-size: 24px; }
    .content h2 { font-size: 20px; }
    .content h3 { font-size: 17px; }
}

@media (max-width: 400px) {
    .head_line { padding: 8px 12px; }
    .head_logo > a { gap: 10px; }
    .head_logo > a > img { width: 76px; }
    .head_logo__title { width: 200px; max-width: 200px; font-size: 12px; }
    .icons_phone > a { font-size: 14px; }
}
