@font-face {
    font-family: 'PT Sans';
    src: url('/template/font/PTSans-Regular.eot');
    src: local('PT Sans'), local('PTSans-Regular'),
        url('/template/font/PTSans-Regular.eot?#iefix') format('embedded-opentype'),
        url('/template/font/PTSans-Regular.woff2') format('woff2'),
        url('/template/font/PTSans-Regular.woff') format('woff'),
        url('/template/font/PTSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/template/font/PTSans-BoldItalic.eot');
    src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'),
        url('/template/font/PTSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
        url('/template/font/PTSans-BoldItalic.woff2') format('woff2'),
        url('/template/font/PTSans-BoldItalic.woff') format('woff'),
        url('/template/font/PTSans-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/template/font/PTSans-Italic.eot');
    src: local('PT Sans Italic'), local('PTSans-Italic'),
        url('/template/font/PTSans-Italic.eot?#iefix') format('embedded-opentype'),
        url('/template/font/PTSans-Italic.woff2') format('woff2'),
        url('/template/font/PTSans-Italic.woff') format('woff'),
        url('/template/font/PTSans-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/template/font/PTSans-Bold.eot');
    src: local('PT Sans Bold'), local('PTSans-Bold'),
        url('/template/font/PTSans-Bold.eot?#iefix') format('embedded-opentype'),
        url('/template/font/PTSans-Bold.woff2') format('woff2'),
        url('/template/font/PTSans-Bold.woff') format('woff'),
        url('/template/font/PTSans-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}



/* ——— Сброс и базовые стили ——— */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: PT Sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2d3748;
    line-height: 1.6;
    background-color: #fff;
}

/* ——— Базовые компоненты ——— */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #007bff;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #0069d9;
}
button:active {
    transform: translateY(1px);
}

input, select, textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

/* ——— Навигация ——— */
.main-nav {
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin: 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 60px;
}
.nav-logo img {
    height: 50px;
    display: block;
}
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    align-items: center;
}
.nav-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-menu img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}
.nav-menu a:hover,
.nav-menu a.active {
    background-color: #e9f5ff;
    color: #007bff;
}

/* ——— Футер ——— */
.footer {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.footer a {
    color: #007bff;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

/* ——— Главная страница: модули ——— */
.home-modules {
    padding: 40px 16px;
    background-color: #f9f9fb;
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.modules-container {
    max-width: 960px;
    width: 100%;
    text-align: center;
}
.page-title {
    font-size: 28px;
    margin-bottom: 32px;
    color: #222;
    font-weight: 600;
}
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.module-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.module-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 50px;
}
.module-icon svg {
    width: 100%;
    height: 100%;
}
.module-card h2 {
    font-size: 20px;
    margin: 12px 0;
    color: #1a1a1a;
}
.module-card p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin-top: 8px;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 32px;
    flex-wrap: wrap;
}
.badge {
    background: #e6f4ea; /* мягкий зелёный фон */
    color: #137333;       /* тёмно-зелёный текст */
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.4;
}

/* ——— FAQ ——— */
.faq-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eee;
    width: 100%;
}
.faq-title {
    font-size: 22px;
    color: #222;
    margin-bottom: 16px;
    text-align: center;
}
.faq-list {
    list-style: none;
    padding: 0;
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}
.faq-list li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    color: #444;
}
.faq-list a {
    color: #007bff;
    text-decoration: none;
}
.faq-list a:hover {
    text-decoration: underline;
}

.custom-alert-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.custom-alert-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}


/* ——— Адаптив ——— */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }
    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        gap: 16px;
    }
}


/* ——— Авторизация ——— */
.auth-btn {
  color: #012058 !important;
}
.auth-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}
.auth-modal-content .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}
.auth-modal-content input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.auth-modal-content button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
}
.auth-modal-content button:hover {
    background: #0056b3;
}
.auth-status {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}

.logout-icon{
    background: none;
}
.logout-icon:hover{
    background: #c0c0c0;
}

/* ——— Мобильная навигация (изолированная) ——— */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ——— Мобильная навигация ——— */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    background: none;
}
.mobile-nav-toggle:hover {
    background: none;
}

.mobile-nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация: бургер → крестик */
.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Мобильное меню */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.mobile-nav-menu a,
#mobile-authNavPlaceholder {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid #f1f1f1;
}
.mobile-nav-menu a:last-child,
#mobile-authNavPlaceholder {
    border-bottom: none;
}
.mobile-nav-menu a img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.mobile-nav-menu a:hover,
.mobile-nav-active {
    background-color: #f0f8ff;
    color: #007bff;
}

/* Адаптив: мобильные устройства */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
    }

    /* Скрываем десктопное меню ТОЛЬКО на мобильных */
    .nav-menu {
        display: none !important;
    }

    /* Показываем мобильное меню, если открыто */
    .mobile-nav-menu.open {
        display: flex;
    }

    /* Немного уменьшаем логотип для компактности */
    .nav-logo img {
        height: 44px;
    }
}
