/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */
 
/* 1. Наш чертёжный шрифт ГОСТ для заголовков */
@font-face {
    font-family: 'MyGOST';
    src: url('../fonts/gostai.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 2. Объявляем шрифт для прямого логотипа */
@font-face {
    font-family: 'MyGOST_Logo';
    src: url('../fonts/gostlogo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 3. Подключаем технологичный Fira Sans (Рабочий URL через стабильный Google CDN) */
@import url('https://googleapis.com');


/* === ТОТАЛЬНОЕ ПРИМЕНЕНИЕ ГОСТ КО ВСЕМ ЗАГОРОВКАМ НА САЙТЕ === */
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body .content-item h1, html body .content-item h2, html body .content-item h3,
html body [data-blades] h1, html body [data-blades] h2, html body [data-blades] h3,
.display-font, #ingress h1, main h1, main h2, main h3 {
    font-family: 'MyGOST', sans-serif !important;
    font-weight: bold !important;       
    letter-spacing: 0.03em !important;   
    line-height: 1.3 !important;
    text-transform: uppercase !important; 
}

/* Отдельно увеличиваем размер для h2 (ТУТ ЕСТЬ ЧТО ПОЧИТАТЬ), чтобы он стал заметнее */
html body h2, html body .content-item h2, main h2 {
    font-size: 1.8rem !important;        
    margin-top: 2rem !important;         
    margin-bottom: 1rem !important;      
}


/* === АДАПТИВНЫЙ ОСНОВНОЙ ТЕХНИЧЕСКИЙ ТЕКСТ === */
/* Базовый вариант для светлой темы (день) */
html body, html body p, html body li, html body span, html body td, html body th {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    color: #2d3748 !important; 
}

/* Обычные ссылки внутри текста в светлой теме (день) */
html body p a, html body li a, html body td a {
    color: #3182ce !important; /* Стандартный синий цвет */
    text-decoration: underline !important;
}


/* === АВТОМАТИЧЕСКОЕ ПЕРЕКЛЮЧЕНИЕ ДЛЯ ТЁМНОЙ ТЕМЫ (НОЧЬ) === */
html[data-theme="dark"] body, 
html[data-theme="dark"] p, 
html[data-theme="dark"] li, 
html[data-theme="dark"] span, 
html[data-theme="dark"] td, 
html[data-theme="dark"] th {
    color: #f7fafc !important; 
}

/* ИСПРАВЛЕНИЕ ССЫЛОК В ТЁМНОЙ ТЕМЕ: Делаем их белыми и заметными */
html[data-theme="dark"] p a, 
html[data-theme="dark"] li a, 
html[data-theme="dark"] td a,
html[data-theme="dark"] .alert a {
    color: #ffffff !important;             /* Строго белый цвет в темноте */
    text-decoration: underline !important; /* Четкое подчеркивание */
    opacity: 0.9 !important;
}

/* Эффект при наведении на ссылку в тёмной теме */
html[data-theme="dark"] p a:hover, 
html[data-theme="dark"] li a:hover, 
html[data-theme="dark"] td a:hover,
html[data-theme="dark"] .alert a:hover {
    opacity: 1 !important;
    color: #cbd5e0 !important; 
}


/* === ПОЛНОЕ ИСПРАВЛЕНИЕ ВЕРХНЕГО МЕНЮ === */
/* Назначаем технологичный шрифт и правильный цвет всем пунктам меню в светлой теме */
html body header nav a, 
html body .navbar a, 
html body #navigation a {
    font-family: 'Fira Sans', -apple-system, sans-serif !important;
    font-weight: 500 !important;
    color: #4a5568 !important; 
}

/* Цвет при наведении мышки в светлой теме */
html body header nav a:hover, 
html body .navbar a:hover, 
html body #navigation a:hover {
    color: #1a202c !important;
}

/* Принудительно делаем неактивные кнопки меню светлыми в ночном режиме */
html[data-theme="dark"] body header nav a:not(.active), 
html[data-theme="dark"] body .navbar a:not(.active), 
html[data-theme="dark"] body #navigation a:not([class*="active"]) {
    color: #cbd5e0 !important; 
}

/* Цвет при наведении мышки в тёмной теме */
html[data-theme="dark"] body header nav a:not(.active):hover, 
html[data-theme="dark"] body .navbar a:not(.active):hover, 
html[data-theme="dark"] body #navigation a:not([class*="active"]):hover {
    color: #ffffff !important; 
}

/* АКТИВНАЯ КНОПКА: Белый текст для светлой темы (на тёмной подложке) */
html body header nav .active a, 
html body header nav a.active, 
html body .navbar .active a, 
html body .navbar a.active, 
html body #navigation [class*="active"] a,
html body [data-blades] [class*="active"] a,
html body .active-page a {
    font-family: 'Fira Sans', -apple-system, sans-serif !important;
    font-weight: 500 !important;
    color: #ffffff !important; 
}

/* АКТИВНАЯ КНОПКА В ТЁМНОЙ ТЕМЕ: Тёмный текст (на белой подложке) */
html[data-theme="dark"] body header nav .active a, 
html[data-theme="dark"] body header nav a.active, 
html[data-theme="dark"] body .navbar .active a, 
html[data-theme="dark"] body .navbar a.active, 
html[data-theme="dark"] body #navigation [class*="active"] a,
html[data-theme="dark"] body [data-blades] [class*="active"] a,
html[data-theme="dark"] body .active-page a {
    color: #1a202c !important; 
}


/* === МАГИЯ ДЛЯ ТЕКСТОВОГО ЛОГОТИПА ALIGET === */
html body header .logo, 
html body #header .logo a, 
html body .navbar-brand a {
    font-size: 0 !important; 
    color: transparent !important;
    text-decoration: none !important;
}

/* СТРОГИЙ ПРЯМОЙ ЛОГОТИП ALIGET (Адаптирован под обе темы) */
html body header .logo a::before,
html body #header .logo a::before,
html body .navbar-brand a::before {
    content: "ALIGET" !important;
    font-family: 'MyGOST_Logo', sans-serif !important; 
    font-style: normal !important;  
    font-weight: bold !important;
    font-size: 2.2rem !important;  
    color: #000000 !important;     
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important; 
    display: inline-block !important;
}

/* Переключаем цвет логотипа на белый, когда активен ночной режим */
html[data-theme="dark"] header .logo a::before,
html[data-theme="dark"] #header .logo a::before,
html[data-theme="dark"] .navbar-brand a::before {
    color: #ffffff !important; 
}

html body header .logo svg, 
html body header .logo img {
    display: none !important;
}


/* === АДАПТИВНОСТЬ ФОРМЫ ДЛЯ МОБИЛЬНЫХ ТЕЛЕФОНОВ === */
@media (max-width: 768px) {
    /* На экранах смартфона вместо 3-х колонок делаем 1 колонку */
    #body-wrapper form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}
