/* Основные стили сайта ЮграЛинк */
:root {
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --hero-color-start: #0d6efd;
    --hero-color-end: #0a58ca;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    scroll-behavior: smooth;
}

/* Hero-блок с плавной сменой цвета (светлая тема) */
.hero-animated {
    position: relative;
    background: #0d6efd; /* fallback */
    overflow: hidden;
    isolation: isolate;
    animation: subtleThemeLight 15s ease-in-out infinite;
}

/* Ключевые кадры для светлой темы */
@keyframes subtleThemeLight {
    0% { background: #0d6efd; }
    50% { background: #0a58ca; }
    100% { background: #0d6efd; }
}

/* Летающие фигуры */
.hero-animated .floating-shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Огромные окружности */
.hero-animated .circle-big {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: floatCircle 18s ease-in-out infinite;
    width: 500px;
    height: 500px;
}

/* Огромные овалы */
.hero-animated .oval {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    transform-origin: center;
    animation: floatOval 22s ease-in-out infinite;
    width: 700px;
    height: 450px;
}

/* Огромные квадраты */
.hero-animated .square-big {
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
    animation: floatSquare 20s ease-in-out infinite;
    width: 500px;
    height: 500px;
}

/* Бегущие цифры 0 и 1 */
.hero-animated .binary {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.12);
    white-space: nowrap;
    animation: floatBinary 25s linear infinite;
    letter-spacing: 15px;
}

/* Анимации */
@keyframes floatCircle {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translate(300px, -280px) scale(1.3); opacity: 0; }
}

@keyframes floatOval {
    0% { transform: translate(0, 0) rotate(0deg) scale(0.4); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translate(-350px, 250px) rotate(180deg) scale(1.2); opacity: 0; }
}

@keyframes floatSquare {
    0% { transform: translate(0, 0) rotate(45deg) scale(0.3); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translate(280px, -300px) rotate(135deg) scale(1.4); opacity: 0; }
}

@keyframes floatBinary {
    0% { transform: translateX(-200px) translateY(0); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateX(calc(100vw + 400px)) translateY(-80px); opacity: 0; }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .hero-animated .circle-big { width: 300px; height: 300px; }
    .hero-animated .oval { width: 400px; height: 250px; }
    .hero-animated .square-big { width: 280px; height: 280px; }
    .hero-animated .binary { font-size: 2rem; letter-spacing: 8px; }
}

/* Карточки */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.1) !important;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.btn-primary:hover {
    background-color: #0b5ed7;
}

/* Кнопка в hero-блоке */
.hero-animated .btn-light {
    background-color: #ffffff;
    color: #0d6efd;
    border: none;
}
.hero-animated .btn-light:hover {
    background-color: #f0f0f0;
    color: #0a58ca;
}

/* Скрыть бейдж ReCaptcha */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
}

/* Кнопка "Наверх" (светлая тема) */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scroll-to-top:hover {
    background-color: #0b5ed7;
    transform: scale(1.05);
}
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Мобильные – чуть меньше */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* Кнопка переключения темы (светлая) */
.theme-switcher {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    color: #1e2a3e;
}
.theme-switcher:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}
.theme-switcher:active {
    transform: scale(0.95);
}
.theme-switcher svg {
    display: block;
}