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

html, body {
    overflow-x: hidden;
}

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

/* =============================================
   ОСНОВА
   ============================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================
   ТИПОГРАФИКА — ЕДИНАЯ СИСТЕМА
   ============================================= */

/* --- H1 --- */
h1 {
    font-family: inherit;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

h1 span {
    color: #2563eb;
}

/* --- H2 --- */
h2 {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

/* --- H3 --- */
h3 {
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

/* --- Основной текст --- */
p {
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: #475569;
}

/* --- Ссылки (контентные) --- */
a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #1d4ed8;
}

/* --- strong --- */
strong {
    font-weight: 600;
    color: #0f172a;
}

/* =============================================
   КОНТЕЙНЕР
   ============================================= */
.container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

/* =============================================
   ШАПКА
   ============================================= */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 0;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-url {
    font-family: 'Roboto', sans-serif;
    font-weight: 200;
    font-size: 14px;
    color: #64748b;
    letter-spacing: 0.3px;
}

.header-tagline {
    font-family: 'Advent Pro', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #1e293b;
    line-height: 1.3;
}

.header-email a {
    color: #f97316;
    font-size: 15px;
    font-weight: 500;
}

.header-email a:hover {
    color: #fb923c;
    text-decoration: underline;
}

/* --- Вход и регистрация поставщика --- */
.header-side {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-shrink: 0;
}

.header-auth__link {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 8px 4px;
    transition: color .15s;
}

.header-auth__link:hover {
    color: #2563eb;
}

.header-auth__btn {
    display: inline-block;
    padding: 8px 4px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}

.header-auth__btn:hover {
    color: #2563eb;
}

/* =============================================
   АНИМАЦИИ
   ============================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 32px rgba(37, 99, 235, 0.6);
    }
}

.hero-text h1 {
    animation: fadeUp 0.8s ease forwards;
}

.hero-text .subtitle {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-text .hero-features {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.form-card {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.5s forwards;
}

/* =============================================
   ГЛАВНЫЙ ЭКРАН
   ============================================= */
.hero {
    flex: 1;
    /* Низ не задаём: интервал между блоками держит верхний отступ следующей секции */
    padding: 30px 0 0;
}

.hero-heading {
    text-align: center;
    margin-bottom: 40px;
}

.subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* =============================================
   ПРЕИМУЩЕСТВА
   ============================================= */
.benefits {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =============================================
   КАРТОЧКА ФОРМЫ
   ============================================= */
.form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h2 {
    margin-bottom: 6px;
}

.form-header .form-subtitle {
    font-size: 15px;
    color: #94a3b8;
}

/* =============================================
   СЕТКА ФОРМЫ
   ============================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #f8fafc;
    padding-right: 36px;
}

.form-group textarea {
    resize: vertical;
    min-height: 44px;
    height: 44px;
}

.form-group input:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* =============================================
   НИЖНЯЯ ЧАСТЬ ФОРМЫ
   ============================================= */
.form-bottom {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.submit-btn {
    padding: 14px 48px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse 2.5s ease-in-out infinite;
}

.submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
    animation: none;
}

.submit-btn:active {
    transform: translateY(0);
}

.privacy {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.privacy a {
    color: #94a3b8;
    text-decoration: underline;
}

.privacy a:hover {
    color: #64748b;
}

/* =============================================
   ГОРИЗОНТАЛЬНЫЕ ЛЕНТЫ НА МОБИЛЬНЫХ
   Точки и подсказка появляются только там, где включён боковой скролл
   ============================================= */
.swipe-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.swipe-dots__item {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.swipe-dots__item.is-active {
    width: 20px;
    border-radius: 4px;
    background: #2563eb;
}

/* Подсказка «листайте вбок» — показывается один раз, пока не листали */
.swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
}

.swipe-hint__arrow {
    display: inline-block;
    animation: swipeNudge 1.6s ease-in-out infinite;
}

@keyframes swipeNudge {
    0%, 60%, 100% { transform: translateX(0); opacity: 0.6; }
    30%           { transform: translateX(5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .swipe-hint__arrow { animation: none; }
}

@media (max-width: 768px) {
    .swipe-dots,
    .swipe-hint {
        display: flex;
    }
    /* После первого пролистывания подсказка больше не нужна */
    .swipe-hint.is-hidden {
        display: none;
    }
}

/* --- Согласие на обработку ПДн: обязательная галочка, по умолчанию снята --- */
.consent-label {
    position: relative;
    flex-basis: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

/* Чекбокс невидим, но сохраняет размеры и остаётся фокусируемым.
   При width/height: 0 браузер не может показать подсказку обязательного поля
   и молча блокирует отправку — человек жмёт кнопку, и ничего не происходит. */
.consent-label input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.consent-box {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.consent-label:hover .consent-box {
    border-color: #94a3b8;
}

.consent-label input[type="checkbox"]:focus-visible + .consent-box {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.consent-label input[type="checkbox"]:checked + .consent-box {
    background: #2563eb;
    border-color: #2563eb;
}

.consent-label input[type="checkbox"]:checked + .consent-box::after {
    content: '✓';
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.consent-text a {
    color: #2563eb;
    text-decoration: underline;
}

.consent-label.is-missing .consent-box {
    border-color: #dc2626;
    background: #fef2f2;
}

/* =============================================
   СООБЩЕНИЯ ФОРМЫ
   ============================================= */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
    animation: fadeUp 0.3s ease;
}

.form-message.success {
    background: #065f46;
    color: #a7f3d0;
    border: 1px solid #10b981;
}

.form-message.error {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #ef4444;
}

/* =============================================
   УСПЕШНАЯ ОТПРАВКА
   ============================================= */
.success-block {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #065f46;
    color: #34d399;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 20px;
    animation: fadeUp 0.5s ease;
}

.success-block h3 {
    margin-bottom: 12px;
}

.success-block p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.success-message {
    display: none;
    text-align: center;
    padding: 48px 20px;
}

.success-message .check {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.success-message h3 {
    margin-bottom: 8px;
}

.success-message p {
    color: #64748b;
}

/* =============================================
   ЧЕКБОКС
   ============================================= */
.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-label:hover .checkmark {
    border-color: #94a3b8;
}

/* =============================================
   ИНН — ВЫПАДАЮЩИЙ СПИСОК
   ============================================= */
.form-group--inn {
    position: relative;
}

.inn-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
}

.inn-dropdown.active {
    display: block;
}

.inn-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.inn-dropdown-item:last-child {
    border-bottom: none;
}

.inn-dropdown-item:hover {
    background: #f1f5f9;
}

.inn-dropdown-company {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.inn-dropdown-details {
    font-size: 12px;
    color: #94a3b8;
}

.form-group--company input {
    background: #f1f5f9;
    color: #64748b;
}

/* =============================================
   РЕГИОН — ВЫПАДАЮЩИЙ СПИСОК
   ============================================= */
.form-group--region {
    position: relative;
}

.region-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.region-dropdown.active {
    display: block;
}

.region-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.region-dropdown-item:last-child {
    border-bottom: none;
}

.region-dropdown-item:hover {
    background: #f1f5f9;
}

.region-dropdown-item span {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 6px;
}

/* =============================================
   О НАС
   ============================================= */
.about {
    padding: 30px 0 0;
}

.about-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 48px 48px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.about-card h2 {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
}

.about-lead {
    font-size: 16px;
    color: #64748b;
    line-height: 1.7;
    text-align: center;
    max-width: 740px;
    margin: 0 auto 40px;
}

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.about-col h3 {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.about-item {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

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

.about-item .benefit-icon {
    margin-top: 2px;
}

.about-item strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.about-item p {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

/* =============================================
   ФУТЕР
   ============================================= */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-left {
    flex: 1;
}

.footer-title {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0;
}

.footer-details {
    font-size: 12px;
    color: #64748b;
    margin: 6px 0 0 0;
}

.footer-right {
    flex-shrink: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer a {
    color: #94a3b8;
    font-size: 13px;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =============================================
   COOKIE-БАННЕР
   ============================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    color: #cbd5e1;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-text {
    font-size: 13px;
    line-height: 1.5;
    max-width: 700px;
}

.cookie-text a {
    color: #60a5fa;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-btn {
    flex-shrink: 0;
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-btn:hover {
    background: #1d4ed8;
}

/* =============================================
   ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ
   ============================================= */
.policy {
    flex: 1;
    padding: 40px 0 60px;
}

.policy-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 56px 64px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    max-width: 820px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    font-size: 14px;
    margin-bottom: 32px;
}

.back-link:hover {
    color: #1d4ed8;
}

.policy-card h1 {
    font-size: clamp(24px, 3.5vw, 34px);
    text-align: left;
    margin-bottom: 8px;
    line-height: 1.3;
}

.policy-date {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 48px;
    line-height: 1.6;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.policy-card h2 {
    font-size: 17px;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: 0.01em;
}

.policy-card h2:first-of-type {
    margin-top: 0;
}

/* Подзаголовок внутри раздела — например, этапы внутри одной главы */
.policy-card h3 {
    font-size: 15px;
    margin-top: 28px;
    margin-bottom: 10px;
    color: #0f172a;
}

/* Таблица внутри статьи. На узком экране строки превращаются
   в карточки: горизонтальный скролл в тексте читать неудобно */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 20px;
    font-size: 14px;
}

.article-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 600;
    font-size: 13px;
}

.article-table td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    color: #475569;
    vertical-align: top;
}

@media (max-width: 620px) {
    .article-table,
    .article-table tbody,
    .article-table tr,
    .article-table td {
        display: block;
        width: 100%;
    }

    .article-table thead {
        display: none;
    }

    .article-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 4px 12px;
        background: #fff;
    }

    .article-table td {
        border: none;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    .article-table td + td {
        border-top: 1px solid #f1f5f9;
    }

    .article-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #0f172a;
        flex-shrink: 0;
    }
}

.policy-card p {
    line-height: 1.8;
    margin-bottom: 14px;
}

.policy-card ul {
    margin: 8px 0 20px 0;
    padding: 0 0 0 24px;
    list-style-position: outside;
}

.policy-card li {
    font-size: 15px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 8px;
    padding-left: 4px;
}

.policy-card li:last-child {
    margin-bottom: 0;
}

.policy-card a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.policy-card a:hover {
    border-bottom-color: #2563eb;
}

.highlight-email {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    margin: 20px 0 24px;
}

.highlight-email a {
    font-size: 17px;
    font-weight: 600;
    border-bottom: none;
}

.contacts {
    list-style: none;
    margin: 12px 0 0 0;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.contacts li {
    margin-bottom: 6px;
    padding-left: 0;
}

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

.policy-card h2 + p {
    margin-top: 4px;
}

.policy-card p + ul {
    margin-top: 4px;
}

.policy-card ul + p {
    margin-top: 16px;
}

/* =============================================
   АДАПТИВНОСТЬ
   ============================================= */

/* --- Планшет --- */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-card {
        padding: 32px 36px;
    }
}

/* --- Маленький планшет --- */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 30px 0 0;
    }

    .header .container {
        flex-direction: column;
        gap: 8px;
    }

    .header-brand {
        gap: 12px;
    }

    .header-logo {
        height: 36px;
    }

    .header-tagline {
        font-size: 14px;
    }

    .header-url {
        font-size: 12px;
    }

    .header-email a {
        font-size: 14px;
    }

    /* 50px в одну строку на телефоне не помещаются — сжимаем и разрешаем перенос */
    .header-side {
        gap: 18px;
        flex-wrap: wrap;
        justify-content: center;
    }


    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-card {
        padding: 28px 24px;
    }

    .form-bottom {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .submit-btn {
        width: 100%;
    }

    .benefits {
        gap: 20px;
    }

    .footer-row {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    /* Политика */
    .policy-card {
        padding: 36px 28px;
    }

    .policy-card h2 {
        margin-top: 40px;
    }

    .policy-date {
        margin-bottom: 36px;
    }

        /* О нас */
    .about {
        padding: 30px 0 0;
    }

    .about-card {
        padding: 36px 24px 32px;
    }

    .about-columns {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .about-col h3 {
        text-align: center;
    }

    .about-lead {
        font-size: 15px;
        margin-bottom: 32px;
    }
}

/* --- Мобилка --- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 30px 0 0;
    }

    .hero-heading {
        margin-bottom: 28px;
    }

    .header-tagline {
        font-size: 13px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .benefits {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .benefits .benefit {
        width: 300px;
        justify-content: flex-start;
        text-align: left;
    }

    .benefits .benefit .benefit-icon {
        width: 24px;
        min-width: 24px;
    }

    .checkbox-label {
        flex-wrap: nowrap;
        white-space: nowrap;
        font-size: 12px;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
        gap: 12px;
    }

    .cookie-btn {
        width: 100%;
    }

    /* Политика */
    .policy {
        padding: 24px 0 40px;
    }

    .policy-card {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .policy-card h1 {
        font-size: 22px;
    }

    .policy-card h2 {
            font-size: 15px;
        margin-top: 36px;
        margin-bottom: 12px;
    }

    .policy-card p,
    .policy-card li {
        font-size: 14px;
        line-height: 1.75;
    }

    .policy-card ul {
        padding-left: 18px;
    }

    .highlight-email {
        padding: 14px 16px;
    }

    .highlight-email a {
        font-size: 15px;
    }

    .contacts {
        padding: 16px 18px;
    }

    /* О нас */
    .about {
        padding: 30px 0 0;
    }

    .about-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .about-card h2 {
        font-size: 22px;
    }

    .about-lead {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .about-col h3 {
        font-size: 16px;
    }

    .about-item strong {
        font-size: 14px;
    }

    .about-item p {
        font-size: 13px;
    }
}

/* === Последние заявки === */
.recent-orders {
    padding: 30px 0 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #0f172a;
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.recent-table thead {
    background: #0f172a;
    color: #fff;
}

.recent-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.recent-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.recent-table tbody tr:hover {
    background: #f8fafc;
}

.recent-table tbody .recent-order {
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.recent-table tbody .recent-order:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: -3px;
}

.recent-table tbody tr:last-child td {
    border-bottom: none;
}

.no-orders {
    text-align: center;
    color: #94a3b8;
    padding: 30px 0;
    font-size: 15px;
}

/* Информационное окно при попытке открыть заявку */
body.order-gate-open {
    overflow: hidden;
}

.order-gate[hidden] {
    display: none;
}

.order-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
}

.order-gate__dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 32px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    text-align: center;
    animation: order-gate-in 0.18s ease-out;
}

.order-gate__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.order-gate__close:hover,
.order-gate__close:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
}

.order-gate__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
}

.order-gate__icon svg {
    width: 28px;
    height: 28px;
}

.order-gate__title {
    margin-bottom: 10px;
    font-size: 22px;
}

.order-gate__text {
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.55;
}

.order-gate__action {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    transition: background-color 0.15s ease;
}

.order-gate__action:hover,
.order-gate__action:focus-visible {
    background: #1d4ed8;
    color: #ffffff;
}

.order-gate__later {
    margin-top: 12px;
    padding: 7px 14px;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    cursor: pointer;
}

.order-gate__later:hover,
.order-gate__later:focus-visible {
    color: #0f172a;
    text-decoration: underline;
}

@keyframes order-gate-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .order-gate__dialog {
        animation: none;
    }
}

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

    .recent-orders {
        padding: 30px 0 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .recent-table,
    .recent-table thead,
    .recent-table tbody,
    .recent-table tr,
    .recent-table th,
    .recent-table td {
        display: block;
    }

    .recent-table thead {
        display: none;
    }

    .recent-table {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    /* Карточки заявок листаются вбок: вертикальный список занимал
       пол-экрана и отодвигал всё остальное вниз */
    .recent-table tbody {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Отступы, чтобы тени карточек не обрезались краем контейнера */
        padding: 4px 20px 8px;
        margin: 0 -20px;
    }

    .recent-table tbody::-webkit-scrollbar {
        display: none;
    }

    .recent-table tbody tr {
        flex: 0 0 82%;
        scroll-snap-align: center;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        margin-bottom: 0;
        padding: 16px;
    }

    .recent-table tbody tr:hover {
        background: #ffffff;
    }

    .recent-table td {
        padding: 6px 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        font-size: 13px;
        line-height: 1.5;
        color: #475569;
    }

    .recent-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #0f172a;
        flex-shrink: 0;
        min-width: 90px;
        font-size: 13px;
    }

    .recent-table td + td {
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
        margin-top: 2px;
    }

    .recent-table td:last-child {
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {

    .recent-orders {
        padding: 30px 0 0;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .recent-table tbody tr {
        padding: 14px;
        margin-bottom: 10px;
    }

    .recent-table td {
        font-size: 12px;
    }

    .recent-table td::before {
        min-width: 80px;
        font-size: 12px;
    }

    .order-gate__dialog {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }

    .order-gate__title {
        font-size: 20px;
    }
}

/* ===== БЛОК СТАТЬИ ===== */
.articles {
    /* Последний блок перед подвалом — нижний отступ такой же, как между блоками */
    padding: 30px 0;
    background: #f8f9fa;
}

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

.articles h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: #1a1a2e;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.article-card__image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card__image img {
    transform: scale(1.05);
}

.article-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card__tag {
    display: inline-block;
    background: #e8f4f8;
    color: #0077b6;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
}

.article-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-card__excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0077b6;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.article-card:hover .article-card__link {
    gap: 12px;
}

.article-card__link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__link svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .articles {
        padding: 30px 0;
    }

    .articles h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* Статьи тоже листаются вбок — иначе три карточки с картинками
       растягивают страницу на несколько экранов */
    .articles-grid {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 20px 8px;
        margin: 0 -20px;
    }

    .articles-grid::-webkit-scrollbar {
        display: none;
    }

    .articles-grid .article-card {
        flex: 0 0 82%;
        scroll-snap-align: center;
    }

    .article-card__image {
        height: 200px;
    }

    .article-card__body {
        padding: 20px;
    }

    .article-card__title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    /* Тот же шаг, что у .media, .recent-orders и .about на этой ширине.
       Идёт после блока 768px, иначе тот перебьёт значение. */
    .articles {
        padding: 30px 0;
    }
}

/* =============================================
   МЫ В СМИ
   ============================================= */
.media {
    padding: 30px 0 0;
}

.media .section-title {
    margin-bottom: 8px;
}

.media-subtitle {
    text-align: center;
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.media-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.media-card:not(.media-card--placeholder):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    border-color: #cbd5e1;
}

.media-card__logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.media-card:hover .media-card__logo {
    filter: grayscale(0%);
    opacity: 1;
}

.media-card--placeholder {
    background: #f8fafc;
    border-style: dashed;
    border-color: #cbd5e1;
    box-shadow: none;
    cursor: default;
}

.media-card__soon {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* === Планшет === */
@media (max-width: 1024px) {
    .media-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .media-card {
        padding: 20px;
    }
}

/* === Маленький планшет === */
@media (max-width: 768px) {
    .media {
        padding: 30px 0 0;
    }

    .media-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .media-card {
        padding: 22px;
    }
}

/* === Мобилка === */
@media (max-width: 480px) {
    .media {
        padding: 30px 0 0;
    }

    .media-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .media-card {
        padding: 18px;
        border-radius: 10px;
    }

    .media-card__soon {
        font-size: 11px;
    }
}
