/* ===== PREMIUM DARK THEME V4.1 — MONTERRAT + HIGH CONTRAST ===== */
:root {
    --bg-dark: #0A0E27;
    --bg-card: #111638;
    --bg-card-hover: #1A1F4A;
    --bg-section-alt: #0D1130;
    
    --accent-primary: #3B82F6;
    --accent-bright: #60A5FA;
    --accent-cyan: #06B6D4;
    --accent-green: #10B981;
    --accent-warning: #F59E0B;
    --accent-danger: #EF4444;
    
    --text-primary: #FFFFFF;
    --text-secondary: #E2E8F0;
    --text-muted: #c2d0e3;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(59, 130, 246, 0.3);
    
    --gradient-hero: linear-gradient(135deg, #0A0E27 0%, #1E1B4B 50%, #0A0E27 100%);
    --gradient-accent: linear-gradient(90deg, #3B82F6 0%, #06B6D4 100%);
    --gradient-button: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    --gradient-button-hover: linear-gradient(135deg, #60A5FA 0%, #3B82F6 50%, #2563EB 100%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.4);
    --shadow-glow-strong: 0 0 50px rgba(59, 130, 246, 0.6);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-muted {
    color: var(--text-muted) !important;
}

.layout-body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    transition: var(--transition);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar-scrolled {
    background: rgba(10, 14, 39, 0.98);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.brand-text { color: var(--text-primary); }

.brand-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 4px;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-bright) !important;
    background: rgba(59, 130, 246, 0.1);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-bright);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs-wrapper {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-top: 79px;
    display: flex;
    align-items: center;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover { color: var(--accent-bright); }

.breadcrumbs .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 991px) {
    .breadcrumbs-wrapper { display: none; }
}

/* ===== FOOTER ===== */
.site-footer {
    background: #060919;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-top { padding: 60px 0 40px; }

.footer-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 12px; }

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--accent-bright);
    transform: translateX(4px);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.footer-contact i { color: var(--accent-bright); }

.footer-bottom {
    background: #040612;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-legal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-legal a:hover { color: var(--text-primary); }

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient-button);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== TOASTS ===== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .footer-legal {
        justify-content: flex-start;
        margin-top: 16px;
    }
    .navbar-collapse {
        background: rgba(10, 14, 39, 0.98);
        border-radius: var(--radius-md);
        padding: 20px;
        margin-top: 16px;
        border: 1px solid var(--border-color);
    }
}

/* ===== COOKIE-БАННЕР ===== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: rgba(10, 14, 39, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    padding: 16px 0;
    transform: translateY(110%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    flex: 1 1 400px;
}

.cookie-banner-text i {
    font-size: 1.6rem;
    color: var(--accent-bright);
    flex-shrink: 0;
}

.cookie-banner-text p { margin: 0; }
.cookie-banner-text a { color: var(--accent-bright); }

.cookie-banner-actions {
    flex-shrink: 0;
}

.cookie-banner .btn-primary-custom {
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    box-shadow: none;
}

/* ===== COOKIE-БАННЕР НА МОБИЛЬНЫХ: компактная плашка ===== */
@media (max-width: 767.98px) {
    .cookie-banner {
        padding: 10px 0;
    }

    .cookie-banner-content {
        flex-direction: row;      /* текст и кнопка в ОДНУ строку */
        align-items: center;
        gap: 12px;
        padding: 0 14px;
    }

    .cookie-banner-text {
        flex: 1 1 auto;
        gap: 8px;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .cookie-banner-text i {
        display: none;            /* крупную иконку прячем — экономим место */
    }

    .cookie-banner-actions {
        flex-shrink: 0;
    }

    .cookie-banner-actions .btn-primary-custom {
        width: auto;              /* кнопка по содержимому, не во всю ширину */
        padding: 8px 18px;
        font-size: 0.85rem;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 767px) {
    .scroll-top {
        width: 44px;
        height: 44px;
        right: 14px;
        bottom: 14px;
        font-size: 1.1rem;
        z-index: 1040;   /* НИЖЕ cookie-баннера (1050) — не перекрывает его */
    }
}

/* ===== ГЛОБАЛЬНЫЙ ЗАПРЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА ===== */
html, body {
    overflow-x: hidden;
    overflow-x: clip;
}

/* Мобильные: убираем горизонтальный сдвиг AOS до проигрывания анимации */
@media (max-width: 767.98px) {
    [data-aos="fade-right"],
    [data-aos="fade-left"] {
        transform: none !important;
    }
}
