/* ==========================================================================
   CRITICAL CSS — инлайнится в <head> через includes/header.php
   Только то, что нужно до загрузки styles.min.css (шапка, базовая типографика).

   ИСТОЧНИК ПРАВДЫ. Правь этот файл, потом собери min-версию:
       ./build.sh
   или вручную:
       npx --yes csso assets/css/critical.css -o assets/css/critical.min.css

   Имена переменных обязаны совпадать со схемой в styles.css.
   Не путать: здесь --bg-card (#2d2d2d), в styles.css --card-bg (rgba белого 3%).
   Это РАЗНЫЕ переменные, значение у них тоже разное.

   Важно: header.php делает str_replace('/assets/', $base_path.'/assets/'),
   поэтому пути к шрифтам тут должны начинаться с /assets/.
   ========================================================================== */

:root {
    /* Основные цвета — те же имена, что в styles.css */
    --primary-color: #6B9BB8;
    --primary-hover: #8bb0cc;
    --bg-color: #222222;
    --bg-light: #2a2a2a;
    --text-color: #f0f0f0;
    --text-secondary: #aaa;
    --text-muted: #777;
    --border-color: #333;
    --border-light: #444;

    /* Только для critical — в styles.css таких нет */
    --accent: #52B352;
    --accent-hover: #66c966;
    --bg-card: #2d2d2d;

    /* Типографика и метрики — только для critical */
    --font: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size: 16px;
    --line-height: 1.6;

    /* Размеры — имена совпадают со styles.css, значения те же */
    --container-width: 1200px;
    --border-radius: 4px;
    --border-radius-lg: 8px;

    --transition: 0.2s ease;
}

/* Gilroy: одно и то же начертание объявлено на 100 и 300.
   В стилях встречаются font-weight 100, 200 и 300 — без второго объявления
   4 места с весом 300 и одно с 200 откатывались бы на regular 400. */
@font-face {
    font-family: 'Gilroy';
    src: url('/assets/fonts/gilroy-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('/assets/fonts/gilroy-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('/assets/fonts/gilroy-thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('/assets/fonts/gilroy-thin.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ===== СБРОС ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== ШАПКА ===== */
.main-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-image {
    width: auto;
    height: 60px;
}

.slogan {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 200px;
    line-height: 1.3;
}

/* ===== ДЕСКТОП-НАВИГАЦИЯ ===== */
.main-nav {
    width: 100%;
    order: 3;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ===== КОНТАКТЫ В ШАПКЕ ===== */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.contact-icons {
    display: flex;
    gap: 8px;
}

.contact-icon-link {
    color: var(--text-secondary);
    font-size: 20px;
    transition: color var(--transition);
}

.phone-number {
    color: var(--text-color);
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-color);
    padding: 8px;
    cursor: pointer;
}

/* ===== КОНТЕНТ ===== */
.content-page {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.content-container {
    padding: 30px 0;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.content-main {
    min-height: 60vh;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .header-contacts .contact-icons { display: none; }
    .mobile-toggle { display: block; }
}

@media (max-width: 480px) {
    .slogan { display: none; }
}
