/* ============================================
   ВЕРНИСТРАХОВКУ.РФ - CUSTOM STYLES
   ============================================ */

/* ========== CSS VARIABLES (ТЗ цветовая схема) ========== */
:root {
    /* Основные цвета */
    --primary: #1E3A8A;      /* Primary Blue */
    --secondary: #F97316;    /* Accent Orange (для CTA) */
    --success: #10B981;      /* Success Green */
    --warning: #EAB308;      /* Warning Yellow */
    --danger: #EF4444;       /* Danger Red */

    /* Нейтральные */
    --black: #111827;
    --gray-900: #1F2937;
    --gray-700: #374151;
    --gray-500: #6B7280;
    --gray-300: #D1D5DB;
    --gray-100: #F3F4F6;
    --white: #FFFFFF;

    /* Фоны */
    --bg-light: #F9FAFB;
    --bg-dark: #1F2937;

    /* Типографика */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Разрешаем overflow для header, чтобы кнопка бургерного меню не обрезалась */
#header {
    overflow-x: visible !important;
}

* {
    box-sizing: border-box;
}

/* ========== HEADER STICKY ========== */
#header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: white !important;
    display: block !important;
    visibility: visible !important;
    overflow-x: visible !important; /* Разрешаем overflow для видимости кнопки */
}

#header.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Отступ для контента под фиксированным header не нужен - используем scroll-margin-top для секций */

/* ========== HEADER LOGO ========== */
#header img[alt="вернистраховку.рф"] {
    transition: transform 0.3s ease;
    filter: brightness(0) saturate(100%) invert(33%) sepia(89%) saturate(1766%) hue-rotate(211deg) brightness(95%) contrast(93%);
    align-self: center;
    vertical-align: middle;
}

#header a:hover img[alt="вернистраховку.рф"] {
    transform: scale(1.05);
    filter: brightness(0) saturate(100%) invert(40%) sepia(93%) saturate(2000%) hue-rotate(211deg) brightness(100%) contrast(95%);
}

#header a[href="#hero"] {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    max-width: 100%;
    flex-shrink: 0;
}

/* На мобильных выравниваем логотип и название по центру вертикально */
@media (max-width: 640px) {
    #header a[href="#hero"] {
        align-items: center !important;
        margin-left: 0 !important; /* Прижимаем к левому краю */
    }
}

#header a[href="#hero"]:hover {
    opacity: 0.85;
}

#header nav {
    max-width: 100%;
    overflow: visible;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* Для абсолютного позиционирования кнопки */
}

#header .container {
    max-width: 100%;
    overflow: visible; /* Изменено с hidden на visible для предотвращения обрезания бургерного меню */
}

/* ========== LOGO AND TITLE BLOCK ========== */
.logo-title-block {
    gap: 0.125rem; /* Минимальное расстояние между логотипом и текстом */
}

/* На маленьких экранах уменьшаем расстояние между логотипом и текстом */
@media (max-width: 640px) {
    .logo-title-block {
        gap: 0 !important; /* 0px - название вплотную к логотипу */
    }
}

@media (max-width: 375px) {
    .logo-title-block {
        gap: 0 !important; /* 0px - название вплотную к логотипу */
    }
}

.logo-img {
    margin-right: 0.125rem; /* Дополнительный минимальный отступ справа от логотипа */
}

/* На маленьких экранах убираем отступ между логотипом и текстом */
@media (max-width: 640px) {
    .logo-img {
        margin-right: 0 !important; /* 0px - название вплотную к логотипу */
    }
}

@media (max-width: 375px) {
    .logo-img {
        margin-right: 0 !important; /* 0px - название вплотную к логотипу */
    }
}

.logo-text {
    margin-left: 0 !important; /* Убираем левый отступ у текста */
}

/* На маленьких экранах уменьшаем размер шрифта названия */
@media (max-width: 640px) {
    .logo-text {
        font-size: 0.875rem !important; /* 14px */
        letter-spacing: 0.02em !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 390px) {
    .logo-text {
        font-size: 0.8125rem !important; /* 13px */
        letter-spacing: 0.015em !important;
    }
}

@media (max-width: 640px) {
    /* Убираем padding контейнера на мобильных - максимально влево */
    #header .container {
        padding-left: 0.25rem !important; /* 4px - минимальный отступ от края экрана */
        padding-right: 0.5rem !important; /* 8px - для бургера */
    }
    
    /* Выравниваем nav по вертикали */
    #header nav {
        align-items: center !important;
        height: 100% !important;
    }
    
    .logo-title-block {
        gap: 0.25rem !important; /* 4px - минимальное расстояние между логотипом и текстом */
        max-width: calc(100% - 50px) !important; /* 40px кнопка + 10px отступы */
        flex-shrink: 1;
        min-width: 0;
        margin-left: 0 !important; /* Убираем левый отступ - прижимаем к левому краю */
        margin-right: 0 !important;
        align-items: center !important; /* Выравниваем по центру вертикально */
        height: 100% !important; /* Занимаем всю высоту nav */
    }
    
    .logo-text {
        font-size: 0.875rem !important; /* 14px - уменьшено для мобильных */
        letter-spacing: 0.02em !important;
        line-height: 1.2 !important;
        margin: 0 !important; /* Убираем все отступы */
        display: flex !important;
        align-items: center !important; /* Выравниваем по центру вертикально */
    }
    
    .logo-img {
        height: 3.5rem !important; /* 56px - уменьшено для мобильных */
        margin-top: 0 !important; /* Убираем верхний отступ */
        margin-bottom: 0 !important; /* Убираем нижний отступ */
        margin-right: 0.25rem !important; /* 4px - минимальный отступ от текста */
        margin-left: 0 !important; /* Убираем левый отступ - прижимаем к левому краю */
        align-self: center !important; /* Выравниваем по центру вертикально */
        vertical-align: middle !important;
    }
    
    /* Гарантируем видимость бургерного меню на очень маленьких экранах */
    #mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important; /* Прижимаем к правому краю */
        margin-right: 0 !important; /* Убираем правый отступ */
        position: relative !important;
        z-index: 10000 !important; /* Высокий z-index для предотвращения перекрытия */
    }
    
    /* Убеждаемся, что навигация не обрезает бургерное меню */
    #header nav {
        overflow: visible !important;
        position: relative;
    }
    
    /* Убеждаемся, что контейнер не обрезает элементы */
    #header .container {
        overflow: visible !important;
    }
}

/* Для очень маленьких экранов (iPhone SE - 375px и меньше) */
@media (max-width: 390px) {
    /* Еще меньше padding для максимального использования пространства */
    #header .container {
        padding-left: 0.25rem !important; /* 4px - минимальный отступ от края */
        padding-right: 0.5rem !important; /* 8px - для бургера */
        position: relative;
    }
    
    #header nav {
        padding-right: 0 !important;
        position: relative;
        align-items: center !important;
        height: 100% !important;
    }
    
    .logo-title-block {
        gap: 0.25rem !important; /* 4px - минимальное расстояние */
        max-width: calc(100% - 50px) !important; /* 40px кнопка + 10px отступы */
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex-shrink: 1;
        min-width: 0;
        align-items: center !important; /* Выравниваем по центру вертикально */
        height: 100% !important; /* Занимаем всю высоту nav */
    }
    
    .logo-img {
        margin-right: 0.25rem !important; /* 4px - минимальный отступ */
        margin-left: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        height: 3.25rem !important; /* 52px - еще меньше */
        flex-shrink: 0;
        align-self: center !important; /* Выравниваем по центру вертикально */
        vertical-align: middle !important;
    }
    
    .logo-text {
        font-size: 0.75rem !important; /* 12px - еще меньше */
        letter-spacing: 0.01em !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2 !important;
        margin: 0 !important; /* Убираем все отступы */
        align-self: center !important; /* Выравниваем по центру вертикально */
        display: flex !important;
        align-items: center !important;
    }
    
    /* На экранах 390px используем абсолютное позиционирование на уровне текста */
    #mobile-menu-btn {
        position: absolute !important;
        right: 0.5rem !important; /* 8px от правого края header */
        top: 50% !important; /* По центру header */
        transform: translateY(-50%) !important; /* Центрирование по вертикали */
        flex-shrink: 0 !important;
        min-width: 40px !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 10001 !important;
    }
}

/* Для экстремально маленьких экранов (iPhone SE - 375px) */
@media (max-width: 375px) {
    #header .container {
        padding-left: 0.25rem !important; /* 4px - минимальный отступ от края */
        padding-right: 0.5rem !important; /* 8px - для бургера */
        position: relative;
    }
    
    #header nav {
        padding-right: 0 !important; /* Убираем padding у nav тоже */
        position: relative;
        align-items: center !important;
        height: 100% !important;
    }
    
    .logo-title-block {
        max-width: calc(100% - 50px) !important; /* 36px кнопка + 14px отступы */
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-items: center !important;
        height: 100% !important; /* Занимаем всю высоту nav */
    }
    
    .logo-img {
        height: 3rem !important; /* 48px - еще меньше */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-right: 0.25rem !important; /* 4px - минимальный отступ */
        margin-left: 0 !important;
        align-self: center !important; /* Выравниваем по центру вертикально */
        vertical-align: middle !important;
    }
    
    .logo-text {
        font-size: 0.6875rem !important; /* 11px - минимальный размер */
        letter-spacing: 0.005em !important;
        line-height: 1.2 !important;
        margin: 0 !important; /* Убираем все отступы */
        align-self: center !important; /* Выравниваем по центру вертикально */
        display: flex !important;
        align-items: center !important;
    }
    
    /* Обычная кнопка в nav - абсолютное позиционирование на уровне текста */
    #mobile-menu-btn {
        display: flex !important;
        position: absolute !important;
        right: 0.5rem !important; /* 8px от правого края header */
        top: 50% !important; /* По центру header */
        transform: translateY(-50%) !important; /* Центрирование по вертикали */
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        z-index: 10001 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: center !important; /* Выравниваем иконку по центру */
        justify-content: center !important;
    }
    
    #mobile-menu-btn i {
        font-size: 1.125rem !important;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

/* ========== CALCULATOR RESULT SECTION ========== */
#result-section {
    animation: slideUp 0.6s ease-out;
}

.result-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 2rem 2.5rem;
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.14);
}

.result-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.result-header h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.result-header p {
    font-size: 1rem;
    color: #4B5563;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 100%);
    color: #2563EB;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.result-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.result-summary-item {
    background: #F3F4FF;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.result-summary-item--accent {
    background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
    color: #FFFFFF;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.25);
}

.result-summary-label {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: inherit;
    opacity: 0.85;
}

.result-amount {
    font-size: 1.85rem;
    font-weight: 700;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-amount--accent {
    color: #FFFFFF;
    font-size: 2.2rem;
}

.result-note {
    font-size: 0.9rem;
    color: rgba(31, 41, 55, 0.85);
    line-height: 1.45;
}

.result-summary-item--accent .result-note {
    color: rgba(255, 255, 255, 0.85);
}

.result-breakdown {
    background: #F3F4FF;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    margin: 1.5rem 0 1.25rem 0;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.result-explanation-title {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.result-breakdown-list li {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.result-breakdown-list span {
    color: #4B5563;
    font-size: 0.9rem;
    line-height: 1.4;
}

.result-breakdown-list strong {
    color: #1F2937;
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

.result-timeline {
    background: #F3F4FF;
    border-radius: 12px;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    line-height: 1.6;
    color: #374151;
}

.result-timeline-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.result-timeline p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.result-cta {
    background: #F3F4FF;
    padding: 1.75rem 1.85rem;
    border-radius: 16px;
    margin-top: 1.5rem;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.cta-text {
    font-size: 1.3rem;
    color: #1F2937;
    text-align: center;
    margin-bottom: 0.5rem;
}

.cta-description {
    text-align: center;
    color: #4B5563;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.contact-form {
    margin-top: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563EB;
}

.checkbox-label {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    margin-top: 0.125rem;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-submit {
    width: 100%;
    background: #F59E0B;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #D97706;
    transform: translateY(-2px);
}

.disclaimer {
    font-size: 0.875rem;
    color: #4B5563;
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
}

/* Date input */
#loan-date {
    height: 3.5rem;
    font-size: 1.05rem;
    line-height: 1.5;
    padding-right: 3.5rem;
    border-color: #D1D5DB !important; /* border-gray-300 - не красный по умолчанию */
}

/* Поле даты не должно быть красным по умолчанию, только при валидации через JS */
#loan-date:invalid {
    border-color: #D1D5DB !important;
}

#loan-date::-webkit-calendar-picker-indicator {
    width: 2rem;
    height: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
}

#loan-date::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

#loan-date::-moz-focus-inner {
    border: 0;
}

input[type="date"] {
    color-scheme: light;
}

/* ========== FAQ ACCORDION ========== */
.faq-question {
    transition: background 0.3s ease;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none; /* Используем display вместо max-height для совместимости с JS */
    overflow: hidden;
}

.faq-item.active .faq-answer {
    display: block !important; /* Показываем при активном состоянии */
    padding-top: 1rem;
}

/* ========== SWIPER CUSTOMIZATION ========== */
.swiper {
    padding-bottom: 50px !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: #2563EB !important;
}

.swiper-pagination-bullet {
    background: #2563EB !important;
}

.swiper-pagination-bullet-active {
    background: #F59E0B !important;
}

/* ========== FLOATING CALL BUTTON ========== */
#floating-call {
    animation: pulse 2s infinite;
}

/* ========== MODAL ========== */
#modal {
    display: none !important;
}

#modal.active {
    display: flex !important;
}

/* Гарантируем, что модалка видна при активном состоянии, даже если есть класс hidden */
#modal.active.hidden,
#modal.hidden.active {
    display: flex !important;
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    position: fixed;
    top: 80px; /* Высота header на мобильных */
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 9998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 1024px) {
    #mobile-menu {
        top: 96px; /* Высота header на desktop */
        max-height: calc(100vh - 96px);
    }
}

#mobile-menu-btn {
    z-index: 9999;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

/* Hamburger Icon Animation */
#mobile-menu-btn i {
    transition: transform 0.3s ease-in-out;
    font-size: 1.5rem;
}

#mobile-menu-btn.active i.fa-bars {
    transform: rotate(90deg);
}

/* Гарантия видимости бургерного меню на мобильных и скрытие на десктопе */
@media (max-width: 1023px) {
    /* На экранах больше 390px используем обычное позиционирование */
    #mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10000 !important;
        flex-shrink: 0 !important;
        margin-left: auto !important; /* Прижимаем к правому краю */
        margin-right: 0 !important; /* Убираем правый отступ */
    }
    
    /* Убеждаемся, что навигация не обрезает элементы */
    #header nav {
        overflow: visible !important;
        position: relative;
    }
    
    /* Убеждаемся, что контейнер не обрезает элементы */
    #header .container {
        overflow: visible !important;
    }
}

/* На экранах от 391px до 640px - обычное позиционирование */
@media (min-width: 391px) and (max-width: 640px) {
    #mobile-menu-btn {
        position: relative !important;
    }
}

/* Скрытие бургерного меню на десктопе */
@media (min-width: 1024px) {
    #mobile-menu-btn {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Burger Animation */
.burger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #1F2937;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

.burger-active .burger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger-active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-active .burger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ========== UTILITIES ========== */
.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .result-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .result-header h2 {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .result-header p {
        font-size: 0.95rem;
    }

    .result-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.9rem;
    }

    .result-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-summary-item {
        padding: 1.15rem;
    }

    .result-summary-label {
        font-size: 0.85rem;
    }

    .result-amount {
        font-size: 1.75rem;
    }

    .result-amount--accent {
        font-size: 2rem;
    }

    .result-note {
        font-size: 0.85rem;
    }

    .result-breakdown {
        padding: 1.25rem 1.15rem;
    }

    .result-explanation-title {
        font-size: 1.05rem;
    }

    .result-breakdown-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .result-breakdown-list li {
        padding: 0.75rem 0.9rem;
    }

    .result-breakdown-list span {
        font-size: 0.85rem;
    }

    .result-breakdown-list strong {
        font-size: 1.05rem;
    }

    .result-timeline {
        padding: 1rem 1.15rem;
    }

    .result-timeline-title {
        font-size: 1rem;
    }

    .result-timeline p {
        font-size: 0.9rem;
    }

    .result-cta {
        padding: 1.5rem 1.25rem;
    }

    .cta-text {
        font-size: 1.15rem;
    }

    .cta-description {
        font-size: 0.9rem;
    }
}

/* ========== SMOOTH SCROLLING OFFSET ========== */
section {
    scroll-margin-top: 100px;
}

@media (max-width: 1023px) {
    section {
        scroll-margin-top: 90px; /* h-20 = 80px + небольшой отступ */
    }
}

@media (min-width: 1024px) {
    section {
        scroll-margin-top: 110px; /* h-24 = 96px + небольшой отступ */
    }
}

/* ========== BUTTON HOVER EFFECTS ========== */
button,
.btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

button:active,
.btn:active {
    transform: scale(0.98);
}

/* ========== FORM VALIDATION STATES ========== */
/* Исключаем поле даты из автоматической валидации - валидация только через JS */
input:invalid:not(:placeholder-shown):not(#loan-date),
textarea:invalid:not(:placeholder-shown) {
    border-color: #EF4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #10B981;
}

/* ========== LOADING SPINNER ========== */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== PRINT STYLES ========== */
@media print {
    header,
    #floating-call,
    footer {
        display: none;
    }
}

/* ========== ACCESSIBILITY ========== */
:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* ========== SMOOTH TRANSITIONS ========== */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F9FAFB;
}

::-webkit-scrollbar-thumb {
    background: #2563EB;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1D4ED8;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ АНИМАЦИИ (ТЗ) ========== */

/* Пульсация CTA-кнопок */
@keyframes pulse-cta {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-pulse {
    animation: pulse-cta 2s ease-in-out infinite;
}

/* Появление снизу с fade */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Свечение для больших сумм */
.glow-green {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* Hover-эффект для карточек */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Прогресс-бар скролла */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--success) 100%);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Кнопка наверх */
#back-to-top {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.show {
    display: flex;
}

#back-to-top:hover {
    background: var(--blue-light);
    transform: translateY(-4px);
}

/* Кнопка скролла вверх (scroll-to-top) */
#scroll-to-top {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#scroll-to-top.hidden {
    display: none !important;
}

#scroll-to-top:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Липкая кнопка звонка (мобилка) */
#sticky-call-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: var(--success);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    animation: pulse-cta 2s ease-in-out infinite;
}

#sticky-call-mobile.show {
    display: flex;
}

@media (min-width: 768px) {
    #sticky-call-mobile {
        display: none !important;
    }
}

/* Exit-intent popup */
#exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

#exit-popup.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

#exit-popup-content {
    background: white;
    border-radius: 20px;
    padding: 48px;
    max-width: 560px;
    width: 90%;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Trust badges */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

/* Alert блоки */
.alert-warning {
    background: #FEF3C7;
    border-left: 4px solid var(--warning);
    padding: 24px;
    border-radius: 12px;
}

.alert-danger {
    background: #FEE2E2;
    border-left: 4px solid var(--danger);
    padding: 24px;
    border-radius: 12px;
}

/* Стрелки между шагами */
.step-arrow {
    width: 80px;
    height: 3px;
    background: var(--primary);
    position: relative;
    opacity: 0.3;
}

.step-arrow::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: -12px;
    font-size: 24px;
    color: var(--primary);
}

/* Мобильная оптимизация для минимальных размеров кнопок */
@media (max-width: 768px) {
    button,
    .btn,
    a.btn {
        min-height: 44px;
    }

    input,
    textarea,
    select {
        min-height: 44px;
        font-size: 16px; /* Предотвращает zoom на iOS */
    }
}

/* Обновление цветов Swiper на новые */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary) !important;
}

.swiper-pagination-bullet {
    background: var(--primary) !important;
}

.swiper-pagination-bullet-active {
    background: var(--secondary) !important;
}

/* Обновление цветов скроллбара на новые */
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-light);
}

/* Обновление focus-visible на новый primary */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========== REVIEW PHOTOS LIGHTBOX ========== */
.review-lightbox {
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-in-out;
}

.review-lightbox.hidden {
    display: none !important;
}

.review-lightbox:not(.hidden) {
    display: flex !important;
}

.review-photo-item img {
    cursor: pointer;
}

.review-lightbox img {
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Фиксация стрелок при нажатии */
#review-lightbox-prev:active,
#review-lightbox-next:active {
    transform: translateY(-50%) !important;
}

/* ========== TAILWIND FALLBACK - Полные стили для основных классов ========== */
/* Эти стили применяются, если Tailwind CSS не загрузился */
/* Используем CSS переменные для цветов */

/* ========== LAYOUT ========== */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.grid { display: grid !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.hidden { display: none !important; }

/* Flexbox */
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

/* ========== SPACING ========== */
.p-2 { padding: 0.5rem !important; }
.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
.px-10 { padding-left: 2.5rem !important; padding-right: 2.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.m-0 { margin: 0 !important; }
.m-4 { margin: 1rem !important; }
.m-6 { margin: 1.5rem !important; }
.m-8 { margin: 2rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* ========== SIZING ========== */
.w-full { width: 100% !important; }
.w-10 { width: 2.5rem !important; }
.w-14 { width: 3.5rem !important; }
.w-16 { width: 4rem !important; }
.w-20 { width: 5rem !important; }
.h-10 { height: 2.5rem !important; }
.h-14 { height: 3.5rem !important; }
.h-16 { height: 4rem !important; }
.h-20 { height: 5rem !important; }
.h-full { height: 100% !important; }
.min-w-\[40px\] { min-width: 40px !important; }
.max-w-6xl { max-width: 72rem !important; }
.max-w-7xl { max-width: 80rem !important; }
.max-w-screen-xl { max-width: 1280px !important; }

/* ========== TYPOGRAPHY ========== */
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.uppercase { text-transform: uppercase !important; }
.text-center { text-align: center !important; }
.whitespace-nowrap { white-space: nowrap !important; }

/* ========== COLORS ========== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-white { color: var(--white) !important; }
.text-gray-500 { color: var(--gray-500) !important; }
.text-gray-700 { color: var(--gray-700) !important; }
.text-gray-900 { color: var(--gray-900) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-white { background-color: var(--white) !important; }
.bg-transparent { background-color: transparent !important; }

/* ========== BORDERS & ROUNDING ========== */
.border-2 { border-width: 2px !important; }
.border-4 { border-width: 4px !important; }
.border-primary { border-color: var(--primary) !important; }
.border-secondary { border-color: var(--secondary) !important; }
.border-gray-300 { border-color: var(--gray-300) !important; }
.border-orange-100 { border-color: #ffedd5 !important; }
.rounded { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

/* ========== SHADOWS ========== */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; }

/* ========== HOVER EFFECTS ========== */
.hover\:text-primary:hover { color: var(--primary) !important; }
.hover\:bg-orange-600:hover { background-color: #ea580c !important; }
.hover\:bg-blue-800:hover { background-color: #1e40af !important; }
.hover\:bg-yellow-500:hover { background-color: #eab308 !important; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }

/* ========== TRANSITIONS ========== */
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.transition-all { transition-property: all !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.duration-300 { transition-duration: 300ms !important; }

/* ========== TRANSFORMS ========== */
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; }
.hover\:scale-105:hover { transform: scale(1.05) !important; }

/* ========== FOCUS ========== */
.focus\:border-primary:focus { border-color: var(--primary) !important; }
.focus\:border-secondary:focus { border-color: var(--secondary) !important; }
.focus\:outline-none:focus { outline: none !important; }

/* ========== POSITIONING ========== */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.inset-0 { top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; }
.top-4 { top: 1rem !important; }
.right-4 { right: 1rem !important; }
.bottom-4 { bottom: 1rem !important; }
.left-1\/2 { left: 50% !important; }
.z-50 { z-index: 50 !important; }
.z-9999 { z-index: 9999 !important; }

/* ========== OBJECT FIT ========== */
.object-cover { object-fit: cover !important; }

/* ========== ASPECT RATIO ========== */
.aspect-\[3\/4\] { aspect-ratio: 3 / 4 !important; }

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

/* ========== TRANSFORM ========== */
.-translate-x-1\/2 { transform: translateX(-50%) !important; }
.-translate-y-1 { transform: translateY(-0.25rem) !important; }

/* ========== CONTAINER ========== */
.container { width: 100% !important; margin-left: auto !important; margin-right: auto !important; padding-left: 1rem !important; padding-right: 1rem !important; }
/* Переопределение для header контейнера на маленьких экранах */
@media (max-width: 640px) {
    #header .container { padding-right: 0.75rem !important; }
}
@media (max-width: 390px) {
    #header .container { padding-right: 0.25rem !important; }
}
@media (max-width: 375px) {
    #header .container { padding-right: 0 !important; }
}
@media (min-width: 640px) { .container { max-width: 640px !important; } }
@media (min-width: 768px) { .container { max-width: 768px !important; } }
@media (min-width: 1024px) { .container { max-width: 1024px !important; } }
@media (min-width: 1280px) { .container { max-width: 1280px !important; } }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* ========== HEIGHT ========== */
.h-20 { height: 5rem !important; }
.h-24 { height: 6rem !important; }
.h-28 { height: 7rem !important; }

/* ========== SPACING EXTENDED ========== */
.space-x-4 > * + * { margin-left: 1rem !important; }
.space-x-8 > * + * { margin-left: 2rem !important; }
.space-y-4 > * + * { margin-top: 1rem !important; }
.space-y-8 > * + * { margin-top: 2rem !important; }

/* ========== TEXT SIZES EXTENDED ========== */
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
.text-5xl { font-size: 3rem !important; line-height: 1 !important; }

/* ========== LEADING ========== */
.leading-relaxed { line-height: 1.625 !important; }

/* ========== FLEX EXTENDED ========== */
.flex-1 { flex: 1 1 0% !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* ========== MARGIN EXTENDED ========== */
.mr-2 { margin-right: 0.5rem !important; }
.mr-4 { margin-right: 1rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-16 { margin-bottom: 4rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.pb-12 { padding-bottom: 3rem !important; }

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
    .sm\:text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
    .sm\:h-24 { height: 6rem !important; }
    .sm\:flex-row { flex-direction: row !important; }
}

@media (min-width: 768px) {
    .md\:grid { display: grid !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .md\:text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
    .md\:text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
    .md\:text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
    .md\:hidden { display: none !important; }
    .md\:p-8 { padding: 2rem !important; }
    .md\:w-20 { width: 5rem !important; }
    .md\:h-20 { height: 5rem !important; }
    .md\:text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block !important; }
    .lg\:hidden { display: none !important; }
    .lg\:flex { display: flex !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .lg\:h-24 { height: 6rem !important; }
    .lg\:h-28 { height: 7rem !important; }
    .lg\:px-16 { padding-left: 4rem !important; padding-right: 4rem !important; }
    .lg\:top-32 { top: 8rem !important; }
}

/* Адаптивность для lightbox на мобильных */
@media (max-width: 768px) {
    .review-lightbox button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    #review-lightbox-prev {
        left: 8px;
    }
    
    #review-lightbox-next {
        right: 8px;
    }
    
    #review-lightbox-close {
        top: 8px;
        right: 8px;
    }
    
    #review-lightbox-prev:active,
    #review-lightbox-next:active {
        transform: translateY(-50%) !important;
    }
}

/* ========== PREVENT PLACEHOLDER SELECTION ========== */
/* Предотвращаем выделение placeholder текста в полях даты */
input[type="date"]::placeholder,
input[type="date"]::-webkit-input-placeholder,
input[type="date"]::-moz-placeholder,
input[type="date"]:-ms-input-placeholder {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Предотвращаем выделение placeholder при фокусе */
input[type="date"]:focus::placeholder,
input[type="date"]:focus::-webkit-input-placeholder {
    user-select: none;
    -webkit-user-select: none;
}

/* Убираем выделение текста в пустых полях даты */
input[type="date"]:invalid:not(:focus) {
    color: transparent;
}

input[type="date"]:invalid:not(:focus)::-webkit-datetime-edit {
    color: transparent;
}

input[type="date"]:invalid:not(:focus)::-webkit-datetime-edit-fields-wrapper {
    color: transparent;
}

