/* ===== ШРИФТЫ ===== */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'InterBold';
    src: url('/static/fonts/Inter_18pt-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* ===== ПЕРЕМЕННЫЕ CSS ===== */
:root {
    --primary-color: #198754;
    --header-bg: #005528;
    --header-height: 90px;
    --accent-green: #78B42D;
}

/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== СТИЛИ ХЕДЕРА ===== */
.custom-header {
    background-color: var(--header-bg);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 4000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Стили логотипа */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-left: 20px;
    margin-right: auto;
    text-decoration: none;
    color: white;
}

.logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
    color: white;
}

.logo-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    display: flex;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    font-family: 'InterBold', sans-serif;
}

.logo-hely {
    color: white;
}

.logo-select {
    color: var(--accent-green);
}

.logo-subtitle {
    font-size: 0.7rem;
    color: white;
    margin-top: 2px;
    margin-left: 110px;
    line-height: 1;
    opacity: 0.9;
    font-family: 'Inter';
}

/* Навигация */
.nav-links {
    display: flex;
    gap: 120px;
    align-items: center;
    margin-right: 70px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-weight: bold;
    font-family: 'Inter';
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-links a.active {
    color: var(--accent-green) !important;
}

/* Dropdown меню в навигации */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown .dropdown-menu-custom {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 10px;
}

.nav-dropdown:hover .dropdown-menu-custom {
    display: block;
}

.dropdown-menu-custom a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #333 !important;
    font-weight: normal;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.dropdown-menu-custom a:hover {
    background-color: #f5f5f5;
    opacity: 1;
}

.dropdown-menu-custom a.active {
    background-color: #e8f5e9;
    color: var(--primary-color) !important;
}

.dropdown-menu-custom a i {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Стили для меню пользователя */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: opacity 0.3s;
}

.user-profile-link i {
    font-size: 1.3rem;
}

.user-profile-link:hover {
    opacity: 0.8;
}

/* Аватар пользователя в хедере */
.user-avatar-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.user-profile-link:hover .user-avatar-header {
    border-color: rgba(255, 255, 255, 0.6);
}

.logout-link {
    display: flex;
    align-items: center;
    color: white !important;
    text-decoration: none;
    font-size: 1.3rem;
    transition: opacity 0.3s;
    padding: 5px;
}

.logout-link:hover {
    opacity: 0.8;
}

.login-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: opacity 0.3s;
}

.login-link i {
    font-size: 1.3rem;
}

.login-link:hover {
    opacity: 0.8;
}

/* Адаптивность хедера */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .custom-header {
        height: auto;
        padding: 1rem 0;
    }

    .nav-links {
        margin-top: 0.5rem;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        margin-right: 0;
    }

    .logo {
        margin-right: 0;
        margin-left: 0;
    }

    .logo-icon,
    .logo img {
        width: 60px;
        height: 60px;
    }

    .logo-main {
        font-size: 2rem;
    }

    .logo-subtitle {
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .logo-icon,
    .logo img {
        width: 50px;
        height: 50px;
    }

    .logo-main {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .nav-links {
        flex-direction: column;
        gap: 8px;
    }

    .logo {
        flex-direction: column;
        gap: 5px;
    }

    .logo-icon,
    .logo img {
        width: 40px;
        height: 40px;
    }

    .logo-main {
        font-size: 1.2rem;
    }
}