/* ============================================
   IT top COLLEGE - Строгий минималистичный дизайн
   Цветовая схема: #6B46C1, #805AD5
   Минимализм без лишних элементов
   ============================================ */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Учитываем высоту фиксированной шапки */
    margin: 0;
    padding: 0;
    height: 100%;
}

:root {
    /* Цветовая схема - один оттенок фиолетового */
    --primary-color: #6B46C1;        /* Основной фиолетовый */
    --primary-dark: #553C9A;         /* Темный фиолетовый (для hover) */
    --primary-light: #6B46C1;        /* Тот же фиолетовый */
    --secondary-color: #F3F4F6;      /* Светло-серый фон */
    --text-dark: #2D3748;            /* Темно-серый текст */
    --text-light: #718096;           /* Серый текст */
    --white: #FFFFFF;                /* Белый */
    --gradient: #6B46C1;             /* Один оттенок фиолетового */
    --success-color: #38A169;        /* Зеленый успех */
    --error-color: #E53E3E;          /* Красный ошибка */
    --warning-color: #DD6B20;        /* Оранжевый предупреждение */
    --info-color: #3182CE;           /* Синий информация */

    /* Glassmorphism эффекты */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --backdrop-blur: blur(10px);

    /* Анимации */
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    /* Оптимизация рендеринга */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100%;
}

/* На главной странице body должен быть прозрачным, чтобы видео было видно */
body:has(.hero) {
    background-color: transparent;
}

/* Поддержка эмодзи для карточек функций */
.feature-icon {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', sans-serif;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Минималистичные карточки */
.glass {
    background: var(--white);
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.glass-card {
    background: var(--white);
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.12);
    transform: translateY(-3px);
}

/* Сообщения */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

/* Если JS включен — используем toast, а не дублирующие alerts */
html.js .messages-container {
    display: none;
}

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: var(--success-color);
    color: white;
}

.alert-error {
    background: var(--error-color);
    color: white;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
}

.alert-info {
    background: var(--info-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Шапка */
.header {
    background: var(--white); /* по умолчанию белая */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

/* Состояние обычной (цветной) шапки после скролла и на всех страницах кроме главной */
.header-solid {
    background: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Прозрачная шапка поверх hero-видео на главной */
.header.header-transparent {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header.header-transparent .logo-text {
    color: #ffffff;
}

.header.header-transparent .logo-bracket {
    color: #ffffff;
}

.header.header-transparent .nav-menu a {
    color: rgba(255, 255, 255, 0.9);
}

.header.header-transparent .nav-menu a:hover {
    color: #ffffff;
}

.header.header-transparent .user-menu-toggle {
    background: rgba(15, 23, 42, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.header.header-transparent .menu-icon {
    background: rgba(255, 255, 255, 0.2);
}

.header.header-transparent .user-name,
.header.header-transparent .dropdown-arrow {
    color: rgba(255, 255, 255, 0.9);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 0;
    position: relative;
    background: transparent;
}

.navbar-leading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    text-decoration: none;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.logo-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 6px;
    letter-spacing: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: transform 0.2s ease, background 0.2s ease;
}

.logo:hover .logo-square {
    transform: scale(1.05);
    background: var(--primary-dark);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.logo:hover .logo-text {
    color: var(--primary-color);
}

.logo-bracket {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: -2px;
    transition: color 0.2s ease;
}

.logo-bottom {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    margin-left: 0;
}

.logo:hover .logo-bottom {
    color: var(--primary-color);
}

.logo-image {
    height: auto;
    max-height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo:hover .logo-image {
    opacity: 0.9;
    transform: scale(1.02);
}

.logo-text-fallback {
    display: flex;
}

/* Основное меню и бургер */
.nav-menu {
    display: flex;
    flex: 1;
    justify-content: center;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(107, 70, 193, 0.35);
    border-radius: 10px;
    background: var(--secondary-color);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
}

.header.header-transparent .hamburger {
    background: rgba(15, 23, 42, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.header.header-transparent .hamburger-line {
    background: #ffffff;
}

body.nav-open {
    overflow: hidden;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}


/* Пользовательское меню */
.nav-user {
    position: relative;
}

.user-menu-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--secondary-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-dark);
    border: none;
    box-shadow: none;
}

.user-menu-toggle:hover {
    background: rgba(107, 70, 193, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.15);
    color: var(--text-dark);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    border: none;
    box-shadow: 0 2px 6px rgba(107, 70, 193, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-menu-toggle:hover .user-avatar {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(107, 70, 193, 0.3);
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: none;
    box-shadow: 0 2px 6px rgba(107, 70, 193, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-menu-toggle:hover .menu-icon {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(107, 70, 193, 0.3);
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-user.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 0.5rem 0;
    min-width: 240px;
    list-style: none;
    margin: 0;
    z-index: 1000;
    overflow: hidden;
}

.nav-user.active .user-menu {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu li {
    margin: 0;
    padding: 0;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.user-menu a:hover {
    background: rgba(107, 70, 193, 0.05);
    color: var(--primary-color);
    text-decoration: none;
}

.user-menu .menu-login-btn {
    background: var(--primary-color);
    color: var(--white);
    margin: 0.5rem 1rem;
    border-radius: 6px;
    justify-content: center;
    font-weight: 600;
}

.user-menu .menu-login-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.user-menu .menu-register-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    margin: 0 1rem 0.5rem 1rem;
    border-radius: 6px;
    justify-content: center;
    font-weight: 600;
}

.user-menu .menu-register-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.5rem 1.5rem;
    border: none;
    list-style: none;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-nav {
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block;
    color: var(--text-dark);
}

.btn-nav:hover {
    color: var(--primary-color);
}

.btn-nav-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-nav-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(107, 70, 193, 0.2);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.1);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.3);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Hero секция - Лабораторный стиль */
.hero {
    --hero-overlay-opacity: 0.45;
    background: var(--primary-color);
    color: var(--white);
    /* Hero начинается с самого верха, под шапкой */
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 0;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.hero-media-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-media-video {
    overflow: hidden;
}

.hero-media-video video {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, var(--hero-overlay-opacity));
    z-index: 1;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(107, 70, 193, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 70, 193, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(107, 70, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(128, 90, 213, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(107, 70, 193, 0.05) 2px, rgba(107, 70, 193, 0.05) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 70, 193, 0.05) 2px, rgba(107, 70, 193, 0.05) 4px);
    background-size: 100px 100px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    animation: fadeInUp 0.8s ease-out;
    padding-top: 160px; /* Отступ сверху для контента, чтобы он не был под шапкой */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(107, 70, 193, 0.2);
    border: 1px solid rgba(107, 70, 193, 0.4);
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-family: 'Courier New', monospace;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    color: var(--white);
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.hero-tagline {
    font-size: 1.5rem;
    margin: 2rem 0 1.5rem 0;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

.hero-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 70, 193, 0.5), transparent);
    margin: 2rem auto;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.85;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-buttons .btn {
    min-width: 200px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Кнопки на главной странице */
.hero-buttons .btn-primary {
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-3px);
}

.hero-buttons .btn-secondary {
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

/* Декоративные ромбы по бокам секции проектов */
.projects-diamond {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.8) 0%, rgba(128, 90, 213, 0.6) 50%, rgba(107, 70, 193, 0.4) 100%);
    transform: rotate(45deg);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    animation: floatDiamond 8s ease-in-out infinite;
    border-radius: 8px;
    box-shadow:
        0 0 20px rgba(107, 70, 193, 0.4),
        0 0 40px rgba(107, 70, 193, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        inset -10px -10px 30px rgba(85, 60, 154, 0.3);
    filter: blur(0.5px);
}

.projects-diamond::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(8px);
}

.projects-diamond::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 8px;
}

.projects-diamond-left {
    left: 5%;
    top: 30%;
}

.projects-diamond-right {
    right: 5%;
    bottom: 30%;
    animation-delay: -2s;
}

@keyframes floatDiamond {
    0% {
        transform: rotate(45deg) translateY(0) translateX(0) scale(1);
        box-shadow:
            0 0 20px rgba(107, 70, 193, 0.4),
            0 0 40px rgba(107, 70, 193, 0.2),
            inset 0 0 20px rgba(255, 255, 255, 0.1),
            inset -10px -10px 30px rgba(85, 60, 154, 0.3);
    }
    25% {
        transform: rotate(90deg) translateY(-25px) translateX(15px) scale(1.1);
        box-shadow:
            0 0 35px rgba(107, 70, 193, 0.5),
            0 0 60px rgba(107, 70, 193, 0.3),
            inset 0 0 25px rgba(255, 255, 255, 0.15),
            inset -10px -10px 35px rgba(85, 60, 154, 0.4);
    }
    50% {
        transform: rotate(135deg) translateY(-15px) translateX(-10px) scale(0.95);
        box-shadow:
            0 0 25px rgba(107, 70, 193, 0.45),
            0 0 50px rgba(107, 70, 193, 0.25),
            inset 0 0 20px rgba(255, 255, 255, 0.12),
            inset -10px -10px 30px rgba(85, 60, 154, 0.35);
    }
    75% {
        transform: rotate(180deg) translateY(10px) translateX(-20px) scale(1.05);
        box-shadow:
            0 0 30px rgba(107, 70, 193, 0.5),
            0 0 55px rgba(107, 70, 193, 0.3),
            inset 0 0 22px rgba(255, 255, 255, 0.14),
            inset -10px -10px 32px rgba(85, 60, 154, 0.4);
    }
    100% {
        transform: rotate(225deg) translateY(0) translateX(0) scale(1);
        box-shadow:
            0 0 20px rgba(107, 70, 193, 0.4),
            0 0 40px rgba(107, 70, 193, 0.2),
            inset 0 0 20px rgba(255, 255, 255, 0.1),
            inset -10px -10px 30px rgba(85, 60, 154, 0.3);
    }
}

/* Универсальные декоративные элементы для всех страниц */
.main-content {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    margin: 0;
    padding-top: 80px; /* Базовый отступ для хедера на всех страницах */
    width: 100%;
    min-height: calc(100vh - 200px);
}

/* На главной странице padding-top убирается через JavaScript */

/* Универсальные декоративные элементы для всех страниц */
.universal-decorative {
    position: fixed !important;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.7) 0%, rgba(128, 90, 213, 0.5) 50%, rgba(107, 70, 193, 0.4) 100%) !important;
    transform: rotate(45deg);
    opacity: 0.65 !important;
    z-index: 999 !important;
    pointer-events: none !important;
    border-radius: 8px;
    animation: universalFloat 8s ease-in-out infinite;
    box-shadow:
        0 0 20px rgba(107, 70, 193, 0.4),
        0 0 40px rgba(107, 70, 193, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        inset -10px -10px 30px rgba(85, 60, 154, 0.3) !important;
    filter: blur(0.5px);
    will-change: transform;
    visibility: visible !important;
    display: block !important;
    overflow: visible !important;
}

.universal-decorative::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    filter: blur(6px);
}

.universal-decorative::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    border-radius: 8px;
}

.universal-decorative-1 {
    left: 1.5% !important;
    top: 15% !important;
    width: 85px !important;
    height: 85px !important;
    transform: rotate(38deg) !important;
    opacity: 0.55 !important;
    animation-delay: 0s;
}

.universal-decorative-2 {
    right: 4.5% !important;
    top: 38% !important;
    width: 150px !important;
    height: 150px !important;
    transform: rotate(52deg) !important;
    opacity: 0.7 !important;
    animation-delay: -2s;
}

.universal-decorative-3 {
    left: 0.8% !important;
    bottom: 22% !important;
    width: 105px !important;
    height: 105px !important;
    transform: rotate(42deg) !important;
    opacity: 0.6 !important;
    animation-delay: -4s;
}

.universal-decorative-4 {
    right: 1.8% !important;
    bottom: 12% !important;
    width: 135px !important;
    height: 135px !important;
    transform: rotate(48deg) !important;
    opacity: 0.65 !important;
    animation-delay: -6s;
}

@keyframes universalFloat {
    0% {
        transform: rotate(45deg) translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: rotate(90deg) translateY(-20px) translateX(10px) scale(1.05);
    }
    50% {
        transform: rotate(135deg) translateY(-10px) translateX(5px) scale(0.95);
    }
    75% {
        transform: rotate(180deg) translateY(15px) translateX(-8px) scale(1.02);
    }
    100% {
        transform: rotate(225deg) translateY(0) translateX(0) scale(1);
    }
}

/* Оптимизация: отключаем анимации на мобильных и при prefers-reduced-motion */
@media (max-width: 768px) {
    .universal-decorative {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .universal-decorative {
        animation: none;
    }
}

/* Декоративные элементы для страницы команды */
.team-decorative {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    filter: blur(1px);
}

.team-circle-left {
    width: 120px;
    height: 120px;
    left: 3%;
    top: 20%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.6) 0%, rgba(128, 90, 213, 0.3) 50%, transparent 100%);
    animation: floatCircleLeft 10s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(107, 70, 193, 0.3);
}

.team-circle-right {
    width: 150px;
    height: 150px;
    right: 4%;
    bottom: 25%;
    background: radial-gradient(circle, rgba(128, 90, 213, 0.5) 0%, rgba(107, 70, 193, 0.2) 50%, transparent 100%);
    animation: floatCircleRight 12s ease-in-out infinite;
    animation-delay: -2s;
    box-shadow: 0 0 50px rgba(128, 90, 213, 0.25);
}

.team-circle-center {
    width: 80px;
    height: 80px;
    left: 50%;
    top: 60%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(107, 70, 193, 0.4) 0%, rgba(128, 90, 213, 0.2) 50%, transparent 100%);
    animation: floatCircleCenter 11s ease-in-out infinite;
    animation-delay: -4s;
    box-shadow: 0 0 30px rgba(107, 70, 193, 0.2);
}

@keyframes floatCircleLeft {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-40px) translateX(25px) rotate(90deg) scale(1.15);
        opacity: 0.65;
    }
    50% {
        transform: translateY(-20px) translateX(10px) rotate(180deg) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translateY(30px) translateX(-15px) rotate(270deg) scale(1.1);
        opacity: 0.55;
    }
    100% {
        transform: translateY(0) translateX(0) rotate(360deg) scale(1);
        opacity: 0.5;
    }
}

@keyframes floatCircleRight {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(35px) translateX(-30px) rotate(-90deg) scale(1.2);
        opacity: 0.65;
    }
    50% {
        transform: translateY(-20px) translateX(15px) rotate(-180deg) scale(0.85);
        opacity: 0.4;
    }
    75% {
        transform: translateY(10px) translateX(-25px) rotate(-270deg) scale(1.05);
        opacity: 0.55;
    }
    100% {
        transform: translateY(0) translateX(0) rotate(-360deg) scale(1);
        opacity: 0.5;
    }
}

@keyframes floatCircleCenter {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translateX(-50%) translateY(-35px) rotate(90deg) scale(1.25);
        opacity: 0.55;
    }
    50% {
        transform: translateX(-50%) translateY(-15px) rotate(180deg) scale(0.95);
        opacity: 0.35;
    }
    75% {
        transform: translateX(-50%) translateY(20px) rotate(270deg) scale(1.15);
        opacity: 0.5;
    }
    100% {
        transform: translateX(-50%) translateY(0) rotate(360deg) scale(1);
        opacity: 0.4;
    }
}

/* Стрелка прокрутки вниз */
.scroll-down-arrow {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounceArrow 2s infinite;
    cursor: pointer;
}

.scroll-down-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateX(-50%) translateY(-5px);
}

.scroll-down-arrow svg {
    width: 24px;
    height: 24px;
}

@keyframes bounceArrow {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Секции */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3.5rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-number {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    opacity: 0.6;
}

/* Проекты */
.projects-preview, .projects-section {
    padding: 60px;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.projects-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 70, 193, 0.2), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #E5E7EB;
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.12);
    transform: translateY(-4px);
    border-color: rgba(107, 70, 193, 0.2);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--secondary-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.75rem;
}

.project-info h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.project-author-name {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(107, 70, 193, 0.2);
}

.tech-tag:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.tech-tag.large {
    padding: 6px 16px;
    font-size: 0.9rem;
}

/* Детальная страница проекта */
.project-detail {
    padding: 60px 0;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
}

.project-detail-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-top: 1rem;
}

.project-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.project-detail-image {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.project-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-author {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #E5E7EB;
}

.project-author h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-detail-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.project-detail-info h2:first-child {
    margin-top: 0;
}

.project-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-github {
    margin: 2rem 0;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.github-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.project-download-card {
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 8px 28px rgba(107, 70, 193, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.06);
}

.project-download-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.project-download-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.project-download-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid rgba(107, 70, 193, 0.25);
    background: rgba(107, 70, 193, 0.06);
    color: var(--primary-color);
}

.project-download-badge--android {
    border-color: rgba(56, 161, 105, 0.35);
    background: rgba(56, 161, 105, 0.08);
    color: var(--success-color);
}

.project-download-badge--ios {
    border-color: rgba(49, 130, 206, 0.35);
    background: rgba(49, 130, 206, 0.08);
    color: var(--info-color);
}

.project-download-badge--other {
    border-color: rgba(113, 128, 150, 0.35);
    background: rgba(113, 128, 150, 0.08);
    color: var(--text-light);
}

.project-download-badge--note {
    border-color: rgba(221, 107, 32, 0.35);
    background: rgba(221, 107, 32, 0.08);
    color: var(--warning-color);
}

.project-download-title {
    color: var(--primary-color);
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.project-download-lead {
    color: var(--text-light);
    margin: 0 0 0.75rem;
    line-height: 1.65;
    font-size: 1.05rem;
}

.project-download-body {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.25rem;
    align-items: start;
}

.project-download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-download-subnote {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.project-download-notes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-download-note {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.18);
    background: rgba(107, 70, 193, 0.04);
}

.project-download-note-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    background: rgba(107, 70, 193, 0.14);
    color: var(--primary-color);
}

.project-download-note-title {
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
}

.project-download-note-text {
    color: var(--text-light);
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

.project-download-note--warn {
    border-color: rgba(221, 107, 32, 0.25);
    background: rgba(221, 107, 32, 0.06);
}

.project-download-note--warn .project-download-note-icon {
    background: rgba(221, 107, 32, 0.14);
    color: var(--warning-color);
}

.project-download-note--info {
    border-color: rgba(49, 130, 206, 0.25);
    background: rgba(49, 130, 206, 0.06);
}

.project-download-note--info .project-download-note-icon {
    background: rgba(49, 130, 206, 0.14);
    color: var(--info-color);
}

.project-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.project-download-btn-icon {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .project-download-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-download-badges {
        justify-content: flex-start;
    }

    .project-download-body {
        grid-template-columns: 1fr;
    }
}

/* Формы */
.form-section {
    padding: 60px 0;
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.form-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.1);
    background: var(--white);
}

.form-control textarea {
    resize: vertical;
}

/* Стили для форм Django */
form p {
    margin-bottom: 1rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="file"],
form select,
form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.1);
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

form input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

form .errorlist {
    color: var(--error-color);
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

form .errorlist li {
    margin: 0.25rem 0;
}

.auth-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Заказы */
.order-section {
    background: var(--secondary-color);
    padding: 60px 0;
    margin-top: 3rem;
}

.order-title {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.order-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
}

/* Кабинеты */
.user-dashboard {
    padding: 40px 0;
}

.user-dashboard h1 {
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-item:hover {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.12);
    transform: translateY(-2px);
    border-color: rgba(107, 70, 193, 0.2);
}

.order-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.order-info p {
    margin: 0.25rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.dashboard-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.dashboard-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Чат */
.chat-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--secondary-color);
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-message.admin-message {
    border-left: 4px solid var(--primary-color);
}

.chat-message.user-message {
    border-left: 4px solid var(--success-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.message-text {
    color: var(--text-dark);
    line-height: 1.6;
}

.empty-chat {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.chat-form {
    margin-top: 1rem;
}

/* Подтверждение договора */
.contract-confirmation-section {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.05) 0%, rgba(128, 90, 213, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.1);
}

.contract-confirmation-section h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.contract-details {
    background: var(--white);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Страницы */
.page-header {
    background: var(--gradient);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Футер */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 30px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-logo-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo .logo-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo .logo-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    letter-spacing: 0;
    border: none;
    box-shadow: none;
}

.footer-logo .logo-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
}

.footer-logo .logo-bracket {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: -2px;
}

.footer-logo .logo-bottom {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.footer-logo-image {
    height: auto;
    max-height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.2s ease;
    background-color: white;
    border: 1px white;
    border-radius: 20px;
}

.footer-logo:hover .footer-logo-image {
    opacity: 1;
}

.footer-logo-text-fallback {
    display: flex;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
    align-items: center;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.01em;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Адаптивность футера */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-info {
        text-align: center;
        align-items: center;
    }
    
    .footer-logo-wrapper {
        flex-direction: column;
        gap: 0.25rem;
    }
}

.footer-bottom p {
    margin: 0;
}

/* Админ-панель */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    margin: -6px;
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.12);
    transform: translateY(-4px);
    border-color: rgba(107, 70, 193, 0.2);
}

.stat-icon {
    font-size: 1.5rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 10px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.2);
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin: 0 0 0.25rem 0;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.05);
    border-radius: 12px;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.action-btn:hover {
    background: rgba(107, 70, 193, 0.08);
    border-color: rgba(107, 70, 193, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.15);
}

.action-btn:hover::before {
    background: var(--primary-color);
}

.action-btn.active {
    background: rgba(107, 70, 193, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.2);
}

.action-btn.active::before {
    background: var(--primary-color);
}

.action-icon {
    font-size: 1.75rem;
    font-weight: 700;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 70, 193, 0.1);
    color: var(--text-dark);
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex-shrink: 0;
    transition: all 0.3s ease;
    letter-spacing: 0;
}

.action-btn:hover .action-icon {
    background: rgba(107, 70, 193, 0.15);
    transform: scale(1.05);
}

.action-btn.active .action-icon {
    background: rgba(107, 70, 193, 0.2);
    color: var(--primary-color);
}

.action-btn span:not(.action-icon) {
    flex: 1;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.action-btn:hover span:not(.action-icon) {
    color: var(--text-dark);
}

.action-btn.active span:not(.action-icon) {
    color: var(--primary-color);
    font-weight: 600;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Дубликат удален - стили main-content определены выше */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: middle;
}

.icon-large {
    font-size: 3rem;
    width: auto;
    height: auto;
}

.icon-medium {
    font-size: 1.5rem;
    width: auto;
    height: auto;
}

/* Минималистичные текстовые иконки */
.icon-student::before { content: "S"; }
.icon-briefcase::before { content: "P"; }
.icon-trophy::before { content: "T"; }
.icon-user::before { content: "U"; }
.icon-book::before { content: "B"; }
.icon-computer::before { content: "C"; }
.icon-calendar::before { content: "D"; }
.icon-gear::before { content: "⚙"; }
.icon-link::before { content: "→"; }
.icon-mail::before { content: "@"; }
.icon-phone::before { content: "T"; }
.icon-location::before { content: "📍"; }
.icon-star::before { content: "★"; }
.icon-home::before { content: "H"; }
.icon-folder::before { content: "F"; }
.icon-check::before { content: "✓"; }
.icon-pen::before { content: "!"; }
.icon-cart::before { content: "O"; }
.icon-crown::before { content: "A"; }
.icon-info::before { content: "i"; }
.icon-empty::before { content: "—"; }
.icon-rocket::before { content: "↑"; }
.icon-portfolio::before { content: "P"; }
.icon-community::before { content: "S"; }
.icon-money::before { content: "₽"; }
.icon-target::before { content: "○"; }
.icon-lightbulb::before { content: "•"; }
.icon-globe::before { content: "○"; }

/* Альтернатива - использование Font Awesome через CSS псевдоэлементы */
.icon-fa {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", sans-serif;
    font-weight: 900;
    font-style: normal;
}

/* Дополнительные улучшения */
.feature-card {
    background: #e1dfdf;
    padding: 2.5rem 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e2e3;
    border-top: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card-news {
    background: #f7f7f7;
    padding: 2.5rem 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f3f3f3;
    border-top: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}


.feature-card:hover {
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.15);
    transform: translateY(-2px);
    border-color: rgba(107, 70, 193, 0.3);
    border-top-color: var(--primary-color);
}

.feature-card-news:hover {
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.15);
    transform: translateY(-2px);
    border-color: rgba(107, 70, 193, 0.3);
    border-top-color: var(--primary-color);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
    font-weight: 300;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(107, 70, 193, 0.1);
    border: 2px solid rgba(107, 70, 193, 0.3);
    border-radius: 4px;
    text-align: center;
    font-weight: normal;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: rgba(107, 70, 193, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.info-section {
    padding: 100px 0;
    background: #e9e9e9;
    position: relative;
    overflow: hidden;
}

.info-section-news {
    padding: 100px 0;
    background: #ffffff;
    position: relative;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 70, 193, 0.2), transparent);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.12);
    transform: translateY(-4px);
    border-color: rgba(107, 70, 193, 0.2);
}

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    font-weight: normal;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.2);
}

/* Убираем любую автоматическую стилизацию цифр везде */
body, html {
    font-variant-numeric: normal !important;
    -webkit-font-feature-settings: normal !important;
    -moz-font-feature-settings: normal !important;
    font-feature-settings: normal !important;
}

/* Убираем стилизацию цифр в контактах, email, телефонах, ценах */
.contact-card p,
.contact-card a,
.user-dashboard p,
.user-dashboard span,
.glass-card p,
.glass-card span,
.dashboard-section p,
.dashboard-section span,
.order-item p,
.order-item span,
.students-dashboard p,
.students-dashboard span {
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
    -webkit-font-feature-settings: normal !important;
    -moz-font-feature-settings: normal !important;
    text-decoration: none;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: inline !important;
}

/* Специально для всех текстовых элементов */
section p,
section span,
section div {
    font-variant-numeric: normal !important;
    -webkit-font-feature-settings: normal !important;
    -moz-font-feature-settings: normal !important;
    font-feature-settings: normal !important;
}

/* Убираем любые рамки и фоны у цифр во всех элементах */
p, span, div, a, td, th {
    font-variant-numeric: normal !important;
    -webkit-font-feature-settings: normal !important;
    -moz-font-feature-settings: normal !important;
    font-feature-settings: normal !important;
}

/* Специально для email и телефонов */
[href^="mailto:"],
[href^="tel:"] {
    font-variant-numeric: normal !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-feature-settings: normal !important;
}

/* Убираем стилизацию цифр в ценах и датах */
.stat-info h3,
.order-info p,
.project-price,
.price {
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
    -webkit-font-feature-settings: normal !important;
    -moz-font-feature-settings: normal !important;
}

/* Улучшенные кнопки */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Оптимизация производительности */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ленивая загрузка: только нативный loading="lazy" (opacity по .loaded давала невидимые картинки, если IntersectionObserver не успевал) */

/* Улучшенные анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideInRight 0.4s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Улучшенные переходы для интерактивных элементов */
a, button, .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Оптимизация рендеринга */
.glass-card, .stat-card, .order-item {
    will-change: transform;
    transform: translateZ(0);
}

/* Улучшенная типографика */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Улучшенные формы */
.form-control:focus {
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.1);
    border-color: var(--primary-color);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Улучшенные скроллбары */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .hero-badge {
        font-size: 0.65rem;
        padding: 6px 16px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-detail-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1001;
    }

    .hamburger {
        display: inline-flex;
    }

    .nav-menu {
        flex: none;
        position: fixed;
        top: 0;
        left: 0;
        width: min(100%, 320px);
        height: 100vh;
        height: 100dvh;
        padding: calc(5.25rem + env(safe-area-inset-top, 0px)) 1.5rem 2rem;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1.5rem;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1002;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu a {
        font-size: 1rem;
        width: 100%;
        padding: 0.65rem 0;
        box-sizing: border-box;
    }

    .user-menu {
        right: 0;
        left: auto;
        min-width: min(280px, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
    }
    
    .user-menu-toggle {
        padding: 0.5rem 1rem;
    }
    
    .user-avatar,
    .menu-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .menu-icon {
        font-size: 1.1rem;
    }

    /* Отдельная иконка ☰ в аккаунт-меню гостя дублирует бургер разделов */
    .nav-user .menu-icon {
        display: none;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .messages-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-btn {
        padding: 1.25rem;
    }
    
    .action-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .projects-preview,
    .projects-section {
        padding: 28px 0;
    }

    .project-detail {
        padding: 28px 0;
    }

    .project-detail-title {
        font-size: 1.65rem;
        line-height: 1.25;
    }

    .page-header {
        padding: 36px 0;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .info-section,
    .info-section-news {
        padding: 48px 0;
    }

    .hero-buttons .btn {
        min-width: 0;
        width: 100%;
        max-width: 340px;
    }

    .scroll-down-arrow {
        bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }

    html {
        scroll-padding-top: 72px;
    }

    .toast-container-global {
        left: 12px;
        right: 12px;
        top: calc(76px + env(safe-area-inset-top, 0px));
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.98rem;
        margin-bottom: 2rem;
    }

    .container {
        padding-left: max(14px, env(safe-area-inset-left, 0px));
        padding-right: max(14px, env(safe-area-inset-right, 0px));
    }

    .page-title {
        font-size: 1.65rem;
    }

    .nav-user .user-name {
        max-width: 7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Toast-позиционирование (общее; на мобильных переопределено выше) */
.toast-container-global {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-container-global > * {
    pointer-events: auto;
}

/* Форма фильтров списка проектов */
.projects-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 768px) {
    .projects-filter-form {
        grid-template-columns: 1fr;
    }
}

/* Карточка участника команды */
.team-member-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .team-member-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 1.5rem;
    }
}

/* Шапки личных кабинетов */
.dashboard-profile-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
}

.dashboard-profile-grid--student {
    grid-template-columns: auto 1fr auto;
}

@media (max-width: 768px) {
    .dashboard-profile-grid,
    .dashboard-profile-grid--student {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .dashboard-profile-grid--student > div:last-child {
        width: 100%;
        max-width: 220px;
    }
}

.rating-achievements,
.dashboard-panels-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .rating-achievements,
    .dashboard-panels-row {
        grid-template-columns: 1fr;
    }
}

.review-scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .review-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .review-scores-grid {
        grid-template-columns: 1fr;
    }
}

.responsive-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.table-responsive-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.student-projects-card {
    min-height: 280px;
    height: 350px;
}

@media (max-width: 768px) {
    .student-projects-card {
        height: auto;
        min-height: 240px;
    }
}



