/* ============================================================
   med2099.ru × med2099.online — единая экосистема
   Подтягивает дизайн-язык платформы: градиент циан→синий,
   стеклянные поверхности, мягкие тени, системная типографика.
   Загружается ПОСЛЕ main.css и переопределяет токены.
   ============================================================ */

/* ── Токены платформы med2099.online ─────────────────────── */
:root {
    --ecosys-cyan:   #00d4d4;
    --ecosys-blue:   #3b82f6;
    --ecosys-violet: #8b5cf6;
    --ecosys-gradient: linear-gradient(90deg, #00d4d4 0%, #3b82f6 100%);

    --font-head: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* тёмная тема: аккуратные циан-синие акценты вместо травяного тила */
    --teal:          #22d3ee;
    --teal-dim:      rgba(0, 212, 212, 0.14);
    --teal-glow:     rgba(0, 212, 212, 0.08);
    --border-accent: rgba(0, 212, 212, 0.35);
    --gold:          #3b82f6;
    --gold-dim:      rgba(59, 130, 246, 0.16);

    --radius:     14px;
    --radius-sm:  10px;
    --radius-lg:  24px;

    --shadow:      0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-teal: 0 8px 24px rgba(0, 212, 212, 0.22);
}

[data-theme="light"] {
    --teal:          #0e7490;            /* циановый текст на светлом — читаемый */
    --teal-dim:      rgba(0, 212, 212, 0.12);
    --teal-glow:     rgba(0, 212, 212, 0.06);
    --border-accent: rgba(14, 116, 144, 0.35);
    --gold:          #2563eb;
    --gold-dim:      rgba(59, 130, 246, 0.10);

    --text:   #111827;                   /* в точности текст платформы */
    --text-2: #4b5563;
    --text-3: #6b7280;

    --border: rgba(17, 24, 39, 0.08);
    --shadow:      0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-teal: 0 8px 24px rgba(0, 212, 212, 0.18);
}

/* ── База ────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    letter-spacing: -0.01em;
}
h1, h2, h3, h4, .font-head {
    font-family: var(--font-head);
    letter-spacing: -0.02em;
}
a { color: var(--teal); }

/* ── Шапка: стекло как у SiteNav платформы ──────────────── */
.site-header {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
:root:not([data-theme="light"]) .site-header {
    background: rgba(13, 15, 20, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.logo span {
    background: var(--ecosys-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav a:hover, .nav a.active {
    color: var(--text);
    background: var(--teal-dim);
    border-radius: 10px;
}

.nav-cta {
    background: var(--ecosys-gradient) !important;
    color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 212, 212, 0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.nav-cta:hover {
    background: var(--ecosys-gradient) !important;
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 10px 28px rgba(0, 212, 212, 0.35) !important;
}

/* ── Кнопки платформы ────────────────────────────────────── */
.btn-primary, .nav-rustore {
    background: var(--ecosys-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 212, 212, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover, .nav-rustore:hover {
    background: var(--ecosys-gradient);
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 10px 28px rgba(0, 212, 212, 0.35);
}
.btn {
    border-radius: 12px;
    font-weight: 600;
}
.btn-outline {
    border: 1.5px solid rgba(59, 130, 246, 0.45);
    color: var(--gold);
    border-radius: 12px;
}
.btn-outline:hover {
    background: var(--gold-dim);
    border-color: rgba(59, 130, 246, 0.7);
    color: var(--gold);
}

/* PRO-бейдж — сине-фиолетовый градиент вместо золота */
.badge-gold {
    background: linear-gradient(90deg, rgba(59,130,246,0.16), rgba(139,92,246,0.16));
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.badge-teal {
    background: var(--teal-dim);
    color: var(--teal);
}

/* ── Карточки: стеклянные, с мягким подъёмом ────────────── */
.card {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
    border-color: rgba(0, 212, 212, 0.35);
}

/* ── Ссылки « Подробнее» и акценты в тексте ─────────────── */
a:hover { color: var(--ecosys-blue); }
:root:not([data-theme="light"]) a:hover { color: #60a5fa; }

/* Скроллбар в стиле платформы (тонкий, нейтральный) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.55); }
::-webkit-scrollbar-track { background: transparent; }

/* Плавное появление секций — фирменная анимация платформы */
.card, .site-header, .site-footer { animation: ecosys-fade-in-up 0.5s ease both; }
@keyframes ecosys-fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .card, .site-header, .site-footer { animation: none; }
}

/* ═══ Фон, орбы и анимации как у med2099.online ═══════════ */

/* Фоновое изображение — ровно как на med2099.online: cover, без вёлей */
body {
    background-image: url('/img/ecosystem-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
/* Тёмная тема сохраняет затемняющую вуаль для читаемости */
:root:not([data-theme="light"]) body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgba(13, 15, 20, 0.86) 0%,
        rgba(13, 15, 20, 0.94) 45%,
        rgba(13, 15, 20, 0.97) 100%);
    pointer-events: none;
}

/* Плавающие светящиеся орбы (cyan / blue / violet) */
.ecosys-orbs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.ecosys-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    animation: ecosys-float 26s ease-in-out infinite;
}
.ecosys-orb--cyan  { width: 520px; height: 520px; background: #00d4d4; top: -140px; left: -120px; }
.ecosys-orb--blue  { width: 620px; height: 620px; background: #3b82f6; top: 30%; right: -200px; animation-delay: -9s; }
.ecosys-orb--violet{ width: 460px; height: 460px; background: #8b5cf6; bottom: -160px; left: 28%; animation-delay: -17s; }
@keyframes ecosys-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(60px, -40px) scale(1.08); }
    66%      { transform: translate(-40px, 50px) scale(0.95); }
}

/* Логотип дышит, как на платформе */
.logo {
    animation: ecosys-breathe 4.5s ease-in-out infinite;
}
@keyframes ecosys-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.035); }
}

/* Появление при прокрутке */
.ecosys-reveal {
    opacity: 0;
    transform: translateY(16px);
}
.ecosys-revealed {
    animation: ecosys-fade-in-up 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes ecosys-fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .ecosys-reveal { opacity: 1; transform: none; }
    .ecosys-orb, .logo { animation: none; }
}

/* ── SSO-чип пользователя в шапке ───────────────────────── */
.sso-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--teal-dim);
    border: 1px solid var(--border-accent);
    white-space: nowrap;
}
.sso-user-name {
    color: var(--text);
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sso-logout { color: var(--text-3); font-size: 12px; }
.sso-logout:hover { color: var(--coral); }

/* ── Баннер-мост на платформу ───────────────────────────── */
.ecosys-bridge {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 212, 212, 0.12), rgba(59, 130, 246, 0.12));
    border: 1px solid var(--border-accent);
}
.ecosys-bridge h3 { font-size: 18px; }
.ecosys-bridge p { font-size: 14px; color: var(--text-2); margin: 0; }
