:root {
    /* Обновленная основная цветовая палитра с более яркими синими оттенками */
    --primary-100: #E3F2FD; /* Светлый голубой */
    --primary-200: #90CAF9; /* Яркий светло-голубой */
    --primary-300: #42A5F5; /* Яркий (голубой средний тон) */
    --primary-400: #1e64e5; /* Голубой ближе к насыщенному */
    --primary-500: #1565C0; /* Темно-синий насыщенный */

    /* Обновленная вторичная цветовая палитра */
    --secondary-100: #FDE7E7; /* Светлый коралловый */
    --secondary-200: #F9BABA; /* Коралловый */
    --secondary-300: #F36D6D; /* Кораллово-красный */
    --secondary-400: #E53935; /* Насыщенный красный */
    --secondary-500: #B71C1C; /* Глубокий темно-красный */

    /* Нейтральные цвета с большей контрастностью */
    --neutral-100: #FFFFFF; /* Белый */
    --neutral-200: #F4F8FA; /* Обновленный светлый для фона */
    --neutral-300: #D1D9E0; /* Более выразительные границы */
    --neutral-400: #7A8B99; /* Активное неактивное */
    --neutral-500: #2F3A46; /* Основной текст стал контрастнее */

    /* Цвета акцентов */
    --accent: var(--primary-400); /* Яркий акцент */
    --accent-hover: var(--primary-500); /* Темный акцент */

    /* Цвета состояний */
    --success: #36ae3b; /* Насыщенный зеленый */
    --error: #ec2222; /* Ярко-красный */
    --warning: #ccad35; /* Ярко-желтый */
    --info: #337de5; /* Светлый голубой */

    /* Обновленные фоны и текст */
    --background: var(--neutral-200); /* Более гладкий тон */
    --surface: var(--neutral-200); /* Для поверхностей */
    --border: var(--neutral-300);
    --text-primary: var(--neutral-500);
    --text-secondary: var(--neutral-400);
    --toast-text: #EAF3FF;

    /* Тени с более темным тоном */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 14px 28px rgba(0, 0, 0, 0.3);

    /* Анимационные переменные */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    --header-height: 80px;
    --footer-height: 120px;
    --content-max-width: 800px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.5rem;
    --font-size-md: 1.25rem;
    --font-size-sm: 0.875rem;
    --font-size-xs: 0.75rem;
    --font-size-xxs: 0.625rem;
    --font-size-xxxs: 0.5rem;
    --font-size-xxxl: 2.5rem;
    --font-size-xxxxl: 3rem;
    --font-size-xl: 2rem;
}

/* Темная тема */
[data-theme="dark"] {
    --background: #0A1F44;
    --surface: #12325B;
    --surface-variant: #1C497A;
    --text-primary: #EAF3FF; /* Насыщенный светлый */
    --toast-text: #EAF3FF;
    --text-secondary: rgba(234, 243, 255, 0.8); /* Чуть более выразительный */
    --accent: #448AFF;
    --accent-hover: #2979FF;

    /* Тени темной темы */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 14px 28px rgba(0, 0, 0, 0.9);
}

/* Добавляем плавный переход между темами */
body {
    transition: background-color var(--transition-normal), color var(--transition-normal);
    background-image: url('/img/bg.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: 0 center;
    animation: slideBackground 60s ease-in-out infinite alternate;
}

/* Page Loader - Спиннер */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background, #ffffff);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.dot-spinner {
    --uib-size: 40px;
    --uib-speed: .9s;
    --uib-color: var(--accent, --accent-hover);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--uib-size);
    width: var(--uib-size);
}

.dot-spinner__dot {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
}

.dot-spinner__dot::before {
    content: '';
    height: 20%;
    width: 20%;
    border-radius: 50%;
    background-color: var(--uib-color);
    transform: scale(0);
    opacity: 0.5;
    animation: pulse0112 calc(var(--uib-speed) * 1.111) ease-in-out infinite;
    box-shadow: 0 0 20px rgba(18, 31, 53, 0.3);
}

.dot-spinner__dot:nth-child(2) {
    transform: rotate(45deg);
}

.dot-spinner__dot:nth-child(2)::before {
    animation-delay: calc(var(--uib-speed) * -0.875);
}

.dot-spinner__dot:nth-child(3) {
    transform: rotate(90deg);
}

.dot-spinner__dot:nth-child(3)::before {
    animation-delay: calc(var(--uib-speed) * -0.75);
}

.dot-spinner__dot:nth-child(4) {
    transform: rotate(135deg);
}

.dot-spinner__dot:nth-child(4)::before {
    animation-delay: calc(var(--uib-speed) * -0.625);
}

.dot-spinner__dot:nth-child(5) {
    transform: rotate(180deg);
}

.dot-spinner__dot:nth-child(5)::before {
    animation-delay: calc(var(--uib-speed) * -0.5);
}

.dot-spinner__dot:nth-child(6) {
    transform: rotate(225deg);
}

.dot-spinner__dot:nth-child(6)::before {
    animation-delay: calc(var(--uib-speed) * -0.375);
}

.dot-spinner__dot:nth-child(7) {
    transform: rotate(270deg);
}

.dot-spinner__dot:nth-child(7)::before {
    animation-delay: calc(var(--uib-speed) * -0.25);
}

.dot-spinner__dot:nth-child(8) {
    transform: rotate(315deg);
}

.dot-spinner__dot:nth-child(8)::before {
    animation-delay: calc(var(--uib-speed) * -0.125);
}

@keyframes pulse0112 {
    0%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Движение бекграунда */

@keyframes slideBackground {
    from {
        background-position-x: 0;
    }
    to {
        background-position-x: -100%;
    }
}

/* Тосты - тоасты - уведомления */

.toast-container {
    position: fixed;
    bottom: 6.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.toast {
    width: 20rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
    border-left: 4px solid;
    overflow: hidden;
    position: relative;
}

.toast-content {
    padding: 10px 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.toast-message {
    flex: 1;
    text-align: center;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.toast-progress-bar.animating {
    animation: progressBar linear forwards;
}

/* Стили для разных типов тостов с иконками */
.toast-success {
    background: var(--success);
    border-color: #66BB6AFF;
    color: var(--toast-text);
}

.toast-success .toast-progress-bar {
    background: #66BB6AFF;
}

.toast-error {
    background: var(--error);
    border-color: #f8485aFF;
    color: var(--toast-text);
}

.toast-error .toast-progress-bar {
    background: #f8485aFF;
}

.toast-warning {
    background: var(--warning);
    border-color: #FFC61AFF;
    color: var(--toast-text);
}

.toast-warning .toast-progress-bar {
    background: #FFC61AFF;
}

.toast-info {
    background: var(--info);
    border-color: var(--primary-300);
    color: var(--toast-text);
}

.toast-info .toast-progress-bar {
    background: var(--primary-300);
}

.toast-icon {
    color: var(--toast-text);
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 24px;
    color: var(--toast-text);
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 1;
}

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

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast.fade-out {
    animation: slideDown 0.3s ease-in forwards;
}

.toast.fade-out .toast-progress-bar {
    animation: none;
}

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

/* Применение цветов */
body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: "Exo 2", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

main {
    flex: 1;
}

/* Стили заголовка с улучшенной интерактивностью */
.header {
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 8;
    backdrop-filter: blur(8px);
    transition: all var(--transition-normal);
}

[data-theme="dark"] .header {
    background-color: var(--surface-variant);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* ПОДЧЕРКИВАНИЕ ТОЛЬКО ДЛЯ ЛОГОТИПА В ХЕДЕРЕ */
.logo {
    color: var(--accent);
    font-size: 2rem;
    font-weight: bold;
    padding: 0 0 0.25rem 0;
    transition: all var(--transition-normal);
    cursor: default;
    position: relative;
}

.logo:hover {
    transform: scale(1.03);
    color: var(--accent-hover);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    transition: width var(--transition-normal);
}

.logo:hover::after {
    width: 100%;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    text-wrap: nowrap;
    padding: 0.5rem 1rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* Для светлой темы с закругленными углами */
[data-theme="light"] .nav-link:hover {
    background-color: var(--primary-200);
    color: var(--primary-500);
    transform: translateY(-2px);
    transition: all var(--transition-normal);
}

/* Для темной темы с закругленными углами */
[data-theme="dark"] .nav-link:hover {
    background-color: var(--primary-400);
    color: var(--text-primary);
    transform: none;
    transition: all var(--transition-normal);
}

.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Улучшенные стили кнопок */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.btn:hover::before {
    width: 200px;
    height: 200px;
}

.btn:active {
    transform: scale(0.95);
}

/* Стили для кнопки переключения темы с анимацией */
.btn-theme {
    background: transparent;
    border: 1px solid var(--border);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-normal);
    position: relative;
}

.btn-theme::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-normal);
    opacity: 0.1;
}

.btn-theme:hover::before {
    width: 100%;
    height: 100%;
}

[data-theme="dark"] .btn-theme {
    background-color: var(--surface-variant);
}

.btn-theme:hover {
    color: var(--accent);
    transform: rotate(30deg) scale(1.1);
    border-color: var(--accent);
}

[data-theme="dark"] .btn-theme:hover {
    background-color: var(--surface);
}

.theme-icon-light,
.theme-icon-dark {
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.theme-icon-dark {
    display: none;
}

/* Основной контент */
.main-content {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.main-title {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}

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

/* Секция проектов */
.projects-section {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--accent);
}

.projects-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    width: 100%;
    flex-wrap: wrap;
}

/* Улучшенные карточки проектов */
.project-card {
    width: 350px; /* Новый увеличенный размер */
    min-width: 320px; /* Устанавливаем минимальную ширину */
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    background: var(--surface);
    transform-origin: center;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

[data-theme="dark"] .project-card {
    background: var(--surface-variant);
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image::after {
    transform: translateX(100%);
}

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

.project-card:hover .project-image img {
    transform: scale(1.1) rotate(2deg);
}

.project-title {
    padding: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
}

.project-card:hover .project-title {
    color: var(--accent);
    transform: scale(1.05);
}

[data-theme="dark"] .project-title {
    background-color: var(--surface-variant);
}

/* Упрощённый футер */
.footer {
    background-color: var(--surface);
    padding: 0.75rem 0;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    z-index: 8;
}

.footer-content {
    justify-content: space-between; /* Распределение пространства между блоками */
    align-items: center; /* Вертикальное выравнивание содержимого */
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--spacing-md); /* Расстояние между ссылками */
    justify-content: center; /* Центрирование списка соцсетей */
}

.footer-social li {
    display: inline-block; /* Убирает вертикальное выравнивание строк */
}

.footer-social a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition-normal);
}

.footer-social a:hover {
    color: var(--accent);
}

.footer-social i {
    font-size: 1.2rem; /* Размер иконок */
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: var(--font-size-base);
}

.footer-link:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* About block */
.about-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-xl);
    color: var(--accent);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.card-base {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--accent); /* Тонкая окантовка */
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-base:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-hover); /* Можно изменить цвет при наведении */
}

.card-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--accent);
}

.card-info {
    display: flex;
    flex-direction: column;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) {
    .card-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .card-list {
        grid-template-columns: 1fr;
    }
}

/* Контентные страницы */

.content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    padding: var(--spacing-xl) var(--spacing-md);
    display: flex;
    justify-content: center;
}

.content__container {
    max-width: var(--content-max-width);
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    animation: slideInUp 0.6s ease-out;
}

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

.content__container:hover {
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .content__container {
    box-shadow: var(--shadow-md);
}

.content__title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    text-align: center;
}

.content__text {
    color: var(--text-primary);
    line-height: 1.8;
}

.content__text h1 {
    font-size: var(--font-size-xl);
    color: var(--accent);
}

.content__text h2 {
    font-size: var(--font-size-lg);
    margin: var(--spacing-lg) 0 var(--spacing-md);
    color: var(--accent);
}

.content__text h3 {
    font-size: var(--font-size-md);
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--accent);
}


.content__text p {
    margin-bottom: var(--spacing-sm);
}


.content__text ul,
.content__text ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.content__text li {
    margin-bottom: var(--spacing-sm);
}

.content__text a {
    color: var(--accent);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 600;
}

.content__text a:hover {
    color: var(--accent-hover);
    transform: scale(1.05);
}

.content__text .content__img {
    width: 50%;
}

/* Добавляем эффект размытия для модальных окон */
[data-theme="dark"] .modal,
[data-theme="dark"] .dropdown-menu {
    backdrop-filter: blur(12px);
    background-color: rgba(26, 21, 63, 0.9);
}

/* Анимации загрузки */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    transition: background var(--transition-normal);
}

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

/* Анимация появления элементов при прокрутке */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Анимация исчезновения */
.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

/* Ключевые кадры для появления */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Ключевые кадры для исчезновения */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.burger-menu {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-normal);
    position: relative;
}

.burger-menu.rotated {
    color: var(--accent);
    transform: rotate(90deg) scale(1.1);
    border-color: var(--accent);
}

.mobile-nav {
    display: none; /* По умолчанию меню скрыто */
    background-color: var(--surface); /* Фон для меню */
    position: fixed;
    top: var(--header-height); /* Для размещения под хедером */
    right: 0;
    left: 0;
    width: 100%; /* Задаем ширину */
    z-index: 7;
    padding: 1.5rem; /* Внутренние отступы для списка */
    overflow-y: auto; /* Скролл при большом количестве элементов */
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%); /* Анимация входа */
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    opacity: 0;
}


/* Обновление анимации для большей "жизни" */
.button:hover {
    color: var(--accent-hover);
    border-color: var(--accent);
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}


/* Мобильная версия */
@media only screen and (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --font-size-xl: 1.75rem;
    }

    .burger-menu {
        display: block;
        position: inherit;
        margin: 1rem;
    }


    .projects-grid {
        flex-direction: column;
        align-items: center;
    }

    .project-card {
        width: 300px; /* Уменьшаем размер для мобильных экранов */
        min-width: 280px; /* Минимальная ширина для компактных устройств */
    }

    .main-nav {
        display: none; /* Скрываем основное меню в мобильной версии */
    }

    .mobile-nav.active {
        display: block; /* Отображаем меню */
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column; /* Вертикальное расположение ссылок */
        gap: 1rem; /* Расстояние между элементами */
        align-items: center; /* Центровка ссылок */
    }

    .mobile-nav-list li {
        width: 100%; /* Полная ширина для кликов */
        text-align: center; /* Текст по центру */
    }

    .mobile-nav-list a {
        color: var(--text-primary); /* Цвет текста */
        text-decoration: none;
        font-size: var(--font-size-lg); /* Увеличенный шрифт */
        padding: 0.75rem 1rem; /* Внутренние отступы */
        border-radius: 8px; /* Скругленные углы */
        transition: background-color var(--transition-fast), transform var(--transition-fast);
    }

    .mobile-nav-list a:hover {
        background-color: var(--primary-200); /* Цвет фона при наведении */
        transform: scale(1.03); /* Легкое увеличение */
    }


    /* Карточки проектов */
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr; /* По одной карточке в строке */
        gap: 20px;
    }

    .project-card {
        width: 100%; /* Автоматическое масштабирование */
    }

    .project-image {
        display: flex;
    }

    .project-image img {

        max-width: 100%;
        height: auto;
    }

    /* Соцсети в футере */
    .footer-social {
        display: flex;
        flex-direction: column;
        align-items: center; /* Центровка внутри */
        gap: 10px;
        text-align: center;
    }

    .footer-link {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    /* Уменьшаем отступы в футере */
    .footer-legal {
        margin-top: 10px;
        text-align: center;
    }

}

@media (max-width: 430px) {
    .footer-legal {
        display: block;
        margin-top: 10px;
        text-align: center;
    }
}