/* style.css */

/* Регулярный шрифт (400) */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/open-sans-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/open-sans-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Жирный шрифт (700) */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/open-sans-latin-ext-700-normal.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/open-sans-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
    --primary: #0056b3;
    --primary-hover: #004494;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --gray: #64748b;
    --white: #fff;
    --dark: #1e293b;
}

body { 
    font-family: 'Open Sans', sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f7f6; 
    color: var(--text-dark);
}



/* --- Глобальные параметры сетки --- */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
    box-sizing: border-box;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* Базовый класс для всех колонок */
[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

/* --- Сетка Mobile First (col-) --- */
.col-1  { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3  { flex: 0 0 25%; max-width: 25%; }
.col-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6  { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* --- Средние экраны (MD >= 768px) --- */
@media (min-width: 768px) {
    .col-md-3  { flex: 0 0 25%; max-width: 25%; }
    .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6  { flex: 0 0 50%; max-width: 50%; }
    .col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* --- Большие экраны (LG >= 992px) --- */
@media (min-width: 992px) {
    .col-lg-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3  { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6  { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-9 { flex: 0 0 auto; width: 75%;}
}
/* ===============================
   Bootstrap-like col-sm grid
   Breakpoint: ≥576px
   =============================== */

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

/* Активируем сетку с 576px */
@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 8.333333%;  max-width: 8.333333%; }
  .col-sm-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-sm-3  { flex: 0 0 25%;        max-width: 25%; }
  .col-sm-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-sm-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-sm-6  { flex: 0 0 50%;        max-width: 50%; }
  .col-sm-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-sm-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-sm-9  { flex: 0 0 75%;        max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-sm-12 { flex: 0 0 100%;       max-width: 100%; }
}


/* --- Отступы Margin Bottom (mb-) --- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.flex-grow-1 {
  flex-grow: 1 !important;
}
/* --- Интеграция с вашей структурой calc-grid --- */
.category-section {
    margin-bottom: 3rem; /* Аналог mb-5 */
}

/* Автоматическая сетка на основе CSS Grid для карточек */
.calc-grid {
    display: grid;
    gap: 20px;
    /* На мобилках в 1 колонку, от 768px в 2, от 1100px в 3 */
    grid-template-columns: 1fr;
}
.align-items-center {align-items: center;}

@media (min-width: 768px) {
    .calc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .calc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Навигация */
header { background: var(--white); border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 1000; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); text-decoration: none; }

.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-item { margin-left: 20px; }
.nav-link { text-decoration: none; color: var(--dark); font-weight: 400; font-size: 14px; transition: 0.3s; }
.nav-link:hover { color: var(--primary); }

.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; }

@media (max-width: 991px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none; flex-direction: column; position: absolute; top: 100%; left: 0; 
        width: 100%; background: var(--white); border-top: 1px solid #ddd; padding: 10px 0;
    }
    .nav-menu.active { display: flex; }
    .nav-item { margin: 15px 20px; }
}

/* Карточки и форматирование */

/* Улучшенные стили для главной */
.hero-bg {
    background: linear-gradient(135deg, #0056b3 0%, #003d7a 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}
.hero-bg h1 { font-size: 2.5rem; margin-bottom: 10px; }
.hero-bg p { font-size: 1.1rem; opacity: 0.9; }


.icon-box {
    width: 60px; height: 60px;
    background: var(--light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin: 0 auto 15px;
    transition: 0.3s;
}
/* Стили секций и сетки калькуляторов */
.category-section {
    margin-bottom: 50px;
}

.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.category-section-header h2 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--dark);
}

.cat-more-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.cat-more-link:hover {
    text-decoration: underline;
}


/* Сама карточка */
.calc-card {
    display: flex;
    align-items: flex-start;
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.calc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.card-icon {
    font-size: 1.75rem;
    margin-right: 15px;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
}

.card-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .category-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
.site-footer {
    background: #333;
    color: #fff;
    padding: 30px 0 20px 0;
    margin-top: 30px;
}

.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-text {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 25px;
    margin-top: 40px;
    color: #999;
    font-size: 0.85rem;
}

.text-center { text-align: center; }
.seo-content-wrapper {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.seo-content-wrapper h2 {
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.seo-content-wrapper h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.seo-content-wrapper h3 {
    margin-top: 25px;
    font-weight: 600;
}

.seo-content-wrapper ul li {
    margin-bottom: 10px;
}
.form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
    background-color: #fff;
}

.form-label {
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dark);
    display: block;
}
/* Контейнер для кастомных инпутов */
.custom-control {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

/* Скрываем реальный инпут */
.custom-control input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Общий стиль для кружка (radio) и квадрата (checkbox) */
.checkmark {
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid var(--border-color);
    margin-right: 12px;
    transition: 0.2s;
    display: inline-block;
    position: relative;
}

/* Радио - делаем круглым */
.radio-control .checkmark {
    border-radius: 50%;
}

/* Чекбокс - делаем скругленные углы */
.checkbox-control .checkmark {
    border-radius: 6px;
}

/* Эффект при наведении */
.custom-control:hover input ~ .checkmark {
    border-color: var(--primary);
}

/* Состояние "Выбрано" */
.custom-control input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Белая точка внутри радио или галочка в чекбоксе */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-control input:checked ~ .checkmark:after {
    display: block;
}

/* Стили точки для Radio */
.radio-control .checkmark:after {
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Стили галочки для Checkbox */
.checkbox-control .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* Контейнер для формулы */
.formula-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 15px;
}

/* Стиль самой строки формулы */
.math-row {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 8px;
}

/* Выделение переменных (наклонный и жирный шрифт) */
.math-var {
    font-style: italic;
    font-weight: 700;
    color: #0056b3; /* Твой основной синий цвет */
}

/* Описание переменных под формулой */
.math-desc {
    font-size: 0.85rem;
    color: #64748b;
}

/* Для дробей (если понадобятся) */
.math-fraction {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    margin: 0 5px;
}

.math-num { border-bottom: 1px solid #1e293b; display: block; padding: 0 5px; }
.math-den { display: block; padding: 0 5px; }
/* Контейнер для адаптивности таблиц */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Основной стиль таблицы */
.seo-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Заголовки */
.seo-table thead th {
    background-color: #f8fafc;
    color: var(--dark);
    font-weight: 700;
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

/* Ячейки */
.seo-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    vertical-align: middle;
}

/* Чередование строк (зебра) */
.seo-table tbody tr:nth-of-type(even) {
    background-color: #fcfdfe;
}

/* Подсветка строки при наведении */
.seo-table tbody tr:hover {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* Стиль для жирного выделения в первой колонке (опционально) */
.seo-table td:first-child {
    font-weight: 600;
}

/* Стиль для числовых данных (можно добавить класс .text-end) */
.text-end {
    text-align: right;
}
/* Layout & Containers */
.calc-section { padding-bottom: 3rem; }
.calc-card-input { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 15px; 
    border: 1px solid var(--border-color); 
}
.calc-card-result { 
    background: var(--dark); 
    color: var(--white); 
    padding: 30px; 
    border-radius: 15px; 
    position: sticky; 
    top: 20px; 
}

/* Results Display */
.result-box-main { 
    background: rgba(255,255,255,0.05); 
    padding: 25px; 
    border-radius: 12px; 
    text-align: center; 
    margin-bottom: 1.5rem; 
}
.result-label-upper { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    opacity: 0.8; 
    display: block; 
}
.result-value-big { 
    font-size: 3rem; 
    font-weight: 800; 
    color: #4ade80; 
}
.result-value-big small { font-size: 1.2rem; }

/* Options Area */
.options-panel { 
    background: var(--bg-light); 
    padding: 20px; 
    border-radius: 10px; 
}

/* Info Blocks */
.info-block-blue { 
    background: #f0f9ff; 
    padding: 25px; 

    border-left: 4px solid var(--primary); 
    margin-top: 30px; 
}

.input-wrapper {position: relative;}
.seo-wrapper {
    background: #fff; padding: 40px; border-radius: 15px; border: 1px solid #edf2f7; line-height: 1.8;
}
.vat-rates-grid {display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;}
@media (max-width: 768px) {
    .seo-wrapper {
    background: #fff; padding: 15px; border-radius: 15px; border: 1px solid #edf2f7; line-height: 1.8;
    
}
.calc-card-input {padding: 15px;}
.vat-rates-grid {grid-template-columns: none;}
}
/* Контейнер формулы */
.formula-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 15px 0;
}

/* Название переменной слева */
.formula-var {
    color: var(--primary);
    font-style: italic;
}

/* Контейнер самой дроби */
.fraction {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    align-items: center;
    text-align: center;
}

/* Числитель (линия под ним) */
.numerator {
    border-bottom: 2px solid var(--dark);
    padding: 0 10px 2px 10px;
    width: 100%;
}

/* Знаменатель */
.denominator {
    padding: 2px 10px 0 10px;
}
/* Основной класс кнопки */
.btn-calc-primary {
    background-color: #0d6efd; /* Фирменный синий */
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 30px;
    border: none;
    border-radius: 8px; /* Скругление углов */
    cursor: pointer;
    transition: all 0.3s ease; /* Плавность всех эффектов */
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.15); /* Мягкая тень */
    display: inline-block;
    text-align: center;
    width: 100%; /* На мобильных на всю ширину */
}

/* Эффект при наведении */
.btn-calc-primary:hover {
    background-color: #0b5ed7; /* Чуть темнее при наведении */
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.25); /* Тень становится глубже */
    transform: translateY(-1px); /* Легкий подъем вверх */
}

/* Эффект при нажатии */
.btn-calc-primary:active {
    background-color: #0a58ca;
    transform: translateY(0); /* Возвращается на место */
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

/* Состояние фокуса для доступности (TAB) */
.btn-calc-primary:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.4); /* «Кольцо» вокруг кнопки */
}
/* Small table (table-sm) */
.table-sm th,
.table-sm td {
  padding: 0.45rem 0.6rem;
}

/* Bordered table (table-bordered) */
.table-bordered {
  border: 1px solid #e5e7eb;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #e5e7eb;
}

/* Vertical alignment (align-middle) */
.align-middle th,
.align-middle td {
  vertical-align: middle;
}

/* Header styling */
.table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  white-space: nowrap;
}

/* Body rows */
.table tbody td {
  color: #1f2937;
}

/* Zebra (optional but recommended for SEO tables) */
.table tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* Responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile readability */
@media (max-width: 768px) {
  .table {
    font-size: 0.9rem;
  }
}
/* ===== FLEX CONTAINER ===== */
.d-flex {
  display: flex;
}

/* ===== JUSTIFY CONTENT ===== */
.justify-content-start {
  justify-content: flex-start;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-around {
  justify-content: space-around;
}

.justify-content-evenly {
  justify-content: space-evenly;
}
/* =========================
   Tables
========================= */

.table-sm {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
}

.table-sm th,
.table-sm td {
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.08);
}

.table-sm thead th {
  background: #f1f5f9;
  font-weight: 800;
  color: #0f172a;
}

.table-sm tbody tr:nth-child(even) {
  background: #fafafa;
}


/* Vertical alignment like Bootstrap */
.align-middle th,
.align-middle td {
  vertical-align: middle;
}


/* =========================
   Box / cards
========================= */

.box-lite {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.box-lite p {
  margin-bottom: 6px;
}

.box-lite p:last-child {
  margin-bottom: 0;
}


/* =========================
   Notes / hints
========================= */

.note {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
}



.note code {
  background: #eef2ff;
  color: #3730a3;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.82rem;
}
/* Контейнер правой колонки */
.poradnik-main {
    padding-left: 1.5rem; /* Отступ от сайдбара */
}

/* Заголовки */
.poradnik-main h1 {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--dark);
    margin-bottom: 1rem;
}

.poradnik-main h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

/* Вводный текст (Lead) */
.poradnik-main .lead-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 2.5rem;
}

/* Основной текст статьи */
.poradnik-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155; /* Оптимальный цвет для долгого чтения */
}

.poradnik-body p {
    margin-bottom: 1.5rem;
}

/* Стилизация таблиц в контенте */
.poradnik-table-wrapper {
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #edf2f7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.poradnik-table-wrapper table {
    margin-bottom: 0;
}

.poradnik-table-wrapper thead th {
    background: #f8fafc;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 1rem;
    border-bottom: 2px solid #edf2f7;
}

.poradnik-table-wrapper td {
    padding: 1rem;
    vertical-align: middle;
}

/* Блок "Экспертный совет" или "Важное" */
.poradnik-alert {
    background: #eff6ff;
    border-left: 5px solid var(--primary);
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    margin: 2.5rem 0;
}

.poradnik-alert strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* Адаптивность для мобильных */
@media (max-width: 991px) {
    .poradnik-main {
        padding-left: 0; /* Убираем отступ, когда колонки встают друг под друга */
    }
    
    .poradnik-main h1 {
        font-size: 2rem;
    }
}
/* Контейнер сайдбара */
.poradnik-sidebar {
    background: transparent;
}

/* Настройка заголовков категорий в сайдбаре */
.poradnik-sidebar h6 a {
    transition: color 0.2s ease;
    display: block;
}

.poradnik-sidebar h6 a:hover {
    color: var(--primary) !important;
}

/* Стилизация списка ссылок (Bootstrap list-group) */
.poradnik-sidebar .list-group-item {
    font-size: 0.95rem;
    color: var(--dark);
    background-color: #fff;
    transition: all 0.2s ease;
    border-left: 3px solid transparent !important; /* Резервируем место под индикатор */
}

/* Эффект при наведении */
.poradnik-sidebar .list-group-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
    padding-left: 1.25rem !important; /* Небольшой сдвиг вправо */
}

/* Активный пункт меню */
.poradnik-sidebar .list-group-item.active {
    background-color: #eff6ff; /* Очень светло-голубой */
    color: var(--primary);
    border-left: 3px solid var(--primary) !important; /* Акцентная полоса слева */
    font-weight: 600;
}

/* Иконка шеврона */
.poradnik-sidebar .list-group-item i {
    transition: transform 0.2s ease;
    color: var(--gray);
    opacity: 0.5;
}

.poradnik-sidebar .list-group-item:hover i {
    transform: translateX(3px);
    opacity: 1;
    color: var(--primary);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 991.98px) {
    .poradnik-sidebar.sticky-top {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 2rem;
    }
}
/* Text utilities */
.text-uppercase { text-transform: uppercase; }
.text-muted { color: #6c757d; }
.text-decoration-none { text-decoration: none; }
.text-reset { color: inherit !important; }
.small { font-size: 0.875rem; }

/* Font weight */
.fw-bold { font-weight: 700; }

/* Padding */
.ps-3 { padding-left: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.me-1 { margin-right: 0.25rem; }

/* Border */
.border-0 { border: 0 !important; }

/* Shadows */
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }

/* Border radius */
.rounded { border-radius: 0.375rem; }

/* Position */
.sticky-top { position: sticky; top: 0; z-index: 1020; }

/* List group */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
}

.list-group-flush .list-group-item {
    border-width: 0 0 1px;
}

.list-group-item-action:hover {
    color: #495057;
    background-color: #f8f9fa;
}
/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ UTILITY КЛАССЫ
   (Только те, которых нет в style.css)
   Добавьте в конец style.css
   ======================================== */

/* ===== TEXT UTILITIES ===== */
.text-uppercase { 
    text-transform: uppercase; 
}

.text-lowercase { 
    text-transform: lowercase; 
}

.text-capitalize { 
    text-transform: capitalize; 
}

.text-muted { 
    color: #6c757d !important; 
}

.text-decoration-none { 
    text-decoration: none !important; 
}

.text-decoration-underline { 
    text-decoration: underline !important; 
}

.text-reset { 
    color: inherit !important; 
}

.small, small { 
    font-size: 0.875rem; 
    font-weight: 400; 
}

.text-nowrap { 
    white-space: nowrap !important; 
}

/* ===== FONT WEIGHT ===== */
.fw-light { 
    font-weight: 300 !important; 
}

.fw-normal { 
    font-weight: 400 !important; 
}

.fw-bold { 
    font-weight: 700 !important; 
}

.fw-bolder { 
    font-weight: 800 !important; 
}

/* ===== PADDING UTILITIES ===== */
/* Padding Start (Left) */
.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 1.5rem !important; }
.ps-5 { padding-left: 3rem !important; }

/* Padding End (Right) */
.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-4 { padding-right: 1.5rem !important; }
.pe-5 { padding-right: 3rem !important; }

/* Padding Top */
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

/* Padding Bottom */
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

/* Padding Y (Vertical) */
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* Padding X (Horizontal) */
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }

/* Padding All */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* ===== MARGIN UTILITIES ===== */
/* Margin Start (Left) */
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-5 { margin-left: 3rem !important; }
.ms-auto { margin-left: auto !important; }

/* Margin End (Right) */
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }
.me-auto { margin-right: auto !important; }

/* Margin Top */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }

/* Margin Y (Vertical) */
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* Margin X (Horizontal) */
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
.mx-5 { margin-left: 3rem !important; margin-right: 3rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Margin All */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

/* ===== BORDER UTILITIES ===== */
.border { 
    border: 1px solid #dee2e6 !important; 
}

.border-0 { 
    border: 0 !important; 
}

.border-top { 
    border-top: 1px solid #dee2e6 !important; 
}

.border-end { 
    border-right: 1px solid #dee2e6 !important; 
}

.border-bottom { 
    border-bottom: 1px solid #dee2e6 !important; 
}

.border-start { 
    border-left: 1px solid #dee2e6 !important; 
}

.border-top-0 { 
    border-top: 0 !important; 
}

.border-end-0 { 
    border-right: 0 !important; 
}

.border-bottom-0 { 
    border-bottom: 0 !important; 
}

.border-start-0 { 
    border-left: 0 !important; 
}

/* ===== BORDER RADIUS ===== */
.rounded { 
    border-radius: 0.375rem !important; 
}

.rounded-0 { 
    border-radius: 0 !important; 
}

.rounded-1 { 
    border-radius: 0.25rem !important; 
}

.rounded-2 { 
    border-radius: 0.375rem !important; 
}

.rounded-3 { 
    border-radius: 0.5rem !important; 
}

.rounded-circle { 
    border-radius: 50% !important; 
}

.rounded-pill { 
    border-radius: 50rem !important; 
}

.rounded-top { 
    border-top-left-radius: 0.375rem !important; 
    border-top-right-radius: 0.375rem !important; 
}

.rounded-end { 
    border-top-right-radius: 0.375rem !important; 
    border-bottom-right-radius: 0.375rem !important; 
}

.rounded-bottom { 
    border-bottom-right-radius: 0.375rem !important; 
    border-bottom-left-radius: 0.375rem !important; 
}

.rounded-start { 
    border-bottom-left-radius: 0.375rem !important; 
    border-top-left-radius: 0.375rem !important; 
}

/* ===== SHADOWS ===== */
.shadow-none { 
    box-shadow: none !important; 
}

.shadow-sm { 
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; 
}

.shadow { 
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; 
}

.shadow-lg { 
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; 
}

/* ===== POSITION UTILITIES ===== */
.position-static { 
    position: static !important; 
}

.position-relative { 
    position: relative !important; 
}

.position-absolute { 
    position: absolute !important; 
}

.position-fixed { 
    position: fixed !important; 
}

.position-sticky { 
    position: sticky !important; 
}

.sticky-top { 
    position: sticky; 
    top: 0; 
    z-index: 1020; 
}

/* ===== DISPLAY UTILITIES ===== */
.d-none { 
    display: none !important; 
}

.d-inline { 
    display: inline !important; 
}

.d-inline-block { 
    display: inline-block !important; 
}

.d-block { 
    display: block !important; 
}

.d-grid { 
    display: grid !important; 
}

.d-table { 
    display: table !important; 
}

.d-table-row { 
    display: table-row !important; 
}

.d-table-cell { 
    display: table-cell !important; 
}

.d-inline-flex { 
    display: inline-flex !important; 
}

/* ===== WIDTH & HEIGHT ===== */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* ===== LIST GROUP (Bootstrap-style) ===== */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: 0.375rem;
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.list-group-item:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
}

.list-group-item + .list-group-item {
    border-top-width: 0;
}

.list-group-item.active {
    z-index: 2;
    color: #fff;
    background-color: var(--primary, #0056b3);
    border-color: var(--primary, #0056b3);
}

.list-group-item-action {
   /* width: 100%;*/
    color: #495057;
    text-align: inherit;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    z-index: 1;
    color: #495057;
    text-decoration: none;
    background-color: #f8f9fa;
}

.list-group-flush {
    border-radius: 0;
}

.list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}

.list-group-flush > .list-group-item:last-child {
    border-bottom-width: 0;
}

/* ===== GAP UTILITIES ===== */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* ===== OVERFLOW UTILITIES ===== */
.overflow-auto { 
    overflow: auto !important; 
}

.overflow-hidden { 
    overflow: hidden !important; 
}

.overflow-visible { 
    overflow: visible !important; 
}

.overflow-scroll { 
    overflow: scroll !important; 
}

/* ===== VISIBILITY ===== */
.visible { 
    visibility: visible !important; 
}

.invisible { 
    visibility: hidden !important; 
}

/* ===== OPACITY ===== */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ===== CURSOR ===== */
.cursor-pointer { 
    cursor: pointer !important; 
}

.cursor-default { 
    cursor: default !important; 
}

.cursor-not-allowed { 
    cursor: not-allowed !important; 
}

/* ===== USER SELECT ===== */
.user-select-all { 
    user-select: all !important; 
}

.user-select-auto { 
    user-select: auto !important; 
}

.user-select-none { 
    user-select: none !important; 
}

/* ===== RESPONSIVE DISPLAY UTILITIES ===== */
@media (max-width: 575.98px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
}

/* ===== Z-INDEX UTILITIES ===== */
.z-n1 { z-index: -1 !important; }
.z-0 { z-index: 0 !important; }
.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }
/* Выравнивание содержимого по центру (вертикально) */
.align-middle {
    vertical-align: middle !important;
}

/* Удаление всех стандартных границ таблицы */
.table-borderless, 
.table-borderless th, 
.table-borderless td, 
.table-borderless thead, 
.table-borderless tbody, 
.table-borderless tfoot {
    border: 0 !important;
}

/* Контейнер для скругления углов и тени */
.table-responsive.rounded-4 {
    border-radius: 12px !important;
    /*overflow: hidden;  Чтобы фон заголовка не вылезал за скругления */
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

/* Стили для строк и интерактивности */
.table-borderless tbody tr {
    transition: background-color 0.2s ease;
}

.table-borderless tbody tr:hover {
    background-color: #f8f9fa; /* Легкая подсветка строки при наведении */
}
/* Базовые параметры таблицы */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #334155; /* Тёмно-серый цвет текста для лучшей читаемости */
    vertical-align: top;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem; /* Оптимальный размер для табличных данных */
}

/* Стили заголовков (thead) */
.table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* Стили ячеек (td) */
.table tbody td {
    padding: 1rem 0.75rem;
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}

/* Убираем нижнюю границу у последней строки, чтобы не двоилась с рамкой контейнера */
.table tbody tr:last-child td {
    border-bottom: 0;
}

/* Адаптивность текста в ячейках */
.table th, .table td {
    white-space: normal; /* Разрешаем перенос текста */
    word-break: break-word;
}
.list-unstyled {list-style: none; padding-inline-start: initial;}
.nav-item {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  padding: 15px;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-radius: 8px;
  z-index: 1000;
}

.dropdown-menu li {
  list-style: none;
  margin-bottom: 8px;
}

.dropdown-menu li:last-child {
  margin-bottom: 0;
}

.dropdown-menu a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
}

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