:root {
    --burgundy: #800020;
    --burgundy-dark: #600018;
    --burgundy-soft: rgba(128, 0, 32, 0.04);
    --bg-site: #fcfcfc;
    --text-dark: #1a1a1a;
    --text-muted: #4b5563;
    --border-color: #e5e7eb;
    --green-success: #22c55e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Страховка от горизонтального переполнения на мобильном: если где-то на
   странице длинный текст, картинка без max-width или фикс-элемент вылезет
   за пределы вьюпорта — страница ужмёт это, а не разъедется вбок. Не влияет
   на нормальную вёрстку, так как горизонтальный скролл сайту нигде не нужен.
   ВАЖНО: этот overflow-x нужен ТОЛЬКО на html, не на body — если задать его
   ещё и на body, по спецификации CSS браузер автоматически трактует
   overflow-y как auto (когда overflow-x задан, а overflow-y — нет), и body
   неожиданно становится самостоятельным скролл-контейнером. А position:
   sticky считает точку прилипания относительно ближайшего скролл-контейнера —
   получится, что все sticky-элементы на сайте (например строка вариантов на
   training.html) вместо реального вьюпорта браузера начинают ориентироваться
   на body, и прилипание перестаёт работать. Отсюда и не трогаем body. */
html { overflow-x: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg-site); color: var(--text-dark); line-height: 1.5; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.header { background: #fff; border-bottom: 3px solid var(--burgundy); position: sticky; top: 0; z-index: 1000; height: 70px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-content { display: flex; justify-content: space-between; align-items: center; height: 100%; }

/* LOGO */
.logo { display: flex !important; align-items: center !important; text-decoration: none !important; }
.logo img { width: 30px; height: 30px; margin-right: 12px !important; }
.logo-text { font-weight: 900; font-size: 24px; color: var(--text-dark); text-decoration: none !important; }
.part-2 { color: var(--burgundy); }

/* DESKTOP NAV */
.nav-main.desktop-only { display: flex; align-items: center !important; height: 100%; }
.nav-menu { display: flex !important; list-style: none; gap: 20px; align-items: center; margin-top: 30px; }
.nav-link { text-decoration: none !important; color: var(--text-dark) !important; font-size: 13px; font-weight: 700; text-transform: uppercase; }

/* DROPDOWN */
.dropdown-parent { position: relative; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 8px; min-width: 220px; z-index: 1100; padding: 10px 0; }
.dropdown-parent:hover .dropdown-content { display: block; }
.dropdown-content a { display: block; padding: 10px 20px; text-decoration: none !important; color: var(--text-muted); font-size: 14px; border-bottom: 1px solid #f3f4f6; }

/* FOOTER */
footer { background: #111; color: #fff; padding: 60px 0; text-align: center; margin-top: 40px; }
.logo-footer { font-weight: 900; font-size: 24px; display: block; margin-bottom: 10px; color: #fff; text-decoration: none; }

/* MOBILE MENU - скрыто по умолчанию */
.nav-main.mobile-nav { display: none; }

@media (max-width: 900px) {
    .nav-main.desktop-only { display: none !important; }
    .logo-text { font-size: 20px; }

    .mobile-menu-toggle { display: flex !important; flex-direction: column; justify-content: space-between; width: 30px; height: 20px; background: transparent; border: none; cursor: pointer; z-index: 2147483647 !important; }
    .mobile-menu-toggle span { display: block; width: 100%; height: 3px; background-color: var(--burgundy); border-radius: 2px; }

    /* Мобильное меню */
    .nav-main.mobile-nav {
        display: block !important; 
        position: fixed !important; 
        top: 0; 
        right: 0;
        width: 60% !important; 
        height: 100vh; 
        background: #fff; 
        z-index: 2147483646 !important;
        padding: 60px 0 20px !important; 
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: hidden;
        border-left: 5px solid var(--burgundy); 
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); 
        overflow-y: auto;
    }

    .nav-main.mobile-nav.active { 
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    /* Список мобильного меню */
    .nav-main.mobile-nav .nav-menu { 
        display: flex !important; 
        flex-direction: column !important; 
        align-items: stretch !important;
        width: 100% !important; 
        padding: 0 15px !important; 
        gap: 8px !important; 
        list-style: none;
    }

    .nav-main.mobile-nav .nav-link {
        display: flex !important; 
        width: 100% !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        padding: 14px 15px !important; 
        background: #f8f9fa !important; 
        border-radius: 10px !important;
        align-items: center; 
        justify-content: flex-start; 
        text-decoration: none !important;
        font-weight: 800;
        color: #000;
    }

    .nav-main.mobile-nav .nav-link i { margin-right: 12px; font-style: normal; min-width: 20px; }

    .mobile-close-btn {
        margin: 20px 15px 0;
        padding: 12px;
        background: var(--burgundy-soft);
        color: var(--burgundy);
        border: 1px solid var(--burgundy);
        border-radius: 8px;
        font-weight: 800;
        text-align: center;
        cursor: pointer;
    }

    /* Затемнение фона */
    body.menu-open::after { 
        content: ''; 
        position: fixed; 
        top: 0; left: 0; 
        width: 100%; height: 100%; 
        background: rgba(0,0,0,0.7); 
        z-index: 2147483640 !important; 
        display: block !important; 
        cursor: pointer;
    }
}
/* Фиксы для Google Translate */
.skiptranslate {
    display: none !important;
}

.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
    position: static !important;
}

/* Скрываем стандартную панель Google */
.goog-te-gadget {
    display: none !important;
    visibility: hidden !important;
}

#google_translate_element {
    display: none !important;
}

/* Убираем отступ, который добавляет Google Translate */
body > .skiptranslate {
    display: none !important;
}
/* Выделенная карточка для "Поиск работы" */
.feature-card.highlight-card {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.feature-card.highlight-card:hover {
    background: #c8e6c9;
    border-color: #81c784;
}

/* ДОПОЛНИТЕЛЬНЫЙ CSS ДЛЯ КОМПАКТНЫХ КНОПОК */

.variant-nav-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 16px;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.variant-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted, #4b5563);
  white-space: nowrap;
}

.variant-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.variant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-dark, #1a1a1a);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid var(--border-color, #e5e7eb);
  flex-shrink: 0;
}

.variant-btn:hover {
  background: var(--burgundy-soft, rgba(128, 0, 32, 0.04));
  border-color: var(--burgundy, #800020);
  transform: translateY(-1px);
}

.variant-btn.active {
  background: var(--burgundy, #800020);
  color: #ffffff;
  border-color: var(--burgundy, #800020);
  box-shadow: 0 2px 8px rgba(128, 0, 32, 0.25);
}

.variant-btn.active:hover {
  background: var(--burgundy-dark, #600018);
  border-color: var(--burgundy-dark, #600018);
  transform: translateY(-1px);
}

/* АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ - ЕЩЕ МЕНЬШЕ */
@media (max-width: 768px) {
  .variant-btn {
    min-width: 22px;
    height: 22px;
    font-size: 10px;
    border-radius: 4px;
    border-width: 1.5px;
    padding: 0 3px;
  }
  
  .variant-nav {
    gap: 3px;
  }
  
  .variant-nav-wrapper {
    gap: 6px;
    padding: 8px 0 12px;
  }
  
  .variant-label {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .variant-btn {
    min-width: 18px;
    height: 18px;
    font-size: 8px;
    border-radius: 3px;
    border-width: 1.5px;
    padding: 0 2px;
  }
  
  .variant-nav {
    gap: 2px;
  }
  
  .variant-nav-wrapper {
    gap: 4px;
    padding: 6px 0 10px;
  }
  
  .variant-label {
    font-size: 10px;
  }
}
/* Блокировка скролла (без оверлеев и индикаторов) */
body.scroll-locked,
html.scroll-locked {
    overflow: hidden !important;
    height: 100% !important;
    position: relative;
}
/* ====================
   ХЛЕБНЫЕ КРОШКИ (универсальные, кроме городских — там свой стиль city.css)
   ==================== */
.breadcrumbs {
    max-width: 1100px;
    margin: 14px auto 0;
    padding: 0 20px;
    font-size: 13px;
    color: var(--text-muted, #4b5563);
    box-sizing: border-box;
    overflow: hidden;
}
.breadcrumbs a {
    color: var(--text-muted, #4b5563);
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: var(--burgundy, #800020);
    text-decoration: underline;
}
.breadcrumbs .sep {
    margin: 0 6px;
    color: #cbd5e1;
}
.breadcrumbs .current {
    color: var(--text-dark, #1a1a1a);
    font-weight: 600;
    /* Длинный текст (например "Ошибки — вариант 16") не должен растягивать
       страницу вбок на мобильном — переносим по словам, а не расширяемся. */
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Значок "База вопросов актуальна на [дата]" — inc/actuality-badge.php,
   подключается на главной, странице вариантов, обучении и экзамене.
   Специально display:flex (не inline-flex) + width:fit-content вместо
   margin:auto на строчном элементе — раньше margin:auto по горизонтали
   у inline-flex ничего не делал, и реальное положение зависело от того,
   обернула ли конкретная страница бейдж в свой text-align:center или
   нет — отсюда разнобой между страницами. Теперь бейдж центрируется
   сам, независимо от того, во что он обёрнут снаружи. */
.actuality-badge {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 40px);
    margin: 10px auto 0;
    padding: 6px 14px;
    box-sizing: border-box;
    background: #eafaf0;
    border: 1px solid #b8e6c9;
    border-radius: 20px;
    font-size: 12.5px;
    color: #166534;
    font-weight: 500;
    text-align: left;
}
.actuality-badge-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}
.actuality-badge strong {
    font-weight: 700;
}
@media (max-width: 480px) {
    .actuality-badge {
        font-size: 11.5px;
        padding: 5px 12px;
    }
}

/* ============================================
   Статический SEO-текст под тренажёром
   ============================================ */
.seo-content {
    background: #fafafa;
    border-top: 1px solid #ececec;
    padding: 36px 0 44px;
}

.seo-content-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 16px;
}

.seo-content h2 {
    font-size: 24px;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 14px;
}

.seo-content h3 {
    font-size: 18px;
    color: #800020;
    margin: 26px 0 8px;
}

.seo-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 12px;
}

.seo-content .seo-lead {
    font-size: 17px;
    color: #444;
}

.seo-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.seo-faq-item {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.seo-faq-item summary {
    cursor: pointer;
    padding: 13px 44px 13px 16px;
    font-weight: 700;
    font-size: 15px;
    color: #800020;
    list-style: none;
    position: relative;
}

.seo-faq-item summary::-webkit-details-marker { display: none; }

.seo-faq-item summary::after {
    content: "\25BC";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    transition: transform .2s ease;
}

.seo-faq-item[open] summary::after { transform: translateY(-50%) rotate(180deg); }

.seo-faq-item p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 15px;
}

.seo-cta {
    margin-top: 26px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    font-size: 15px;
}

.seo-cta a { color: #800020; font-weight: 700; text-decoration: none; }
.seo-cta a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .seo-content { padding: 26px 0 32px; }
    .seo-content h2 { font-size: 20px; }
    .seo-content h3 { font-size: 17px; }
    .seo-content p { font-size: 15px; }
}

/* ============================================================
   Блок методологии на about.html (E-A-T: откуда берутся данные)
   ============================================================ */
.methodology-section {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.method-item {
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid #800020;
    border-radius: 10px;
    padding: 18px 20px;
}

.method-item h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #800020;
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-item h3 i {
    font-size: 15px;
    opacity: .85;
}

.method-item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #333;
}

@media (min-width: 900px) {
    .methodology-section {
        grid-template-columns: 1fr 1fr;
    }
    .method-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}


/* ============================================================
   Карточки статей на poleznoe.html
   ============================================================ */
.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(128, 0, 32, .12);
}

.article-card h3 {
    color: #800020;
}

/* ============================================================
   Заголовки h2 внутри статей — не общий центрированный
   .section-title, а компактный, левый, для текстового потока.
   ============================================================ */
.article-h2 {
    text-align: left;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 36px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-h2 i {
    color: #800020;
    font-size: 19px;
}

/* Первый заголовок в статье — без лишнего отступа сверху */
.about-hero + .article-h2,
.about-hero + img + .article-h2 {
    margin-top: 8px;
}

/* Ссылки внутри текста статьи — в стилистике сайта, не браузерный синий */
.about-container p a,
.article-h2 + p a {
    color: #800020;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(128, 0, 32, 0.3);
    transition: border-color 0.2s;
}

.about-container p a:hover {
    border-bottom-color: #800020;
}

/* ============================================================
   FAQ статей в мягкой карточке-подложке — как на index.html
   ============================================================ */
.faq-box {
    background: rgba(128, 0, 32, 0.04);
    border: 1px solid rgba(128, 0, 32, 0.08);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 8px;
}

.faq-box .faq-item:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    .faq-box { padding: 16px; border-radius: 14px; }
}

/* ============================================================
   Цветные блоки-врезки внутри статей — та же палитра,
   что у карточек на poleznoe.html (.info-card).
   ============================================================ */
.callout {
    border-radius: 14px;
    padding: 18px 20px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.65;
}

.callout strong { font-weight: 700; }

.callout-peach { background: #fef3e8; border: 1px solid #ffe0b5; color: #7a4a12; }
.callout-blue  { background: #e8f0fe; border: 1px solid #d0e0ff; color: #1f4c73; }
.callout-green { background: #e8fef0; border: 1px solid #c0f0d0; color: #1e5c37; }

.callout i { margin-right: 8px; }

@media (max-width: 600px) {
    .article-h2 { font-size: 19px; margin: 28px 0 12px; }
    .callout { padding: 14px 16px; font-size: 14px; }
}

.price-table {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.price-table table { width: 100%; border-collapse: collapse; }
.price-table thead tr { background: #800020; color: #fff; }
.price-table th { padding: 12px 14px; text-align: left; font-weight: 700; }
.price-table th:last-child, .price-table td:last-child { text-align: right; }
.price-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color, #e5e7eb); }
.price-table tr:last-child td { border-bottom: none; }
.price-table td.price { font-weight: 700; }

.article-cta {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-left: 4px solid #800020;
    border-radius: 10px;
    padding: 22px;
    margin: 32px 0;
}

.article-cta h2 { margin-top: 0; color: #800020; font-size: 19px; }
.article-cta p { margin-bottom: 16px; }
.article-cta p:last-child { margin-bottom: 0; }
.article-cta a { color: #800020; font-weight: 700; text-decoration: none; }
.article-cta a:hover { text-decoration: underline; }

.article-disclaimer {
    font-size: 13px;
    color: #777;
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 16px;
    margin-top: 24px;
}

.ad-container { margin: 28px 0; min-height: 1px; }

@media (max-width: 600px) {
    .price-table th, .price-table td { padding: 10px 12px; font-size: 14px; }
    .article-cta { padding: 16px; }
}
   что на index.html и documenty-dlya-patenta.html: div.faq-item
   с onclick-переключением класса .active, а не <details>.
   ============================================================ */
.faq-list .faq-item {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.faq-list .faq-q {
    padding: 18px 20px;
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    gap: 12px;
}

.faq-list .faq-q span {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: #800020;
}

.faq-list .faq-item.active .faq-q { color: #800020; }
.faq-list .faq-item.active .faq-q span { transform: rotate(180deg); }

.faq-list .faq-a {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: 0.35s;
    color: var(--text-muted, #4b5563);
    font-size: 15px;
    line-height: 1.65;
}

.faq-list .faq-item.active .faq-a {
    padding-bottom: 18px;
    max-height: 500px;
}
