/* --- 1. ШРИФТЫ И ОБЩИЕ ПЕРЕМЕННЫЕ --- */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f9fafb;
    --text-color: #1f2937;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --footer-bg: #111827;
}

/* --- 2. БАЗОВЫЕ СТИЛИ --- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0; padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 3. ШАПКА И НАВИГАЦИЯ --- */
header {
    /* Фиксация */
    position: -webkit-sticky; /* Для поддержки Safari */
    position: sticky;
    top: 0;
    
    /* Слой поверх остального контента */
    z-index: 1000; 
    
    /* Оформление */
    background-color: #ffffff; 
    border-bottom: 1px solid #e2e8f0;
    
    /* Плавная тень при скролле (можно сделать через JS или оставить всегда) */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    
    /* Плавность для будущих эффектов */
    transition: all 0.3s ease;
	background: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Опционально: если при скролле вы хотите немного уменьшить высоту шапки */
header.scrolled {
    padding-top: 5px;
    padding-bottom: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a { color: white; text-decoration: none; }

/* Мобильное меню */
.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.burger-btn span { width: 25px; height: 3px; background: white; border-radius: 2px; }

.mobile-menu {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100%;
    background: white; z-index: 2000; transition: 0.4s; padding: 20px;
}
.mobile-menu.active { right: 0; }
.mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1500; display: none;
}
.mobile-overlay.active { display: block; }
/* Мобильная навигация — ссылки */
.mobile-nav-links a {
    text-decoration: none;
    color: #1f2937 !important; /* Делаем текст темно-серым, чтобы он был виден на белом фоне */
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.2s;
}

.mobile-nav-links a:hover {
    color: var(--primary-color) !important;
}

/* Заголовки разделов в мобильном меню (если есть) */
.mobile-nav-links h4 {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px 0;
}

/* Группировка в мобильном меню */
.nav-group {
    margin-bottom: 30px;
}

/* Заголовок категории (родитель) */
.nav-group h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8; /* Приглушенный цвет для заголовка */
}

.nav-group h4 a {
    color: #94a3b8 !important;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-group h4 a:hover {
    color: var(--primary-color) !important;
}

/* Список подкатегорий (дети) */
.nav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #f1f5f9; /* Линия иерархии слева */
    margin-left: 4px;
}

.nav-group li {
    margin: 0;
}

.nav-group li a {
    display: block;
    padding: 10px 20px !important; /* Отступ слева создает иерархический сдвиг */
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color) !important;
    border-bottom: none !important; /* Убираем старые линии */
    transition: all 0.2s;
}

.nav-group li a:hover {
    color: var(--primary-color) !important;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}
/* --- ОСНОВНОЕ МЕНЮ С ВЫПАДАЮЩИМИ СПИСКАМИ --- */

.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 25px; /* Увеличенный отступ для десктопа */
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}

.main-nav > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* 1. Родительский элемент должен быть отправной точкой */
.dropdown {
    position: relative;
}

/* 2. Скрываем меню и настраиваем его позицию */
.dropdown-content {
    display: none; /* Скрыто по умолчанию */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1000;
    list-style: none; /* Явно убираем маркеры */
    margin: 0;
    /* Важно: перебиваем flex родителя, чтобы ссылки шли одна под другой */
    flex-direction: column; 
}

/* 3. Элементы внутри должны идти сверху вниз (колонкой) */
.dropdown-content li {
    display: block;
    width: 100%;
}

.dropdown-content a {
    color: #1f2937 !important; /* Темный текст */
    padding: 12px 20px;
    display: block;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}

/* 4. Показываем ТОЛЬКО при наведении на родителя (.dropdown) */


.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--primary-color) !important;
}
/* Выпадающая панель */


.dropdown-content li {
    width: 100%;
}



/* Показ меню при наведении */
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInMenu 0.2s ease-out;
}

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

/* Прячем десктопное меню на мобилках */
@media (max-width: 850px) {
    .main-nav { display: none; }
    .burger-btn { display: flex; }
}

@media (max-width: 850px) {
    .category-section-header { display: flex;
    align-items: center;
    justify-content: space-between;
	flex-direction: column;}
   .cat-more-link {margin-bottom: 20px;}
}
.cat-more-link {text-decoration: none;}
.cat-more-link:hover {text-decoration: underline;}
.category-section-header {display: flex;
    align-items: center;
    justify-content: space-between;}

/* --- 4. ХЛЕБНЫЕ КРОШКИ --- */
.breadcrumbs {
    margin-bottom: 25px;
    font-size: 14px;
    display: flex;
    gap: 8px;
    color: var(--text-muted);
    align-items: center;
}
.breadcrumbs a { color: var(--primary-color); text-decoration: none; }
.breadcrumbs span.separator { color: #cbd5e1; }
.calc-header {text-align: left; padding: 40px 0;}
/* --- 5. КАРТОЧКИ (СЕТКА) --- */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.calc-card {
    background: var(--card-bg);
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}
.calc-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.08);
}
.card-icon {
    width: 48px; height: 48px; background: #eff6ff;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.calc-card:hover .card-icon { background: var(--primary-color); color: white; }

/* --- 6. ВИДЖЕТ КАЛЬКУЛЯТОРА (ФОРМЫ И РЕЗУЛЬТАТЫ) --- */
.salary-calc-widget {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.calc-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

/* Поля ввода */
.form-group { margin-bottom: 20px; }
.kd-label { display: block; margin-bottom: 10px; font-weight: 600; color: #475569; }
.input-wrapper { position: relative; width: 100%; }

.calc-input {
    width: 100%; padding: 14px 16px; padding-right: 45px;
    border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 1.25rem; font-weight: 600; font-family: inherit;
    transition: 0.2s; outline: none;
}
.calc-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

.currency-label {
    position: absolute; right: 18px; top: 50%;
    transform: translateY(-50%); font-weight: 700; color: #94a3b8;
}

/* Переключатели и Опции */
.calc-tabs {
    display: flex; background: #f1f5f9; padding: 5px; border-radius: 12px; margin-bottom: 25px; word-break: break-all;
}
.tab-item { flex: 1; cursor: pointer; text-align: center; }
.tab-item input { display: none; }
.tab-item span { display: block; padding: 12px; border-radius: 10px; font-weight: 600; color: #64748b; }
.tab-item input:checked + span { background: #fff; color: var(--primary-color); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.options-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    margin: 20px 0; padding: 20px; background: #f8fafc; border-radius: 15px;
}
.check-item { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }

/* Кнопка */
.btn-calculate {
    width: 100%; padding: 16px; border: none; border-radius: 12px;
    background: var(--primary-color); color: #fff;
    font-size: 18px; font-weight: 700; cursor: pointer; transition: 0.3s;
}
.btn-calculate:hover { background: var(--primary-hover); transform: translateY(-2px); }

/* Результаты */
.summary-card {
    background: #f8fafc; padding: 20px; border-radius: 15px;
    text-align: center; margin-bottom: 15px; border: 1px solid #e2e8f0;
}
.summary-card.accent { background: #eff6ff; border-color: #bfdbfe; border-left: 5px solid var(--primary-color); }
.summary-value { font-size: 32px; font-weight: 800; color: var(--text-color); }
.summary-card.accent .summary-value { color: var(--primary-color); }

/* Таблица */
.result-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.result-table th { text-align: left; padding: 12px; background: #f8fafc; color: #64748b; font-size: 12px; text-transform: uppercase; }
.result-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; }
.result-table tr.row-group-title td { background: #fdfdfd; font-weight: bold; color: #94a3b8; font-size: 12px; }
.val-bold { font-weight: 700; text-align: right; }

/* --- 7. SEO КОНТЕНТ --- */
.salary-seo-content, .mrp-seo-content {
    margin-top: 60px; line-height: 1.8; color: #475569;
    max-width: 1200px; margin-left: auto; margin-right: auto;
}
.salary-seo-content h2 { font-size: 24px; color: #1e293b; margin-bottom: 20px; }
.salary-seo-content h3 { font-size: 18px; color: #1e293b; margin-top: 30px; }
/* --- СТИЛИ ТАБЛИЦ В SEO БЛОКАХ --- */

.values-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.values-table th {
    background: var(--primary-color);
    color: #ffffff;
    padding: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.values-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 15px;
}

/* Эффект чередования строк (Зебра) */
.values-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.values-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Для мобильных устройств — разрешаем горизонтальный скролл если не влезает */
@media (max-width: 600px) {
    .values-box {
        padding: 15px;
        overflow-x: auto;
    }
    .values-table th, .values-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
}
.info-grid-text { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px 0; }

.example-box, .values-box {
    background: #f8fafc; border-radius: 16px; padding: 30px;
    border-left: 5px solid var(--primary-color); margin: 40px 0;
}
.example-table { width: 100%; border-collapse: collapse; }
.example-table td { padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.example-table td:last-child { text-align: right; font-weight: 700; }
.total-row td { border-bottom: none; font-size: 1.2rem; color: var(--primary-color); padding-top: 20px; }

/* --- 8. ФУТЕР --- */
footer {
    background-color: var(--footer-bg); color: #9ca3af;
    padding: 80px 0 40px; margin-top: 100px;
}
.footer-container { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px; }
.footer-menu h4 { color: white; text-transform: uppercase; font-size: 14px; margin-bottom: 25px; }
.footer-menu ul { list-style: none; padding: 0; }
.footer-menu li { margin-bottom: 12px; }
.footer-menu a { color: #9ca3af; text-decoration: none; transition: 0.2s; }
.footer-menu a:hover { color: white; transform: translateX(5px); display: inline-block; }

/* --- 9. АДАПТИВНОСТЬ --- */
@media (max-width: 850px) {
    .calc-main-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .info-grid-text { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .burger-btn { display: flex; }
	.salary-calc-widget {padding: 15px;}
}
/* Адаптивность для всех калькуляторов */
@media (max-width: 768px) {
    /* Основная сетка виджета: делаем одну колонку вместо двух */
    .calc-main-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Контейнер для дат начала и конца (теперь в колонку) */
    .calc-inputs-side div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Делаем все инпуты и кнопки на всю ширину */
    .calc-input, 
    .input-wrapper, 
    .btn-calculate {
        width: 100% !important;
    }

    /* Настройка итоговой карточки на мобильном */
    .calc-summary-side {
        padding-left: 0 !important;
        border-left: none !important;
        border-top: 1px solid #e2e8f0;
        padding-top: 20px;
    }

    /* Увеличиваем шрифт результата для читаемости */
    .summary-value {
        font-size: 28px !important;
    }

    /* Делаем табы (5-дневка/6-дневка) более удобными для нажатия пальцем */
    .calc-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-item {
        text-align: center;
        padding: 12px !important;
    }
}
/* Находим контейнер вашего мобильного меню */
.mobile-menu {
    /* Ограничиваем высоту меню высотой экрана за вычетом шапки */
    max-height: calc(100vh - 70px); 
    
    /* Включаем вертикальную прокрутку */
    overflow-y: auto;
    
    /* Плавный скролл для iOS */
    -webkit-overflow-scrolling: touch;
    
    /* Чтобы пункты не прилипали к нижнему краю при скролле */
    padding-bottom: 40px;
}

/* Настройка внешнего вида скроллбара (опционально, для красоты) */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
blockquote {
    margin: 30px 0;
    padding: 25px 30px;
    background-color: #f8fafc; /* Очень мягкий серо-голубой фон */
    border-left: 6px solid #3b82f6; /* Яркий акцентный синий слева */
    border-radius: 0 16px 16px 0; /* Скругление только справа */
    position: relative;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #334155;
    font-style: italic; /* Курсив для ощущения цитаты/справки */
}

/* Добавляем иконку "инфо" или кавычки через псевдоэлемент (опционально) */
blockquote::before {
    content: "“";
    position: absolute;
    left: 10px;
    top: -10px;
    font-size: 60px;
    color: #3b82f6;
    opacity: 0.15;
    font-family: serif;
}

/* Стилизация жирного текста внутри цитаты */
blockquote strong {
    color: #1e40af; /* Более темный синий для акцентов */
    font-style: normal; /* Убираем курсив для жирного текста */
    font-weight: 800;
}

/* Стилизация подписи автора или источника (если есть тег <cite>) */
blockquote cite {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #64748b;
    font-style: normal;
    font-weight: 600;
}
blockquote cite::before {
    content: "— ";
}

/* Адаптивность */
@media (max-width: 600px) {
    blockquote {
        padding: 20px;
        font-size: 1rem;
        margin: 20px 0;
    }
}
/* ===== Minimal Bootstrap-like grid (for row/col + g-*) ===== */

/* optional: container (если используешь .container как у Bootstrap) */

/* breakpoints как у Bootstrap 5 */
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* row */
.row {
  display: flex;
  flex-wrap: wrap;
  /* Bootstrap использует отрицательные margin, чтобы компенсировать padding колонок */
  margin-right: -12px;
  margin-left: -12px;
}

/* базовые колонки */
[class^="col-"], [class*=" col-"] {
  position: relative;
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

/* col-12 */
.col-12 { flex: 0 0 auto; width: 100%; }

/* если вдруг понадобится */
.col-6 { flex: 0 0 auto; width: 50%; }
.col-4 { flex: 0 0 auto; width: 33.3333333333%; }
.col-5 { flex: 0 0 auto; width: 41.6666666667%; }
.col-7 { flex: 0 0 auto; width: 58.3333333333%; }

/* md breakpoint (>=768px) */
@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-5 { flex: 0 0 auto; width: 41.6666666667%; }
  .col-md-7 { flex: 0 0 auto; width: 58.3333333333%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* ===== gutters (g-*) как у Bootstrap (через CSS variables) ===== */
.row {
  --bs-gutter-x: 24px; /* дефолт Bootstrap ~1.5rem */
  --bs-gutter-y: 0px;
  margin-right: calc(var(--bs-gutter-x) / -2);
  margin-left:  calc(var(--bs-gutter-x) / -2);
}

.row > * {
  padding-right: calc(var(--bs-gutter-x) / 2);
  padding-left:  calc(var(--bs-gutter-x) / 2);
  margin-top: var(--bs-gutter-y);
}

/* g-0..g-5 (тебе нужен g-3, но даю весь набор) */
.g-0, .gx-0 { --bs-gutter-x: 0px; }
.g-0, .gy-0 { --bs-gutter-y: 0px; }

.g-1, .gx-1 { --bs-gutter-x: 6px; }
.g-1, .gy-1 { --bs-gutter-y: 6px; }

.g-2, .gx-2 { --bs-gutter-x: 12px; }
.g-2, .gy-2 { --bs-gutter-y: 12px; }

.g-3, .gx-3 { --bs-gutter-x: 16px; }
.g-3, .gy-3 { --bs-gutter-y: 16px; }

.g-4, .gx-4 { --bs-gutter-x: 24px; }
.g-4, .gy-4 { --bs-gutter-y: 24px; }

.g-5, .gx-5 { --bs-gutter-x: 48px; }
.g-5, .gy-5 { --bs-gutter-y: 48px; }
