/* ===================================
   HOME-DECOR-EXTRA — насыщение декором
   всех секций главной страницы, дополняет
   home-decor.css. Терракот — только точечно.
   =================================== */

:root {
    /* Арка-четверть окружности с точкой-акцентом на конце */
    --hd-arc-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M8 70 A62 62 0 0 1 70 8' fill='none' stroke='%2325A9B8' stroke-width='3' stroke-linecap='round' opacity='0.5'/%3E%3Ccircle cx='8' cy='70' r='7' fill='%23EE7A5D'/%3E%3C/svg%3E");

    /* Сетка точек 3х3, мятная */
    --hd-dot-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%2352CC9A' opacity='0.4'%3E%3Ccircle cx='4' cy='4' r='2.4'/%3E%3Ccircle cx='20' cy='4' r='2.4'/%3E%3Ccircle cx='36' cy='4' r='2.4'/%3E%3Ccircle cx='4' cy='20' r='2.4'/%3E%3Ccircle cx='20' cy='20' r='2.4'/%3E%3Ccircle cx='36' cy='20' r='2.4'/%3E%3Ccircle cx='4' cy='36' r='2.4'/%3E%3Ccircle cx='20' cy='36' r='2.4'/%3E%3Ccircle cx='36' cy='36' r='2.4'/%3E%3C/g%3E%3C/svg%3E");

    /* Волнистая линия teal */
    --hd-squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='24' viewBox='0 0 90 24'%3E%3Cpath d='M2 12Q11 2 20 12T38 12T56 12T74 12T92 12' fill='none' stroke='%2325A9B8' stroke-width='2.5' stroke-linecap='round' opacity='0.45'/%3E%3C/svg%3E");

    /* Пунктирная дуга-стрелка (соединитель шагов) */
    --hd-dash-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='20' viewBox='0 0 48 20'%3E%3Cpath d='M2 10Q24 -4 46 10' fill='none' stroke='%2325A9B8' stroke-width='2' stroke-dasharray='4 4' stroke-linecap='round'/%3E%3Cpath d='M40 4L47 10L40 16' fill='none' stroke='%2325A9B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    /* Малый плюсик мятный */
    --hd-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cline x1='8' y1='2' x2='8' y2='14' stroke='%2352CC9A' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='2' y1='8' x2='14' y2='8' stroke='%2352CC9A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");

    /* Пунктирный круг-обводка терракотовый (единичный акцент) */
    --hd-dashed-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='none' stroke='%23EE7A5D' stroke-width='2' stroke-dasharray='6 6' opacity='0.4'/%3E%3C/svg%3E");

    /* Звёздочка-искра teal */
    --hd-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.6 6.4L20 10l-6.4 1.6L12 18l-1.6-6.4L4 10l6.4-1.6z' fill='%2325A9B8' opacity='0.5'/%3E%3C/svg%3E");

    /* Скобка-акколада мятная (обрамление цифр/фактов) */
    --hd-bracket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='50' viewBox='0 0 20 50'%3E%3Cpath d='M16 2C8 2 8 12 8 18C8 22 4 24 2 25C4 26 8 28 8 32C8 38 8 48 16 48' fill='none' stroke='%2352CC9A' stroke-width='2' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E");
}

@keyframes hdFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(6deg); }
}

@keyframes hdFloatReverse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(8px) rotate(-6deg); }
}

@keyframes hdSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes hdPulseSpark {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%      { opacity: 0.7; transform: scale(1.2); }
}

/* ===================================
   HERO — усиление (арка + сетка точек + плюсики)
   =================================== */
.hero__deco::before {
    content: '';
    position: absolute;
    top: 6%;
    left: 3%;
    width: 130px;
    height: 130px;
    background: var(--hd-arc-dot) no-repeat center / contain;
    opacity: 0.85;
    transform: rotate(-15deg);
}

.hero__deco::after {
    content: '';
    position: absolute;
    bottom: 12%;
    right: 10%;
    width: 60px;
    height: 60px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    animation: hdFloat 10s ease-in-out infinite;
}

.hero__deco-plus-1,
.hero__deco-plus-2,
.hero__deco-plus-3 {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--hd-plus) no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
}
.hero__deco-plus-1 { top: 20%; left: 44%; animation: hdFloat 6s ease-in-out infinite; }
.hero__deco-plus-2 { top: 68%; left: 8%; animation: hdFloatReverse 8s ease-in-out infinite; }
.hero__deco-plus-3 { top: 32%; right: 32%; animation: hdFloat 7s ease-in-out infinite; }

.hero__deco-spark {
    position: absolute;
    top: 46%;
    left: 46%;
    width: 20px;
    height: 20px;
    background: var(--hd-spark) no-repeat center / contain;
    animation: hdPulseSpark 3.5s ease-in-out infinite;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .hero__deco::before, .hero__deco::after,
    .hero__deco-plus-1, .hero__deco-plus-2, .hero__deco-plus-3,
    .hero__deco-spark { display: none; }
}

/* Виджет ПроДокторов — маленький пунктирный акцент рядом */
.hero__widget-pd { position: relative; }
.hero__widget-pd::after {
    content: '';
    position: absolute;
    top: -14px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: var(--hd-spark) no-repeat center / contain;
    opacity: 0.6;
    pointer-events: none;
    animation: hdPulseSpark 4s ease-in-out infinite;
}
@media (max-width: 900px) {
    .hero__widget-pd::after { display: none; }
}

/* ===================================
   COURSES-SCHEDULE — доп. дудлы в шапке + по бокам viewport
   =================================== */
.courses-schedule__header {
    position: relative;
}
.courses-schedule__header::before {
    content: '';
    position: absolute;
    top: -14px;
    left: calc(50% - 230px);
    width: 64px;
    height: 20px;
    background: var(--hd-squiggle) no-repeat center / contain;
}
.courses-schedule__header::after {
    content: '';
    position: absolute;
    top: -8px;
    right: calc(50% - 250px);
    width: 18px;
    height: 18px;
    background: var(--hd-plus) no-repeat center / contain;
    animation: hdFloat 6s ease-in-out infinite;
}

.courses-schedule {
    position: relative;
}
.courses-schedule::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 1%;
    width: 90px;
    height: 90px;
    background: var(--hd-arc-dot) no-repeat center / contain;
    opacity: 0.4;
    transform: rotate(180deg);
    z-index: 0;
    pointer-events: none;
}
.courses-schedule::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 2%;
    width: 56px;
    height: 56px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 900px) {
    .courses-schedule__header::before,
    .courses-schedule__header::after,
    .courses-schedule::before,
    .courses-schedule::after { display: none; }
}

/* ===================================
   SERVICES-NEW (главная) — усиление декора
   =================================== */
.services-new__deco-arc {
    position: absolute;
    top: 14%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: var(--hd-arc-dot) no-repeat center / contain;
    opacity: 0.6;
    transform: rotate(200deg);
    pointer-events: none;
}

.services-new__deco::before {
    content: '';
    position: absolute;
    top: 4%;
    right: 3%;
    width: 90px;
    height: 60px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.55;
}

.services-new__deco::after {
    content: '';
    position: absolute;
    bottom: 6%;
    left: 2%;
    width: 100px;
    height: 26px;
    background: var(--hd-squiggle) no-repeat center / contain;
}

/* Пунктирная обводка вокруг заголовка секции результатов */
.services-new__results {
    position: relative;
}
.services-new__results::after {
    content: '';
    position: absolute;
    top: -14px;
    right: 24px;
    width: 24px;
    height: 24px;
    background: var(--hd-spark) no-repeat center / contain;
    animation: hdPulseSpark 3.8s ease-in-out infinite;
    pointer-events: none;
}

@media (max-width: 900px) {
    .services-new__deco-arc,
    .services-new__deco::before,
    .services-new__deco::after { display: none; }
}
@media (max-width: 480px) {
    .services-new__results::after { display: none; }
}

/* ===================================
   ADVANTAGES — стрелки-соединители + вращающийся круг
   =================================== */
.advantages__layout { position: relative; }

.advantages__connector {
    display: none;
}
@media (min-width: 1025px) {
    .advantages__connector {
        display: block;
        position: absolute;
        top: 50%;
        width: 48px;
        height: 20px;
        background: var(--hd-dash-arrow) no-repeat center / contain;
        transform: translateY(-50%);
        z-index: 1;
        pointer-events: none;
    }
    .advantages__connector--1 { left: calc(33.33% - 24px); }
    .advantages__connector--2 { left: calc(66.66% - 24px); }
}

.advantages__col--center .adv-image--tall {
    position: relative;
}
.advantages__col--center .adv-image--tall::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 72px;
    height: 72px;
    background: var(--hd-dashed-circle) no-repeat center / contain;
    z-index: 2;
    pointer-events: none;
    animation: hdSpin 32s linear infinite;
}

.advantages__col--center .adv-image--tall::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: -14px;
    width: 40px;
    height: 40px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.6;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .advantages__col--center .adv-image--tall::before,
    .advantages__col--center .adv-image--tall::after { display: none; }
}

/* Иконки преимуществ — искра при ховере усиливает "живость" */
.adv-item { position: relative; }
.adv-item__icon { position: relative; }
.adv-item:hover .adv-item__icon::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: var(--hd-spark) no-repeat center / contain;
    animation: hdPulseSpark 1.4s ease-in-out infinite;
}

/* ===================================
   ABOUT-SHORT — точки + арка + обводка фото
   =================================== */
.about-short__deco::before {
    content: '';
    position: absolute;
    top: 8%;
    right: 6%;
    width: 90px;
    height: 60px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.55;
}
.about-short__deco::after {
    content: '';
    position: absolute;
    bottom: 14%;
    left: 3%;
    width: 110px;
    height: 110px;
    background: var(--hd-arc-dot) no-repeat center / contain;
    opacity: 0.55;
    transform: rotate(100deg);
}

.about-short__image-wrap { position: relative; }
.about-short__image-wrap::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: -18px;
    width: 64px;
    height: 64px;
    background: var(--hd-dashed-circle) no-repeat center / contain;
    pointer-events: none;
    z-index: 3;
}

/* Скобки вокруг блока фактов (2021 / 1000+) */
.about-short__facts { position: relative; }
.about-short__facts::before {
    content: '';
    position: absolute;
    left: -18px;
    top: -6px;
    width: 14px;
    height: calc(100% + 12px);
    background: var(--hd-bracket) no-repeat center / contain;
}

@media (max-width: 900px) {
    .about-short__deco::before,
    .about-short__deco::after,
    .about-short__image-wrap::after,
    .about-short__facts::before { display: none; }
}

/* ===================================
   SPECIALISTS — арка + точки (сверх уже добавленных линий)
   =================================== */
.specialists__deco::before {
    content: '';
    position: absolute;
    top: 6%;
    left: 4%;
    width: 80px;
    height: 80px;
    background: var(--hd-arc-dot) no-repeat center / contain;
    opacity: 0.5;
    transform: rotate(-40deg);
}
.specialists__deco::after {
    content: '';
    position: absolute;
    bottom: 16%;
    right: 5%;
    width: 70px;
    height: 46px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.5;
}

/* Искра на карточке специалиста при ховере */
.specialist-card { position: relative; }
.specialist-card:hover::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 18px;
    height: 18px;
    background: var(--hd-spark) no-repeat center / contain;
    animation: hdPulseSpark 1.6s ease-in-out infinite;
    z-index: 4;
    pointer-events: none;
}

@media (max-width: 900px) {
    .specialists__deco::before,
    .specialists__deco::after { display: none; }
}

/* ===================================
   REVIEWS — точки + волна (сверх смайлика)
   =================================== */
.reviews__deco::before {
    content: '';
    position: absolute;
    top: 8%;
    right: 6%;
    width: 70px;
    height: 46px;
    background: var(--hd-dot-grid) no-repeat center / contain;
    opacity: 0.5;
}
.reviews__deco::after {
    content: '';
    position: absolute;
    bottom: 12%;
    left: 5%;
    width: 90px;
    height: 24px;
    background: var(--hd-squiggle) no-repeat center / contain;
}

/* Кавычка-декор у карточки — доп. искра при ховере */
.review-card:hover::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--hd-spark) no-repeat center / contain;
    animation: hdPulseSpark 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@media (max-width: 900px) {
    .reviews__deco::before,
    .reviews__deco::after { display: none; }
}

/* ===================================
   BENTO-GRID — доп. пунктирный круг + искры на карточках
   =================================== */
.bento-card--donations { position: relative; }
.bento-card--donations::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 64px;
    height: 64px;
    background: var(--hd-dashed-circle) no-repeat center / contain;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
    animation: hdSpin 40s linear infinite;
}

#randomDoctorCard { position: relative; }
#randomDoctorCard::before {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--hd-spark) no-repeat center / contain;
    opacity: 0.7;
    z-index: 3;
    animation: hdPulseSpark 3s ease-in-out infinite;
    pointer-events: none;
}

@media (max-width: 768px) {
    .bento-card--donations::before,
    #randomDoctorCard::before { display: none; }
}

/* ===================================
   ACCESSIBILITY / PRINT
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .hero__deco::after,
    .hero__deco-plus-1, .hero__deco-plus-2, .hero__deco-plus-3,
    .hero__deco-spark,
    .hero__widget-pd::after,
    .courses-schedule__header::after,
    .services-new__results::after,
    .advantages__col--center .adv-image--tall::before,
    .adv-item:hover .adv-item__icon::after,
    .specialist-card:hover::before,
    .review-card:hover::after,
    .bento-card--donations::before,
    #randomDoctorCard::before {
        animation: none;
    }
}

@media print {
    .hero__deco::before, .hero__deco::after,
    .hero__deco-plus-1, .hero__deco-plus-2, .hero__deco-plus-3, .hero__deco-spark,
    .hero__widget-pd::after,
    .courses-schedule__header::before, .courses-schedule__header::after,
    .courses-schedule::before, .courses-schedule::after,
    .services-new__deco-arc, .services-new__deco::before, .services-new__deco::after,
    .services-new__results::after,
    .advantages__connector,
    .advantages__col--center .adv-image--tall::before,
    .advantages__col--center .adv-image--tall::after,
    .about-short__deco::before, .about-short__deco::after,
    .about-short__image-wrap::after, .about-short__facts::before,
    .specialists__deco::before, .specialists__deco::after,
    .reviews__deco::before, .reviews__deco::after,
    .bento-card--donations::before, #randomDoctorCard::before {
        display: none !important;
    }
}