/*style.css*/
/* ===================================
   CSS ПЕРЕМЕННЫЕ
   =================================== */
:root {
    --color-primary: #30a6da;
    --color-primary-hover: #05ABF2;
    --color-primary-dark: #048DC8;
    --color-primary-darker: #0375A6;
    --color-primary-darkest: #035D84;
    --color-primary-light: #EBF8FF;

    --color-accent: #05ABF2;
    --color-accent-dark: #0375A6;

    --color-text: #333333;
    --color-text-secondary: #666666;
    --color-text-light: #999999;

    --color-bg: #FFFFFF;
    --color-bg-light: #F9FAFB;
    --color-bg-section: #F3F4F6;
    --color-bg-blue: #F4F7FF;
    --color-dark-gray: #4A4A4A;

    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-error: #EF4444;
    --color-warning: #F59E0B;
    --color-white: #FFFFFF;
    --color-dark: #4A4A4A;
    --color-gray: #6b7280;

    --font-heading: 'Playpen Sans', cursive, sans-serif;
    --font-body: 'Manrope', sans-serif;

    --fz-xs: 0.75rem;
    --fz-sm: 0.875rem;
    --fz-base: 1rem;
    --fz-md: 1.125rem;
    --fz-lg: 1.25rem;
    --fz-xl: 1.5rem;
    --fz-2xl: 1.875rem;
    --fz-3xl: 2.25rem;
    --fz-4xl: 3rem;
    --fz-5xl: 3.75rem;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-bold: 600;
    --fw-black: 650;

    --lh-tight: 1.2;
    --lh-normal: 1.6;
    --lh-loose: 1.8;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 1.75rem;  /* 28px */
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 4px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .02);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, .05), 0 8px 10px -6px rgba(15, 23, 42, .02);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, .08);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, .15);
    --shadow-blue: 0 8px 24px rgba(48, 166, 218, .3);
    --shadow-blue-hover: 0 12px 32px rgba(48, 166, 218, .45);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    --header-height: 72px;
    --container-width: 1200px;
    --container-padding: 1.25rem;

    /* Дополнительные переменные для таблиц и текста */
    --radius-2: 12px;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;

    --color-text-primary: #333333;
}

/* ===================================
   ГЛОБАЛЬНЫЙ ЗАПРЕТ ГОРИЗОНТАЛЬНОГО
   СКРОЛЛА
   =================================== */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}


/* ===================================
   СБРОС И БАЗОВЫЕ СТИЛИ
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body), serif;
    font-size: var(--fz-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

body.intro-active {
    overflow: hidden !important;
}

body.modal-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6, b, strong {
    font-family: var(--font-heading), serif;
}

::selection {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 7px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary); /* Изначально подсвечен основным цветом */
    opacity: 0.15; /* Полупрозрачный */
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-light);
    transition: background-color var(--transition-base), opacity var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-dark); /* Более насыщенный цвет */
    opacity: 1; /* Полная непрозрачность */
}


/* ===================================
   УТИЛИТЫ
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* ===================================
   ТИПОГРАФИКА
   =================================== */
.section-title {
    font-size: var(--fz-3xl);
    font-weight: var(--fw-black);
    color: var(--color-text);
    text-align: center;
    margin-bottom: var(--space-4);
    line-height: 1.15;
    position: relative;
}

.section-title:not(.section-title--left) {
    padding-bottom: var(--space-5);
}

.section-title:not(.section-title--left)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
}

.section-title--left {
    text-align: left;
}

.section-subtitle {
    font-size: var(--fz-md);
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 600px;
    margin-inline: auto;
    line-height: var(--lh-loose);
}

/* ===================================
   КНОПКИ
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading), serif;
    font-size: var(--fz-sm);
    font-weight: var(--fw-bold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-blue);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-base);
}

.btn--primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .25) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-blue-hover);
}

.btn--primary:hover::before,
.btn--primary:hover::after {
    opacity: 1;
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-blue);
}

.btn--dark {
    background-color: #78909C; /* Приглушенный сине-серый/шалфей */
    color: #fff;
    box-shadow: 0 6px 20px rgba(120, 144, 156, 0.2);
    border: none;
}

.btn--dark:hover {
    background-color: #546E7A;
    box-shadow: 0 8px 25px rgba(120, 144, 156, 0.4);
}




@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 172, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0); }
}

.btn--dark {
    animation: pulse-btn 2s infinite;
}



.btn--large {
    padding: 1rem 2.25rem;
    font-size: var(--fz-base);
    gap: var(--space-3);
}

.btn--small {
    padding: 0.5rem 1.25rem;
    font-size: var(--fz-xs);
}

.btn--full {
    width: 100%;
}

.btn-icon-round {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    transition: all var(--transition-base);
}

.btn-icon-round:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, .3);
}

/* ===================================
   ЛЕНИВАЯ ЗАГРУЗКА
   =================================== */
.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
    background: linear-gradient(110deg, #EFF3F8 30%, #FFFFFF 50%, #EFF3F8 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy--loaded {
    opacity: 1;
    animation: none;
    background: none;
}

.lazy--error {
    opacity: 0.4;
    animation: none;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #c7d7fe 100%);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===================================
   ШАПКА
   =================================== */
.header {
    position: fixed; /* Изменено с sticky на fixed */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(48, 166, 218, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            135deg,
            rgba(48, 166, 218, 0.03) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(5, 171, 242, 0.02) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
            0 8px 32px 0 rgba(15, 23, 42, 0.1),
            0 2px 8px 0 rgba(48, 166, 218, 0.06);
    border-bottom: 1px solid rgba(48, 166, 218, 0.12);
}

.header.scrolled::before {
    opacity: 1;
}

/* Дополнительное состояние для очень длинной прокрутки */
.header.scrolled-far {
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow:
            0 12px 40px 0 rgba(15, 23, 42, 0.12),
            0 4px 12px 0 rgba(48, 166, 218, 0.08);
}

.header__main {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: relative;
}

.header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    width: 100%;
}

/* Логотип */
.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
    text-decoration: none;
    transition: opacity var(--transition-base), transform 0.3s ease;
    position: relative;
}

.logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 270px;
    height: 60px;
    background: radial-gradient(
            ellipse,
            rgba(48, 166, 218, 0.28) 0%,
            rgba(5, 171, 242, 0.16) 40%,
            transparent 70%
    );
    border-radius: 50%;
    filter: blur(25px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.logo:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.logo:hover {
    transform: translateY(-1px);
}

.logo__img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(48, 166, 218, 0.1));
    transition: filter var(--transition-base);
}

.header.scrolled .logo__img {
    filter: drop-shadow(0 2px 6px rgba(48, 166, 218, 0.15));
}

.logo__name {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-xl);
    font-weight: var(--fw-black);
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: color var(--transition-base);
}

.logo__subtitle {
    font-family: var(--font-heading), serif;
    font-size: 11px;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    transition: color var(--transition-base);
}

.header.scrolled .logo__subtitle {
    color: var(--color-text);
}

.logo:hover .logo__name {
    color: var(--color-primary-dark);
}

.logo--white .logo__name {
    color: var(--color-white);
}

.logo--white .logo__subtitle {
    color: rgba(255, 255, 255, .6);
}

/* Навигация */
.navigation {
    flex: 1;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-list a {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-heading), serif;
    font-size: var(--fz-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    position: relative;
    white-space: nowrap;
    transition: color var(--transition-base);
    border-radius: var(--radius-sm);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: var(--space-4);
    right: var(--space-4);
    height: 2px;
    background: linear-gradient(
            90deg,
            var(--color-primary) 0%,
            var(--color-accent) 100%
    );
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-base);
}

.nav-list a:hover {
    color: var(--color-primary);
    background-color: rgba(48, 166, 218, 0.04);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    transform: scaleX(1);
}

.nav-list a.active {
    color: var(--color-primary);
    font-weight: var(--fw-bold);
}

/* Контакты в шапке */
.header__contacts {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: auto;
    flex-shrink: 0;
}

.header__phone-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.phone {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-md);
    font-weight: var(--fw-bold);
    transition: color var(--transition-base), text-shadow 0.3s ease;
}

.phone:hover {
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(48, 166, 218, 0.3);
}

.header__phone-note {
    font-size: var(--fz-xs);
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.header.scrolled .header__phone-note {
    color: var(--color-text);
}

/* Бургер */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-base);
}

.burger-menu:hover {
    background-color: rgba(48, 166, 218, 0.08);
}

.burger-menu span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Анимация появления шапки при загрузке */
@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header {
    animation: headerSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Плавное появление при скролле вверх */
.header {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.header.hide-on-scroll {
    transform: translateY(-100%);
}

/* Тонкая линия света снизу при прокрутке */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(48, 166, 218, 0.5) 50%,
            transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.header.scrolled::after {
    opacity: 1;
}

/* ===================================
   HERO
   =================================== */
.hero {
    position: relative;
    background: var(--color-bg-blue);
    overflow: hidden;
    padding-top: var(--space-12);
    padding-bottom: var(--space-8);
}

/* Левое встречное свечение */
.hero::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 70%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 50%,
    rgba(5, 171, 242, .08) 0%,
    rgba(48, 166, 218, .02) 40%,
    transparent 70%
    );
    z-index: 0;
    pointer-events: none;
    animation: floatGlow 18s ease-in-out infinite alternate;
}

/* Живое голубое пятно */
.hero__bg-blob {
    position: absolute;
    top: -15%;
    right: -5%;
    width: 65%;
    height: 120%;
    background: linear-gradient(135deg,
    rgba(48, 166, 218, .12) 0%,
    rgba(5, 171, 242, .08) 100%
    );
    z-index: 0;
    pointer-events: none;
    filter: blur(60px);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morphBlob 18s ease-in-out infinite alternate;
    transform-origin: center;
    will-change: transform;
    transform: translateZ(0);
}

/* Контейнер для точечного паттерна и фрактального дерева */
.hero__bg-logo {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}


/* Фрактальный холст (правое дерево) */
#fractalCanvas {
    position: absolute;
    bottom: -15%;
    right: -5%;
    width: 800px;
    height: 800px;
    opacity: 0.35;
    transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 70%, transparent 100%);
}

/* Контейнер текста */
.hero .container {
    position: relative;
    z-index: 1;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-16);
    align-items: center;
    margin-bottom: var(--space-10);
}

.hero__text-box {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: start;
    margin-top: var(--space-6);
}

/* Левое (нейронное) дерево */
.hero__bg-neural {
    position: absolute;
    top: -30%;
    left: -20%;
    width: 140%;
    height: 160%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Заголовок Hero */
.hero__title {
    font-family: var(--font-body), serif;
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.05;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.hero__title-regular {
    display: block;
    font-weight: 400;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    margin-top: 12px;
}

.hero__title-accent {
    color: var(--color-accent);
    font-family: inherit;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: var(--space-8);
    max-width: 500px;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

/* Анимации появления текста Hero */
@keyframes heroTextReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero__title,
.hero__subtitle,
.hero__actions {
    opacity: 0;
    animation: heroTextReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title {
    animation-delay: 0.1s;
}

.hero__subtitle {
    animation-delay: 0.3s;
}

.hero__actions {
    animation-delay: 0.5s;
}

/* ===================================
   HERO — ПРАВАЯ КОЛОНКА / СЛАЙДЕР
   =================================== */
.hero__right-col {
    position: relative;
    width: 100%;
    display: grid;
    opacity: 0;
    animation: sliderInitialFade 1.5s ease-in-out forwards;
}

@keyframes sliderInitialFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    flex-direction: column;
    z-index: 1;
    pointer-events: none;
}

.hero__slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    pointer-events: auto;
}

/* Управление слайдером */
.hero__slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.hero__slider-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--color-border);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    border: none;
    flex-shrink: 0;
    pointer-events: none;
    cursor: default;
}

.slider-dot:hover {
    background-color: var(--color-text-light);
    transform: scale(1.2);
}

.slider-dot.active {
    width: 20px;        /* таблетка */
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--color-primary);
    transform: none;
}

.slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.slider-arrow:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, .3);
}

.slider-arrow:active {
    transform: translateY(0) scale(0.95);
}

/* ===================================
   BENTO GRID (слайд 1)
   =================================== */
.hero__bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 16px;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-5);
    /* Стекло */
    background-color: rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, .3);
}

.bento-card--wide {
    grid-column: span 2;
}

.bento-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.85;
    transition: transform var(--transition-slow), opacity 0.4s ease;
}

.bento-card:hover .bento-card__img {
    transform: scale(1.05);
    opacity: 1;
}

.bento-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, .8) 0%, rgba(15, 23, 42, .2) 50%, transparent 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

.bento-card:hover .bento-card__overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, .95) 0%, rgba(15, 23, 42, .3) 100%);
}

.bento-card__content {
    position: relative;
    z-index: 2;
}

.bento-card__title {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-md);
    font-weight: var(--fw-bold);
    line-height: 1.3;
}

.bento-card__title--white {
    color: var(--color-white);
}

.bento-card__subtitle {
    display: block;
    font-family: var(--font-body), serif;
    font-size: var(--fz-xs);
    font-weight: var(--fw-regular);
    opacity: 0.8;
    margin-top: 4px;
}

/* ===================================
   ВИДЖЕТ АНОНСОВ (слайд 2)
   =================================== */
.hero__courses-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 482px;
}

.hero__courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-right: 8px;
}

.hero__courses-title {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-lg);
    font-weight: var(--fw-bold);
    color: var(--color-text);
    margin: 0;
}

/* ===================================
   ПЕРЕХОД HERO → УСЛУГИ
   =================================== */
.services {
    position: relative;
    z-index: 2;
    background: linear-gradient(
            180deg,
            var(--color-bg-blue) 0%,
            var(--color-bg) 350px
    );
}

.services::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(
            0deg,
            var(--color-bg-blue) 0%,
            rgba(244, 247, 255, 0) 100%
    );
    pointer-events: none;
}

/* ===================================
   РАЗДЕЛИТЕЛЬ HERO → УСЛУГИ
   =================================== */
.hero__divider {
    position: relative;
    width: 100%;
    height: 1px;
    background: linear-gradient(
            to right,
            transparent 0%,
            var(--color-primary) 20%,
            var(--color-accent) 50%,
            var(--color-primary) 80%,
            transparent 100%
    );
    margin: 0 auto;
    z-index: 3;
    box-shadow: 0 0 20px rgba(48, 166, 218, 0.4);
}

/* ===================================
   УСЛУГИ
   =================================== */
.services {
    padding: var(--space-24) 0;
}

.services__header {
    margin-bottom: var(--space-16);
}

.services__header .section-subtitle {
    margin-top: var(--space-3);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-12) var(--space-6);
    max-width: 1000px;
    margin-inline: auto;
}

.service-item {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: var(--space-2);
    transition: transform var(--transition-base);
    position: relative;
}

.service-item:hover,
.service-item:focus-visible {
    transform: translateY(-3px);
}

.service-item__icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
}

.service-item__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-item:hover .service-item__icon {
    transform: scale(1.1);
}

.service-item__title {
    font-family: var(--font-heading), serif;
    font-size: 1.125rem;
    font-weight: var(--fw-medium);
    color: var(--color-text);
    line-height: 1.3;
    transition: color var(--transition-base);
}

.service-item:hover .service-item__title {
    color: var(--color-primary);
}

.service-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(to bottom, transparent 50%, rgba(56, 189, 248, .15) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    z-index: -1;
}

.service-item:hover::after {
    opacity: 1;
}

/*.service-item:first-child::before {*/
/*    content: 'Популярное';*/
/*    position: absolute;*/
/*    top: -15px;*/
/*    right: 0;*/
/*    z-index: 3;*/
/*    padding: var(--space-1) var(--space-3);*/
/*    background-color: var(--color-warning);*/
/*    color: var(--color-white);*/
/*    font-family: var(--font-heading), serif;*/
/*    font-size: var(--fz-xs);*/
/*    font-weight: var(--fw-bold);*/
/*    border-radius: var(--radius-full);*/
/*    text-transform: uppercase;*/
/*}*/

/* ===================================
   ПРЕИМУЩЕСТВА
   =================================== */
.advantages {
    padding: var(--space-16) 0 var(--space-20);
    background-color: var(--color-bg-blue);
}

.advantages__header {
    margin-bottom: var(--space-12);
    text-align: center;
}

.advantages__layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: var(--space-8);
    align-items: stretch;
}

.advantages__col {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.adv-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: relative;
}

.adv-item__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.adv-item__icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-base);
}

.adv-item__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5px;
}

.adv-item__title {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-lg);
    font-weight: var(--fw-regular);
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.adv-item__text {
    font-size: var(--fz-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    padding-left: 40px;
    margin: 0;
}

.adv-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--color-primary-light);
}

.adv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.adv-image:hover img {
    transform: scale(1.05);
}

.adv-image--small {
    height: 220px;
    margin-top: auto;
}

.adv-image--top {
    margin-top: 0;
    margin-bottom: auto;
}

.adv-image--tall {
    height: 100%;
    min-height: 400px;
}

/* ===================================
   О ЦЕНТРЕ
   =================================== */
.about-short {
    position: relative;
    padding: var(--space-24) 0;
    background: linear-gradient(180deg, var(--color-bg-blue) 0%, var(--color-bg-blue) 80%, var(--color-bg) 100%);
    overflow: hidden;
}

/* Голубое пятно */
.about-short__bg-blob {
    position: absolute;
    top: 10%;
    left: -10%;
    width: 70%;
    height: 120%;
    background: radial-gradient(ellipse at center,
    rgba(48, 166, 218, .12) 0%,
    rgba(5, 171, 242, .05) 50%,
    transparent 70%
    );
    z-index: 0;
    pointer-events: none;
    filter: blur(50px);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morphBlob 22s ease-in-out infinite alternate-reverse;
}

/* Фрактальное дерево */
.about-short__bg-tree {
    position: absolute;
    bottom: -65%;
    right: -15%;
    width: 1400px;
    height: 1400px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 70%, transparent 100%);
}

/* Нижний туман (наплывает на следующую секцию) */
.about-short::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(0deg, var(--color-bg-blue) 0%, rgba(244, 247, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Контент выше фоновых слоёв */
.about-short > .container,
.about-short__inner {
    position: relative;
    z-index: 2;
}

.about-short__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.about-short__image-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.about-short__image-wrap {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-short__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--color-primary-light), #c7d7fe);
    min-height: 280px;
    transition: transform var(--transition-slow);
}

.about-short__image-wrap:hover .about-short__img {
    transform: scale(1.03);
}

.about-short__image-label {
    position: absolute;
    bottom: var(--space-5);
    left: var(--space-5);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-white);
    border-radius: var(--radius-full);
    font-size: var(--fz-sm);
    font-weight: var(--fw-medium);
    color: var(--color-success);
    box-shadow: var(--shadow-md);
}

.about-short__image-label svg {
    animation: pulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

.about-short__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.about-short__fact {
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-base);
}

.about-short__fact:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
}

.about-short__fact-num {
    font-family: var(--font-heading), serif;
    font-size: var(--fz-2xl);
    font-weight: var(--fw-black);
    color: var(--color-primary);
    line-height: 1;
    transition: color var(--transition-base);
}

.about-short__fact:hover .about-short__fact-num {
    color: var(--color-primary-dark);
}

.about-short__fact-text {
    font-size: var(--fz-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-2);
}

/* Контент О центре */
.about-short__content .section-title--left {
    position: relative;
    padding-left: var(--space-5);
}

.about-short__content .section-title--left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
}

.about-short__text {
    font-size: var(--fz-base);
    color: var(--color-text-secondary);
    line-height: var(--lh-loose);
    margin-bottom: var(--space-4);
}

.about-short__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
    margin-top: var(--space-2);
}

.about-short__list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: var(--fw-medium);
    font-family: var(--font-heading), serif;
}

.about-short__list li svg {
    flex-shrink: 0;
    color: var(--color-success);
}





/* ===================================
   КНОПКА «НАВЕРХ»
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(56, 189, 248, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, .6);
}

.scroll-top::before {
    content: 'Наверх';
    position: absolute;
    right: calc(100% + var(--space-2));
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-dark);
    color: var(--color-white);
    font-size: var(--fz-xs);
    font-weight: var(--fw-medium);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.scroll-top:hover::before {
    opacity: 1;
}

/* ===================================
   АНИМАЦИИ (KEYFRAMES)
   =================================== */
@keyframes morphBlob {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    50% {
        transform: translate3d(-3%, 4%, 0) scale(1.05) rotate(5deg);
    }
    100% {
        transform: translate3d(4%, -3%, 0) scale(0.95) rotate(-5deg);
    }
}

@keyframes driftDots {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(32px, 32px, 0);
    }
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, -40px) scale(1.1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   ПЕЧАТЬ
   =================================== */
@media print {
    .header,
    .hero__actions,
    .modal,
    .scroll-top,
    .burger-menu,

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a[href^="http"]::after {
        content: ' (' attr(href) ')';
        font-size: 10pt;
        color: #555;
    }
}

/* Родительские контейнеры canvas */
.hero__bg-logo {
    overflow: hidden;
}

/* hero: на десктопе обрезаем, на мобильных — через медиазапросы */
.hero {
    overflow: hidden;
}

.about-short {
    overflow: hidden;
}



/* ===================================
   HERO — МОБИЛЬНЫЙ СЛАЙДЕР
   =================================== */

/* По умолчанию (десктоп) мобильный слайдер скрыт */
.hero__mobile-slider {
    display: none;
}

/* Мобильный слайд — базовые стили */
.hero__mobile-slide {
    display: none;
}

.hero__mobile-slide.active {
    display: flex;
}

/* Во время анимации — всегда показан */
.hero__mobile-slide.animating {
    display: flex !important;
}

/* Первый мобильный слайд: текст сверху, бенто снизу */
.hero__mobile-slide--main .hero__text-box {
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: 0;
}

.hero__mobile-slide--main .hero__title {
    text-align: center;
}

.hero__mobile-slide--main .hero__subtitle {
    text-align: center;
    margin-inline: auto;
}

.hero__mobile-slide--main .hero__actions {
    justify-content: center;
}

/* Второй мобильный слайд: виджет курсов */
.hero__mobile-slide--courses .hero__courses-widget {
    max-height: none;
}

.hero__mobile-slide--courses {
    overflow-y: visible;
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
}

@media (max-width: 1024px) {
    .hero__mobile-slide--main {
        flex-direction: column !important;
    }
}

/* ===================================
   МОБИЛЬНОЕ ДЕРЕВО В HERO
   =================================== */
.hero__mobile-tree-canvas {
    display: none;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    margin: 0;
    -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 15%,
            black 70%,
            transparent 100%
    );
    mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 15%,
            black 70%,
            transparent 100%
    );
    opacity: 0.22;
}

.hero__mobile-slide--main {
    position: relative;
    overflow: hidden;
}

/* Карточка случайного врача в Bento Grid */
#randomDoctorCard {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease;
}

#randomDoctorCard .bento-card__img {
    object-position: center 30% !important; /* Смещаем фокус вниз */
}

#randomDoctorCard:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px rgba(48, 166, 218, 0.3);
}

#randomDoctorCard:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

#randomDoctorCard:active {
    transform: translateY(-4px) !important;
}


/* === ТЕГИ КУРСОВ === */
.course-card__tag {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 11px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.course-card__tag--urgent {
    background-color: #EF4444;
    animation: pulse-tag 2s ease-in-out infinite;
}

.course-card__tag--soon {
    background-color: #F59E0B;
}

.course-card__tag--ongoing {
    background-color: #10B981;
}

.course-card__tag--open {
    background-color: var(--color-primary);
}

@keyframes pulse-tag {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* === ЛОАДЕР И ОШИБКИ === */
.courses-loader,
.courses-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-secondary);
    font-size: var(--fz-base);
}

.courses-error {
    flex-direction: column;
    gap: var(--space-4);
}

.courses-error p {
    margin: 0;
}


/* ===================================
   ВИДЖЕТ КУРСОВ — ТОЛЬКО ПЛИТКА
   =================================== */

.hero__courses-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: max-content !important;
    gap: 12px !important;
    align-items: stretch !important;
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 8px !important;

    /* Fade-эффект */
    --fade-size: 40px;
    --top-alpha: 1;
    --bottom-alpha: 0;

    -webkit-mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, var(--top-alpha)) 0%,
    rgba(0, 0, 0, 1) var(--fade-size),
    rgba(0, 0, 0, 1) calc(100% - var(--fade-size)),
    rgba(0, 0, 0, var(--bottom-alpha)) 100%
    ) !important;
    mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, var(--top-alpha)) 0%,
    rgba(0, 0, 0, 1) var(--fade-size),
    rgba(0, 0, 0, 1) calc(100% - var(--fade-size)),
    rgba(0, 0, 0, var(--bottom-alpha)) 100%
    ) !important;
}

/* Карточка курса */
.course-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .15);
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end;
    padding: 16px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    min-height: 160px;
    text-decoration: none;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}


.course-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 30%;
    z-index: 0;
    opacity: 0.4;
    transition: transform var(--transition-slow), opacity 0.4s ease;
    transform: scale(1.05);
}

.course-card:hover .course-card__img {
    transform: scale(1.1);
    opacity: 1;
}

.course-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, .8) 0%, rgba(15, 23, 42, 0) 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

.course-card:hover .course-card__overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, .95) 0%, rgba(15, 23, 42, .3) 100%);
}

.course-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}

.course-card__tag {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 11px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.course-card__tag--urgent {
    background-color: #EF4444;
    animation: pulse-tag 2s ease-in-out infinite;
}

.course-card__tag--soon {
    background-color: #F59E0B;
}

.course-card__tag--ongoing {
    background-color: #10B981;
}

.course-card__tag--open {
    background-color: var(--color-primary);
}

@keyframes pulse-tag {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.course-card__specialist {
    color: var(--color-primary-light);
    font-size: 12px;
    font-weight: var(--fw-medium);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

.course-card__specialist::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EBF8FF' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.course-card__title {
    font-family: var(--font-heading), serif;
    font-size: 14px;
    font-weight: var(--fw-bold);
    color: var(--color-white);
    line-height: 1.2;
    margin: 0;
    margin-top: auto;
}

.course-card__dates {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .8);
    font-size: 11px;
    margin-top: 4px;
}

.course-card__dates::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.8)' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ===================================
   БЕЙДЖ "ПОДДЕРЖАТЬ" В BENTO CARD
   =================================== */

.donations-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg,
    rgba(134, 239, 172, 0.25) 0%,
    rgba(134, 239, 172, 0.15) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(134, 239, 172, 0.4);
    border-radius: var(--radius-full);
    font-family: var(--font-heading), serif;
    font-size: 13px;
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.1),
            0 2px 6px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gentle-pulse 3s ease-in-out infinite;
}

/* Иконка сердца с эффектом гравировки */
.donations-badge__icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.9)' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
    animation: heartbeat 3s ease-in-out infinite;
}

/* Hover-эффект для карточки доната */
.bento-card--donations:hover .donations-badge {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg,
    rgba(134, 239, 172, 0.35) 0%,
    rgba(134, 239, 172, 0.25) 100%
    );
    box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.15),
            0 4px 10px rgba(134, 239, 172, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(134, 239, 172, 0.6);
}

/* Усиленное биение сердца при наведении */
.bento-card--donations:hover .donations-badge__icon {
    animation: heartbeat-strong 1.6s ease-in-out infinite;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Анимация плавного пульсирования бейджа */
@keyframes gentle-pulse {
    0%, 100% {
        background: linear-gradient(135deg,
        rgba(134, 239, 172, 0.25) 0%,
        rgba(134, 239, 172, 0.15) 100%
        );
        border-color: rgba(134, 239, 172, 0.4);
    }
    50% {
        background: linear-gradient(135deg,
        rgba(134, 239, 172, 0.3) 0%,
        rgba(134, 239, 172, 0.2) 100%
        );
        border-color: rgba(134, 239, 172, 0.5);
    }
}

/* Анимация биения сердца (мягкая) */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.15);
    }
    20% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.1);
    }
    40% {
        transform: scale(1);
    }
}

/* Анимация биения сердца (сильная) */
@keyframes heartbeat-strong {
    0%, 100% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.3);
    }
    20% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.25);
    }
    40% {
        transform: scale(1);
    }
}

/* Адаптив для планшетов */
@media (max-width: 1024px) {
    .donations-badge {
        padding: 7px 12px;
        font-size: 12px;
        gap: 5px;
    }

    .donations-badge__icon {
        width: 14px;
        height: 14px;
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .donations-badge {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .donations-badge__icon {
        width: 12px;
        height: 12px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .donations-badge {
        padding: 5px 8px;
        font-size: 10px;
    }
}

/* Доступность: фокус */
.bento-card--donations:focus-visible .donations-badge {
    outline: 3px solid rgba(134, 239, 172, 0.6);
    outline-offset: 3px;
}

/* Уменьшение движения для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .donations-badge {
        animation: none;
    }

    .donations-badge__icon {
        animation: none;
    }

    .bento-card--donations:hover .donations-badge__icon {
        animation: none;
        transform: scale(1.1);
    }
}

/* ===================================
   ВЫПАДАЮЩЕЕ МЕНЮ В НАВИГАЦИИ
   =================================== */

/* Элемент списка с выпадающим меню */
.nav-item--dropdown {
    position: relative;
}

/* Кнопка-переключатель выпадающего меню */
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-heading), serif;
    font-size: var(--fz-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color var(--transition-base);
    border-radius: var(--radius-sm);
}

/* Иконка стрелки */
.nav-dropdown-icon {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

/* Поворот стрелки при открытии */
.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-icon {
    transform: rotate(180deg);
}

/* Подчеркивание при наведении */
.nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: var(--space-4);
    right: var(--space-4);
    height: 2px;
    background: linear-gradient(
            90deg,
            var(--color-primary) 0%,
            var(--color-accent) 100%
    );
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-base);
}

.nav-dropdown-toggle:hover {
    color: var(--color-primary);
    background-color: rgba(48, 166, 218, 0.04);
}

.nav-dropdown-toggle:hover::after,
.nav-dropdown-toggle[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.nav-dropdown-toggle[aria-expanded="true"] {
    color: var(--color-primary);
    font-weight: var(--fw-bold);
}

/* Выпадающее меню */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1000;
    list-style: none;
}

/* Показываем выпадающее меню */
.nav-item--dropdown.active .nav-dropdown-menu,
.nav-item--dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ссылки в выпадающем меню */
.nav-dropdown-menu a {
    display: block;
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-heading), serif;
    font-size: var(--fz-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-dropdown-menu a::before {
    content: '';
    position: absolute;
    left: var(--space-5);
    right: var(--space-5);
    bottom: 0;
    height: 1px;
    background-color: var(--color-border);
    opacity: 0;
}

.nav-dropdown-menu li:not(:last-child) a::before {
    opacity: 1;
}

.nav-dropdown-menu a:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    padding-left: calc(var(--space-5) + 4px);
}

/* Активная страница в выпадающем меню */
.nav-dropdown-menu a.active {
    color: var(--color-primary);
    font-weight: var(--fw-bold);
    background-color: rgba(48, 166, 218, 0.08);
}

/* Стрелочка указатель */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    transform: rotate(45deg);
    z-index: -1;
}

/* Визуально скрытый элемент (доступен для скринридеров) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
