/* ===========================
   RESET & VARIABLES
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Обычный текст не выделяется и не показывает текстовый курсор/каретку */
body {
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

input,
textarea,
select,
[contenteditable="true"],
.allow-select {
    -webkit-user-select: text;
    user-select: text;
    cursor: text;
}

/* Юридические страницы — можно копировать текст */
.legal-doc {
    -webkit-user-select: text;
    user-select: text;
    cursor: auto;
}

/* Skip link — доступность */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Глобальный focus-visible для a11y */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

:root {
    /* Colors — индиго + сланцевый */
    --primary: #4F46E5;
    --primary-blue: #4F46E5;
    --primary-light: #EEF2FF;
    --accent-green: #4F46E5;
    --secondary: #334155;
    --text-dark: #334155;
    --text-gray: #64748B;
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 52%, #4338CA 100%);
    --gradient-primary-hover: linear-gradient(135deg, #7C83FF 0%, #4F46E5 45%, #3730A3 100%);
    --gradient-secondary: linear-gradient(180deg, #FFFFFF 0%, #EEF2FF 100%);
    --button-shadow-primary: 0 10px 24px rgba(79, 70, 229, 0.26), 0 3px 8px rgba(15, 23, 42, 0.08);
    --button-shadow-secondary: 0 6px 16px rgba(79, 70, 229, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    
    /* Fonts */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

body.page-ready {
    opacity: 1;
}

/* До первой отрисовки анимации приостановлены (класс ставится из <head>) */
html {
    scroll-behavior: smooth;
}
html.loading * {
    animation-play-state: paused !important;
}

main {
    scroll-margin-top: 80px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   BUTTONS
=========================== */

.btn-primary,
.btn-secondary,
.btn-generate {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.36s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.36s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        background-position 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 170% 170%;
    background-position: 0% 50%;
    color: var(--white);
    border: 1px solid rgba(129, 140, 248, 0.55);
    box-shadow: var(--button-shadow-primary);
    text-shadow: 0 1px 0 rgba(15, 23, 42, 0.15);
    z-index: 0;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-primary-hover);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.34), 0 6px 12px rgba(15, 23, 42, 0.12);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.26), 0 2px 6px rgba(15, 23, 42, 0.1);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: #4338CA;
    border: 1px solid #C7D2FE;
    box-shadow: var(--button-shadow-secondary);
}

.btn-secondary:hover {
    border-color: #818CF8;
    color: #3730A3;
    transform: translateY(-0.5px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.12), 0 1px 3px rgba(15, 23, 42, 0.07);
}

.btn-generate {
    background: var(--gradient-primary);
    background-size: 180% 180%;
    background-position: 0% 45%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    margin-top: 20px;
    border: 1px solid rgba(129, 140, 248, 0.58);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.28), 0 4px 10px rgba(15, 23, 42, 0.1);
    z-index: 0;
}

.btn-generate::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-primary-hover);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.34), 0 8px 14px rgba(15, 23, 42, 0.14);
}

.btn-generate:hover::before {
    opacity: 1;
}

.btn-generate svg {
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-generate:hover svg {
    transform: translateX(2px);
}

.btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24), 0 3px 8px rgba(15, 23, 42, 0.1);
}

/* ===========================
   HEADER
=========================== */

.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    cursor: pointer;
    text-shadow: 0 2px 10px rgba(79, 70, 229, 0.2);
    transition: var(--transition);
}

.logo:hover {
    color: #3730A3;
    text-shadow: 0 6px 16px rgba(79, 70, 229, 0.34);
}

.logo svg {
    filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.28));
    transition: var(--transition);
}

.logo:hover svg {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 8px 16px rgba(79, 70, 229, 0.36));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-auth-wrapper {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.4s ease-out, transform 0.35s ease-out;
}

.nav-auth-wrapper.nav-auth-ready {
    opacity: 1;
    transform: translateY(0);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===========================
   HERO SECTION
=========================== */

.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    padding: 60px 0 80px;
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

/* Document preview animations */

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.highlight {
    color: var(--primary-blue);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Generator Form */

.generator-form {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-select,
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Кастомный select для генератора: фирменная палитра + плавная анимация состояния. */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    color: var(--text-dark);
    background-color: var(--white);
    border-color: #cbd5e1;
    background-image:
        linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 14px center;
    background-size: auto, 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease,
        background-color 0.25s ease,
        background-position 0.25s ease;
}

.form-select:hover {
    border-color: #818cf8;
    background-color: #f8faff;
    background-position: 0 0, right 12px center;
    box-shadow:
        0 8px 18px rgba(79, 70, 229, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.06);
}

.form-select:focus {
    border-color: var(--primary-blue);
    background-color: #eef2ff;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.16),
        0 10px 20px rgba(79, 70, 229, 0.12);
    animation: selectFocusGlow 0.28s ease-out;
}

.form-select option {
    color: var(--text-dark);
    background: var(--white);
}

/* Скрытый native select остаётся для текущей JS-логики/значений формы. */
.form-select-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* Кастомный dropdown для type/level/pages в фирменной палитре. */
.custom-select {
    position: relative;
}

.custom-select-trigger {
    width: 100%;
    min-height: 48px;
    padding: 12px 42px 12px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0)),
        var(--white);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease,
        background-color 0.25s ease;
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px;
    transition: transform 0.24s ease;
}

.custom-select-trigger:hover {
    border-color: #818cf8;
    background-color: #f8faff;
    box-shadow:
        0 8px 18px rgba(79, 70, 229, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.06);
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
    outline: none;
    border-color: #4f46e5;
    background-color: #eef2ff;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.16),
        0 10px 20px rgba(79, 70, 229, 0.12);
}

.custom-select.is-open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    max-height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(165, 180, 252, 0.55);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.16);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        max-height 0.3s ease;
}

.custom-select.is-open .custom-select-menu {
    max-height: 280px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.custom-select-option {
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #eef2ff;
    background: #fff;
    color: #334155;
    text-align: left;
    font-size: 15px;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.custom-select-option:last-child {
    border-bottom: 0;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
    outline: none;
    background: #eef2ff;
    color: #4338ca;
    padding-left: 18px;
}

.custom-select-option.is-selected {
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
}

@keyframes selectFocusGlow {
    0% {
        box-shadow:
            0 0 0 0 rgba(79, 70, 229, 0.25),
            0 2px 4px rgba(15, 23, 42, 0.06);
    }
    100% {
        box-shadow:
            0 0 0 3px rgba(79, 70, 229, 0.16),
            0 10px 20px rgba(79, 70, 229, 0.12);
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row-generator {
    grid-template-columns: 1fr 1fr;
}

.timer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--text-gray);
    font-size: 14px;
}

.timer-badge svg {
    color: var(--accent-green);
}

/* Hero Visual */

.hero-visual {
    position: relative;
    height: 450px;
    isolation: isolate;
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.02) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: auto;
}

.document-preview {
    position: absolute;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.document-preview::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.document-preview::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.02) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* Hover effects removed for better UX */

.preview-1 {
    width: 210px;
    height: 280px;
    top: 25px;
    left: 15px;
    z-index: 3;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    animation-delay: 0.15s;
    animation-name: fadeInFloat1;
}

@keyframes fadeInFloat1 {
    0% {
        opacity: 0;
        transform: translateY(15px) rotate(-4deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(-4deg);
    }
}

.preview-2 {
    width: 210px;
    height: 280px;
    top: 30px;
    right: 20px;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    animation-delay: 0.3s;
    animation-name: fadeInFloat2;
}

@keyframes fadeInFloat2 {
    0% {
        opacity: 0;
        transform: translateY(15px) rotate(4deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(4deg);
    }
}

.preview-3 {
    width: 175px;
    height: 205px;
    bottom: 35px;
    left: 35%;
    z-index: 1;
    padding: 18px 14px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 2px solid var(--accent-green);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
    animation-delay: 0.45s;
    animation-name: fadeInFloat3;
}

@keyframes fadeInFloat3 {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) rotate(-2deg);
    }
}

.doc-university {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.doc-type {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.doc-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 20px;
    padding: 0 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

.doc-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 6px;
}

.doc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 8px;
    color: var(--text-gray);
    font-weight: 500;
}

.meta-value {
    font-size: 10px;
    color: var(--text-dark);
    font-weight: 600;
}

.doc-footer {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    margin-top: auto;
    padding-top: 16px;
}

.doc-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    color: var(--primary);
}

.doc-badge svg {
    width: 14px;
    height: 14px;
}

.doc-type-small {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    color: var(--accent-green);
    margin-bottom: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
}

.doc-title-small {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: auto;
    padding: 0 4px;
}

.doc-meta-small {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-gray);
    font-weight: 600;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.stats-card {
    position: absolute;
    bottom: 45px;
    right: 55px;
    background: linear-gradient(135deg, var(--white) 0%, #EEF2FF 100%);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.2);
    padding: 20px 40px;
    text-align: center;
    border: 2px solid rgba(79, 70, 229, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
    backface-visibility: hidden;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 2px;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===========================
   BENEFITS — плоский редакционный дизайн без теней
=========================== */

.benefits {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: #f8f9fa;
    position: relative;
}

.benefits .container {
    position: relative;
}

.benefits-header {
    text-align: center;
    margin-bottom: 52px;
}

.benefits .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
    line-height: 1.2;
}

.benefits .section-title .accent {
    color: var(--primary);
}

.benefits .section-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 640px;
    margin: 0 auto 0;
    line-height: 1.7;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* Плоские карточки: без теней, тонкая граница */
.benefit-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px 28px;
    position: relative;
    border: 1px solid #e8eaed;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.benefits-grid.benefits-visible .benefit-card {
    opacity: 1;
    transform: translateY(0);
}

.benefits-grid.benefits-visible .benefit-card-1 { transition-delay: 0.06s; }
.benefits-grid.benefits-visible .benefit-card-2 { transition-delay: 0.12s; }
.benefits-grid.benefits-visible .benefit-card-3 { transition-delay: 0.18s; }
.benefits-grid.benefits-visible .benefit-card-4 { transition-delay: 0.24s; }

/* Иконка: плоская, без теней */
.benefit-icon-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
}

.benefit-content {
    text-align: left;
}

.benefit-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.benefit-description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.benefit-stat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    background: #eef2ff;
}

/* ===========================
   HOW IT WORKS — в духе benefits: минимализм, белые карточки
=========================== */

.how-works {
    padding: var(--section-padding);
    background: linear-gradient(105deg, #f8fafc 0%, #f1f5f9 30%, #ffffff 70%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.how-works::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.how-works::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.how-works-header {
    text-align: center;
    margin-bottom: 52px;
}

.how-works .section-title {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.how-works .section-title .accent {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.how-works .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 520px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 20px;
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 60px;
}

.steps-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 1;
}

.steps-line {
    display: none;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.step-card {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 50%, #f8faff 100%);
    border-radius: 20px;
    padding: 36px 28px 32px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), #818CF8, transparent);
}

.steps-grid.how-works-visible .step-card {
    opacity: 1;
    transform: translateY(0);
}

.steps-grid.how-works-visible .step-card:nth-child(1) { transition-delay: 0.06s; }
.steps-grid.how-works-visible .step-card:nth-child(2) { transition-delay: 0.12s; }
.steps-grid.how-works-visible .step-card:nth-child(3) { transition-delay: 0.18s; }
.steps-grid.how-works-visible .step-card:nth-child(4) { transition-delay: 0.24s; }

.step-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: #6366F1;
    margin-bottom: 20px;
    opacity: 0.9;
}

.step-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.step-content {
    text-align: center;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.3;
}

.step-description {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

.step-connector {
    display: none;
}

/* ===========================
   STATISTICS — в духе benefits: светлый фон, белые карточки
=========================== */

/* ===========================
   STATISTICS — Erudia в цифрах
=========================== */

.statistics {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.statistics::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.statistics::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -8%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.statistics .container {
    position: relative;
    z-index: 1;
}

.statistics-header {
    text-align: center;
    margin-bottom: 52px;
}

.statistics .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.statistics .section-title .accent {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.statistics .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 520px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 56px;
}

.stat-card {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 50%, #f8faff 100%);
    border-radius: 20px;
    padding: 36px 24px 36px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.4), #818CF8, transparent);
}

.statistics .stats-grid.visible .stat-card {
    opacity: 1;
    transform: translateY(0);
}

.statistics .stats-grid.visible .stat-card:nth-child(1) { transition-delay: 0.06s; }
.statistics .stats-grid.visible .stat-card:nth-child(2) { transition-delay: 0.12s; }
.statistics .stats-grid.visible .stat-card:nth-child(3) { transition-delay: 0.18s; }
.statistics .stats-grid.visible .stat-card:nth-child(4) { transition-delay: 0.24s; }

.stat-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.1;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}

/* «+» только у анимируемых счётчиков с data-target (не у текстовых фактов) */
.stat-number[data-target]:not([data-suffix])::after {
    content: '+';
    margin-left: 2px;
    font-weight: 700;
    opacity: 0.7;
}

.stat-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.stat-detail {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 6px;
    line-height: 1.4;
}

/* Секция вузов */
.partners-section {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 40px 40px 36px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.partners-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.partners-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 28px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.partner-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border-radius: 14px;
    padding: 20px 14px 18px;
    text-align: center;
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.35), transparent);
}

.partner-icon {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1;
}

.partner-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.partner-full {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.35;
    margin-bottom: 6px;
}

.partner-meta {
    font-size: 11px;
    color: var(--text-gray);
    opacity: 0.85;
    line-height: 1.3;
}

/* ===========================
   PRICING
=========================== */

.pricing {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.pricing-header {
    text-align: center;
    margin-bottom: 56px;
}

.pricing-legal-hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.85;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.5;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.price-card {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 32px 28px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.price-card-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #6366F1);
}

.price-card.popular .price-card-bar {
    background: linear-gradient(90deg, var(--primary), #6366F1);
}

.price-card.popular {
    border-color: var(--primary);
    border-width: 2px;
    transform: scale(1.04);
    z-index: 2;
}

.price-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    padding: 5px 12px;
    border-radius: 50px;
    white-space: nowrap;
    pointer-events: none;
}

.price-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.price-name-row .price-name {
    margin-bottom: 0;
}

.price-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.price-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    line-height: 1.4;
}

.price-amount {
    margin-bottom: 4px;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--text-dark);
}

.price-currency {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-gray);
}

.price-period {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.price-features {
    list-style: none;
    margin-bottom: 28px;
    flex-grow: 1;
}

.price-features li {
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 0 8px 28px;
    position: relative;
    line-height: 1.4;
}

.price-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
}

.price-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: auto;
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-grid .price-card {
        width: 100%;
        max-width: none;
    }

    .price-card.popular {
        transform: none;
    }
}

/* ===========================
   EXAMPLES — профессиональный UX
=========================== */

.examples {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.examples::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.04) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.examples .container {
    position: relative;
    z-index: 1;
}

.examples-header {
    text-align: center;
    margin-bottom: 48px;
}

.examples-header .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.examples-header .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 560px;
    margin: 0 auto;
}

.examples-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 24px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    color: #4338ca;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-btn:hover {
    border-color: #818cf8;
    color: #3730a3;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.16), 0 3px 8px rgba(15, 23, 42, 0.08);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: #818cf8;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.24), 0 4px 10px rgba(15, 23, 42, 0.1);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.example-card {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, 0.12);
    opacity: 0;
    animation: exampleFadeIn 0.4s ease-out forwards;
    position: relative;
}

.example-card:nth-child(1)  { animation-delay: 0.03s; }
.example-card:nth-child(2)  { animation-delay: 0.06s; }
.example-card:nth-child(3)  { animation-delay: 0.09s; }
.example-card:nth-child(4)  { animation-delay: 0.12s; }
.example-card:nth-child(5)  { animation-delay: 0.15s; }
.example-card:nth-child(6)  { animation-delay: 0.18s; }
.example-card:nth-child(7)  { animation-delay: 0.21s; }
.example-card:nth-child(8)  { animation-delay: 0.24s; }

.examples-grid.examples-filter-instant .example-card {
    animation: none !important;
    opacity: 1;
}

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


/* Область превью документа */
.example-image {
    position: relative;
    height: 220px;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 50%, #e0e7ff 100%);
    overflow: hidden;
}

.example-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.3) 100%);
    pointer-events: none;
}

.example-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-card:hover .example-overlay {
    opacity: 1;
}

.example-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    color: #4338ca;
    cursor: pointer;
    border: 1px solid #c7d2fe;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: all 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    transform: translateY(8px);
}

.example-card:hover .example-btn {
    transform: translateY(0);
}

.example-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: #818cf8;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.24), 0 4px 10px rgba(15, 23, 42, 0.1);
}

.example-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gradient-primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    z-index: 2;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.24);
}

.example-badge.diploma,
.example-badge.article,
.example-badge.essay {
    background: var(--primary);
}

/* Документ-превью: структурированная имитация страницы */
.example-doc-preview {
    padding: 28px 24px 28px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(79, 70, 229, 0.12);
}

.preview-header .preview-line {
    height: 6px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.6) 0%, rgba(99, 102, 241, 0.4) 100%);
    border-radius: 3px;
    margin-bottom: 8px;
}

.preview-body {
    flex: 1;
}

.preview-body .preview-line {
    height: 5px;
    background: rgba(51, 65, 85, 0.12);
    border-radius: 3px;
    margin-bottom: 10px;
}

.preview-line.short {
    width: 35%;
}

.preview-line.medium {
    width: 60%;
}

.preview-line.long {
    width: 90%;
}

.preview-body .preview-line:last-child {
    margin-bottom: 0;
}

.example-content {
    padding: 24px 28px 28px;
}

.example-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.example-subject {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 14px;
}

.example-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}

.meta-item svg {
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.85;
}

.example-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
}

.example-cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.example-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
    animation: exampleRotate 25s linear infinite;
}

@keyframes exampleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cta-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 8px;
    transition: var(--transition);
}


.cta-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cta-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    border: 2px solid var(--white);
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.cta-button:hover {
    background: transparent;
    color: var(--white);
    transform: scale(1.05);
}

.cta-stats {
    display: flex;
    gap: 32px;
    margin-top: 8px;
}

.cta-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.cta-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* ===========================
   FAQ
=========================== */

.faq {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
}

.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.2) 50%, transparent 100%);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 48px;
}

.faq-header-content {
    flex: 1;
}

.faq-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.faq-search {
    position: relative;
    width: 320px;
    margin-top: 28px;
}

.faq-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--white);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.faq-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.faq-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.faq-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.1), 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: left;
}

.faq-category svg {
    flex-shrink: 0;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.faq-category span:first-of-type {
    flex: 1;
}

.category-count {
    font-size: 13px;
    color: #4338ca;
    background: #e0e7ff;
    padding: 4px 10px;
    border-radius: 50px;
    min-width: 28px;
    text-align: center;
}

.faq-category:hover {
    border-color: #818cf8;
    background: linear-gradient(180deg, #ffffff 0%, #e0e7ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.16), 0 3px 8px rgba(15, 23, 42, 0.08);
}

.faq-category.active {
    background: var(--gradient-primary);
    border-color: #818cf8;
    color: var(--white);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22), 0 4px 10px rgba(15, 23, 42, 0.1);
}

.faq-category.active svg {
    color: var(--white);
}

.faq-category.active .category-count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 80px;
}

.faq-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.faq-item.active {
    border-color: var(--primary-blue);
}

.faq-number {
    position: absolute;
    left: 24px;
    top: 28px;
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1;
    transition: all 0.3s ease;
}

.faq-item.active .faq-number {
    color: var(--primary-blue);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 24px 0;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question-icon {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.05);
}

.faq-question span {
    flex: 1;
}

.faq-toggle-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--text-gray);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 600px;
}

.faq-answer p {
    padding: 0 24px 0 0;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.faq-meta {
    display: flex;
    gap: 8px;
    padding: 0 24px 24px 0;
    flex-wrap: wrap;
}

.faq-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 14px;
    border-radius: 50px;
}

.faq-cta {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.faq-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
}

.faq-cta-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    position: relative;
    z-index: 1;
}

.faq-cta h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.faq-cta p {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.faq-cta .btn-primary {
    position: relative;
    z-index: 1;
}

/* ===========================
   FOOTER
=========================== */

/* Sticky CTA Bar */
.cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
}
.cta-bar.visible {
    transform: translateY(0);
}
.cta-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cta-bar-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}
.cta-bar-btn {
    text-decoration: none;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .cta-bar-inner {
        flex-direction: column;
        gap: 12px;
    }
    .cta-bar-text {
        font-size: 15px;
    }
}

.footer {
    background: linear-gradient(180deg, #1e1b4b 0%, #334155 100%);
    color: var(--white);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.footer-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.footer-decoration-1 {
    width: 320px;
    height: 320px;
    background: var(--primary-blue);
    top: -80px;
    right: -80px;
}

.footer-decoration-2 {
    width: 240px;
    height: 240px;
    background: var(--accent-green);
    bottom: -40px;
    left: -40px;
}

.footer-decoration-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-blue);
    top: 42%;
    left: 55%;
    transform: translate(-50%, -50%);
}

.footer > .container {
    position: relative;
    z-index: 1;
}

/* Newsletter Section */
.footer-newsletter {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px;
    margin: 60px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    backdrop-filter: blur(20px);
}

.newsletter-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.newsletter-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.newsletter-text h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-input {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.newsletter-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%);
    color: #3730A3;
    border: 1px solid rgba(199, 210, 254, 0.85);
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(30, 27, 75, 0.18), 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(30, 27, 75, 0.24), 0 4px 8px rgba(15, 23, 42, 0.12);
}

/* Main Footer */
.footer-main {
    /* Раньше верхний воздух давала newsletter (margin 60px); без неё контент «прилипал» к краю */
    padding-top: 48px;
    padding-bottom: 28px;
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, 1fr));
    gap: 36px 40px;
    margin-bottom: 28px;
    align-items: start;
}

.footer-about {
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-logo svg {
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    line-height: 1.65;
    font-size: 15px;
}

.footer-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Footer Columns */
.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column h4 svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-column ul li a svg {
    color: var(--accent-green);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-column ul li a:hover svg {
    opacity: 1;
    transform: translateX(0);
}

/* Contact List */
.contact-list li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 0;
}

.contact-item svg {
    color: var(--primary-blue) !important;
    opacity: 1 !important;
    transform: none !important;
    flex-shrink: 0;
}

.contact-item:hover {
    padding-left: 0 !important;
}

.working-hours {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.working-hours svg {
    color: var(--accent-green);
    flex-shrink: 0;
}

/* Trust Badges */
.footer-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    min-height: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.trust-badge svg {
    width: 28px;
    height: 28px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.trust-badge div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trust-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.trust-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 40px;
}

.footer-legal {
    flex: 1;
}

.footer-legal p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-links a:hover::after {
    width: 100%;
}

/* Back to Top Button */
.back-to-top {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding: 50px 0 70px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        display: none;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .benefit-card {
        padding: 28px 20px;
    }
    
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-bottom: 60px;
    }
    
    .stat-card {
        padding: 28px 20px;
    }
    
    .stat-number {
        font-size: 44px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .footer-newsletter {
        flex-direction: column;
        padding: 36px;
        gap: 28px;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        max-width: 100%;
    }
    
    .footer-main {
        padding-top: 48px;
    }
    
    .footer-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    
    .faq-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 32px;
    }
    
    .faq-category {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 28px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .benefit-card {
        padding: 32px 24px 28px;
    }
    
    .benefit-icon-wrapper {
        justify-content: center;
    }
    
    .benefit-icon {
        width: 48px;
        height: 48px;
    }
    
    .benefit-content {
        text-align: center;
    }
    
    .benefit-title {
        font-size: 18px;
    }
    
    .benefit-description {
        font-size: 14px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .example-image {
        height: 200px;
    }
    
    .example-content {
        padding: 20px 22px 24px;
    }
    
    .examples-filters {
        gap: 8px;
    }
    
    .filter-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .cta-title {
        font-size: 20px;
    }
    
    .cta-description {
        font-size: 14px;
    }
    
    .cta-stats {
        gap: 24px;
    }
    
    .cta-stat-value {
        font-size: 24px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .step-card {
        padding: 32px 24px 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .partners-logos {
        flex-direction: column;
    }
    
    .footer-newsletter {
        padding: 32px 24px;
        gap: 24px;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .newsletter-text h3 {
        font-size: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-main {
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-trust {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-legal {
        order: 2;
    }
    
    .back-to-top {
        order: 1;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .faq-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .faq-search {
        width: 100%;
        margin-top: 0;
    }
    
    .faq-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .faq-categories {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }
    
    .faq-category {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .faq-item {
        padding-left: 60px;
    }
    
    .faq-number {
        left: 16px;
        font-size: 24px;
    }
    
    .faq-question {
        font-size: 16px;
        padding: 20px 20px 20px 0;
    }
    
    .faq-question-icon {
        width: 40px;
        height: 40px;
    }
    
    .faq-cta {
        padding: 36px 24px;
    }
    
    .faq-cta h3 {
        font-size: 22px;
    }
    
    .faq-cta-icon {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .generator-form {
        padding: 24px;
    }
    
    .step-card {
        padding: 24px 16px;
    }
    
    .step-icon {
        width: 56px;
        height: 56px;
    }
    
    .step-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 48px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .stat-icon {
        width: 64px;
        height: 64px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .partners-section {
        padding: 32px 20px;
    }
    
    .partners-title {
        font-size: 20px;
        margin-bottom: 32px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .partner-card {
        padding: 20px 12px;
    }
    
    .partner-icon {
        font-size: 28px;
    }
    
    .partner-name {
        font-size: 16px;
    }
    
    .partner-full {
        font-size: 11px;
    }
    
    .partner-meta {
        font-size: 10px;
    }
    
    .faq-category {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .faq-item {
        padding-left: 50px;
    }
    
    .faq-number {
        left: 12px;
        font-size: 20px;
    }
    
    .faq-question {
        font-size: 15px;
        padding: 18px 16px 18px 0;
    }
    
    .faq-question-icon {
        width: 36px;
        height: 36px;
    }
    
    .faq-question-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
    
    .faq-cta {
        padding: 32px 20px;
    }
    
    .faq-cta h3 {
        font-size: 20px;
    }
    
    .faq-cta p {
        font-size: 14px;
    }
    
    .footer-newsletter {
        padding: 24px 20px;
    }
    
    .newsletter-icon {
        width: 56px;
        height: 56px;
    }
    
    .newsletter-text h3 {
        font-size: 18px;
    }
    
    .newsletter-text p {
        font-size: 14px;
    }
    
    .footer-logo {
        font-size: 22px;
    }
    
    .footer-stats {
        gap: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .trust-badge {
        flex-direction: column;
        text-align: center;
        padding: 14px 12px;
    }
    
    .trust-title {
        font-size: 13px;
    }
    
    .footer-legal p {
        font-size: 13px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
}

/* ===========================
   UTILITY
=========================== */
.hidden {
    display: none !important;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ===========================
   AUTH MODAL
=========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    color: var(--text-gray);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.modal-auth {
    padding: 32px 28px 28px;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-tab {
    padding: 10px 20px;
    border: none;
    background: var(--bg-light);
    color: var(--text-gray);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-tab:hover {
    color: var(--text-dark);
}

.modal-tab.active {
    background: var(--primary-blue);
    color: var(--white);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-auth-hint {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.modal-auth-hint-accent {
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    border: 1px solid #c7d2fe;
    color: #334155;
    line-height: 1.45;
}

/* Модалка тарифа: компактный макет, промо-блок цены, анимация появления. */
.modal.modal-tariff-upsell {
    max-width: 640px;
    padding: 26px 22px 22px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.85) inset,
        0 28px 56px rgba(15, 23, 42, 0.12),
        0 12px 28px rgba(79, 70, 229, 0.1);
    transition: none;
}

.modal-overlay.is-open .modal.modal-tariff-upsell {
    animation: tariffModalEnter 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tariffModalEnter {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.modal-tariff-upsell .modal-title {
    margin-bottom: 6px;
}

.tariff-upsell-title {
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tariff-upsell-hero {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-right: 40px;
}

.tariff-upsell-hero-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.tariff-upsell-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.tariff-upsell-alert {
    display: none;
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
}

.tariff-upsell-alert:not(:empty) {
    display: block;
}

.tariff-upsell-body {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

.tariff-upsell-body--compact {
    gap: 16px;
}

@media (min-width: 560px) {
    .tariff-upsell-body--compact {
        grid-template-columns: minmax(200px, 0.95fr) minmax(0, 1.2fr);
        gap: 20px;
        align-items: start;
    }
}

.tariff-upsell-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Блок «большая цена + зачёркнутая старая + бейдж скидки» (промо первого подключения). */
.tariff-upsell-price-spotlight {
    position: relative;
    padding: 18px 16px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    overflow: visible;
}

.tariff-upsell-price-caption {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
}

.tariff-upsell-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    position: relative;
    z-index: 1;
}

.tariff-upsell-price-current {
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 8vw, 3.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #1e1b4b;
}

.tariff-upsell-price-currency {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #312e81;
    margin-right: 4px;
}

.tariff-upsell-price-old {
    font-size: 15px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    align-self: center;
}

.tariff-upsell-discount-badge {
    position: absolute;
    right: 10px;
    bottom: 38px;
    z-index: 2;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
    transform: rotate(-6deg);
}

.tariff-upsell-price-note {
    margin: 28px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: #94a3b8;
}

@media (max-width: 420px) {
    .tariff-upsell-discount-badge {
        position: static;
        display: inline-block;
        margin-top: 10px;
        transform: rotate(-4deg);
    }

    .tariff-upsell-price-note {
        margin-top: 12px;
    }
}

.tariff-upsell-mini-trust {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
    text-align: center;
}

@media (min-width: 560px) {
    .tariff-upsell-mini-trust {
        text-align: left;
    }
}

.modal-overlay.is-open .tariff-upsell-price-spotlight .tariff-upsell-price-current,
.modal-overlay.is-open .tariff-upsell-price-spotlight .tariff-upsell-price-currency {
    animation: tariffPriceReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.modal-overlay.is-open .tariff-upsell-price-spotlight .tariff-upsell-price-old {
    animation: tariffPriceReveal 0.5s ease 0.18s both;
}

.modal-overlay.is-open .tariff-upsell-price-spotlight .tariff-upsell-discount-badge {
    animation: tariffBadgePop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) 0.22s both;
}

@keyframes tariffPriceReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tariffBadgePop {
    from {
        opacity: 0;
        transform: rotate(-14deg) scale(0.4);
    }

    to {
        opacity: 1;
        transform: rotate(-6deg) scale(1);
    }
}

.tariff-upsell-main {
    padding: 16px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.modal-overlay.is-open .modal-tariff-upsell .tariff-upsell-main {
    animation: tariffUpsellMainIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

@keyframes tariffUpsellMainIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tariff-upsell-benefits-title {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.tariff-upsell-benefits {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.tariff-upsell-benefits--short li {
    padding: 8px 0;
}

.tariff-upsell-benefits li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    line-height: 1.45;
    color: #475569;
}

.tariff-upsell-benefits li:last-child {
    border-bottom: none;
}

.tariff-upsell-benefit-ic {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
}

.tariff-upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.tariff-upsell-btn-hero,
.tariff-upsell-btn-secondary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    padding-top: 12px;
    padding-bottom: 12px;
}

.tariff-upsell-btn-hero .tariff-upsell-btn-label,
.tariff-upsell-btn-secondary .tariff-upsell-btn-label {
    font-size: 15px;
    font-weight: 700;
}

.tariff-upsell-btn-meta {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.tariff-upsell-btn-hero .tariff-upsell-btn-meta {
    font-weight: 500;
}

.tariff-upsell-legal {
    margin-bottom: 0 !important;
    font-size: 12px !important;
}

.verification-notice {
    max-width: 1200px;
    margin: 14px auto 0;
    padding: 14px 16px 14px 44px;
    position: relative;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.verification-notice.notice-success {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #334155;
}

.verification-notice.notice-error {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.verification-notice.notice-info {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #334155;
}

.verification-notice::before {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    content: 'i';
}

.verification-notice.notice-success::before {
    content: '✓';
    background: #c7d2fe;
    color: #4338ca;
}

.verification-notice.notice-error::before {
    content: '!';
    background: #e2e8f0;
    color: #4f46e5;
}

.verification-notice.notice-info::before {
    background: #c7d2fe;
    color: #4338ca;
}

/** Подсказка после регистрации: подтвердите почту перед входом. */
.auth-verification-hint {
    margin: 0 0 12px;
    padding: 12px 14px 12px 40px;
    position: relative;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    background: #eef2ff;
    border: 1px solid #a5b4fc;
    color: #334155;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.auth-verification-hint::before {
    content: '✉';
    position: absolute;
    left: 13px;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #c7d2fe;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-note-card {
    margin: -2px 0 12px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.auth-note-card p {
    margin: 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.auth-note-card p + p {
    margin-top: 6px;
}

.auth-note-card-compact {
    margin-top: -4px;
}

/* Project details modal */
.modal.modal-project-details {
    position: relative;
    max-width: min(980px, calc(100vw - 32px));
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 55% 45% at 92% 8%, rgba(199, 210, 254, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 45% 40% at 6% 92%, rgba(224, 231, 255, 0.5) 0%, transparent 72%),
        linear-gradient(165deg, #ffffff 0%, #fafbff 48%, #f8faff 100%);
    border: 1px solid rgba(199, 210, 254, 0.55);
}

.project-details-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.project-details-orbit {
    position: absolute;
    top: -28px;
    right: -36px;
    width: 280px;
    height: 230px;
    opacity: 0.9;
}

.project-details-mini-doc {
    position: absolute;
    width: 88px;
    padding: 10px 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(199, 210, 254, 0.65);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-details-mini-doc--1 {
    top: 18%;
    right: 4%;
    transform: rotate(-7deg);
    animation: projectDetailsFloat 5.5s ease-in-out infinite;
}

.project-details-mini-doc--2 {
    bottom: 16%;
    left: 3%;
    transform: rotate(6deg);
    animation: projectDetailsFloat 6.2s ease-in-out infinite reverse;
}

.project-details-mini-doc__type,
.project-details-mini-doc__badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #4F46E5;
    text-transform: uppercase;
}

.project-details-mini-doc__badge {
    align-self: flex-start;
    padding: 2px 6px;
    border-radius: 999px;
    background: #EEF2FF;
}

.project-details-mini-doc__line {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: #E0E7FF;
}

.project-details-mini-doc__line--short {
    width: 55%;
}

.project-details-shield {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #E0E7FF;
    color: #6366F1;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.1);
}

.project-details-shield--1 { top: 12%; left: 8%; animation: projectDetailsFloat 4.8s ease-in-out infinite; }
.project-details-shield--2 { top: 42%; right: 14%; animation: projectDetailsFloat 5.8s ease-in-out infinite 0.4s; }
.project-details-shield--3 { bottom: 22%; right: 28%; animation: projectDetailsFloat 5.2s ease-in-out infinite 0.8s; }

@keyframes projectDetailsFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.project-details-mini-doc--1 {
    animation-name: projectDetailsFloatTilt1;
}

.project-details-mini-doc--2 {
    animation-name: projectDetailsFloatTilt2;
}

@keyframes projectDetailsFloatTilt1 {
    0%, 100% { transform: rotate(-7deg) translateY(0); }
    50% { transform: rotate(-7deg) translateY(-6px); }
}

@keyframes projectDetailsFloatTilt2 {
    0%, 100% { transform: rotate(6deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-5px); }
}

.project-details-inner {
    position: relative;
    z-index: 1;
    padding: 28px 36px 24px;
}

.modal-project-details .modal-title {
    margin-bottom: 6px;
    font-size: 1.35rem;
}

.project-details-hint {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 0 16px;
    line-height: 1.45;
    max-width: 42rem;
}

.project-details-field--subject {
    margin-bottom: 12px;
}

.project-details-group {
    margin: 0 0 16px;
    padding: 0;
    border: none;
}

.project-details-group legend {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #0f172a);
    margin-bottom: 10px;
    padding: 0;
}

.project-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

.project-details-field--span2 {
    grid-column: span 2;
}

.modal-project-details .form-group {
    margin-bottom: 0;
}

.modal-project-details .form-group label {
    margin-bottom: 4px;
    font-size: 13px;
}

.modal-project-details .form-input {
    padding: 10px 12px;
    font-size: 14px;
}

.project-details-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

@media (max-width: 820px) {
    .project-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .project-details-field--span2 {
        grid-column: 1 / -1;
    }

    .project-details-mini-doc,
    .project-details-shield--2,
    .project-details-shield--3 {
        display: none;
    }

    .project-details-inner {
        padding: 24px 22px 20px;
    }
}

@media (max-width: 560px) {
    .project-details-grid {
        grid-template-columns: 1fr;
    }

    .project-details-field--span2 {
        grid-column: auto;
    }

    .project-details-actions {
        flex-direction: column-reverse;
    }

    .project-details-actions .btn-primary,
    .project-details-actions .btn-secondary {
        width: 100%;
    }

    .project-details-decor {
        display: none;
    }

    .modal.modal-project-details {
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-details-mini-doc--1,
    .project-details-mini-doc--2,
    .project-details-shield {
        animation: none !important;
    }
}

/* Structure modal */
.modal-structure {
    max-width: 560px;
    padding: 32px 28px 28px;
}

.structure-modal-hint {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.structure-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    max-height: 320px;
    overflow-y: auto;
}

.structure-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light, #f8fafc);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    transition: var(--transition);
}

.structure-item:hover {
    border-color: #cbd5e1;
}

.structure-item.dragging {
    opacity: 0.6;
}

.structure-item-handle {
    cursor: grab;
    color: var(--text-gray);
    padding: 4px;
    flex-shrink: 0;
}

.structure-item-handle:active {
    cursor: grabbing;
}

.structure-item-number {
    font-weight: 700;
    color: var(--text-gray);
    min-width: 24px;
    flex-shrink: 0;
}

.structure-item--subsection {
    margin-left: 20px;
    border-style: dashed;
    background: #fff;
}

.structure-item--subsection .structure-item-number {
    min-width: 18px;
    font-size: 14px;
    color: var(--primary-blue, #2563eb);
}

.structure-item-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    padding: 4px 0;
}

.structure-item-input:focus {
    outline: none;
}

.structure-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 20px;
    cursor: pointer;
}

.structure-disclaimer input {
    margin-top: 3px;
    flex-shrink: 0;
}

.btn-structure-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.auth-form-error {
    font-size: 14px;
    color: #dc2626;
    margin-bottom: 12px;
    min-height: 20px;
}

.auth-form-meta {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 10px;
}

.auth-link-inline {
    font-size: 13px;
    text-decoration: none;
}

#forgotPasswordBtn {
    text-decoration: none;
}

.btn-resend-verification {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #a5b4fc;
    background: #eef2ff;
    color: #4338ca;
    margin-bottom: 12px;
    text-decoration: none !important;
}

.btn-resend-verification:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #3730a3;
}

.btn-resend-verification:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.auth-form button[type="submit"] {
    margin-top: 8px;
}

.auth-form-footer {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary);
}

.credentials-display {
    margin-bottom: 24px;
}

.credential-row {
    margin-bottom: 16px;
}

.credential-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.credential-value-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.credential-value-wrap input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: monospace;
    background: var(--bg-light);
}

.btn-copy {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #A5B4FC;
    color: #4338CA;
    background: var(--gradient-secondary);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: #818CF8;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.2), 0 3px 6px rgba(15, 23, 42, 0.1);
}

/* Nav user (logged in) */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-email {
    font-size: 14px;
    color: var(--text-gray);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    padding: 8px 16px;
    font-size: 14px;
}

/* Кнопка перехода в личный кабинет в шапке: без подчеркивания как у ссылок. */
.nav-cabinet-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 14px;
}

/* Generator result / status */
.generator-result {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.generator-status {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.generator-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.generator-download-btn {
    cursor: pointer;
}

/* Generating overlay — светлый экран при генерации структуры/проекта */
.generating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.generating-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.generating-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.generating-wavy-icon {
    color: #8B7EC8;
}

.generating-wavy-icon .wavy-path {
    stroke-dasharray: 12 24;
    animation: generating-wavy-flow 1.2s linear infinite;
}

@keyframes generating-wavy-flow {
    to { stroke-dashoffset: -72; }
}

.generating-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #8B7EC8;
    margin: 0;
}

/* Окно ожидания с шагами — генерация документа */
.generating-overlay-simple {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generating-overlay-steps {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.generating-overlay-steps.hidden {
    display: none !important;
}

.generating-steps-modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    max-width: 520px;
    width: 100%;
    padding: 32px 28px;
}

.generating-steps-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
    text-align: center;
}

.generating-steps-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 0 24px;
    text-align: center;
}

.generating-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generating-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s, border-color 0.2s;
}

.generating-step.active {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.generating-step.done {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.generating-step-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
}

.generating-step.active .generating-step-icon,
.generating-step.done .generating-step-icon {
    color: var(--primary-blue);
}

.generating-step.done .generating-step-icon {
    color: var(--primary);
}

.generating-step-body {
    flex: 1;
    min-width: 0;
}

.generating-step-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.generating-step-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
}

.generating-step-status {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-status-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.generating-step.done .gen-status-check {
    display: flex !important;
}

.generating-step.done .gen-status-spinner {
    display: none !important;
}

.gen-status-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: gen-spin 0.8s linear infinite;
}

.generating-step.done .generating-step-status .gen-status-spinner,
.generating-step.pending .generating-step-status .gen-status-spinner {
    border-color: #e2e8f0;
    border-top-color: #cbd5e1;
}

.generating-step.active .generating-step-status .gen-status-spinner {
    border-color: #C7D2FE;
    border-top-color: var(--primary-blue);
}

@keyframes gen-spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 10px;
    background: var(--text-dark);
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
