/* ==========================================================================
   CLEAN RESPONSIVE ARCHITECTURE (ALL 6 SECTIONS — MOBILE & DESKTOP)
   ========================================================================== */

:root {
    --bg-color: #F8F1ED;
    --text-primary: #512231;
    --text-secondary: #7A4C5B;
    --accent-color: #6B273D;
    --card-bg: #FFFFFF;
    --border-color: #EADCD6;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', Arial, sans-serif;
    --font-cursive: 'Caveat', cursive;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 48px;
}

body {
    background-color: #FDFBF7;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.taplink-container {
    --cw: min(1vw, 5px);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #F8F1ED;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: visible;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

#home,
#approach,
#help,
#formats,
#education,
#science {
    scroll-margin-top: 48px;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   НАВИГАЦИЯ (.site-nav)
   ========================================================================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 2px;
    width: calc(100% + 40px);
    min-height: 42px;
    margin: -20px -20px 0;
    padding: 0 clamp(8px, calc(2.8 * var(--cw)), 14px);
    background: rgba(248, 241, 237, 0.97);
    border-bottom: 1px solid rgba(73, 33, 41, 0.18);
    box-shadow: 0 3px 9px rgba(73, 33, 41, 0.035);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

.site-nav a {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 1px 2px 0;
    border-bottom: 2px solid transparent;
    color: #635448;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(6.8px, calc(2.12 * var(--cw)), 9px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.site-nav a[aria-current="location"] {
    color: #642E40;
    border-bottom-color: #642E40;
}

@media (max-width: 359px) {
    .site-nav {
        padding-left: 5px;
        padding-right: 5px;
        gap: 1px;
    }
    .site-nav a {
        font-size: clamp(6.2px, 2.05vw, 7.1px);
        padding: 1px 1px 0;
        letter-spacing: -0.02em;
    }
}

/* ==========================================================================
   БЛОК 1: HERO (#home) — Координаты DOC2 HERO FRIEND PSD V5 (1086 x 1750)
   ========================================================================== */
#home.hero-block {
    position: relative;
    isolation: isolate;
    width: calc(100% + 40px);
    aspect-ratio: 1086 / 1750;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 -20px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    background: #F7EFEB;
}

#home.hero-block > .hero-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center top;
}

#home.hero-block > .hero-upper-line-v4 {
    position: absolute;
    left: 44.8%;
    top: -0.35%;
    z-index: 1;
    display: block;
    width: 66.66666667%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

#home.hero-block > .hero-text {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

#home.hero-block .hero-subtitle {
    position: absolute;
    top: 5.5%;
    left: 6.15%;
    width: 51%;
    margin: 0;
    padding: 0 0 0 2.7%;
    border: 0;
    white-space: normal;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(16.5px, calc(4.65 * var(--cw)), 23px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    color: #635448;
}

#home.hero-block .hero-subtitle::before {
    content: '';
    position: absolute;
    top: 0.07em;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #492129;
}

#home.hero-block .hero-subtitle .hero-subtitle-hyphen {
    display: inline;
    position: static;
    color: #635448;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8em;
    font-weight: 400;
    vertical-align: baseline;
}

#home.hero-block .hero-name {
    position: absolute;
    top: 20.5%;
    left: 5.0%;
    width: 52%;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

#home.hero-block .hero-surname {
    display: block;
    font-family: 'Bodoni Moda', 'Times New Roman', serif;
    font-size: clamp(28px, calc(8.6 * var(--cw)), 43px);
    line-height: 0.98;
    font-weight: 400;
    letter-spacing: -0.055em;
    color: #635448;
    white-space: nowrap;
}

#home.hero-block .hero-script-img {
    display: block;
    width: 86%;
    max-width: none;
    height: auto;
    margin-top: -3px;
    margin-left: -1.5%;
    object-fit: contain;
    object-position: left top;
    pointer-events: none;
    filter: none !important;
}

#home.hero-block .hero-quote {
    position: absolute;
    top: 38.6%;
    left: 6.15%;
    width: 46%;
    margin: 0;
    padding: 0 0 0 2.5%;
    border: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(12px, calc(3.62 * var(--cw)), 18px);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: 0;
    color: #635448;
}

#home.hero-block .hero-quote::before {
    content: '';
    position: absolute;
    top: 0.12em;
    bottom: 0.06em;
    left: 0;
    width: 2px;
    background: #492129;
}

#home.hero-block .hero-quote p {
    margin: 0;
}

#home.hero-block .hero-cta {
    position: absolute;
    top: 83.0%;
    bottom: auto;
    left: 12.7%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74.6%;
    height: 9.0% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    padding: 1.2% 3.2%;
    border: 0;
    border-radius: 100px;
    background: linear-gradient(180deg, #96364F 0%, #843F51 45%, #681D35 100%);
    box-shadow: 0 7px 18px rgba(73, 33, 41, 0.12);
    color: #FFF9F7;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(16px, calc(4.9 * var(--cw)), 24px);
    line-height: 1.02;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#home.hero-block .hero-cta-icon {
    display: flex;
    flex: 0 0 28%;
    align-items: center;
    justify-content: center;
    height: 75%;
}

#home.hero-block .hero-cta-icon svg {
    display: block;
    width: min(calc(7.4 * var(--cw)), 37px);
    height: min(calc(7.4 * var(--cw)), 37px);
    fill: none;
    stroke: #FFF9F7;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#home.hero-block .hero-cta-divider {
    display: block;
    flex: 0 0 1px;
    align-self: center;
    height: 70%;
    margin-right: 3.5%;
    background: rgba(255, 249, 247, 0.78);
}

#home.hero-block .hero-cta-label {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding-right: 1%;
    white-space: nowrap;
}

#home.hero-block .hero-cta-label span {
    display: block;
}

@media (max-width: 360px) {
    #home.hero-block .hero-subtitle {
        width: 51%;
        font-size: clamp(14px, 4.25vw, 15.5px);
    }
    #home.hero-block .hero-surname {
        font-size: clamp(26px, 8.5vw, 30px);
    }
    #home.hero-block .hero-script-img {
        width: 86%;
        margin-top: -2px;
    }
    #home.hero-block .hero-quote {
        font-size: clamp(11px, 3.55vw, 12.7px);
        width: 47.5%;
    }
    #home.hero-block .hero-cta {
        left: 12.7%;
        width: 74.6%;
        font-size: clamp(15px, 4.75vw, 17px);
    }
}

/* ==========================================================================
   БЛОК 2: МОЙ ПОДХОД К ЛЕЧЕНИЮ (#approach) — Потоковая вёрстка без багов iOS
   ========================================================================== */
#approach.approach-block {
    position: relative;
    isolation: isolate;
    width: calc(100% + 40px);
    height: auto;
    min-height: 0;
    margin: 0 -20px !important;
    padding: calc(8.1 * var(--cw)) 0 calc(5.8 * var(--cw));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    background: #F8F1ED;
    color: #635448;
}

#approach .approach-top-blob {
    position: absolute;
    z-index: 0;
    top: calc(15.76 * var(--cw));
    right: -18%;
    width: 61%;
    height: calc(51.02 * var(--cw));
    border-radius: 48% 52% 45% 55% / 52% 43% 57% 48%;
    background: #EADBD4;
    opacity: 0.62;
    pointer-events: none;
}

#approach .approach-top-wave {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: calc(40.52 * var(--cw));
    overflow: hidden;
    fill: none;
    stroke: #492129;
    stroke-width: 1.35;
    opacity: 0.83;
    pointer-events: none;
}

#approach .approach-heading {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 7% calc(14.5 * var(--cw));
    color: #635448;
    font-family: 'Bodoni Moda', 'Times New Roman', serif;
    font-size: clamp(22px, calc(6.15 * var(--cw)), 28px);
    font-weight: 400;
    line-height: 0.99;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

#approach .approach-heading-main,
#approach .approach-heading-accent {
    display: block;
}

#approach .approach-heading-accent {
    margin-top: 3px;
    color: #642E40;
    font-family: 'Bodoni Moda', 'Times New Roman', serif;
    font-size: 1.03em;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.025em;
}

#approach .approach-cards {
    position: relative;
    z-index: 2;
    margin: 0 4.5%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#approach .approach-card {
    position: relative;
    display: grid;
    grid-template-columns: 21% 1.5px minmax(0, 1fr);
    column-gap: 3.5%;
    row-gap: 0;
    align-items: center;
    min-width: 0;
}

/* Отступ между карточками через margin-top (100% поддержка всех iOS) */
#approach .approach-card + .approach-card {
    margin-top: clamp(14px, calc(3.8 * var(--cw)), 16px);
}

/* Горизонтальный разделитель ровно посередине зазора между карточками */
#approach .approach-card + .approach-card::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(-0.5 * clamp(14px, calc(3.8 * var(--cw)), 16px));
    height: 1px;
    background: rgba(205, 184, 174, 0.48);
    pointer-events: none;
}

/* Иконки 640x640: блочное масштабирование без бага aspect-ratio в iOS 16 */
#approach .approach-icon-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(19.5 * var(--cw));
}

#approach .approach-icon-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(19.5 * var(--cw));
    object-fit: contain;
}

/* Вертикальная линия: равна высоте своей карточки, оставляя чистый зазор 7-8px до горизонтальной черты */
#approach .approach-card-divider {
    display: block;
    align-self: stretch;
    width: 1.5px;
    height: auto;
    background: #492129;
    opacity: 0.9;
}

#approach .approach-card-content {
    min-width: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#approach .approach-card-content h3 {
    margin: 0 0 3px;
    color: #642E40;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(16px, calc(4.6 * var(--cw)), 18px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
}

#approach .approach-card-content p {
    margin: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(12.3px, calc(3.45 * var(--cw)), 14.1px);
    font-weight: 500;
    line-height: 1.19;
    letter-spacing: -0.005em;
}

/* Нижняя плашка «Вместе —» в нормальном потоке */
#approach .approach-banner {
    position: relative;
    z-index: 2;
    height: calc(32.2 * var(--cw));
    min-height: 112px;
    margin: clamp(16px, calc(4.2 * var(--cw)), 21px) 2.5% 0;
    padding: 0 5.8%;
    display: grid;
    grid-template-columns: 28% 1.5px minmax(0, 1fr);
    column-gap: 4.2%;
    row-gap: 0;
    align-items: center;
    overflow: hidden;
    border-radius: 42% 58% 19% 24% / 25% 24% 27% 25%;
    background: #EBDDD6;
    color: #492129;
}

#approach .approach-banner-lines {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #492129;
    stroke-width: 1.15;
    opacity: 0.7;
    pointer-events: none;
}

#approach .approach-banner-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

#approach .approach-banner-img {
    display: block;
    width: 100%;
    max-width: 118px;
    max-height: calc(22 * var(--cw));
    height: auto;
    object-fit: contain;
}

/* Вертикальная линия в плашке «Вместе —»: ровно 62% высоты плашки, не задевает волны */
#approach .approach-banner-divider {
    position: relative;
    z-index: 1;
    display: block;
    width: 1.5px;
    height: 62%;
    align-self: center;
    background: #492129;
    transform: translateY(3%);
}

#approach .approach-banner-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    line-height: 1.12;
}

#approach .approach-banner-script {
    display: block;
    margin: -4px 0 -2px;
    color: #642E40;
    font-family: 'Pinyon Script', 'Brush Script MT', cursive;
    font-size: clamp(29px, calc(8.2 * var(--cw)), 38px);
    font-weight: 400;
    line-height: 1.02;
}

#approach .approach-banner-copy {
    display: block;
    font-size: clamp(14.4px, calc(4.25 * var(--cw)), 17px);
    font-weight: 500;
    line-height: 1.12;
}

@media (max-width: 360px) {
    #approach.approach-block {
        padding-top: calc(7.5 * var(--cw));
        padding-bottom: calc(5.1 * var(--cw));
    }
    #approach .approach-heading {
        margin: 0 6.5% calc(13.2 * var(--cw));
        font-size: clamp(21px, 6.7vw, 24px);
    }
    #approach .approach-cards {
        margin: 0 4%;
    }
    #approach .approach-card {
        grid-template-columns: 20% 1.5px minmax(0, 1fr);
        column-gap: 3%;
    }
    #approach .approach-card + .approach-card::before {
        left: 12px;
        right: 12px;
    }
    #approach .approach-banner {
        margin: 14px 2% 0;
        padding: 0 5%;
        grid-template-columns: 26% 1.5px minmax(0, 1fr);
        column-gap: 3.8%;
    }
    #approach .approach-banner-img {
        max-width: 100px;
    }
}

/* ==========================================================================
   БЛОКИ 3–5: ОБЩИЕ СТИЛИ СЕКЦИЙ (.ref-help-section, .ref-formats-section, .ref-education-section)
   ========================================================================== */
.ref-help-section,
.ref-formats-section,
.ref-education-section {
    position: relative;
    isolation: isolate;
    width: calc(100% + 40px);
    margin: 0 -20px !important;
    padding-left: 22px;
    padding-right: 22px;
    overflow: hidden;
    background: #F8F1ED;
    color: #635448;
}

.ref-section-blob {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background: #EADBD4;
    opacity: 0.56;
}

.ref-section-wave {
    position: absolute;
    z-index: 0;
    left: 0 !important;
    right: auto !important;
    display: block;
    width: 100%;
    fill: none;
    stroke: #492129;
    stroke-width: 1.35;
    opacity: 0.72;
    pointer-events: none;
}

.ref-section-wave path,
.education-boundary-wave-v1 path,
.science-v1-wave path {
    vector-effect: non-scaling-stroke;
}

.ref-section-heading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 22px 2%;
    color: #635448;
    font-family: 'Bodoni Moda', 'Times New Roman', serif;
    font-size: clamp(25px, calc(7 * var(--cw)), 31px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.ref-section-heading span,
.ref-section-heading em {
    display: block;
}

.ref-section-heading em {
    margin-top: 2px;
    color: #642E40;
    font-style: italic;
    font-weight: 400;
}

.ref-help-intro-divider,
.ref-help-divider,
.ref-format-divider,
.ref-format-alert-divider,
.ref-education-bar-divider,
.ref-timeline-divider {
    display: block;
    width: 1.5px;
    background: #492129;
    opacity: 0.9;
}

/* ==========================================================================
   БЛОК 3: С ЧЕМ Я МОГУ ПОМОЧЬ (#help)
   ========================================================================== */
.ref-help-section {
    padding-top: 26px;
    padding-bottom: 86px !important;
    z-index: 2;
}

.ref-help-blob {
    width: 64%;
    height: 36%;
    top: 8%;
    right: -24%;
    border-radius: 48% 52% 44% 56% / 50% 42% 58% 50%;
}

.ref-help-section > svg.ref-help-wave-top {
    top: -16px;
    height: 44px;
}

.ref-help-section > svg.ref-help-wave-bottom {
    bottom: 8px !important;
    height: 40px;
}

@media (min-width: 768px) {
    .ref-help-section {
        padding-top: 28px;
        padding-bottom: 90px !important;
    }
    .ref-help-section > svg.ref-help-wave-top {
        top: -14px;
    }
    .ref-help-section > svg.ref-help-wave-bottom {
        bottom: 16px !important;
    }
}

.ref-help-section .ref-section-heading {
    margin-bottom: 26px;
}

.ref-help-intro {
    position: relative;
    z-index: 1;
    display: grid !important;
    grid-template-columns: 82px 1.5px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 12px;
    min-height: 82px;
    margin: 0 1% 16px;
    padding: 7px 13px 7px 8px;
    border-radius: 38px;
    background: #F1E4DE;
}

.ref-help-intro-art {
    position: relative !important;
    grid-column: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 82px !important;
    height: 68px !important;
    overflow: hidden !important;
}

.ref-help-intro-art-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.ref-help-intro-divider {
    grid-column: 2 !important;
    height: 78%;
}

.ref-help-intro > p {
    grid-column: 3 !important;
    margin: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(14.5px, calc(4.3 * var(--cw)), 18.5px);
    font-weight: 500;
    line-height: 1.03;
}

.ref-help-intro p em {
    display: block;
    margin-top: 2px;
    color: #642E40;
    font-size: 1.04em;
    font-style: italic;
    font-weight: 600;
}

.ref-help-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ref-help-item {
    display: grid;
    grid-template-columns: 58px 1.5px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 6px 12px 6px 7px;
    border: 1px solid rgba(234, 219, 212, 0.8);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 3px 9px rgba(73, 33, 41, 0.07);
}

.ref-help-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 40px;
    background: transparent !important;
}

.ref-help-icon > img.help-symptom-icon-v1 {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.ref-help-divider {
    align-self: stretch;
    min-height: 31px;
}

.ref-help-text {
    min-width: 0;
    color: #352C29;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(11.6px, calc(3.4 * var(--cw)), 14.5px);
    font-weight: 400;
    line-height: 1.18;
}

.ref-help-text .wide-only {
    display: none;
}

/* ==========================================================================
   БЛОК 4: ФОРМАТЫ КОНСУЛЬТАЦИЙ (#formats)
   ========================================================================== */
.ref-formats-section {
    margin-top: -22px !important;
    padding-top: 30px;
    padding-bottom: 38px;
    z-index: 1;
}

.ref-formats-blob {
    width: 65%;
    height: 33%;
    top: 5%;
    right: -24%;
    border-radius: 52% 48% 58% 42% / 46% 55% 45% 54%;
}

.ref-formats-section .ref-formats-wave {
    display: none !important;
}

.ref-formats-section .ref-section-heading {
    margin-bottom: 20px;
}

.ref-format-alert {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 56px 1.5px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    min-height: 78px;
    margin: 0 0 17px;
    padding: 10px 13px;
    border-radius: 30px;
    background: #F1E4DE;
}

.ref-format-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #635448;
}

.ref-format-alert-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ref-format-alert-divider {
    height: 75%;
}

.ref-format-alert p {
    margin: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(12px, calc(3.25 * var(--cw)), 14px);
    font-style: italic;
    font-weight: 600;
    line-height: 1.17;
}

.ref-format-cards {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.ref-format-card {
    position: relative;
    display: grid;
    grid-template-columns: 60px 1.5px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    row-gap: 8px;
    align-items: stretch;
    min-width: 0;
    padding: 14px 12px 14px 9px;
    border: 1px solid rgba(234, 219, 212, 0.78);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 12px rgba(73, 33, 41, 0.055);
}

.ref-format-card > .ref-format-icon {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    width: 62px;
    min-width: 62px;
    height: 72px;
    align-self: center;
    transform: translateY(14px);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.ref-format-card > .ref-format-icon svg {
    display: none;
}

.ref-format-card:nth-child(1) .ref-format-icon {
    background-image: url('assets/formats-icons-v1/telegram.webp');
}

.ref-format-card:nth-child(2) .ref-format-icon {
    background-image: url('assets/formats-icons-v1/zoom.webp');
}

.ref-format-card:nth-child(3) .ref-format-icon {
    background-image: url('assets/formats-icons-v1/onsite.webp');
}

.ref-format-card > .ref-format-divider {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    height: auto;
    min-height: 0;
}

.ref-format-card > .ref-format-body {
    grid-column: 3;
    grid-row: 1;
    position: relative;
    min-width: 0;
    color: #352C29;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.ref-format-heading-row {
    display: block;
    margin: 0 0 6px;
}

.ref-format-heading-row h3 {
    margin: 0;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(16px, calc(4.6 * var(--cw)), 20px);
    font-weight: 700;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: break-word;
}

.ref-format-heading-row h3 span {
    color: inherit;
    font-weight: 400;
}

.ref-format-timing-price-v5 {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}

.ref-format-timing-price-v5 .ref-format-meta {
    flex: 0 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px clamp(5px, calc(1.8 * var(--cw)), 8px);
    border-radius: 999px;
    background: #F5EAE5;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(11.5px, calc(3.25 * var(--cw)), 13px);
    line-height: 1;
    white-space: nowrap;
}

.ref-format-meta svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #492129;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ref-format-timing-price-v5 > .ref-format-price {
    position: relative;
    top: -12px;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px clamp(6px, calc(2.0 * var(--cw)), 8px);
    border-radius: 999px;
    color: #635448;
    background: #F1E4DE;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(11.8px, calc(3.3 * var(--cw)), 13px);
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 350px) {
    .ref-format-timing-price-v5 {
        flex-wrap: wrap;
    }
    .ref-format-timing-price-v5 > .ref-format-price {
        top: 0;
    }
}

.ref-format-body p {
    margin: 0;
    color: #352C29;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(12.5px, calc(3.4 * var(--cw)), 15px);
    line-height: 1.13;
}

.ref-format-card-onsite .ref-format-onsite-media {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    margin-top: 8px;
}

.ref-format-card-onsite .ref-format-location {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #F5EAE5;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(11.2px, calc(3.1 * var(--cw)), 12.5px);
    line-height: 1.06;
}

.ref-format-card-onsite .ref-format-location > svg {
    display: none;
}

.ref-format-card-onsite .ref-format-location::before {
    content: "";
    display: block;
    flex: 0 0 25px;
    width: 25px;
    height: 23px;
    background: url('assets/clinic-approved-v3/clinic.webp') center / contain no-repeat;
}

.ref-format-card-onsite .ref-format-building-v6 {
    flex: 0 0 clamp(64px, calc(19 * var(--cw)), 88px);
    width: clamp(64px, calc(19 * var(--cw)), 88px);
    height: auto;
    object-fit: contain;
    opacity: 0.85;
    pointer-events: none;
}

.ref-format-card > a.ref-format-cta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    justify-self: center;
    width: min(100%, 310px);
    min-height: 42px;
    margin: 2px auto 0;
    padding: 6px 12px;
    border-radius: 100px;
    background: linear-gradient(180deg, #96364F 0%, #843F51 45%, #681D35 100%);
    box-shadow: 0 7px 18px rgba(73, 33, 41, 0.12);
    color: #FFF9F7;
    text-decoration: none;
}

.ref-format-card > a.ref-format-cta > .ref-format-cta-icon {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-format-card > a.ref-format-cta > .ref-format-cta-icon svg {
    display: block;
    width: 27px;
    height: 27px;
    fill: none;
    stroke: #FFF9F7;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ref-format-card-onsite > a.ref-format-cta .ref-format-cta-icon {
    background: url('assets/formats-cta-unified-v3/calendar-check.svg') center / 27px 27px no-repeat;
}

.ref-format-card-onsite > a.ref-format-cta .ref-format-cta-icon svg {
    display: none;
}

.ref-format-card > a.ref-format-cta > .ref-format-cta-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 27px;
    background: rgba(255, 249, 247, 0.8);
}

.ref-format-card > a.ref-format-cta > span:last-child {
    flex: 0 1 auto;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(13.5px, calc(4.0 * var(--cw)), 16px);
    font-weight: 600;
    line-height: 1.08;
    text-align: center;
}

/* ==========================================================================
   БЛОК 5: ОБРАЗОВАНИЕ И КВАЛИФИКАЦИЯ (#education)
   ========================================================================== */
.ref-education-section {
    padding-top: 82px;
    padding-bottom: 44px;
}

.ref-education-blob {
    width: 62%;
    height: 28%;
    top: 0;
    right: -31%;
    border-radius: 48% 52% 50% 50%;
}

.ref-education-section > svg.ref-education-wave {
    display: none !important;
}

.ref-education-section > svg.education-boundary-wave-v1 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 80px;
    fill: none;
    stroke: #642E40;
    stroke-width: 1.15;
    opacity: 0.82;
    pointer-events: none;
}

.ref-education-section .ref-section-heading {
    max-width: 75%;
    margin-bottom: 25px;
    font-size: clamp(22px, calc(6.8 * var(--cw)), 30px);
}

.ref-education-section > img.ref-education-cap.ref-education-diploma-v5 {
    position: absolute;
    z-index: 1;
    top: 66px;
    right: 2%;
    display: block;
    width: clamp(72px, calc(21 * var(--cw)), 104px);
    max-height: 92px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

.ref-education-group {
    position: relative;
    z-index: 1;
    margin: 0 0 23px;
}

.ref-education-section > .ref-education-group > .ref-education-bar {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1.5px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    min-height: 48px;
    margin: 0 0 10px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 252, 250, 0.96);
    color: #635448;
    border: 1px solid #CDB8AE;
    box-shadow: 0 2px 8px rgba(73, 33, 41, 0.045);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(13.5px, calc(4.0 * var(--cw)), 17.5px);
    line-height: 1.05;
}

.ref-education-section > .ref-education-group:nth-of-type(3) > .ref-education-bar {
    transform: translateY(-6px);
}

.ref-education-section > .ref-education-group > .ref-education-bar > svg {
    visibility: hidden;
    width: 42px;
    height: 42px;
}

.ref-education-section > .ref-education-group > .ref-education-bar::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 50%;
    width: 39px;
    height: 39px;
    transform: translateY(-50%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.ref-education-section > .ref-education-group:nth-of-type(1) > .ref-education-bar::before {
    background-image: url('assets/education-v4/cap.png');
}

.ref-education-section > .ref-education-group:nth-of-type(2) > .ref-education-bar::before {
    background-image: url('assets/education-v4/book.png');
}

.ref-education-section .ref-education-bar-divider {
    height: 34px;
    background: #A98B80;
    opacity: 0.95;
}

.ref-education-section .ref-education-bar > span:last-child {
    color: #642E40;
    font-weight: 700;
}

.ref-education-section .ref-timeline-card {
    position: relative;
    padding: 12px 11px 12px 9px;
    border: 1px solid rgba(234, 219, 212, 0.8);
    border-radius: 23px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 12px rgba(73, 33, 41, 0.05);
}

.ref-education-section .ref-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0 0 0 15px;
    list-style: none;
}

.ref-education-section .ref-timeline > li {
    position: relative;
    display: grid;
    grid-template-columns: 45px 1.5px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 9px 0;
}

.ref-education-section .ref-timeline > li + li {
    border-top: 1px solid rgba(205, 184, 174, 0.48);
}

.ref-education-section .ref-timeline > li::before {
    content: '';
    position: absolute;
    z-index: 4;
    top: 50%;
    left: -19px;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    border: 1.6px solid #795164;
    border-radius: 50%;
    background: #FFFCFA;
}

.ref-education-section .ref-timeline > li::after {
    content: '';
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: -12px;
    z-index: 3;
    width: 1.5px;
    background: #A98B80;
    pointer-events: none;
}

.ref-education-section .ref-timeline > li:first-child::after {
    top: 50%;
}

.ref-education-section .ref-timeline > li:last-child::after {
    bottom: 50%;
}

.ref-education-section .ref-timeline > li > .ref-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 2px;
    border-radius: 999px;
    background: #F1E4DE;
    color: #635448;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.ref-education-section .ref-timeline > li > .ref-timeline-divider {
    align-self: stretch;
    min-height: 29px;
    background: #A98B80;
    opacity: 0.95;
}

.ref-education-section .ref-timeline-content {
    min-width: 0;
    color: #352C29;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(11px, calc(3.05 * var(--cw)), 13.5px);
    line-height: 1.18;
}

.ref-education-section .ref-timeline-content strong {
    display: block;
    font-weight: 500;
}

.ref-education-section .ref-timeline-content em {
    display: block;
    margin-top: 3px;
    color: #716861;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.08em;
    font-style: italic;
}

/* ==========================================================================
   БЛОК 6: НАУЧНАЯ ДЕЯТЕЛЬНОСТЬ (#science) И ФУТЕР
   ========================================================================== */
section.science-block.science-v1 {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: calc(100% + 40px);
    margin: -32px -20px 0;
    padding: 54px 22px 60px;
    background: #F8F1ED;
    color: #635448;
}

.science-block.science-v1::before {
    content: "";
    position: absolute;
    z-index: -1;
    right: -37%;
    top: 10px;
    width: 83%;
    height: 230px;
    border-radius: 54% 46% 36% 64% / 45% 57% 43% 55%;
    background: rgba(234, 219, 212, 0.47);
    pointer-events: none;
}

.science-v1 > * {
    position: relative;
    z-index: 1;
}

.science-v1 .science-v1-wave {
    display: block;
    position: absolute;
    z-index: 0;
    left: 0;
    width: 100%;
    height: 80px;
    fill: none;
    stroke: #642E40;
    stroke-width: 1.15;
    opacity: 0.82;
    pointer-events: none;
}

.science-v1 .science-v1-wave-top {
    top: 0;
}

.science-v1 .science-v1-wave-bottom {
    bottom: 0;
}

.science-block.science-v1 .science-v1-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 115px;
    margin: 0 0 12px;
}

@media (max-width: 767px) {
    .science-block.science-v1 .science-v1-heading-row {
        margin-bottom: 0;
    }
}

.science-block.science-v1 .science-v1-title {
    margin: 0;
    font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(22px, calc(6.3 * var(--cw)), 29px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    color: #635448;
}

.science-v1 .science-v1-title span,
.science-v1 .science-v1-title em {
    display: block;
}

.science-v1 .science-v1-title em {
    margin-top: 3px;
    font-style: italic;
    font-weight: 600;
    color: #642E40;
}

.science-block.science-v1 .science-v1-hero-art {
    width: clamp(105px, 30%, 134px);
    max-width: 34%;
    max-height: 128px;
    height: auto;
    object-fit: contain;
}

#science.science-v1 > p.science-intro {
    margin: 0 2px 24px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: #352C29;
}

.science-v1 .science-v1-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.science-v1 .accordion-item {
    background: rgba(255, 253, 251, 0.87);
    border: 1px solid rgba(223, 205, 197, 0.67);
    border-radius: 26px;
    margin: 0;
    box-shadow: 0 6px 15px rgba(73, 33, 41, 0.045);
    overflow: hidden;
}

.science-block.science-v1 .accordion-header {
    display: grid;
    grid-template-columns: 63px 1.5px minmax(0, 1fr) 20px;
    gap: 11px;
    align-items: center;
    width: 100%;
    min-height: 99px;
    margin: 0;
    padding: 13px 15px 13px 11px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #642E40;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(17.5px, calc(4.6 * var(--cw)), 21px);
    line-height: 1.09;
    font-weight: 700;
}

.science-v1 .science-v1-icon-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 63px;
    height: 63px;
    border-radius: 50%;
    background: #F5E8E3;
}

.science-block.science-v1 .science-v1-icon-frame img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}

.science-v1 .science-v1-divider {
    display: block;
    width: 1.5px;
    height: 60px;
    background: #642E40;
    opacity: 0.78;
}

#science.science-v1 .accordion-header > .science-v1-label {
    min-width: 0;
    display: block;
    color: #352C29;
}

.science-v1 .accordion-header > .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 24px;
    color: #642E40;
    font-family: Arial, sans-serif;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

.science-v1 .accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.52;
    color: #554943;
}

.science-v1 .accordion-content.active {
    max-height: none;
    padding: 12px 18px 20px;
    border-top: 1px solid rgba(219, 194, 187, 0.7);
}

.science-v1 .accordion-content ul,
.science-v1 .accordion-content ol {
    margin: 0 0 8px;
    padding-left: 19px;
}

.science-v1 .accordion-content li {
    margin: 0 0 11px;
}

.science-v1 .accordion-content p {
    margin: 0 0 10px;
}

.science-block.science-v1 .science-v1-note {
    margin: 26px 0 18px;
    padding: 15px 15px 15px 12px;
    display: grid;
    align-items: center;
    grid-template-columns: 63px 1.5px minmax(0, 1fr);
    gap: 11px;
    min-height: 103px;
    border-radius: 40px;
    background: rgba(241, 226, 220, 0.7);
}

.science-block.science-v1 .science-v1-note-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 63px;
    height: 64px;
}

.science-block.science-v1 .science-v1-note-icon img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.science-block.science-v1 .science-v1-note-divider {
    background: #642E40;
    width: 1.5px;
    align-self: stretch;
    min-height: 54px;
}

#science.science-v1 .science-v1-note > p {
    margin: 0;
    color: #352C29;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
}

footer.science-v2-footer {
    margin: 16px 0 10px !important;
    padding: 18px 18px 20px;
    border: 1px solid #DCC8BE;
    border-radius: 22px;
    background: #FFFCFA;
    box-shadow: 0 4px 13px rgba(73, 33, 41, 0.035);
    text-align: left;
    color: #635448;
}

footer.science-v2-footer h3 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E7D7D0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.13;
    color: #642E40;
}

footer.science-v2-footer .science-v2-footer-row {
    display: block;
    margin: 0 0 11px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

footer.science-v2-footer .science-v2-footer-row:last-child {
    margin-bottom: 0;
}

footer.science-v2-footer dt {
    display: inline;
    font-weight: 600;
    color: #635448;
}

footer.science-v2-footer dd {
    display: inline;
    margin: 0 0 0 3px;
    color: #443A36;
    overflow-wrap: anywhere;
}

footer.science-v2-footer a {
    color: #642E40;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Возвращаем иконки Шапочки и Книги в раздел Образования */
.ref-education-section > .ref-education-group:nth-of-type(2) > .ref-education-bar::before {
    background-image: url('assets/education-v4/cap.png');
}
.ref-education-section > .ref-education-group:nth-of-type(3) > .ref-education-bar::before {
    background-image: url('assets/education-v4/book.png');
}

/* Чёткий контур SVG-иконок в разделе Консультаций (самолётик, инфо, часы) */
.ref-format-card > a.ref-format-cta > .ref-format-cta-icon svg {
    stroke: #FFF9F7;
    stroke-width: 1.65;
}
.ref-format-card > a.ref-format-cta > .ref-format-cta-icon svg *,
.ref-format-alert-icon svg *,
.ref-format-meta svg * {
    vector-effect: non-scaling-stroke;
}
