/*
Theme Name: ChinaBeauty
Theme URI: https://chinabeauty.ru
Author: ChinaBeauty Team
Description: Медицинский стиль для сайта о косметологии в Китае
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: chinabeauty
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue:       #185FA5;
    --blue-dark:  #0f4070;
    --blue-light: #e8f1fb;
    --text:       #1a1a2e;
    --muted:      #6b7280;
    --border:     #e5e7eb;
    --white:      #ffffff;
    --radius:     8px;
    --shadow:     0 2px 12px rgba(24, 95, 165, 0.10);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--blue-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    padding-left: 1.4em;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 48px 0;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--blue);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 1140px;
    margin: 0 auto;
    height: 70px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -0.02em;
}

.site-title span {
    color: var(--blue-dark);
}

.site-tagline {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== NAVIGATION ===== */
.main-navigation > ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 4px;
}

.main-navigation a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: var(--blue-light);
    color: var(--blue);
}

/* Mobile burger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== HERO BANNER ===== */
.hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.25;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto 28px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-white {
    background: var(--white);
    color: var(--blue);
}

.btn-white:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    color: var(--blue-dark);
}

.btn-blue {
    background: var(--blue);
    color: var(--white);
}

.btn-blue:hover {
    background: var(--blue-dark);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(24, 95, 165, 0.15);
}

.post-card-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-body {
    padding: 20px;
}

.post-card-category {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-title a {
    color: var(--text);
}

.post-card-title a:hover {
    color: var(--blue);
}

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.post-card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== SINGLE POST ===== */
.entry-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--blue-light);
}

.entry-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text);
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.entry-meta a {
    color: var(--blue);
}

.entry-content {
    max-width: 760px;
}

.entry-content h2 {
    font-size: 1.5rem;
    color: var(--blue-dark);
    margin: 36px 0 12px;
    padding-left: 14px;
    border-left: 4px solid var(--blue);
}

.entry-content h3 {
    font-size: 1.2rem;
    margin: 28px 0 10px;
    color: var(--text);
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 18px;
}

.entry-content blockquote {
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--blue-dark);
}

/* ===== SIDEBAR ===== */
.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blue);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--blue-light);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text);
}

.widget ul li a:hover {
    color: var(--blue);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text);
    color: #a0aec0;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #a0aec0;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom a {
    color: #a0aec0;
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ===== UTILITY ===== */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.text-blue { color: var(--blue); }

.no-posts {
    text-align: center;
    padding: 64px 20px;
    color: var(--muted);
}

.no-posts svg {
    margin: 0 auto 16px;
    opacity: 0.3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .nav-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 2px solid var(--blue);
        padding: 12px 20px;
        box-shadow: var(--shadow);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation > ul {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

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

/* ==========================================================================
   CITY PAGE TEMPLATE  (.cp-*)
   page-city.php
========================================================================== */

/* ----- Layout ----- */
.cp-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.cp-section    { padding: 68px 0; }
.cp-section--gray { background: #f8fafc; }
.cp-section--blue {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}

.cp-section-head { margin-bottom: 40px; }
.cp-section-head h2 {
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}
.cp-section-head h2 em { color: var(--blue); font-style: normal; }
.cp-section-head p { color: var(--muted); font-size: .9375rem; max-width: 560px; }
.cp-section-head--center { text-align: center; }
.cp-section-head--center p { margin: 0 auto; }

/* ----- Breadcrumb ----- */
.cp-breadcrumb {
    background: var(--blue-light);
    padding: 10px 0;
    font-size: .8rem;
    color: var(--muted);
}
.cp-breadcrumb a { color: var(--blue); text-decoration: none; }
.cp-breadcrumb a:hover { text-decoration: underline; }
.cp-breadcrumb span { margin: 0 6px; opacity: .5; }

/* ----- Hero ----- */
.cp-hero {
    background: linear-gradient(140deg, var(--blue) 0%, #0d4d8a 55%, #0a3260 100%);
    padding: 72px 20px 80px;
    position: relative;
    overflow: hidden;
}
.cp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.cp-hero-inner { position: relative; max-width: 760px; }
.cp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: var(--white);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 22px;
}
.cp-hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 16px;
}
.cp-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.82);
    line-height: 1.65;
    max-width: 600px;
    margin-bottom: 32px;
}
.cp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.cp-hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 52px;
    flex-wrap: wrap;
}
.cp-hero-stat { border-left: 2px solid rgba(255,255,255,.25); padding-left: 16px; }
.cp-hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--white); line-height: 1; }
.cp-hero-stat span  { font-size: .72rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; }

/* ----- Кнопки ----- */
.cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .18s;
    text-decoration: none;
    line-height: 1;
}
.cp-btn--blue  { background: var(--blue); color: var(--white); }
.cp-btn--blue:hover  { background: var(--blue-dark); color: var(--white); }
.cp-btn--white { background: var(--white); color: var(--blue); }
.cp-btn--white:hover { background: #e8f1fb; color: var(--blue-dark); }
.cp-btn--outline-blue  { background: transparent; border-color: var(--blue); color: var(--blue); }
.cp-btn--outline-blue:hover  { background: var(--blue); color: var(--white); }
.cp-btn--outline-white { background: transparent; border-color: rgba(255,255,255,.65); color: var(--white); }
.cp-btn--outline-white:hover { background: rgba(255,255,255,.15); }
.cp-btn--sm { padding: 9px 18px; font-size: .82rem; }
.cp-btn--full { width: 100%; justify-content: center; }

/* ----- Описание города (2 колонки) ----- */
.cp-desc-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 56px;
    align-items: start;
}
.cp-desc-text h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}
.cp-desc-text p {
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.75;
    margin-bottom: 14px;
}
.cp-desc-text p:last-child { margin-bottom: 0; }

.cp-city-facts {
    background: var(--blue-light);
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid rgba(24,95,165,.15);
}
.cp-city-facts h3 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--blue);
    margin-bottom: 18px;
}
.cp-fact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(24,95,165,.12);
}
.cp-fact:last-child { border-bottom: none; padding-bottom: 0; }
.cp-fact-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: var(--white);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
}
.cp-fact-icon svg { width: 18px; height: 18px; stroke: var(--blue); }
.cp-fact-body strong { display: block; font-size: .88rem; font-weight: 700; color: var(--text); }
.cp-fact-body span   { font-size: .78rem; color: var(--muted); }

/* ----- Услуги (3 колонки) ----- */
.cp-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.cp-service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cp-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(24,95,165,.16);
    border-color: var(--blue);
}
.cp-service-icon {
    width: 52px; height: 52px;
    background: var(--blue-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s;
}
.cp-service-card:hover .cp-service-icon { background: var(--blue); }
.cp-service-icon svg { width: 26px; height: 26px; stroke: var(--blue); transition: stroke .18s; }
.cp-service-card:hover .cp-service-icon svg { stroke: var(--white); }
.cp-service-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; }
.cp-service-card p  { font-size: .8rem; color: var(--muted); line-height: 1.5; flex: 1; }
.cp-service-price {
    font-size: .8rem;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-light);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
}
.cp-service-arrow {
    font-size: .8rem;
    color: var(--blue);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

/* ----- Клиники (3 колонки) ----- */
.cp-clinics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.cp-clinic-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
    border-radius: 0 0 12px 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.cp-clinic-card:hover { box-shadow: 0 8px 28px rgba(24,95,165,.16); }
.cp-clinic-header {
    padding: 20px 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.cp-clinic-avatar {
    flex-shrink: 0;
    width: 52px; height: 52px;
    background: var(--blue);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.cp-clinic-avatar svg { width: 26px; height: 26px; }
.cp-clinic-name { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 4px; }
.cp-clinic-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    color: var(--muted);
}
.cp-clinic-rating .stars { color: #f59e0b; letter-spacing: 1px; }
.cp-clinic-body { padding: 16px 20px; flex: 1; }
.cp-clinic-addr {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 12px;
}
.cp-clinic-addr svg { width: 14px; height: 14px; stroke: var(--blue); flex-shrink: 0; margin-top: 2px; }
.cp-clinic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.cp-clinic-tag {
    font-size: .7rem;
    font-weight: 600;
    background: var(--blue-light);
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 20px;
}
.cp-clinic-desc { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.cp-clinic-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ----- Форма заявки ----- */
.cp-form-inner {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    padding: 44px 48px;
    max-width: 840px;
    margin: 0 auto;
}
.cp-form-inner h2 { font-size: 1.6rem; font-weight: 700; color: var(--white); text-align: center; margin-bottom: 8px; }
.cp-form-inner > p { text-align: center; color: rgba(255,255,255,.72); margin-bottom: 28px; font-size: .9375rem; }
.cp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.cp-form-grid .cp-field--full { grid-column: 1 / -1; }
.cp-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255,255,255,.82);
    margin-bottom: 5px;
    letter-spacing: .03em;
}
.cp-field input,
.cp-field select,
.cp-field textarea {
    width: 100%;
    padding: 11px 15px;
    border: 2px solid rgba(255,255,255,.22);
    border-radius: var(--radius);
    background: rgba(255,255,255,.1);
    color: var(--white);
    font-size: .9375rem;
    font-family: inherit;
    outline: none;
    transition: border-color .18s, background .18s;
    -webkit-appearance: none;
}
.cp-field input::placeholder,
.cp-field textarea::placeholder { color: rgba(255,255,255,.4); }
.cp-field input:focus,
.cp-field select:focus,
.cp-field textarea:focus { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.16); }
.cp-field select option { background: var(--blue-dark); color: var(--white); }
.cp-field textarea { resize: vertical; min-height: 96px; }
.cp-form-submit { text-align: center; margin-top: 22px; }
.cp-form-note {
    text-align: center;
    margin-top: 10px;
    font-size: .75rem;
    color: rgba(255,255,255,.48);
}
.cp-form-note a { color: rgba(255,255,255,.6); }
.cp-alert {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cp-alert--success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4); color: #a7f3d0; }
.cp-alert--error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }

/* ----- Как добраться ----- */
.cp-directions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.cp-direction-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: var(--shadow);
}
.cp-direction-icon {
    width: 48px; height: 48px;
    background: var(--blue-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.cp-direction-icon svg { width: 24px; height: 24px; stroke: var(--blue); }
.cp-direction-card h4 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cp-direction-card p  { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.cp-direction-card .cp-direction-time {
    display: inline-block;
    margin-top: 10px;
    font-size: .75rem;
    font-weight: 700;
    background: var(--blue-light);
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 20px;
}
.cp-direction-card .cp-direction-link {
    display: block;
    margin-top: 10px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}
.cp-direction-card .cp-direction-link:hover { text-decoration: underline; }

/* ----- Фото-плейсхолдер города ----- */
.cp-desc-sidebar { display: flex; flex-direction: column; gap: 20px; }

.cp-city-photo-placeholder {
    border-radius: 12px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9ca3af;
    border: 2px dashed #d1d5db;
    min-height: 200px;
}
.cp-city-photo-placeholder svg {
    width: 52px; height: 52px;
    stroke: #9ca3af;
    opacity: .7;
}
.cp-city-photo-placeholder span {
    font-size: .875rem;
    font-weight: 600;
    color: #6b7280;
}
.cp-city-photo-hint {
    font-size: .72rem !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
}

/* ----- Перки клиник ----- */
.cp-clinic-perks {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cp-clinic-perks li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--blue);
}
.cp-clinic-perks li svg { flex-shrink: 0; stroke: var(--blue); }

/* ----- Центр страницы ----- */
.cp-center { text-align: center; margin-top: 36px; }

/* ==========================================================================
   SERVICE PAGE TEMPLATE  (.sp-*)
   page-service.php
========================================================================== */

/* ----- Что такое (описание + показания) ----- */
.sp-what-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 52px;
    align-items: start;
}
.sp-what-text h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}
.sp-what-text h2 em { color: var(--blue); font-style: normal; }
.sp-what-text p {
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.75;
    margin-bottom: 14px;
}
.sp-what-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sp-box {
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid transparent;
}
.sp-box--yes {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.sp-box--no {
    background: #fff7ed;
    border-color: #fed7aa;
}
.sp-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 12px;
}
.sp-box--yes .sp-box-title { color: #16a34a; }
.sp-box--no  .sp-box-title { color: #ea580c; }
.sp-box-title svg { width: 16px; height: 16px; flex-shrink: 0; }
.sp-box-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.sp-box-list li {
    font-size: .845rem;
    color: var(--text);
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}
.sp-box-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
}
.sp-box--yes .sp-box-list li::before { background: #22c55e; }
.sp-box--no  .sp-box-list li::before { background: #f97316; }

/* ----- Цены ----- */
.sp-prices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.sp-price-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
    position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.sp-price-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 28px rgba(24,95,165,.14);
}
.sp-price-card--featured {
    border-color: var(--blue);
    background: var(--blue-light);
}
.sp-price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: var(--white);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.sp-price-type {
    font-size: .875rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.sp-price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
    letter-spacing: -.02em;
}
.sp-price-value span { font-size: 1rem; font-weight: 600; }
.sp-price-compare {
    font-size: .8rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-price-compare s { color: #9ca3af; }
.sp-price-savings {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #16a34a;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
}
.sp-price-card .cp-btn { margin-top: auto; }

.sp-prices-note {
    background: var(--blue-light);
    border: 1px solid rgba(24,95,165,.15);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: .82rem;
    color: var(--blue-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.sp-prices-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; stroke: var(--blue); }

/* ----- Как проходит (шаги) ----- */
.sp-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}
.sp-steps-grid::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(12.5% + 8px);
    right: calc(12.5% + 8px);
    height: 2px;
    background: linear-gradient(to right, var(--blue-light), var(--blue), var(--blue-light));
    z-index: 0;
}
.sp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}
.sp-step-num {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 3px var(--blue-light);
    flex-shrink: 0;
}
.sp-step-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-step-icon svg { width: 28px; height: 28px; stroke: var(--blue); }
.sp-step-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}
.sp-step-desc {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.55;
}
.sp-step-duration {
    display: inline-block;
    margin-top: 8px;
    font-size: .72rem;
    font-weight: 700;
    background: var(--blue-light);
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ----- FAQ ----- */
.sp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 820px;
    margin: 0 auto;
}
.sp-faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: border-color .2s;
}
.sp-faq-item[open] { border-color: var(--blue); }
.sp-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    user-select: none;
    transition: color .18s;
}
.sp-faq-q::-webkit-details-marker { display: none; }
.sp-faq-item[open] .sp-faq-q { color: var(--blue); }
.sp-faq-q-text { flex: 1; }
.sp-faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .25s;
}
.sp-faq-item[open] .sp-faq-icon {
    background: var(--blue);
    transform: rotate(180deg);
}
.sp-faq-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--blue);
    transition: stroke .18s;
}
.sp-faq-item[open] .sp-faq-icon svg { stroke: var(--white); }
.sp-faq-a {
    padding: 0 22px 18px;
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: -1px;
}
.sp-faq-a p { margin-bottom: 8px; }
.sp-faq-a p:last-child { margin-bottom: 0; }

/* ==========================================================================
   RESPONSIVE — SERVICE PAGE
   960px / 768px / 480px
========================================================================== */
@media (max-width: 960px) {
    .sp-what-grid   { grid-template-columns: 1fr; gap: 32px; }
    .sp-what-sidebar { flex-direction: row; flex-wrap: wrap; }
    .sp-box         { flex: 1 1 240px; }
    .sp-prices-grid { grid-template-columns: repeat(2, 1fr); }
    .sp-steps-grid  { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
    .sp-steps-grid::before { display: none; }
}
@media (max-width: 768px) {
    .sp-prices-grid { grid-template-columns: 1fr; }
    .sp-what-sidebar { flex-direction: column; }
    .sp-box         { flex: unset; }
    .sp-steps-grid  { grid-template-columns: repeat(2, 1fr); }
    .sp-faq-q       { font-size: .875rem; padding: 15px 16px; }
    .sp-faq-a       { padding: 0 16px 15px; padding-top: 12px; }
}
@media (max-width: 480px) {
    .sp-steps-grid  { grid-template-columns: 1fr; gap: 24px; }
    .sp-price-value { font-size: 1.6rem; }
    .sp-price-badge { font-size: .65rem; }
}

/* ==========================================================================
   RESPONSIVE — CITY PAGE
   960px  — планшет
   768px  — мобильный (главный брейкпоинт)
   480px  — маленький экран
========================================================================== */

/* ----- Планшет (960px) ----- */
@media (max-width: 960px) {
    .cp-services-grid   { grid-template-columns: repeat(2, 1fr); }
    .cp-clinics-grid    { grid-template-columns: repeat(2, 1fr); }
    .cp-directions-grid { grid-template-columns: repeat(2, 1fr); }
    .cp-desc-grid       { grid-template-columns: 1fr; gap: 32px; }
    .cp-desc-sidebar    { flex-direction: row; flex-wrap: wrap; }
    .cp-city-photo-placeholder { flex: 1 1 260px; aspect-ratio: auto; min-height: 220px; }
    .cp-city-facts      { flex: 1 1 280px; }
    .cp-form-inner      { padding: 32px 28px; }
}

/* ----- Мобильный 768px — главный брейкпоинт ----- */
@media (max-width: 768px) {
    /* Секции */
    .cp-section { padding: 48px 0; }

    /* Герой */
    .cp-hero { padding: 52px 20px 60px; }
    .cp-hero-stats { gap: 14px; flex-wrap: wrap; }
    .cp-hero-stat  { flex: 1 1 120px; }
    .cp-hero-btns  { flex-direction: column; align-items: stretch; }
    .cp-hero-btns .cp-btn { width: 100%; justify-content: center; }

    /* Сетки → 1 колонка */
    .cp-clinics-grid    { grid-template-columns: 1fr; }
    .cp-directions-grid { grid-template-columns: 1fr; }
    .cp-desc-grid       { grid-template-columns: 1fr; gap: 24px; }
    .cp-desc-sidebar    { flex-direction: column; }
    .cp-city-photo-placeholder { aspect-ratio: 16 / 7; min-height: unset; }

    /* Услуги — 2 колонки (исключение) */
    .cp-services-grid { grid-template-columns: repeat(2, 1fr); }

    /* Форма */
    .cp-form-grid     { grid-template-columns: 1fr; }
    .cp-form-grid .cp-field--full { grid-column: 1; }
    .cp-form-inner    { padding: 28px 20px; }

    /* Кнопки — полная ширина в карточках */
    .cp-clinic-footer .cp-btn { width: 100%; justify-content: center; }

    /* Хлебные крошки */
    .cp-breadcrumb { font-size: .75rem; }
}

/* ----- Маленький экран (480px) ----- */
@media (max-width: 480px) {
    .cp-hero h1 { font-size: 1.6rem; }
    .cp-hero-stats { gap: 8px; }
    .cp-hero-stat  { flex: 1 1 100px; border-left-width: 1px; }
    .cp-hero-stat strong { font-size: 1.25rem; }

    /* Услуги → 1 колонка */
    .cp-services-grid { grid-template-columns: 1fr; }

    .cp-form-inner    { padding: 24px 16px; }
    .cp-section-head h2 { font-size: 1.3rem; }
}

/* ==========================================================================
   SEO-БЛОКИ  (.cp-price-table, .cp-intlinks, .sp-reviews, .sp-seo-text,
               .cp-city-photo)
========================================================================== */

/* ----- Фото города (реальное изображение) ----- */
.cp-city-photo {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.cp-city-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 960px) {
    .cp-city-photo { aspect-ratio: 16 / 7; }
}

/* ----- Таблица цен Хэйхэ vs Россия ----- */
.cp-price-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cp-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.cp-price-table thead tr {
    background: var(--blue);
    color: var(--white);
}
.cp-price-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.cp-price-table th:not(:first-child) { text-align: right; }
.cp-price-table tbody tr:nth-child(odd)  { background: var(--white); }
.cp-price-table tbody tr:nth-child(even) { background: #f8fafc; }
.cp-price-table tbody tr:hover { background: var(--blue-light); }
.cp-price-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.cp-price-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.cp-price-table td:first-child { font-weight: 600; }
.cp-price-table .cn-price  { color: var(--blue); font-weight: 700; }
.cp-price-table .ru-price  { color: var(--muted); text-decoration: line-through; }
.cp-price-table .savings   {
    display: inline-block;
    background: #dcfce7;
    color: #16a34a;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
.cp-price-table-note {
    margin-top: 12px;
    font-size: .8rem;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.cp-price-table-note svg { flex-shrink: 0; width: 14px; height: 14px; stroke: var(--muted); margin-top: 2px; }

/* ----------------------------------------------------------------
   УСЛУГА ПО ГОРОДАМ (.sp-city-blocks)
---------------------------------------------------------------- */
.sp-city-blocks { background: var(--white); }
.sp-city-block { padding: 32px 0; border-bottom: 1px solid var(--border); }
.sp-city-block:first-child { padding-top: 0; }
.sp-city-block:last-child { padding-bottom: 0; border-bottom: none; }
.sp-city-block h2 {
    border-left: 4px solid var(--blue);
    padding-left: 16px;
    margin: 0 0 12px;
    font-size: 1.4rem;
    line-height: 1.3;
}
.sp-city-block > p {
    margin: 0 0 18px;
    color: var(--text);
    line-height: 1.6;
    max-width: 70ch;
}
.sp-city-block-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 18px; }
.clinic-prices-table {
    margin: 0;
    max-width: 760px;
}
.sp-city-block-table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    font-size: .9rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.sp-city-block-table thead tr { background: var(--blue); color: var(--white); }
.sp-city-block-table th {
    padding: 12px 18px;
    text-align: left;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.sp-city-block-table th:not(:first-child) { text-align: right; }
.sp-city-block-table tbody tr:nth-child(odd)  { background: var(--white); }
.sp-city-block-table tbody tr:nth-child(even) { background: #f8fafc; }
.sp-city-block-table tbody tr:hover { background: var(--blue-light); }
.sp-city-block-table td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.sp-city-block-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.sp-city-block-table td:first-child { font-weight: 600; }

/* ----- Блок перелинковки ----- */
.cp-intlinks { padding: 56px 0; background: #f8fafc; }
.cp-intlinks-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.cp-intlinks h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.cp-intlinks-sub { color: var(--muted); font-size: .875rem; margin-bottom: 20px; }
.cp-intlinks-group { margin-bottom: 28px; }
.cp-intlinks-group:last-child { margin-bottom: 0; }
.cp-intlinks-group h3 {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--blue);
    margin-bottom: 10px;
}
.cp-intlinks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cp-intlinks-list a {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: .845rem;
    font-weight: 500;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: border-color .18s, color .18s, background .18s;
}
.cp-intlinks-list a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* ==========================================================================
   HOW TO GET PAGE TEMPLATE  (.htg-*)
   page-how-to-get.php
========================================================================== */
.page-template-page-how-to-get-php .cp-section { padding: 24px 0; }
.page-template-page-how-to-get-php .cp-section-head { margin-bottom: 24px; }
.page-template-page-how-to-get-php .cp-section-head p { margin: 0; }

.htg-route-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.htg-route-cards:last-child { margin-bottom: 0; }
.htg-route-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.htg-route-card-icon {
    width: 40px; height: 40px;
    background: var(--blue-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.htg-route-card-icon svg { width: 20px; height: 20px; stroke: var(--blue); }
.htg-route-card h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.htg-route-card-lines { margin: 0; padding-left: 18px; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.htg-route-card-lines li { margin-bottom: 8px; }
.htg-route-card-lines li:last-child { margin-bottom: 0; }

.htg-subblock { margin-top: 24px; }
.htg-subblock h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.htg-subblock p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.htg-subblock p:last-child { margin-bottom: 0; }
.htg-info-list { margin: 0 0 12px; padding-left: 18px; color: var(--muted); line-height: 1.6; }
.htg-info-list li { margin-bottom: 8px; }
.htg-info-list li:last-child { margin-bottom: 0; }
.htg-info-list:last-child { margin-bottom: 0; }

.htg-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.htg-tip {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.htg-tip-icon {
    width: 40px; height: 40px;
    background: var(--blue-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.htg-tip-icon svg { width: 20px; height: 20px; stroke: var(--blue); }
.htg-tip h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.htg-tip p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }

/* ==========================================================================
   CLINIC PAGE TEMPLATE  (.clinic-*)
   page-clinic.php
========================================================================== */
.clinic-hero {
    background: var(--white);
    border-bottom: 3px solid var(--blue);
    padding: 40px 0;
}
.clinic-hero-inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.clinic-hero-logo {
    width: 88px; height: 88px;
    flex-shrink: 0;
    background: var(--blue-light);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}
.clinic-hero-logo svg { width: 44px; height: 44px; stroke: var(--blue); }
.clinic-hero-info { flex: 1; min-width: 260px; }
.clinic-hero-info h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 12px;
}
.clinic-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: .875rem;
}
.clinic-meta-item { display: flex; align-items: center; gap: 6px; }
.clinic-meta-item svg { width: 16px; height: 16px; stroke: var(--blue); flex-shrink: 0; }
.clinic-rating .stars { color: #f59e0b; letter-spacing: 1px; }
.clinic-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.clinic-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ----- Категории прайса ----- */
.cp-price-category-title {
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 32px 0 12px;
    text-align: left;
}
.cp-price-category-title:first-of-type { margin-top: 0; }

@media (max-width: 600px) {
    .clinic-hero-inner { flex-direction: column; align-items: flex-start; }
    .clinic-hero-meta { flex-direction: column; gap: 8px; }
}

/* ----- Отзывы (страница услуги) ----- */
.sp-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.sp-review-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sp-review-stars { color: #f59e0b; font-size: 1rem; letter-spacing: 2px; }
.sp-review-text {
    font-size: .875rem;
    color: var(--text);
    line-height: 1.65;
    flex: 1;
    font-style: italic;
}
.sp-review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.sp-review-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}
.sp-review-name  { font-size: .82rem; font-weight: 700; color: var(--text); }
.sp-review-city  { font-size: .75rem; color: var(--muted); }

/* ----- SEO-текст (страница услуги) ----- */
.sp-seo-text { padding: 60px 0; }
.sp-seo-text-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.sp-seo-text-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
}
.sp-seo-body h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.3;
}
.sp-seo-body h2 em { color: var(--blue); font-style: normal; }
.sp-seo-body p {
    font-size: .9375rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 14px;
}
.sp-seo-body p:last-child { margin-bottom: 0; }
.sp-seo-body strong { color: var(--text); }
.sp-seo-photo {
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 88px;
}
.sp-seo-photo img {
    width: 100%;
    display: block;
    border-radius: 12px;
}
.sp-seo-photo figcaption {
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
    padding: 8px 4px 0;
}

/* ----- Адаптив SEO-блоков ----- */
@media (max-width: 900px) {
    .sp-reviews-grid    { grid-template-columns: repeat(2, 1fr); }
    .sp-seo-text-grid   { grid-template-columns: 1fr; }
    .sp-seo-photo       { position: static; }
}
@media (max-width: 640px) {
    .sp-reviews-grid    { grid-template-columns: 1fr; }
    .cp-intlinks-list a { font-size: .8rem; padding: 6px 13px; }
    .cp-price-table th,
    .cp-price-table td  { padding: 10px 12px; font-size: .82rem; }
}

/* ==========================================================================
   БЛОК ВРАЧЕЙ  (.cp-doctors-*)
   page-clinic.php — секция #doctors
========================================================================== */
.cp-doctors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cp-doctor-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.cp-doctor-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

/* --- Фото / аватар --- */
.cp-doctor-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1e293b;
    overflow: hidden;
}
.cp-doctor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cp-doctor-anon {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #2a3a50 0%, #1a2535 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-doctor-anon svg {
    width: 65%;
    height: 65%;
    display: block;
}

/* --- Информация --- */
.cp-doctor-info {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cp-doctor-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
}
.cp-doctor-placeholder {
    font-weight: 400;
    color: var(--muted);
    font-style: italic;
    font-size: .85rem;
}
.cp-doctor-position {
    font-size: .82rem;
    font-weight: 600;
    color: var(--blue);
    margin: 2px 0 0;
}
.cp-doctor-specialty {
    font-size: .8rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}
.cp-doctor-age {
    font-size: .78rem;
    color: var(--muted);
    margin: 4px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

/* --- Адаптив --- */
@media (max-width: 1024px) {
    .cp-doctors-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .cp-doctors-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cp-doctor-info  { padding: 12px 12px 14px; }
    .cp-doctor-name  { font-size: .88rem; }
}
