/* ===================================
   PSYCHOLOGY-DECOR.CSS — декоративные паттерны и "карандашные" дудлы
   Надстройка над psychology.css / services.css.
   Только фон/декор через ::before/::after — верстку не трогает.
   Hero уже содержит .psychology-hero__thoughts —
   здесь добавляем лёгкие дополнения, не конфликтующие с ними.
   =================================== */

:root {
    --doodle-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 3 L23 16 L35 9 L24 19 L37 23 L23 22 L27 36 L20 23 L13 36 L17 22 L3 23 L16 19 L5 9 L17 16 Z' fill='none' stroke='%23EE7A5D' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M14 32C11 18 24 7 39 9C54 11 55 29 45 40C35 51 16 48 11 35' fill='none' stroke='%2325A9B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --doodle-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M2 14Q12 2 22 14T42 14T62 14T82 14T102 14T122 14' fill='none' stroke='%2352CC9A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --doodle-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='16' viewBox='0 0 40 16'%3E%3Ccircle cx='4' cy='8' r='2' fill='%2352CC9A'/%3E%3Ccircle cx='16' cy='6' r='2' fill='%2352CC9A'/%3E%3Ccircle cx='28' cy='9' r='2' fill='%2352CC9A'/%3E%3Ccircle cx='36' cy='5' r='2' fill='%2352CC9A'/%3E%3C/svg%3E");
    --doodle-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='26' viewBox='0 0 30 26'%3E%3Cpath d='M15 23C15 23 2 14 2 7C2 2 8 0 12 4C13.5 5.5 15 8 15 8C15 8 16.5 5.5 18 4C22 0 28 2 28 7C28 14 15 23 15 23Z' fill='none' stroke='%23EE7A5D' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-bubble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='46' viewBox='0 0 60 46'%3E%3Cpath d='M4 6C4 3 7 2 10 2h40c3 0 6 1 6 4v22c0 3-3 4-6 4H20l-8 8v-8h-2c-3 0-6-1-6-4Z' fill='none' stroke='%2325A9B8' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46' viewBox='0 0 46 46'%3E%3Ccircle cx='23' cy='23' r='10' fill='none' stroke='%23EE7A5D' stroke-width='1.6'/%3E%3Cg stroke='%23EE7A5D' stroke-width='1.6' stroke-linecap='round'%3E%3Cline x1='23' y1='2' x2='23' y2='8'/%3E%3Cline x1='23' y1='38' x2='23' y2='44'/%3E%3Cline x1='2' y1='23' x2='8' y2='23'/%3E%3Cline x1='38' y1='23' x2='44' y2='23'/%3E%3Cline x1='8' y1='8' x2='12' y2='12'/%3E%3Cline x1='34' y1='34' x2='38' y2='38'/%3E%3Cline x1='38' y1='8' x2='34' y2='12'/%3E%3Cline x1='12' y1='34' x2='8' y2='38'/%3E%3C/g%3E%3C/svg%3E");
    --doodle-rainbow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='50' viewBox='0 0 100 50'%3E%3Cpath d='M4 50a46 46 0 0192 0' fill='none' stroke='%23EE7A5D' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M14 50a36 36 0 0172 0' fill='none' stroke='%2352CC9A' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M24 50a26 26 0 0152 0' fill='none' stroke='%2325A9B8' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    --doodle-underline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='14' viewBox='0 0 90 14'%3E%3Cpath d='M2 9C12 2 18 12 28 6C38 0 44 12 54 6C64 0 72 12 82 6' fill='none' stroke='%23EE7A5D' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    --doodle-wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40L0 20C100 0 200 40 300 20C400 0 500 40 600 20C700 0 800 40 900 20C1000 0 1100 40 1200 20L1200 40Z' fill='white'/%3E%3C/svg%3E");

    /* приглушённые "водяные" варианты для карточек */
    --doodle-star-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 3 L23 16 L35 9 L24 19 L37 23 L23 22 L27 36 L20 23 L13 36 L17 22 L3 23 L16 19 L5 9 L17 16 Z' fill='none' stroke='rgba(238,122,93,0.22)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-check-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='30' viewBox='0 0 36 30'%3E%3Cpath d='M4 16L14 25L32 4' fill='none' stroke='rgba(82,204,154,0.35)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-question-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='40' viewBox='0 0 26 40'%3E%3Cpath d='M6 12C6 5 12 2 17 5C22 8 21 15 16 18C13 20 13 22 13 25' stroke='rgba(37,169,184,0.3)' stroke-width='2.6' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='13' cy='33' r='2.4' fill='rgba(37,169,184,0.3)'/%3E%3C/svg%3E");
    --doodle-exclaim-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='40' viewBox='0 0 24 40'%3E%3Cpath d='M12 3C10 14 11 20 12 26' stroke='rgba(220,38,38,0.28)' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='12' cy='34' r='2.4' fill='rgba(220,38,38,0.28)'/%3E%3C/svg%3E");
    --doodle-bubble-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='46' viewBox='0 0 60 46'%3E%3Cpath d='M4 6C4 3 7 2 10 2h40c3 0 6 1 6 4v22c0 3-3 4-6 4H20l-8 8v-8h-2c-3 0-6-1-6-4Z' fill='none' stroke='rgba(37,169,184,0.2)' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
    --doodle-heart-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='26' viewBox='0 0 30 26'%3E%3Cpath d='M15 23C15 23 2 14 2 7C2 2 8 0 12 4C13.5 5.5 15 8 15 8C15 8 16.5 5.5 18 4C22 0 28 2 28 7C28 14 15 23 15 23Z' fill='none' stroke='rgba(238,122,93,0.2)' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@keyframes psyDoodleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(6deg); }
}

@keyframes psyDoodleFloatReverse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(8px) rotate(-8deg); }
}

@keyframes psySunPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: .45; }
    50%      { transform: scale(1.08) rotate(8deg); opacity: .6; }
}

/* ===================================
   HERO — доп. дудлы, не конфликтующие с .psychology-hero__thoughts
   =================================== */
.service-hero {
    position: relative;
    isolation: isolate;
}

.service-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--doodle-bubble), var(--doodle-rainbow), var(--doodle-dots);
    background-repeat: no-repeat;
    background-position: 4% 68%, 88% 66%, 88% 16%;
    background-size: 60px 46px, 90px 44px, 60px 24px;
    opacity: .35;
}

.service-hero::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    top: 10%;
    right: 8%;
    width: 40px;
    height: 40px;
    background: var(--doodle-sun) no-repeat center / contain;
    opacity: .45;
    animation: psySunPulse 6s ease-in-out infinite;
}

.service-hero .container {
    position: relative;
    z-index: 1;
}

/* тэги-услуги как приклеенные вкривь стикеры */
.service-tag:nth-child(odd)  { transform: rotate(-1.5deg); }
.service-tag:nth-child(even) { transform: rotate(1.2deg); }
.service-tag {
    display: inline-flex;
    transition: transform var(--transition-base, .3s), box-shadow var(--transition-base, .3s);
}
.service-tag:hover {
    transform: rotate(0deg) translateY(-2px);
}

.service-hero__image {
    outline: 2px dashed rgba(238, 122, 93, .35);
    outline-offset: 8px;
}

/* ===================================
   ВОЛНИСТЫЕ РАЗДЕЛИТЕЛИ
   =================================== */
.hero__divider {
    position: relative;
    overflow: hidden;
}

.hero__divider::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 200%;
    background: currentColor;
    -webkit-mask-image: var(--doodle-wave-mask);
    mask-image: var(--doodle-wave-mask);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    opacity: .06;
    pointer-events: none;
}

/* ===================================
   "ДЕТСКАЯ ПСИХОЛОГИЯ: ЧТО ЭТО ТАКОЕ" (psychology-about)
   =================================== */
.psychology-about {
    position: relative;
    isolation: isolate;
}

.psychology-about::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(37, 169, 184, .12) 1.4px, transparent 1.6px);
    background-size: 26px 26px;
    opacity: .6;
}

.psychology-about > .container {
    position: relative;
    z-index: 1;
}

.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 90px;
    height: 12px;
    margin-top: 10px;
    background: var(--doodle-underline) no-repeat left center / contain;
}

/* водяной знак диалогового облачка на карточке "как проходят занятия" —
   символ разговора, доверительного контакта */
.principle-box {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.principle-box::after {
    content: '';
    position: absolute;
    right: 4%;
    bottom: 6%;
    width: 54px;
    height: 42px;
    background: var(--doodle-bubble) no-repeat center / contain;
    opacity: .1;
    pointer-events: none;
    z-index: 0;
}

/* лёгкий "стикер"-декор на карточках особенностей */
.feature-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--doodle-star) no-repeat center / contain;
    opacity: .25;
    pointer-events: none;
    transition: transform .4s cubic-bezier(.16,1,.3,1);
}

.feature-card:hover::after {
    transform: rotate(20deg) scale(1.15);
}

/* ===================================
   ЭТАПЫ РАБОТЫ ПСИХОЛОГА (psychology-stages)
   =================================== */
.psychology-stages {
    position: relative;
    isolation: isolate;
}

.psychology-stages::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(37, 169, 184, .08) 31px 32px);
    opacity: .5;
}

.psychology-stages__title,
.stages-timeline {
    position: relative;
    z-index: 1;
}

/* "шатающееся" пунктирное кольцо за маркером этапа */
.psychology-stage-item__marker {
    position: relative;
}

.psychology-stage-item__marker::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px dashed rgba(238, 122, 93, .4);
    border-radius: 42% 58% 53% 47% / 48% 44% 56% 52%;
    z-index: -1;
    pointer-events: none;
}

.psychology-stage-item:nth-child(6n+1) .psychology-stage-item__marker::after { transform: rotate(3deg); }
.psychology-stage-item:nth-child(6n+2) .psychology-stage-item__marker::after { transform: rotate(-4deg); }
.psychology-stage-item:nth-child(6n+3) .psychology-stage-item__marker::after { transform: rotate(5deg); }
.psychology-stage-item:nth-child(6n+4) .psychology-stage-item__marker::after { transform: rotate(-3deg); }
.psychology-stage-item:nth-child(6n+5) .psychology-stage-item__marker::after { transform: rotate(4deg); }
.psychology-stage-item:nth-child(6n+6) .psychology-stage-item__marker::after { transform: rotate(-5deg); }

.psychology-note {
    position: relative;
    overflow: hidden;
}

.psychology-note::after {
    content: '';
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 34px;
    background: var(--doodle-exclaim-w) no-repeat center / contain;
    pointer-events: none;
}

/* ===================================
   ПОКАЗАНИЯ — КРУГОВАЯ СХЕМА (indications-circle)
   =================================== */
.service-indications {
    position: relative;
    isolation: isolate;
}

.service-indications::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(238, 122, 93, .08) 1.4px, transparent 1.6px);
    background-size: 30px 30px;
    opacity: .7;
}

.service-indications > .container {
    position: relative;
    z-index: 1;
}

/* пунктирное кольцо вокруг центрального фото + плавающие солнце/сердце по краям */
.indications-circle__center {
    position: relative;
}

.indications-circle__center::after {
    content: '';
    position: absolute;
    inset: -14px;
    border: 2px dashed rgba(37, 169, 184, .3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.indications-circle__image {
    position: relative;
    isolation: isolate;
}

.indications-circle__image::before {
    content: '';
    position: absolute;
    z-index: 2;
    pointer-events: none;
    top: -18px;
    left: -10px;
    width: 32px;
    height: 32px;
    background: var(--doodle-sun) no-repeat center / contain;
    opacity: .7;
    animation: psySunPulse 7s ease-in-out infinite;
}

.indications-circle__image::after {
    content: '';
    position: absolute;
    z-index: 2;
    pointer-events: none;
    bottom: -16px;
    right: -14px;
    width: 30px;
    height: 26px;
    background: var(--doodle-heart) no-repeat center / contain;
    opacity: .65;
    animation: psyDoodleFloatReverse 9s ease-in-out infinite;
}

/*!* лёгкий водяной знак на карточках показаний (десктоп-орбита) *!*/
/*.indication-card {*/
/*    position: relative;*/
/*    overflow: hidden;*/
/*    isolation: isolate;*/
/*}*/

.indication-card::after {
    content: '';
    position: absolute;
    right: 6%;
    top: 6%;
    width: 24px;
    height: 20px;
    background: var(--doodle-heart-w) no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
}

/* то же для мобильных мини-карточек */
.indication-mini-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.indication-mini-card::after {
    content: '';
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--doodle-star-w) no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
}

/* блок "обратитесь если" (.speech-alert) */
.speech-alert {
    position: relative;
    overflow: hidden;
}

.speech-alert::after {
    content: '';
    position: absolute;
    right: 5%;
    top: 10%;
    width: 22px;
    height: 36px;
    background: var(--doodle-exclaim-w) no-repeat center / contain;
    pointer-events: none;
}

/* ===================================
   РЕЗУЛЬТАТЫ
   =================================== */
.service-results {
    position: relative;
    isolation: isolate;
}

.service-results::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(82, 204, 154, .1) 1.4px, transparent 1.6px);
    background-size: 28px 28px;
    opacity: .6;
}

.service-results > .container {
    position: relative;
    z-index: 1;
}

.result-item {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.result-item::after {
    content: '';
    position: absolute;
    right: 6%;
    top: 8%;
    width: 30px;
    height: 26px;
    background: var(--doodle-check-w) no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
    opacity: .9;
}

.result-item:hover {
    transform: translateY(-3px);
}

.results-note {
    position: relative;
    overflow: hidden;
}

.results-note::after {
    content: '';
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 18px;
    background: var(--doodle-wave) no-repeat center / contain;
    opacity: .3;
    pointer-events: none;
}

/* ===================================
   ПРОТИВОПОКАЗАНИЯ И ОГРАНИЧЕНИЯ (speech-risks / risks-box)
   =================================== */
.speech-risks {
    position: relative;
    isolation: isolate;
}

.speech-risks::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(37, 169, 184, .1) 1.4px, transparent 1.6px);
    background-size: 28px 28px;
    opacity: .55;
}

.speech-risks > .container {
    position: relative;
    z-index: 1;
}

/* лёгкие водяные знаки на блоках .risks-box, не пересекающие иконку/текст —
   размещены в углу, противоположном .risks-box__icon */
.risks-box {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.risks-box::after {
    content: '';
    position: absolute;
    right: 4%;
    bottom: 6%;
    width: 26px;
    height: 26px;
    pointer-events: none;
    z-index: 0;
    opacity: .12;
}

.risks-box--info::after {
    background: var(--doodle-bubble-w) no-repeat center / contain;
    width: 34px;
    height: 26px;
}

.risks-box--warning::after {
    background: var(--doodle-exclaim-w) no-repeat center / contain;
}

.risks-box--success::after {
    background: var(--doodle-check-w) no-repeat center / contain;
}

/* ===================================
   FAQ
   =================================== */
.service-faq {
    position: relative;
    isolation: isolate;
}

.service-faq::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--doodle-question-w), var(--doodle-question-w), var(--doodle-question-w);
    background-repeat: no-repeat;
    background-position: 6% 10%, 92% 40%, 10% 85%;
    background-size: 26px 40px, 22px 34px, 24px 36px;
    opacity: .6;
}

.service-faq > .container {
    position: relative;
    z-index: 1;
}

.faq-item {
    position: relative;
    transition: transform .3s ease;
}

.faq-item[open] {
    transform: translateX(2px);
}

/* ===================================
   CTA
   =================================== */
.doctors-cta {
    position: relative;
    isolation: isolate;
}

.doctors-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--doodle-heart), var(--doodle-wave), var(--doodle-bubble-w);
    background-repeat: no-repeat;
    background-position: 6% 25%, 40% 88%, 88% 22%;
    background-size: 38px 32px, 140px 24px, 50px 38px;
    opacity: .4;
}

.doctors-cta::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    top: 15%;
    left: 8%;
    width: 44px;
    height: 44px;
    background: var(--doodle-sun) no-repeat center / contain;
    opacity: .35;
    animation: psySunPulse 8s ease-in-out infinite;
}

.doctors-cta > .container {
    position: relative;
    z-index: 1;
}

/* ===================================
   МОБИЛЬНАЯ АДАПТАЦИЯ ДЕКОРА
   =================================== */
@media (max-width: 1024px) {
    /* десктопная орбита скрывается разметкой сайта — гасим и декор круга */
    .indications-circle__center::after,
    .indications-circle__image::before,
    .indications-circle__image::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .service-hero::before,
    .doctors-cta::before,
    .service-faq::before {
        opacity: .2;
    }

    .service-hero::after,
    .doctors-cta::after {
        width: 30px;
        height: 30px;
    }

    .principle-box::after {
        opacity: .07;
        transform: scale(.8);
    }

    .risks-box::after {
        opacity: .08;
    }
}

/* ===================================
   ACCESSIBILITY / PRINT
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .service-hero::after,
    .doctors-cta::after,
    .indications-circle__image::before,
    .indications-circle__image::after {
        animation: none;
    }
}

@media print {
    .service-hero::before,
    .service-hero::after,
    .doctors-cta::before,
    .doctors-cta::after,
    .psychology-about::before,
    .service-indications::before,
    .service-results::before,
    .service-faq::before,
    .speech-risks::before,
    .principle-box::after,
    .feature-card::after,
    .result-item::after,
    .psychology-note::after,
    .psychology-stages::before,
    .psychology-stage-item__marker::after,
    .indications-circle__center::after,
    .indications-circle__image::before,
    .indications-circle__image::after,
    .indication-card::after,
    .indication-mini-card::after,
    .speech-alert::after,
    .risks-box::after,
    .hero__divider::after {
        display: none !important;
    }
}