/* ===== Фирменные цвета: медицинский сине-бирюзовый дуотон ===== */
:root {
    --brand: #1a7a8c;
    --brand-2: #2ba9bd;
    --accent: #14c4c9;
    --bg: #f6fafb;
    --surface: #ffffff;
    --surface-2: #eef6f8;
    --text: #12333a;
    --muted: #5f7c84;
    --border: #dbe9ec;
    --grad: linear-gradient(135deg, #1a7a8c 0%, #2ba9bd 55%, #14c4c9 100%);
    --header-height: 76px;
    --transition: 200ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: var(--step-0, 1rem);
    /* лёгкое зерно/мягкие mesh-пятна */
    background-image:
        radial-gradient(ellipse 60% 50% at 15% 0%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent),
        radial-gradient(ellipse 50% 40% at 90% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    font-weight: 700;
}

h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    margin-bottom: 0.4em;
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--brand-2);
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--grad);
    color: #fff;
    border: none;
    padding: 15px 32px;
    border-radius: var(--radius-pill, 999px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 30%, transparent);
    text-align: center;
}

.btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 40%, transparent);
}

.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: var(--radius-pill, 999px);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    transition: all var(--transition);
}

.btn-ghost:hover {
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-2px);
}

/* ===== Шапка ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: 30px;
    margin-left: auto;
    margin-right: 24px;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.98rem;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.btn-header {
    padding: 11px 22px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===== Секции ===== */
.section {
    padding: clamp(64px, 9vw, 110px) 0;
}

.section-intro {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 640px;
    margin-bottom: 48px;
}

/* ===== Герой ===== */
.hero {
    padding: clamp(48px, 7vw, 90px) 0 clamp(56px, 8vw, 100px);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.3rem, 5vw, 3.7rem);
    margin-bottom: 0.5em;
}

.hero-lead {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    color: var(--muted);
    margin-bottom: 2em;
    max-width: 540px;
}

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

.hero-visual {
    position: relative;
}

.hero-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 28px;
    box-shadow:
        0 20px 60px color-mix(in srgb, var(--brand) 22%, transparent),
        0 6px 18px rgba(18, 51, 58, 0.08);
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    background: var(--grad);
    border-radius: 28px;
    opacity: 0.15;
    z-index: -1;
}

/* ===== Об враче ===== */
.about-section {
    background: var(--surface);
    border-radius: 40px;
    margin: 0 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 56px;
    align-items: start;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 2em;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.detail-item {
    padding: 24px;
    background: var(--surface-2);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.detail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(18, 51, 58, 0.06);
}

.detail-item h3 {
    color: var(--brand);
    margin-bottom: 0.5em;
    font-size: 1.1rem;
}

.detail-item p {
    margin: 0;
    font-size: 0.97rem;
    color: var(--muted);
}

.about-photo {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.workplace-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(18, 51, 58, 0.1);
}

/* ===== Услуги ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--surface);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(18, 51, 58, 0.1);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.service-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: 20px;
    color: var(--brand);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 0.6em;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--muted);
    font-size: 0.96rem;
    flex-grow: 1;
    margin-bottom: 1.2em;
}

.service-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.services-note {
    margin-top: 40px;
    padding: 28px 32px;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface));
    border-radius: 20px;
    border-left: 4px solid var(--brand);
}

.services-note p {
    margin: 0;
    color: var(--muted);
}

/* ===== Отзывы ===== */
.reviews-section {
    background: var(--surface);
    border-radius: 40px;
    margin: 0 16px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.review-card {
    background: var(--surface-2);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: transform var(--transition);
}

.review-card:hover {
    transform: translateY(-3px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.review-author {
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
}

.review-rating {
    color: #f5b942;
    font-size: 1rem;
    letter-spacing: 2px;
}

.review-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.97rem;
}

/* ===== Запись на приём ===== */
.appointment-section {
    position: relative;
}

.appointment-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: start;
    background: var(--grad);
    border-radius: 32px;
    padding: clamp(32px, 5vw, 60px);
    color: #fff;
    box-shadow: 0 24px 60px color-mix(in srgb, var(--brand) 30%, transparent);
}

.appointment-info h2 {
    color: #fff;
}

.appointment-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2em;
}

.contact-quick {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-quick .contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 1.02rem;
}

.contact-quick .contact-item svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.85);
}

.appointment-form-wrapper {
    background: var(--surface);
    border-radius: 24px;
    padding: 36px;
    color: var(--text);
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
    background: var(--surface);
}

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

.btn-submit {
    width: 100%;
    margin-top: 8px;
}

.form-privacy {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    margin: 8px 0 0;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
    color: var(--brand);
}

.form-success svg {
    color: var(--brand);
    margin-bottom: 12px;
}

.form-success h3 {
    color: var(--text);
    margin-bottom: 0.5em;
}

.form-success p {
    color: var(--muted);
    margin: 0;
}

.form-error {
    padding: 18px 20px;
    background: #fdecec;
    border-radius: 14px;
    border-left: 4px solid #e05757;
    margin-bottom: 18px;
}

.form-error p {
    margin: 0;
    color: #b13232;
    font-size: 0.95rem;
}

/* ===== FAQ ===== */
.faq-section {
    background: var(--surface);
    border-radius: 40px;
    margin: 0 16px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 860px;
}

.faq-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.faq-item:hover {
    box-shadow: 0 6px 20px rgba(18, 51, 58, 0.06);
}

.faq-item summary {
    padding: 24px 28px;
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: color var(--transition);
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--brand);
    font-weight: 400;
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    color: var(--brand);
}

.faq-item p {
    padding: 0 28px 24px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.98rem;
}

/* ===== Контакты ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contacts-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.contact-block h3 {
    color: var(--brand);
    font-size: 1.05rem;
    margin-bottom: 0.4em;
}

.contact-block p {
    color: var(--muted);
    margin: 0;
    font-size: 0.97rem;
}

.contact-block a {
    font-weight: 600;
}

.contacts-map {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(18, 51, 58, 0.07);
}

.map-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--surface-2);
}

.map-placeholder svg {
    display: block;
}

/* ===== Подвал ===== */
.site-footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.75);
    padding: 56px 0 28px;
    margin-top: 40px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1.3fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 14px;
}

.footer-brand p {
    max-width: 320px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-nav,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav h4,
.footer-contact h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-contact p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    margin: 0;
}

/* ===== Reveal-анимации (только при живом JS) ===== */
html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out, ease), transform 0.6s var(--ease-out, ease);
}

html.js .reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-visual {
        order: -1;
        max-width: 420px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .about-photo {
        position: static;
        max-width: 400px;
    }

    .appointment-wrapper {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 720px) {
    .main-nav {
        display: none;
    }

    .btn-header {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 20px 24px;
        gap: 18px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 30px rgba(18, 51, 58, 0.1);
        margin: 0;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .contacts-info {
        grid-template-columns: 1fr;
    }

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

    .about-section,
    .reviews-section,
    .faq-section {
        margin: 0 8px;
        border-radius: 28px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 16px;
    }

    .service-card,
    .review-card {
        padding: 24px;
    }

    .appointment-form-wrapper {
        padding: 24px;
    }
    
    .faq-item summary {
        padding: 20px;
        font-size: 1.02rem;
    }
    
    .faq-item summary::after {
        right: 20px;
    }
    
    .faq-item p {
        padding: 0 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    * {
        scroll-behavior: auto;
    }
}

/* --- Стили для блоков, оставшихся без оформления --- */
/* Секция "О клинике" */
.about-text {
  max-width: 65ch;
  margin: 0 auto;
  font-size: var(--step-1, 1.125rem);
  line-height: 1.7;
  color: var(--text, #1F2421);
}

.about-text p {
  margin-bottom: var(--space-4, 1rem);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Секция контактов */
.contacts-section {
  background: var(--surface, #FBF9F5);
  border-radius: var(--radius-2, 12px);
  padding: var(--space-6, 2rem);
  border: 1px solid var(--border, #E7E1D7);
  box-shadow: var(--shadow-1, 0 1px 3px rgba(0,0,0,0.06));
}

.contacts-section h2 {
  margin-bottom: var(--space-5, 1.5rem);
}

.contacts-section p {
  margin-bottom: var(--space-3, 0.75rem);
  font-size: var(--step-0, 1rem);
  line-height: 1.6;
}

.contacts-section a {
  color: var(--brand, #C4612F);
  text-decoration: none;
  transition: color 150ms var(--ease-out, ease-out);
}

.contacts-section a:hover {
  color: var(--brand-2, #A94E22);
  text-decoration: underline;
}

/* Секция услуг */
.services-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: var(--space-5, 1.5rem);
  margin-top: var(--space-6, 2rem);
}

@media (max-width: 640px) {
  .services-section {
    grid-template-columns: 1fr;
  }
}

/* Звёзды в отзывах */
.star {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.125rem;
  background: var(--accent, #C4612F);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star:last-child {
  margin-right: 0;
}

/* --- Недостающие дизайн-токены (значения из theme.css платформы) --- */
:root{
  --font-sans: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: var(--step-0, clamp(1rem, .96rem + .2vw, 1.125rem));
  --line-height: 1.6;
}
