/* =========================================================
   Центр «Контакт» — полный style.css
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f7f1e8;
    --bg-soft: #fbf7f0;
    --primary: #7a8c6a;
    --primary-dark: #5d6e50;
    --accent: #c9a27a;
    --text: #3a3a3a;
    --text-soft: #6b6b6b;
    --card: #ffffff;
    --border: #e8dfd0;
    --sidebar-w: 280px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

a {
    color: inherit;
}

/* =========================================================
   Sidebar
   ========================================================= */

.sidebar {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;

    display: flex;
    flex-direction: column;

    width: var(--sidebar-w);
    height: 100vh;
    padding: 28px 20px;

    overflow-y: auto;

    background: var(--bg-soft);
    border-right: 1px solid var(--border);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;

    margin-bottom: 32px;

    color: var(--primary-dark);
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 40px;
    height: 40px;

    color: #ffffff;
    font-size: 20px;

    background: var(--primary);
    border-radius: 50%;
}

.main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;

    list-style: none;
}

.main-nav a {
    position: relative;

    display: block;

    padding: 11px 14px;

    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;

    border-radius: 10px;
    transition: background 0.25s, color 0.25s;
}

.main-nav a::before {
    position: absolute;
    top: 50%;
    left: 0;

    width: 3px;
    height: 60%;

    content: '';

    background: var(--accent);
    border-radius: 2px;
    transform: translateY(-50%) scaleY(0);
    transition: transform 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-dark);
    background: rgba(122, 140, 106, 0.12);
}

.main-nav a:hover::before,
.main-nav a.active::before {
    transform: translateY(-50%) scaleY(1);
}

.main-nav a.active {
    font-weight: 600;
}

.sidebar-cta {
    flex-shrink: 0;
    margin-top: 24px;
}

.sidebar-footer {
    flex-shrink: 0;

    margin-top: 20px;
    padding-top: 20px;

    color: var(--text-soft);
    font-size: 12px;
    text-align: center;

    border-top: 1px solid var(--border);
}

/* =========================================================
   Кнопки
   ========================================================= */

.cta-btn {
    display: inline-block;

    padding: 12px 22px;

    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    background: var(--primary);
    border: 0;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}

.cta-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

button.cta-btn {
    font-family: 'Inter', sans-serif;
}

.sidebar-cta .cta-btn {
    display: block;
    width: 100%;
}

.hero-buttons .cta-btn,
.specialist-intro .cta-btn {
    width: auto;
}

.btn-outline {
    display: inline-block;

    padding: 10px 22px;

    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;

    border: 1px solid var(--primary);
    border-radius: 30px;
    transition: background 0.25s, color 0.25s;
}

.btn-outline:hover {
    color: #ffffff;
    background: var(--primary);
}

/* =========================================================
   Основной контент
   ========================================================= */

.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-w);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;

    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 40px;
}

.hero h1 {
    margin-bottom: 24px;

    color: var(--primary-dark);
    font-size: 52px;
    line-height: 1.1;
}

.hero p {
    max-width: 480px;
    margin-bottom: 32px;

    color: var(--text-soft);
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-img {
    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(122, 140, 106, 0.2);
}

/* =========================================================
   Секции
   ========================================================= */

.content-section {
    padding: 80px 40px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 16px;

    color: var(--primary-dark);
    font-size: 40px;
    text-align: center;
}

.section-sub {
    margin-bottom: 50px;

    color: var(--text-soft);
    font-size: 17px;
    text-align: center;
}

/* =========================================================
   О нас
   ========================================================= */

.about-content,
.care-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;

    color: var(--text);
    font-size: 16px;
    line-height: 1.8;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.care-content p {
    margin-bottom: 16px;
}

.care-content p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   Принципы
   ========================================================= */

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.principle-card {
    position: relative;

    padding: 32px;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.principle-card:hover {
    box-shadow: 0 16px 40px rgba(122, 140, 106, 0.18);
    transform: translateY(-6px);
}

.principle-number {
    position: absolute;
    top: 20px;
    right: 20px;

    color: var(--accent);
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 700;
    opacity: 0.3;
}

.principle-card h3 {
    margin-bottom: 16px;
    padding-right: 60px;

    color: var(--primary-dark);
    font-size: 22px;
}

.principle-card p {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
}

/* =========================================================
   Услуги
   ========================================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.service-card {
    overflow: hidden;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    box-shadow: 0 16px 40px rgba(122, 140, 106, 0.18);
    transform: translateY(-6px);
}

.service-card img {
    width: 100%;
    height: 200px;

    object-fit: cover;
}

.service-card .body {
    padding: 24px;
}

.service-card h3 {
    margin-bottom: 10px;

    color: var(--primary-dark);
    font-size: 22px;
}

.service-card p {
    color: var(--text-soft);
    font-size: 15px;
}

/* =========================================================
   Наша команда
   ========================================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.team-card {
    padding: 32px 24px;

    text-align: center;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.team-card img {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;

    object-fit: cover;

    background: var(--border);
    border: 4px solid var(--bg);
    border-radius: 50%;
}

.team-card h3 {
    margin-bottom: 8px;

    color: var(--primary-dark);
    font-size: 22px;
}

.team-card .short-desc {
    margin-bottom: 16px;

    color: var(--text-soft);
    font-size: 14px;
}

.team-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 16px;

    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    background: transparent;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
}

.team-toggle:hover {
    color: var(--primary-dark);
    background: rgba(122, 140, 106, 0.1);
}

/* =========================================================
   Контакты
   ========================================================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.contact-info ul {
    margin: 24px 0;
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 0;

    color: var(--text);

    border-bottom: 1px solid var(--border);
}

.contact-info li::before {
    color: var(--accent);
    font-size: 18px;
    content: '✦';
}

.contact-info img {
    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: cover;
    border-radius: 20px;
}

/* =========================================================
   Материалы и бесплатная помощь
   ========================================================= */

.materials-grid,
.free-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.material-card,
.free-card {
    padding: 28px;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.material-card {
    display: flex;
    flex-direction: column;
}

.material-card .tag {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.material-card h3,
.free-card h3 {
    margin-bottom: 10px;

    color: var(--primary-dark);
    font-size: 22px;
}

.material-card p,
.free-card p,
.free-card ul {
    color: var(--text-soft);
    font-size: 15px;
}

.material-card p {
    flex-grow: 1;
    margin-bottom: 18px;
}

.free-card .icon {
    margin-bottom: 14px;
    font-size: 32px;
}

.free-card ul {
    margin: 10px 0 0 18px;
    font-size: 14px;
}

.free-card li {
    margin-bottom: 6px;
}

.material-link,
.free-card a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.material-link {
    align-self: flex-start;

    padding: 0;

    font-family: 'Inter', sans-serif;
    font-size: 14px;

    background: transparent;
    border: 0;
    cursor: pointer;
}

.material-link:hover,
.free-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* =========================================================
   Мероприятия
   ========================================================= */

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;

    margin-bottom: 10px;

    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.event-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.event-book {
    display: inline-block;

    margin-top: 14px;
    padding: 9px 22px;

    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;

    background: var(--primary);
    border: 0;
    border-radius: 24px;
    cursor: pointer;
}

.event-book:hover {
    background: var(--primary-dark);
}

/* =========================================================
   Подвал
   ========================================================= */

footer {
    padding: 40px;

    color: #e8dfd0;
    text-align: center;

    background: var(--primary-dark);
}

footer p {
    margin: 6px 0;
    font-size: 14px;
}

footer .small {
    font-size: 12px;
    opacity: 0.7;
}

.footer-docs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;

    margin-bottom: 18px;
}

.footer-docs a {
    color: #e8dfd0;
    font-size: 13px;
    text-decoration: underline;
}

/* =========================================================
   Мобильное меню
   ========================================================= */

.burger {
    position: fixed;
    z-index: 200;
    top: 16px;
    left: 16px;

    display: none;
    flex-direction: column;
    gap: 5px;

    padding: 10px;

    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.burger span {
    display: block;

    width: 24px;
    height: 2px;

    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.overlay {
    position: fixed;
    z-index: 90;
    inset: 0;

    display: none;

    background: rgba(0, 0, 0, 0.4);
}

.overlay.active {
    display: block;
}

/* =========================================================
   Страница специалиста
   ========================================================= */

.specialist-page {
    min-height: 100vh;
}

.specialist-section {
    padding: 70px 40px 80px;
}

.specialist-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;

    overflow-wrap: break-word;

    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.back-link {
    display: inline-block;

    margin-bottom: 28px;

    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Рамка фото всегда по центру */
.specialist-photo-center {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    margin: 0 auto 30px;
}

/* Размер рамки ограничен */
.specialist-photo-frame {
    display: flex;
    justify-content: center;
    align-items: center;

    width: min(320px, 100%);
    max-width: 100%;

    padding: 12px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow:
        0 14px 34px rgba(93, 110, 80, 0.16),
        0 2px 6px rgba(0, 0, 0, 0.04);

    overflow: hidden;
}

/* Фото не растягивается и не обрезается */
.specialist-photo {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 390px;

    margin: 0 auto;

    object-fit: contain;
    object-position: center;

    border-radius: 16px;
}

.specialist-intro {
    text-align: center;
}

.specialist-intro h1 {
    margin-bottom: 12px;

    color: var(--primary-dark);
    font-size: 38px;
    line-height: 1.15;
}

.specialist-role {
    margin-bottom: 24px;

    color: var(--text-soft);
    font-size: 16px;
}

.specialist-intro .cta-btn {
    width: auto;
}

.specialist-details {
    margin-top: 36px;
    padding-top: 28px;

    color: var(--text);
    font-size: 16px;
    line-height: 1.8;

    border-top: 1px solid var(--border);
}

.specialist-details p {
    margin-bottom: 14px;
}

.specialist-details p:last-child {
    margin-bottom: 0;
}

.specialist-details ul {
    margin: 8px 0 16px 20px;
}

.specialist-details li {
    margin-bottom: 6px;
    line-height: 1.7;
}

/* Выравнивание текста */
.about-content p,
.principle-card p,
.service-card p,
.team-card .short-desc,
.care-content p,
.material-card p,
.free-card p,
.modal-body p,
.specialist-details p,
.specialist-details li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* =========================================================
   Модальные окна
   ========================================================= */

.modal-overlay {
    position: fixed;
    z-index: 500;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.5);
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 680px;
    max-height: 85vh;

    overflow-y: auto;

    background: var(--bg-soft);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-header {
    position: sticky;
    z-index: 2;
    top: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 24px 32px;

    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.modal-doc-label {
    display: block;

    margin-bottom: 4px;

    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.modal-header h3 {
    color: var(--primary-dark);
    font-size: 26px;
}

.modal-close {
    flex-shrink: 0;

    color: var(--text-soft);
    font-size: 30px;
    line-height: 1;

    background: transparent;
    border: 0;
    cursor: pointer;
}

.modal-body {
    padding: 24px 32px 32px;

    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

.modal-body h4 {
    margin: 20px 0 8px;

    color: var(--primary-dark);
    font-size: 20px;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 8px 0 12px 20px;
}

/* =========================================================
   Формы
   ========================================================= */

.modal-form label {
    display: block;

    margin-bottom: 6px;

    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    margin-bottom: 16px;
    padding: 11px 14px;

    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.modal-form textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 14px;

    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-row input {
    flex-shrink: 0;
    width: auto;
    margin-top: 3px;
}

.checkbox-row label {
    margin: 0;
    font-weight: 400;
}

.checkbox-row a {
    color: var(--primary);
}

.form-submit {
    width: 100%;
    padding: 13px;

    color: #ffffff;
    font-size: 15px;
    font-weight: 600;

    background: var(--primary);
    border: 0;
    border-radius: 30px;
    cursor: pointer;
}

.form-submit:hover {
    background: var(--primary-dark);
}

.form-success {
    display: none;

    padding: 40px 20px;

    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.form-success .icon {
    margin-bottom: 14px;
    font-size: 44px;
}

.form-error {
    display: none;

    margin-bottom: 14px;
    padding: 12px 14px;

    color: #b04a4a;
    font-size: 13px;

    background: rgba(200, 80, 80, 0.1);
    border-radius: 12px;
}

/* =========================================================
   Cookie banner
   ========================================================= */

.cookie-banner {
    position: fixed;
    z-index: 250;
    right: 20px;
    bottom: 20px;

    display: none;
    align-items: center;
    gap: 16px;

    max-width: 420px;
    padding: 18px 22px;

    color: #e8dfd0;

    background: var(--primary-dark);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cookie-banner.show {
    display: flex;
}

.cookie-banner p {
    flex-grow: 1;
    font-size: 13px;
}

.cookie-accept {
    flex-shrink: 0;

    padding: 9px 22px;

    color: #ffffff;
    font-size: 13px;
    font-weight: 600;

    background: var(--accent);
    border: 0;
    border-radius: 20px;
    cursor: pointer;
}

/* =========================================================
   Адаптация
   ========================================================= */

@media (max-width: 1024px) {
    :root {
        --sidebar-w: 240px;
    }

    .main-nav a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .section-title {
        font-size: 34px;
    }
}

@media (max-width: 860px) {
    .burger {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 40px;

        padding: 80px 24px 50px;
    }

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

    .content-section {
        padding: 60px 24px;
    }

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

    .about-content,
    .care-content {
        padding: 30px 24px;
    }

    .principle-card {
        padding: 24px;
    }

    footer {
        padding: 40px 24px;
    }

    .cookie-banner {
        right: 20px;
        left: 20px;
        max-width: none;
    }

    .modal-header {
        padding: 20px 22px;
    }

    .modal-body {
        padding: 20px 22px 26px;
    }

    .specialist-section {
        padding: 76px 16px 44px;
    }

    .specialist-content {
        width: 100%;
        padding: 24px 16px 30px;
        border-radius: 18px;
    }

    .back-link {
        margin-bottom: 24px;
    }

    .specialist-photo-center {
        width: 100%;
        margin: 0 auto 26px;
    }

    .specialist-photo-frame {
        width: min(280px, 100%);
        min-height: 0;
        padding: 8px;
        border-radius: 20px;
    }

    .specialist-photo {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        border-radius: 13px;
    }

    .specialist-intro h1 {
        font-size: clamp(27px, 8vw, 34px);
    }

    .specialist-role {
        font-size: 15px;
    }

    .specialist-intro .cta-btn {
        max-width: 100%;
        padding: 12px 18px;
        font-size: 14px;
    }

    .specialist-details {
        margin-top: 28px;
        padding-top: 22px;
        font-size: 15px;
    }

    .specialist-details p,
    .specialist-details li {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .content-section {
        padding-right: 14px;
        padding-left: 14px;
    }

    .specialist-section {
        padding-right: 10px;
        padding-left: 10px;
    }

    .specialist-content {
        padding: 22px 14px 26px;
        border-radius: 16px;
    }

    .specialist-photo-frame {
        width: min(250px, 100%);
        padding: 7px;
        border-radius: 18px;
    }

    .specialist-intro .cta-btn {
        width: 100%;
    }

    .specialist-details {
        font-size: 15px;
    }
}
/* =====================================================
   ФИНАЛЬНОЕ ОФОРМЛЕНИЕ ФОТО СПЕЦИАЛИСТОВ
   ===================================================== */

/* Карточки специалистов */
.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Фото в карточках на главной странице */
.team-card>img {
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;

    object-fit: cover;
    object-position: center center;

    background: var(--border);
    border: 4px solid var(--bg);
    border-radius: 50%;
}

/* Кнопка «Подробнее» по центру */
.team-card>.team-toggle {
    align-self: center;
}

/* Фото на отдельной странице специалиста */
.specialist-photo-center {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    margin: 0 auto 30px;
}

.specialist-photo-frame {
    display: flex;
    justify-content: center;
    align-items: center;

    width: min(320px, 100%);
    max-width: 100%;
    min-height: 0;
    height: auto;

    margin: 0 auto;
    padding: 10px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(93, 110, 80, 0.16);

    overflow: hidden;
}

.specialist-photo {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    margin: 0;

    object-fit: contain;
    object-position: center center;

    border: 0;
    border-radius: 15px;
}

/* Мобильная версия */
@media screen and (max-width: 860px) {
    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .team-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .team-card {
        width: 100%;
        max-width: 360px;
    }

    .team-card>img {
        width: 130px;
        height: 130px;
        margin-right: auto;
        margin-left: auto;
    }

    .specialist-section {
        width: 100%;
        padding: 76px 14px 44px;
    }

    .specialist-section .container {
        width: 100%;
        max-width: 100%;
    }

    .specialist-content {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 24px 14px 30px;
    }

    .specialist-photo-center {
        width: 100%;
        margin-right: auto;
        margin-left: auto;
    }

    .specialist-photo-frame {
        width: min(280px, 100%);
        margin-right: auto;
        margin-left: auto;
        padding: 8px;
        border-radius: 20px;
    }

    .specialist-photo {
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 13px;
    }

    .specialist-intro {
        width: 100%;
        text-align: center;
    }

    .specialist-intro .cta-btn {
        display: inline-block;
        width: auto;
        max-width: 100%;
    }
}

@media screen and (max-width: 420px) {
    .specialist-section {
        padding-right: 8px;
        padding-left: 8px;
    }

    .specialist-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .specialist-photo-frame {
        width: min(250px, 100%);
    }

    .specialist-intro .cta-btn {
        width: 100%;
    }
}
/* =====================================================
   ФИНАЛЬНАЯ МОБИЛЬНАЯ ВЕРСИЯ
   ===================================================== */

@media screen and (max-width: 860px) {

    html,
    body {
        width: 100%;
        min-width: 320px;
        overflow-x: hidden;
    }

    .main-content {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .content-section {
        width: 100%;
        padding: 56px 14px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Меню */
    .burger {
        display: flex;
    }

    .sidebar {
        width: min(280px, 86vw);
        max-width: 100%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Первый экран */
    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 30px;

        width: 100%;
        padding: 78px 18px 44px;
    }

    .hero h1 {
        font-size: clamp(34px, 10vw, 44px);
    }

    .hero p {
        max-width: none;
        font-size: 16px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-buttons .cta-btn,
    .hero-buttons .btn-outline {
        display: block;
        width: 100%;
        text-align: center;
    }

    .hero-img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    /* Заголовки */
    .section-title {
        font-size: clamp(30px, 8vw, 38px);
        line-height: 1.15;
    }

    .section-sub {
        margin-bottom: 30px;
        font-size: 15px;
    }

    /* Карточки */
    .about-content,
    .care-content {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px;
    }

    .principles-grid,
    .services-grid,
    .materials-grid,
    .free-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .principle-card,
    .service-card,
    .material-card,
    .free-card {
        width: 100%;
        max-width: 100%;
    }

    /* Наша команда */
    .team-grid {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
    }

    .team-card {
        display: flex;
        flex-direction: column;
        align-items: center;

        width: 100%;
        max-width: 360px;
        padding: 26px 18px;

        text-align: center;
    }

    .team-card>img {
        display: block;

        width: 130px;
        height: 130px;
        margin: 0 auto 18px;

        object-fit: cover;
        object-position: center center;

        border-radius: 50%;
    }

    .team-card h3 {
        width: 100%;
        font-size: 24px;
    }

    .team-card .short-desc {
        width: 100%;
        margin-bottom: 14px;
        text-align: center;
    }

    .team-card .team-toggle {
        align-self: center;
    }

    /* Страница специалиста */
    .specialist-section {
        width: 100%;
        padding: 76px 10px 44px;
    }

    .specialist-content {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 22px 14px 30px;
    }

    .back-link {
        display: block;
        max-width: 100%;
        margin-bottom: 24px;
        overflow-wrap: anywhere;
    }

    .specialist-photo-center {
        display: flex;
        justify-content: center;
        align-items: center;

        width: 100%;
        margin: 0 auto 26px;
    }

    .specialist-photo-frame {
        display: flex;
        justify-content: center;
        align-items: center;

        width: min(280px, calc(100vw - 44px));
        max-width: 100%;
        min-height: 0;
        height: auto;

        margin: 0 auto;
        padding: 8px;

        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 20px;
        box-shadow: 0 10px 26px rgba(93, 110, 80, 0.14);

        overflow: hidden;
    }

    .specialist-photo {
        display: block;

        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;

        margin: 0;

        object-fit: contain;
        object-position: center center;

        border-radius: 13px;
    }

    .specialist-intro {
        width: 100%;
        text-align: center;
    }

    .specialist-intro h1 {
        font-size: clamp(28px, 8vw, 36px);
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .specialist-role {
        font-size: 15px;
    }

    .specialist-intro .cta-btn {
        display: inline-block;
        width: auto;
        max-width: 100%;
        padding: 12px 18px;
    }

    .specialist-details {
        width: 100%;
        font-size: 15px;
        line-height: 1.7;
    }

    .specialist-details p,
    .specialist-details li {
        text-align: left;
    }

    /* Контакты и подвал */
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    footer {
        padding: 34px 16px;
    }

    .footer-docs {
        flex-direction: column;
        gap: 10px;
    }

    /* Модальные окна */
    .modal-overlay {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .modal-box {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        margin: 0 auto;
        border-radius: 16px;
    }

    .modal-header {
        padding: 18px;
    }

    .modal-body {
        padding: 20px 18px 24px;
    }

    /* Cookie */
    .cookie-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;

        flex-direction: column;
        align-items: stretch;
        gap: 12px;

        max-width: none;
        padding: 16px;
    }

    .cookie-accept {
        width: 100%;
    }
}

@media screen and (max-width: 420px) {
    .content-section {
        padding-right: 10px;
        padding-left: 10px;
    }

    .specialist-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .specialist-photo-frame {
        width: min(250px, calc(100vw - 36px));
    }

    .specialist-intro .cta-btn {
        width: 100%;
    }
}
/* ===== Отдельная страница «Контакты» ===== */

.contacts-page {
    min-height: 100vh;
}

.contacts-page .section-title {
    margin-top: 4px;
}

.contacts-page .section-sub {
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
}

.contacts-card {
    background: var(--card);
    padding: 36px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.contacts-card-soft {
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.contacts-card h2,
.contacts-requisites h2 {
    margin-bottom: 16px;
    color: var(--primary-dark);
    font-size: 30px;
    line-height: 1.2;
}

.contacts-card-text {
    margin-bottom: 18px;
    color: var(--text-soft);
}

.contacts-list {
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.contacts-list li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.contacts-list li::before {
    display: none;
}

.contacts-label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
}

.contacts-list a,
.requisites-grid a {
    color: var(--primary);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contacts-cta {
    width: auto;
}

.contacts-steps {
    margin: 0 0 24px 22px;
    color: var(--text);
}

.contacts-steps li {
    margin-bottom: 13px;
    padding-left: 4px;
}

.contacts-note {
    padding: 16px;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: rgba(201, 162, 122, 0.12);
    color: var(--text-soft);
    font-size: 14px;
}

.contacts-requisites {
    margin-top: 32px;
    padding: 36px;
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.requisites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
}

.requisites-grid p {
    color: var(--text-soft);
}

.requisites-grid strong {
    color: var(--text);
}

@media (max-width: 860px) {

    .contacts-card,
    .contacts-requisites {
        padding: 28px 22px;
    }

    .contacts-card h2,
    .contacts-requisites h2 {
        font-size: 27px;
    }

    .requisites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contacts-cta {
        width: 100%;
    }
}