/* ==========================================================================
   components.css — КОМПОНЕНТЫ И ПАТТЕРНЫ
   Карточки/контейнеры, кнопки, сетки, вкладки, таблицы, формы, соц.сети и т.п.
   Каждый блок снабжён комментарием где используется.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Контейнеры и базовые карточки (используются на внутренних страницах)
   -------------------------------------------------------------------------- */
.container {
    text-align: center;
    background: var(--color-surface);
    backdrop-filter: blur(var(--surface-blur));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    max-width: 1400px;
    width: 100%;
    box-shadow: var(--shadow-1);
}

.container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-2));
    -webkit-background-clip: text;

}

.container p {
    margin-bottom: 1.5rem;
    color: var(--color-fg-muted);
    font-size: 1.1rem;
}

/* Поля ввода в контейнерах (поиск/домен/и т.п.) */
.container input[type="text"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(74, 158, 255, .3);
    margin-bottom: 1.5rem;
    background: var(--color-surface-2);
    color: var(--color-fg);
    font-size: 1rem;
    transition: all .3s ease;
    backdrop-filter: blur(10px);
}

.container input[type="text"]::placeholder {
    color: rgba(255, 255, 255, .5);
}

.container input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(74, 158, 255, .3);
}

.hidden {
    display: none;
}

/* --------------------------------------------------------------------------
   Главная: hero-секция и плитки меню
   -------------------------------------------------------------------------- */
.hero-section {
    text-align: center;
    max-width: var(--container-max);
    width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;

    /* Градиент */
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-2), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* ← вот этой строки не хватает */

    /* Анимация свечения */
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(74, 158, 255, .3));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(74, 158, 255, .6));
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, .8);
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--color-fg-dim);
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Сетка и плитки меню (главная и /tools) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.menu-tile {
    background: var(--color-surface);
    backdrop-filter: blur(var(--surface-blur));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--color-fg);
    font-size: 1.2rem;
    font-weight: 600;
    transition: all .3s ease;
    cursor: pointer;
    z-index: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.menu-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(74, 158, 255, .1), rgba(0, 212, 255, .1));
    opacity: 0;
    transition: opacity .3s ease;
}

.menu-tile:hover {
    transform: translateY(-10px);
    border-color: rgba(74, 158, 255, .5);
    box-shadow: 0 20px 40px rgba(74, 158, 255, .2);
}

.menu-tile:hover::before {
    opacity: 1;
}

.menu-tile-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-2));
    -webkit-background-clip: text;
    display: inline-block; /* чтобы transform работал нормально */
    transition: transform 0.3s ease;

}

.menu-tile:hover .menu-tile-icon {
    transform: rotate(15deg) scale(1.2); /* лёгкий поворот по часовой стрелке и небольшое увеличение иконки*/
}

.menu-tile-title {
    position: relative;
    z-index: 1;
}

/* Сетка инструментов /tools (более плотная) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.tools-grid .menu-tile {
    padding: 1.2rem .8rem;
    min-height: 90px;
    font-size: .95rem;
    border-radius: 12px;
}

.tools-grid .menu-tile-icon {
    font-size: 1.8rem;
    margin-bottom: .4rem;
}

@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Отделение секций категорий тонкой линией */
.category-section {
    padding: 1rem 0;
    /*border-bottom: 3px solid var(--color-border-subtle);*/
}

.category-section:last-child {
    border-bottom: none; /* последняя секция без линии */
}

/* Акцент под заголовком категории */
.category-title {
    display: inline-block;
    font-size: 1.8rem;
    margin-bottom: .5rem;
    position: relative;
}

.category-title::after {
    content: "";
    display: block;
    width: 96px; /* длина линии */
    height: 3px; /* толщина */
    background: var(--color-accent);
    margin-top: .4rem;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-2));
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin: .5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left .5s ease;
}

/* Группа действий инструмента: основная кнопка + доп.кнопки */
.tool-actions {
    display: flex;
    align-items: center;
    justify-content: center; /* центрируем группу */
    gap: 0.75rem; /* расстояние между кнопками */
    flex-wrap: wrap; /* на узких экранах переносятся в новую строку */
    margin-top: 10px;
}

/* Внутри группы убираем внешние margin у .btn (они и так разнесены через gap) */
.tool-actions .btn {
    margin: 0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, .4);
}

.btn:hover::before {
    left: 100%;
}

@media (max-width: 480px) {
    /* Полноширинные кнопки только в явных местах */
    .cta-actions .btn,
    .home-search .btn,
    .form-actions .btn {
        width: 100%;
        margin: .5rem 0;
    }
}

/* --------------------------------------------------------------------------
   Вкладки (DNS lookup/trace и т.п.)
   -------------------------------------------------------------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: 0 .5rem;
}

.tab-button {
    flex: 1 1 auto;
    padding: .7rem 1.2rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(74, 158, 255, .3);
    background: rgba(30, 30, 47, .8);
    color: #fff;
    text-align: center;
    white-space: nowrap;
    max-width: 200px;
    position: relative;
    overflow: hidden;
    transition: all .3s ease;
}

.tab-button:hover,
.tab-button.active {
    background: rgba(74, 158, 255, .35);
    border-color: rgba(74, 158, 255, .7);
    box-shadow: 0 8px 16px rgba(74, 158, 255, .2);
    transform: translateY(-2px);
}

.tab-button::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .3s ease;
    border-radius: inherit;
}

.tab-button:hover::before, .tab-button.active::before {
    background: linear-gradient(45deg, rgba(74, 158, 255, .1), rgba(0, 212, 255, .1));
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --------------------------------------------------------------------------
   Таблицы (включая «складывающиеся» для мобилок)
   -------------------------------------------------------------------------- */
/* Fallback-обёртка для горизонтального скролла */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Базовая таблица */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1rem;
    color: #fff;
    background: rgba(255, 255, 255, .03);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th, td {
    border: 1px solid var(--color-border);
    padding: 1rem;
    text-align: left;
}

th {
    background: rgba(74, 158, 255, .1);
    font-weight: 600;
    color: var(--color-accent);
}

td {
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    vertical-align: top;
}

tr:hover td {
    background: rgba(74, 158, 255, .05);
}

/* «Складывающаяся» таблица (на <768px строки становятся карточками) */
.table--stacked {
    width: 100%;
    border-collapse: collapse;
}

.table--stacked th, .table--stacked td {
    border: 1px solid var(--color-border);
    padding: 1rem;
    vertical-align: top;
    background: transparent;
}

.table--stacked th {
    font-weight: 700;
}

@media (max-width: 768px) {
    .table--stacked thead {
        display: none;
    }

    .table--stacked, .table--stacked tbody, .table--stacked tr, .table--stacked td {
        display: block;
        width: 100%;
    }

    .table--stacked tr {
        margin-bottom: .75rem;
        border: 1px solid rgba(74, 158, 255, .2);
        border-radius: 10px;
        overflow: hidden;
        background: var(--color-surface);
        box-shadow: var(--shadow-1);
    }

    .table--stacked td {
        border: none;
        border-bottom: 1px solid rgba(74, 158, 255, .15);
        padding-left: 50%;
        position: relative;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        word-wrap: anywhere;
    }

    .table--stacked td:last-child {
        border-bottom: none;
    }

    .table--stacked td::before {
        content: attr(data-label);
        position: absolute;
        top: 0;
        left: 0;
        min-width: 40%;
        max-width: 48%;
        padding: 1rem;
        font-weight: 600;
        color: var(--color-accent);
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        border-right: 1px solid rgba(74, 158, 255, .15);
        background: rgba(74, 158, 255, .07);
    }

    @media (max-width: 400px) {
        .table--stacked td {
            padding-left: 40%;
        }

        .table--stacked td::before {
            min-width: 35%;
            max-width: 45%;
        }
    }
    @media (max-width: 340px) {
        .table--stacked td {
            padding-left: 36%;
        }

        .table--stacked td::before {
            min-width: 32%;
            max-width: 42%;
        }
    }
}

/* Текстовые блоки DNS (длинные строки) */
.dns-text, .txt-record {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   Формы (контакты) и сообщения о статусе
   -------------------------------------------------------------------------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.contact-form .form-label {
    font-weight: 500;
    color: #fff;
    text-align: left;
    width: 100%;
}

.contact-form input, .contact-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(74, 158, 255, .3);
    background: var(--color-surface-2);
    color: #fff;
    font-size: 1rem;
    line-height: 1.4;
    transition: all .3s ease;
}

.contact-form input {
    height: 56px;
    line-height: 1;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(74, 158, 255, .3);
}

/* Ошибки валидации */
.contact-form .error,
.contact-form input.error,
.contact-form textarea.error {
    border-color: #ff4a4a !important;
    box-shadow: 0 0 10px rgba(255, 74, 74, .3);
}

.error-message {
    color: #ff4a4a;
    font-size: .85rem;
    margin-top: .25rem;
    display: none;
}

/* Обязательные поля */
.contact-form .required-field::after {
    content: " *";
    color: #ff4a4a;
}

/* Сообщения статуса */
.loading {
    opacity: .7;
    pointer-events: none;
}

.error {
    color: var(--color-error);
    background: rgba(255, 107, 107, .1);
    border: 1px solid rgba(255, 107, 107, .3);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.success {
    color: var(--color-success);
    background: rgba(81, 207, 102, .1);
    border: 1px solid rgba(81, 207, 102, .3);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   Социальные иконки
   -------------------------------------------------------------------------- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a img {
    width: 40px;
    height: 40px;
    transition: transform .3s ease;
}

.social-links a:hover img {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Группы чекбоксов (выбор типов DNS-записей)
   -------------------------------------------------------------------------- */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    transform: scale(1);
    cursor: pointer;
    accent-color: var(--color-accent);
}

/* Блок текстового описания под инструментом */
.tool-description {
    max-width: var(--container-max, 1200px);
    margin: 2rem auto 0;
    padding: 1.25rem 1.5rem;
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 14px);
    backdrop-filter: blur(8px);
    line-height: 1.6;
}

.tool-description__title {
    margin: 0 0 .75rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.tool-description__body > p {
    margin: .6rem 0;
}

.tool-description__body ul,
.tool-description__body ol {
    margin: .6rem 0 .6rem 1.25rem;
}

.tool-description__body code {
    padding: .15rem .35rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .95em;
}

/* Вертикальный стек внутри main: панель инструмента, результат, описание — один под другим */
.page-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* расстояние между блоками */
    width: 100%;
}


/* Врезки для вводных текстов (hero + категории) */
.section-intro {
    text-align: left;
    max-width: 900px;
    margin: 1.25rem auto 2rem;
    padding: 1rem 1.25rem;
    background: rgba(20, 20, 35, .55);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    line-height: 1.65;
    color: var(--color-fg-dim);
}

/* герой-врезка на всю ширину контейнера */
.section-intro--full {
    max-width: none; /* снимаем ограничение 900px */
    width: 100%;
    margin: 1.25rem 0 2rem; /* убираем auto по бокам */
}

.section-intro .intro-body {
    text-align: justify; /* выравниваем строки по ширине */
    text-justify: inter-word; /* распределяем пробелы между словами */
    hyphens: auto; /* переносы слов (работает при lang="ru") */
    overflow-wrap: anywhere; /* на всякий случай для длинных токенов/URL */
    text-align-last: left; /* последняя строка остаётся слева (не растягивается) */
}

.section-intro .intro-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: .1rem;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-2));
    -webkit-background-clip: text;
}

.section-intro .intro-body {
    margin: 0;
}

/* Короткая врезка для описания категорий */
.category-intro {
    text-align: left;
    margin: .25rem 0 1.25rem;
    padding: .75rem 1rem;
    border-left: 4px solid var(--color-accent);
    background: rgba(74, 158, 255, .06);
    border-radius: 10px;
    color: var(--color-fg-dim);
}

/* Хедер секции категории: заголовок + кнопка */
.category-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
    flex-wrap: wrap; /* чтобы на узких экранах переносилось красиво */
}

.category-title {
    margin: 0;
}

/* на всякий случай уберём дефолтный отступ */

@media (max-width: 560px) {
    .category-header {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .section-intro {
        padding: .9rem 1rem;
    }

    .category-intro {
        border-left-width: 3px;
    }
}


/* Обёртка-карточка для категории (ховер-подсветка блока) */
.category-box {
    position: relative;
    background: transparent; /* было: var(--color-surface) */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem 1.5rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    backdrop-filter: none; /* убираем блюр, чтобы ничего не «просвечивало» */
    overflow: visible; /* тень не обрезаем */
}

/* Убираем бликующий слой полностью (он и давал «яркость») */
.category-box::before {
    content: none;
}

/* чуть уплотним отступы заголовка внутри карточки */
.category-box .category-header {
    margin-bottom: .5rem;
}


/* Поиск на главной: поле на всю ширину + кнопка поверх справа */
.home-search {
    position: relative;
    width: 100%;
    margin: 1rem 0 2rem;
}

.home-search__input {
    width: 100%;
    height: 48px;
    padding: 0 7.5rem 0 1rem; /* место под кнопку справа ~120px */
    border-radius: var(--radius-md);
    border: 1px solid rgba(74, 158, 255, .30);
    background: var(--color-surface-2);
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0 !important; /* на всякий случай убираем авто-отступы */
}

/* кнопка поверх поля, закреплена справа */
.home-search .btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 48px;
    margin: 0;
    padding: 0 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0; /* чтобы «стыковалась» с полем */
    border-bottom-left-radius: 0;
}

/* скрытая кнопка действительно скрыта */
.btn.hidden,
.home-search .btn.hidden {
    display: none !important;
}

/* когда кнопки нет — вернём обычный паддинг справа */
.home-search--no-btn .home-search__input {
    padding-right: 1rem;
}

/* мобилки: кнопка уходит под поле и растягивается */
@media (max-width: 560px) {
    .home-search .btn {
        position: static;
        width: 100%;
        margin-top: .5rem;
        border-top-left-radius: var(--radius-md);
        border-bottom-left-radius: var(--radius-md);
    }

    .home-search__input {
        padding-right: 1rem;
    }
}


/* ====== FAQ ====== */
.faq-section {
    text-align: left;
}

/* весь блок слева, как у категорий */
.faq-title {
    display: inline-block;
    font-size: 1.8rem;
    margin: 0 0 .5rem;
    position: relative;
}

.faq-title::after {
    content: "";
    display: block;
    width: 96px;
    height: 3px;
    background: var(--color-accent);
    margin-top: .4rem;
    border-radius: 2px;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr; /* всегда одна колонка */
    gap: 12px; /* равномерный промежуток между пунктами */
}


/*@media (min-width: 780px) {*/
/*    .faq-grid {*/
/*        grid-template-columns: 1fr 1fr;*/
/*    }*/
/*}*/

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    overflow: hidden;
}

.faq-item[open] {
    border-color: rgba(74, 158, 255, .35);
}

.faq-q {
    cursor: pointer;
    padding: .9rem 1rem;
    list-style: none;
    user-select: none;
    position: relative;
    font-weight: 600;
}

.faq-q::-webkit-details-marker {
    display: none;
}

.faq-q::after {
    content: "▾";
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform .2s ease;
    opacity: .7;
}

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

.faq-a {
    padding: 0 .95rem 1rem;
    color: var(--color-fg-dim);
    line-height: 1.65;
}

/* ====== TRUST & METRICS ====== */
.trust-metrics {
    display: grid;
    gap: .9rem;
    grid-template-columns: 1fr;
    margin: 1.5rem 0 1rem;
}

/* левое выравнивание контента в карточке «Приватность и надёжность» */
.trust-metrics .card:first-child {
    text-align: left;
}

.trust-metrics .card:first-child .card-list {
    margin-left: 1.1rem; /* оставляем красивый отступ для буллетов */
}

/* метрики остаются центрированными (если вдруг что-то переопределилось) */
.trust-metrics .metrics-grid .metric {
    text-align: center;
}

@media (min-width: 900px) {
    .trust-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    padding: 1.1rem 1.1rem 1.2rem;
}

.card-title {
    margin: 0 0 .5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.card-list {
    margin: .25rem 0 0 1.1rem;
    padding: 0;
    color: var(--color-fg-dim);
    line-height: 1.7;
}

.card-list li {
    margin: .25rem 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    margin-top: .5rem;
}

.metric {
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: .8rem .5rem;
    background: var(--color-surface);
}

.metric-value {
    font-size: 1.55rem;
    font-weight: 800;
}

.metric-key {
    margin-top: .25rem;
    font-size: .8rem;
    color: var(--color-fg-muted, var(--color-fg-dim));
}

/* ====== CTA ====== */
.cta-section {
    margin: 2rem 0 2.5rem;
}

.cta-card {
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    padding: 1.25rem 1.25rem 1.5rem;
}

.cta-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.cta-text {
    margin: .5rem 0 0;
    color: var(--color-fg-dim);
}

.cta-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-border);
}

/* TRUST & METRICS: адаптивная раскладка без горизонтального скролла */

/* Карточки слева/справа: одна колонка по умолчанию, две — только на широких */
.trust-metrics {
    display: grid;
    gap: .9rem;
    grid-template-columns: 1fr; /* мобилка — в столбик */
}

@media (min-width: 900px) {
    .trust-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* колонки могут сжиматься */
    }
}

/* Внутренняя сетка с цифрами: 3→2→1 колонки + разрешаем сжатие */
.metrics-grid {
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* ключевая правка */
}

.metric {
    min-width: 0;
}

/* страховка от переполнения контентом */

@media (max-width: 680px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .metrics-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Мобилка: без карточек и с горизонтальными разделителями ===== */
@media (max-width: 600px) {

    .category-section .category-box,
    #faq.category-section .category-box,
    .trust-metrics .card {
        text-align: left;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .category-section .category-header {
        margin-bottom: .5rem;
    }

    .faq-grid {
        gap: 10px;
    }
}

/* =======================================================================
   HOVER ЭФФЕКТЫ + ПОДЧЁРКИВАНИЕ ДЛЯ TRUST & METRICS и FAQ (PATCH)
   ======================================================================= */

/* 1) FAQ: мягкая подсветка «вкладки» при наведении */
.faq-item {
    transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}

.faq-item:hover {
    border-color: rgba(74, 158, 255, .45);
    box-shadow: 0 8px 24px rgba(74, 158, 255, .15);
    transform: translateY(-1px);
}

/* фон у заголовка вопроса на hover — совсем лёгкий, чтобы не «слепило» */
.faq-item:hover .faq-q {
    background: rgba(74, 158, 255, .06);
}

/* доступность: подсветка по Tab */
.faq-q:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

/* 2) Плашки «Показатели»: минимальный «подъём» на hover */
.metric {
    transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease, background-color .2s ease;
}

.metric:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 158, 255, .45);
    box-shadow: 0 10px 24px rgba(74, 158, 255, .15);
    background-color: rgba(74, 158, 255, .04);
}

/* доступность: по Tab так же видно фокус */
.metric:focus-within {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* 3) Заголовки в Trust & Metrics:
      — ОБА заголовка выравниваем по левому краю,
      — под обоими заголовками рисуем акцентную линию как у категорий */
.trust-metrics .card .card-title {
    text-align: left !important; /* принудительно слева для обеих карточек */
    display: inline-block; /* чтобы ::after лег корректно под текст */
    position: relative;
    margin-bottom: .6rem; /* место для линии */
}

.trust-metrics .card .card-title::after {
    content: "";
    display: block;
    width: 96px; /* длина линии — как у .category-title */
    height: 3px; /* толщина — как у .category-title */
    background: var(--color-accent);
    margin-top: .35rem;
    border-radius: 2px;
}

/* Убеждаемся, что вся карточка с метриками имеет левое выравнивание заголовка */
.trust-metrics .card:nth-child(2) {
    text-align: left; /* заголовок слева */
}

/* Но сами метрики внутри остаются центрированными */
.trust-metrics .card:nth-child(2) .metrics-grid {
    text-align: center; /* сетка с цифрами остается центрированной */
}

.trust-metrics .card:nth-child(2) .metric {
    text-align: center; /* каждая плашка с цифрой центрирована */
}
