/* style.css */
/* style.css - ЗАМЕНИТЬ БЛОК :root */
:root {
    /* Цветовая палитра */
    --color-background: #f8f9fa;
    --color-card-bg: #FFFFFF;
    --color-text: #2c3e50; /* Более мягкий черный */
    --color-text-light: #7f8c8d; /* Серый */
    --color-primary: #3498db; /* Основной голубой */
    --color-primary-dark: #2980b9; /* <<-- ИСПРАВЛЕНО: Добавлен темный голубой для hover */
    --color-secondary: #8e44ad; /* Сиреневый/фиолетовый */
    --color-accent: #2ecc71; /* Ярко-зеленый для hover */
    --color-accent-dark: #27ae60;
    --color-danger: #e74c3c;      /* <<-- ИСПРАВЛЕНО: Добавлен цвет для сообщений об ошибках */
    --color-border: #ecf0f1;
    --color-border-button: #b0dcbf;
    
    /* Типографика и геометрия */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --border-radius: 12px; /* Чуть более скругленные углы */
    --shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
}


/* --- Общие стили и сброс --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.logo {
    /* Make the anchor tag behave like a block or flex container itself */
    display: block; /* or display: flex; if you need it to be a flex container */
    text-decoration: none; /* Remove underline if present */
    color: inherit; /* Inherit color from parent, or set explicitly */
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow: visible;
}
.site-header, .container, .header-content, .logo-container {
    overflow: visible !important; /* !important для перекрытия других правил */
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Arial', sans-serif; /* Выберите свой шрифт */
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
    position: relative;
    height: 60px; /* Достаточно места для падения */
}

.logo-letter {
    display: inline-block; /* Чтобы можно было анимировать каждую букву */

    transform: translateY(-100px) rotate(0deg); /* Начальное положение выше и без поворота */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

section {
    padding: 60px 0;
}

h1, h2, h3 {
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 40px; }

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-primary);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text);
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(45deg, rgba(0, 86, 179, 0.05), rgba(40, 167, 69, 0.05));
}
.hero-section .subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 20px auto 0;
}

/* --- Offers Section & Toolbar --- */
.offers-section {
    background-color: #fff;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.toolbar h2 {
    text-align: left;
    margin-bottom: 0;
}

.sort-form label {
    margin-right: 10px;
    color: var(--color-text-light);
}
.sort-form select {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

/* style.css - ЗАМЕНИТЬ СТИЛИ КАРТОЧЕК */
/* Контейнер-сетка для карточек */
.offers-grid {
    display: grid;
    /* Эта строка создает адаптивные колонки */
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); 
    gap: 25px;
    position: relative;
    min-height: 200px; 
    transition: opacity 0.3s;
}

.offer-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.06), 0 1px 3px rgba(44, 62, 80, 0.08);
    display: flex;
    flex-direction: column;
    padding: 25px;
    position: relative; /* Необходимо для позиционирования кнопки */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 240px; /* Задаем минимальную высоту для единообразия */
}
.offer-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 0;
    border-bottom: none; /* Убираем нижнюю границу */
    margin-bottom: 20px;
}
.card-header h3 a {
    color: var(--color-text);
    font-size: 1.3rem;
}
.offer-bank {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.offer-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 15px 10px;
    margin-top: auto;
    padding: 0;
}
.detail-item {
    text-align: left;
    min-width: 0; 
}
.detail-item span {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.detail-item strong {
    display: block;
    overflow-wrap: break-word;
    word-break: break-all; 
    font-size: 1.25rem;
    font-weight: 600;
}

.detail-item:nth-child(odd) strong {
    color: var(--color-primary); 
}
.detail-item:nth-child(even) strong {
    color: var(--color-secondary); 
}

.cta-button {
    position: absolute;
    bottom: 25px;
    right: 25px;
    padding: 8px 16px; 
    border: 2px solid var(--color-border-button); 
    color: var(--color-text-light); 
    background-color: transparent; 
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.cta-button:hover {
    background-color: var(--color-accent); /* Становится зеленой при наведении */
    border-color: var(--color-accent);
    color: #fff;
    transform: scale(1.05); /* Немного увеличивается */
}




/* --- Footer --- */
.site-footer {
    background-color: #1a253c; /* Темно-синий фон */
    color: #adb5bd;
    padding: 50px 0 20px 0;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-column h4 {
    color: #fff;
    margin-bottom: 15px;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column a {
    color: #adb5bd;
}
.footer-column a:hover {
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
}
.disclaimer {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* --- Адаптивность (Responsiveness) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .toolbar { flex-direction: column; gap: 20px; align-items: stretch; }
    .toolbar h2 { text-align: center; }

    .guide-steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 480px) {
    .offers-grid { grid-template-columns: 1fr; }
    .offer-details { flex-direction: column; gap: 15px; }
}

/* --- Дополнения и улучшения для style.css --- */

/* --- Блок фильтров --- */
.filter-section {
    background-color: var(--color-card-bg);
    padding: 40px 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 5px 15px rgba(0,86,179,0.05);
    position: relative;
}
.filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 20px;
}
.slider-values {
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* Стилизация noUiSlider */
.noUi-target {
    background: #f0f0f0;
    border-radius: 4px;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.noUi-connect {
    background: var(--color-primary);
}
.noUi-handle {
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--color-primary-dark);
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    cursor: grab;
    width: 28px !important;
    height: 28px !important;
    right: -14px !important;
    top: -10px !important;
}
.noUi-handle:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.3);
}
.noUi-handle:active {
    cursor: grabbing;
}
.noUi-handle::before, .noUi-handle::after {
    display: none; /* убираем стандартные черточки */
}

.sort-wrapper {
    text-align: right;
    margin-top: 20px;
}

/* --- Сетка предложений и анимации --- */
.offers-section {
    background-color: var(--color-background);
}

.offers-grid {
    position: relative;
    min-height: 200px; /* Чтобы индикатор загрузки был виден */
    transition: opacity 0.3s;
}

/* Анимация появления карточек */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.offer-card {
    /* Добавляем анимацию */
    animation: fadeIn 0.5s ease-out forwards;
}

/* Индикатор загрузки */
.offers-grid.loading::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
    border: 5px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}
.offers-grid.loading > * { /* Прячем старые карточки во время загрузки */
    opacity: 0.3;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Плейсхолдер (сообщение-заглушка) */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    width: 100%;
    grid-column: 1 / -1; /* Растягиваем на всю ширину сетки */
}
.placeholder svg {
    stroke: var(--color-border);
    stroke-width: 1.5;
    margin-bottom: 20px;
}
.placeholder h3 {
    color: var(--color-text);
}


/* --- Адаптивность для новых блоков --- */
@media (max-width: 768px) {
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .sort-wrapper {
        text-align: center;
        margin-top: 30px;
    }
}

/* style.css - ДОБАВИТЬ В КОНЕЦ ФАЙЛА */
.loan-types label { margin-bottom: 15px !important; }
.type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.type-selector input[type="radio"] {
    display: none; /* Прячем стандартную радиокнопку */
}
.type-selector label {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}
.type-selector input[type="radio"]:checked + label {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.type-selector label:hover {
    border-color: var(--color-primary);
}

/* --- Стили для текстовых секций (Инструкция, FAQ) --- */
.text-section {
    background-color: var(--color-background);
}

.text-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
}

/* --- Стили для шагов инструкции --- */
.guide-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.step .step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}

.step h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step p {
    color: var(--color-text-light);
}

/* --- Адаптивность для шагов --- */
@media (max-width: 768px) {
    .guide-steps {
        grid-template-columns: 1fr;
    }
}

/* Стили для подзаголовка "Laenu tüüp" */
.loan-types > label {
    text-align: center; /* Центрируем текст */
    font-size: 1.2rem; /* Увеличиваем размер шрифта */
    font-weight: 600;  /* Делаем его полужирным */
    width: 100%;       /* Растягиваем на всю ширину для корректного центрирования */
    margin-bottom: 20px; /* Увеличиваем отступ снизу */
}

/* Контейнер для кнопки "Показать еще" */
.show-all-container {
    text-align: center;
    padding: 20px 0;
    width: 100%;
}

/* Стили для кнопки "Показать еще" */
.show-all-button {
    background-color: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-primary);
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-all-button:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Стили для обертки сортировки */
.sort-wrapper {
    text-align: right;
    margin-top: 20px;
}

/* Контейнер для кастомного селекта */
.custom-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.custom-select-wrapper label {
    font-weight: 500;
    color: var(--color-text-light);
}

/* Стилизуем сам выпадающий список */
#sort-select {
    /* Убираем стандартный вид */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Наши стили */
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 10px 40px 10px 15px; /* Больше отступ справа для стрелки */
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sort-select:hover {
    border-color: var(--color-primary);
}

#sort-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Рисуем свою стрелку с помощью SVG */
.custom-select-wrapper::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    pointer-events: none; /* Чтобы клики проходили на сам select */
}

/* Стили для группы фильтров по типу кредита */
.filter-group.loan-types {
    /* Растягиваем этот блок на всю ширину родительской сетки */
    grid-column: 1 / -1;

    /* Добавляем отступ сверху, чтобы визуально отделить от ползунков */
    margin-top: 20px;
    padding-top: 25px;

    /* Добавляем тонкую линию-разделитель сверху */
    border-top: 1px solid var(--color-border);
}

/* Дополнительно центрируем сами чекбоксы внутри их нового, широкого контейнера */
.type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* Центрируем чекбоксы */
}

/* --- Стили для Бургер-меню --- */
.burger-menu {
    display: none; /* Скрыто по умолчанию */
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 101; /* Поверх всего */
}
.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}
.burger-menu span:nth-child(1) { top: 0; }
.burger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger-menu span:nth-child(3) { bottom: 0; }

/* Анимация бургера в крестик */
.nav-open .burger-menu span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.nav-open .burger-menu span:nth-child(2) {
    opacity: 0;
}
.nav-open .burger-menu span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}


/* Адаптивность навигации */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }
    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .nav-open .nav-container {
        opacity: 1;
        visibility: visible;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .main-nav a {
        font-size: 1.8rem;
    }
}

/* style.css - ДОБАВИТЬ В КОНЕЦ */
.text-section, .offers-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.text-section.is-visible, .offers-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* style.css */

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-list details {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    overflow: hidden; /* Важно, чтобы скрыть выходящий контент */
}
.faq-list summary {
    padding: 20px;
    font-weight: 500;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    display: block; /* Убираем стандартный маркер */
    list-style: none; /* Для Firefox */
}
.faq-list summary::-webkit-details-marker {
    display: none; /* Для Chrome/Safari */
}

/* Кастомный анимированный плюсик/минус */
.faq-list summary::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease-in-out;
}
.faq-list details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Магия плавной анимации с помощью CSS Grid */
.faq-list details .faq-content {
    display: grid;
    grid-template-rows: 0fr; /* Изначально высота 0 */
    transition: grid-template-rows 0.3s ease-in-out;
}
.faq-list details[open] .faq-content {
    grid-template-rows: 1fr; /* В открытом состоянии высота равна контенту */
}
.faq-list .faq-content > div {
    overflow: hidden; /* Обязательно для работы анимации */
}
.faq-list .faq-content p {
    padding: 0 20px 20px 20px;
    margin: 0;
}

/* style.css */

/* --- Стили для секции подписки (Финальная версия) --- */
.subscribe-section {
    padding: 80px 0;
}
.subscribe-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.subscribe-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}
.subscribe-content p {
    color: var(--color-text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.subscribe-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 15px;
    align-items: center;
}
.subscribe-form input, .subscribe-form select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: #fff;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.subscribe-form input:focus, .subscribe-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* УНИКАЛЬНЫЕ СТИЛИ ТОЛЬКО ДЛЯ КНОПКИ ПОДПИСКИ */
.btn-subscribe {
    padding: 15px 30px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-subscribe:hover {
    background-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}
/* ------------------------------------------- */

.form-message {
    margin-top: 15px;
    font-weight: 500;
    height: 20px;
    transition: color 0.3s;
}
.form-message.success { color: var(--color-accent-dark); }
.form-message.error { color: var(--color-danger); }

/* Адаптивность для формы подписки */
@media (max-width: 768px) {
    .subscribe-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Стили для секции "Предложение месяца" (Новый дизайн) --- */
.featured-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #eef7ff, #f8f9fa);
    overflow: hidden;
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--color-text);
}

.featured-slider {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}

.slides-container {
    position: relative;
}

.slide {
    display: none;
    animation: fade 0.7s ease-in-out;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    border: 1px solid #fff;
}
.slide.active {
    display: block;
}

/* Новая двухколоночная сетка внутри слайда */
.slide-grid {
    display: grid;
    grid-template-columns: 200px 1fr; /* Колонка для лого и колонка для инфо */
    align-items: center;
    gap: 30px;
}

.slide-logo-area {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    padding: 20px;
}
.slide-logo-area img {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

.slide-info-area {
    padding: 40px 40px 40px 20px;
    position: relative;
}

/* Декоративный значок "Горячее предложение" */
.featured-badge {
    position: absolute;
    top: 20px;
    right: -15px;
    background-color: var(--color-secondary); /* Сиреневый цвет */
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 5px;
    transform: rotate(10deg);
}

.slide-info-area h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--color-text);
}
.slide-bank {
    color: var(--color-text-light);
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Новая сетка для деталей (сумма, срок, процент) */
.slide-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;
}
.slide-details .detail-item {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
}
.slide-details .detail-item span {
    font-size: 0.8rem;
    color: var(--color-text-light);
    display: block;
}
.slide-details .detail-item strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.btn-slide {
    background: var(--color-primary);
    color: #fff;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
    display: inline-block;
}
.btn-slide:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
    color: #fff;
}

.slider-dots { /* Стили для точек без изменений */
    text-align: center;
    margin-top: 20px;
}
.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #d8e2e7;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.dot.active, .dot:hover {
    background-color: var(--color-primary);
}

@keyframes fade {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Адаптивность для нового блока */
@media (max-width: 768px) {
    .slide-grid {
        grid-template-columns: 1fr; /* На мобильных колонки встают друг под друга */
    }
    .slide-logo-area {
        height: 150px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .slide-info-area {
        padding: 30px;
    }
}


/* --- Анимированные фоновые фигуры --- */

.background-shapes span {
    position: absolute;
    display: block;
    list-style: none;
    border-radius: 50%; 
    background: rgba(52, 152, 219, 0.15); 
    animation: moveShapes 25s linear infinite;
    bottom: -150px; 
}

/* Создаем несколько фигур разного размера и с разной скоростью */
.background-shapes span:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}
.background-shapes span:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}
.background-shapes span:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}
.background-shapes span:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}
.background-shapes span:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

/* Сама анимация движения */
@keyframes moveShapes {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) rotate(720deg); /* Движутся вверх и вращаются */
        opacity: 0;
    }
}

/* style.css */

/* --- Hero Section с анимированным градиентом --- */
.hero-section {
    text-align: center;
    padding: 100px 0;
    color: white; /* Делаем текст белым, чтобы он был читаем на градиенте */
    background: linear-gradient(315deg, #3498db, #8e44ad, #2c3e50);
    background-size: 400% 400%;
    animation: moveGradient 15s ease infinite;
    position: relative;
}

.hero-section h1 {
    color: white; /* Убедимся, что заголовок тоже белый */
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Тень для лучшей читаемости */
}

.hero-section .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85); /* Полупрозрачный белый */
    max-width: 700px;
    margin: 20px auto 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Анимация движения градиента */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* --- ИСПРАВЛЕННЫЕ Стили для локальной анимации в секциях --- */

/* 1. Делаем родительские секции "контейнерами" для позиционирования */
.guide-section, .faq-section, .subscribe-section {
    position: relative;
    overflow: hidden; /* Оставляем, чтобы фигуры не вылетали за пределы */
}

/* 2. Контейнер для фигур. Убираем z-index, он здесь не нужен. */
.section-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 3. Контент внутри секции. 
   Добавляем position: relative, чтобы он гарантированно был НАД 
   абсолютно спозиционированными фигурами. z-index не нужен. */
.guide-section .container,
.faq-section .container,
.subscribe-section .container {
    position: relative;
}

/* 4. Стили самих фигур (без изменений) */
.section-shapes span {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(142, 68, 173, 0.1));
    animation: moveShapes 30s linear infinite;
    bottom: -150px;
}

/* Расстановка фигур (без изменений) */
.section-shapes span:nth-child(1) {
    left: 10%; width: 80px; height: 80px; animation-delay: 0s;
}
.section-shapes span:nth-child(2) {
    left: 50%; width: 30px; height: 30px; animation-delay: 5s; animation-duration: 20s;
}
.section-shapes span:nth-child(3) {
    left: 80%; width: 50px; height: 50px; animation-delay: 2s;
}

/* Анимация движения (без изменений) */
@keyframes moveShapes {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-120vh) rotate(720deg);
        opacity: 0;
    }
}

/* style.css (НОВЫЙ ДИЗАЙН ДЛЯ ФИЛЬТРОВ) */

/* --- Стили для нового двухуровневого фильтра (Таб-дизайн) --- */
.main-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent; /* Невидимая линия-основа */
    border-radius: 0;
    background-color: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}
.category-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-light);
    transition: all 0.3s ease;
}
.category-btn:hover {
    color: var(--color-primary);
}
.category-btn:hover svg {
    stroke: var(--color-primary);
}
.category-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary); /* Активная вкладка подчеркнута */
}
.category-btn.active svg {
    stroke: var(--color-primary);
}

.sub-categories {
    margin-bottom: 30px;
}
.sub-category-group {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    animation: fadeIn 0.4s;
}
.sub-category-group.active {
    display: flex;
}
.checkbox-wrapper input[type="checkbox"] {
    display: none;
}
.checkbox-wrapper label {
    display: block;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    background-color: #fff;
}
.checkbox-wrapper input[type="checkbox"]:checked + label {
    background-color: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}
.checkbox-wrapper label:hover {
    border-color: var(--color-text);
}

.secondary-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 40px;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}
.secondary-filters .filter-group {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}
.secondary-filters .filter-group label {
    text-align: center;
}
/* style.css - ДОБАВИТЬ В САМЫЙ КОНЕЦ ФАЙЛА */

/* =================================================================== */
/* =================== НОВЫЕ СТИЛИ ДЛЯ ДОБАВЛЕННЫХ БЛОКОВ =================== */
/* =================================================================== */

/* Hero Section CTA Button */
.btn-hero {
    display: inline-block;
    margin-top: 30px;
    background-color: #fff;
    color: var(--color-primary);
    padding: 14px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background-color: var(--color-accent);
    color: #fff;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background-color: var(--color-background);
}
.calculator-section h2, .loan-types-section h2, .refinancing-section h2, .euribor-section h2 {
    font-size: 2.5rem; /* Крупный шрифт для заголовков */
}
.calculator-section .subtitle, .loan-types-section .subtitle, .refinancing-section .subtitle, .euribor-section .subtitle {
    max-width: 750px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
}

.calculator-form h4, .calculator-results h4 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--color-text);
}

.calculator-form .form-group {
    margin-bottom: 20px;
}
.calculator-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.calculator-form input, .calculator-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.calculator-form input:focus, .calculator-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}
.calculator-form hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 20px 0;
}

.calculator-results {
    background: linear-gradient(135deg, #eef7ff, #f8f9fa);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-display {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.result-display-small {
    margin-bottom: 20px;
}
.result-display-small .label {
    display: block;
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 5px;
}
.result-display-small .value {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-primary);
}
#refinance-result-savings .value {
    color: var(--color-accent-dark);
}

.disclaimer-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Euribor Table */
.euribor-projections {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}
.euribor-projections th, .euribor-projections td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.euribor-projections th {
    font-weight: 500;
    color: var(--color-text-light);
    font-size: 0.9rem;
}
.euribor-projections td:last-child {
    font-weight: 600;
    text-align: right;
}

/* Loan Types Section (Tabs) */
.loan-types-section {
    background-color: #fff;
}
.tabs-container {
    max-width: 900px;
    margin: 40px auto 0 auto;
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 30px;
}
.tab-link {
    padding: 15px 25px;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    margin-bottom: -1px; /* Overlap border */
}
.tab-link:hover {
    color: var(--color-primary);
}
.tab-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}
.tab-pane.active {
    display: block;
}
.tab-pane h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.tab-pane h4 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--color-secondary);
}
.tab-pane p {
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Advice Section */
.advice-section {
    background: var(--color-secondary);
}
.advice-box {
    display: flex;
    align-items: center;
    gap: 30px;
    background-color: rgba(255,255,255, 0.1);
    color: #fff;
    padding: 30px 40px;
    border-radius: var(--border-radius);
}
.advice-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}
.advice-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #fff;
}
.advice-content p {
    margin: 0;
    line-height: 1.7;
    opacity: 0.9;
}

/* Responsiveness for New Blocks */
@media (max-width: 900px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    .tabs-nav {
        flex-wrap: wrap;
    }
}
@media (max-width: 768px) {
    .calculator-section h2, .loan-types-section h2, .refinancing-section h2, .euribor-section h2 {
        font-size: 2rem;
    }
    .advice-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* =================================================================== */
/* =========== СТИЛИ ДЛЯ ОБНОВЛЕННЫХ И НОВЫХ СЕКЦИЙ =========== */
/* =================================================================== */

/* Блок с советом для калькулятора */
.calculator-tip-box {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    background-color: var(--color-background);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 40px;
    border: 1px solid var(--color-border);
}
.calculator-tip-box .tip-icon {
    flex-shrink: 0;
    color: var(--color-secondary);
}
.calculator-tip-box .tip-icon svg {
    width: 32px;
    height: 32px;
}
.calculator-tip-box .tip-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--color-secondary);
}
.calculator-tip-box .tip-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text-light);
}

/* Блок с FAQ внутри секции */
.section-faq {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}
.section-faq-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
}
.section-faq .faq-list {
    max-width: 800px;
    margin: 0 auto;
}

/* Секция финансовой ответственности */
.financial-responsibility-section {
    background-color: var(--color-background);
    padding: 80px 0;
}
.responsibility-box {
    max-width: 850px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #e74c3c; /* --color-danger */
    border-radius: var(--border-radius);
    padding: 40px;
}
.responsibility-header {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #c0392b; /* Darker danger color */
    margin-bottom: 25px;
}
.responsibility-header svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.responsibility-header h2 {
    margin: 0;
    font-size: 2rem;
    text-align: left;
    margin-bottom: 0;
}
.responsibility-content p {
    line-height: 1.7;
    margin-bottom: 15px;
}
.responsibility-content strong {
    font-weight: 600;
}
.responsibility-links {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
}
.responsibility-links h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.responsibility-links ul {
    list-style: none;
    padding: 0;
}
.responsibility-links ul li {
    margin-bottom: 10px;
}
.responsibility-links ul a {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--color-primary-dark);
    text-underline-offset: 4px;
}
.responsibility-links ul a:hover {
    color: var(--color-primary-dark);
}

@media (max-width: 768px) {
    .responsibility-header {
        flex-direction: column;
        text-align: center;
    }
    .responsibility-header h2 {
        text-align: center;
    }
}

/* =================================================================== */
/* ============== СТИЛИ ДЛЯ НОВОГО ФОРМАТА ЗАГОЛОВКОВ ============== */
/* =================================================================== */

/* Основной стиль для H2 остается прежним, но можно немного скорректировать */
h2 {
    line-height: 1.2; /* Более плотная строка для основного ключевого слова */
    margin-bottom: 15px; /* Уменьшим отступ, т.к. часть уйдет на подзаголовок */
}

/* Стили для подзаголовка в SPAN */
.h2-subtitle {
    display: block;
    font-size: 1.1rem; /* Меньше, чем основной H2 */
    color: var(--color-text-light); /* Более светлый, приглушенный цвет */
    font-weight: 400; /* Обычная жирность, не жирный */
    margin-top: 8px; /* Небольшой отступ сверху от ключевого слова */
}

/* Убираем верхний отступ у .subtitle, если он идет сразу после нового h2 */
h2 + .subtitle {
    margin-top: 0;
}

/* =================================================================== */
/* =================== СТИЛИ ДЛЯ НОВОГО МЕГА-МЕНЮ =================== */
/* =================================================================== */

/* --- Общие стили для навигации --- */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}
.main-nav ul a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text);
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.main-nav ul a:hover,
.main-nav ul li.active a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --- Скрытие/отображение меню для разных устройств --- */
.main-nav-mobile,
.megamenu-panel {
    display: none; /* Скрываем мобильное меню и мега-меню по умолчанию */
}
.main-nav-desktop {
    display: flex; /* Показываем десктопное меню */
}

/* --- Панель Мега-меню (для десктопа) --- */
.megamenu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-card-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--color-border);
    padding: 30px 0;
    z-index: 99;
    
    /* Анимация */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.megamenu-panel.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.megamenu-content {
    display: none; /* Скрываем все блоки контента внутри панели */
    gap: 40px;
}
.megamenu-content.active {
    display: flex; /* Показываем только активный блок */
}

.megamenu-column {
    flex: 1;
    min-width: 0;
}
.megamenu-column h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}
.megamenu-column h4 a {
    color: inherit;
}
.megamenu-column p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}
.megamenu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.megamenu-column ul a {
    font-size: 0.95rem;
    padding: 0;
    border: none;
}

/* --- Стили для мобильных устройств --- */
@media (max-width: 768px) {
    /* Скрываем десктопное меню и показываем мобильное */
    .main-nav-desktop {
        display: none;
    }
    .main-nav-mobile {
        display: block;
    }
    
    /* Старые стили для мобильного меню (слегка адаптированные) */
    .main-nav-mobile ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .main-nav-mobile ul a {
        font-size: 1.8rem;
        border: none;
    }
    .main-nav-mobile .has-dropdown > a {
        position: relative;
    }
    .main-nav-mobile .has-dropdown > a::after {
        content: '▾';
        font-size: 0.7em;
        position: absolute;
        right: -25px;
        top: 50%;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 0.3s ease;
    }
    .main-nav-mobile .has-dropdown.open > a::after {
        transform: translateY(-50%) rotate(-180deg);
    }
    .main-nav-mobile .dropdown-menu {
        position: static;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 10px auto 0;
        background: transparent;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    }
    .main-nav-mobile .has-dropdown.open > .dropdown-menu {
        max-height: 600px;
        padding: 15px 0 0 0;
    }
     .main-nav-mobile .dropdown-menu a {
        font-size: 1.2rem;
        color: var(--color-text-light);
    }
    .main-nav-mobile .dropdown-divider {
        display: none;
    }
}

/* =================================================================== */
/* ============== ИСПРАВЛЕНИЕ АДАПТИВНОСТИ ДЛЯ ФИЛЬТРОВ ============== */
/* =================================================================== */

@media (max-width: 768px) {
    /* * Главное исправление: заставляем вторичные фильтры 
     * (ползунки и сортировку) выстраиваться в одну колонку.
     */
    .secondary-filters {
        grid-template-columns: 1fr; /* Вместо трех колонок делаем одну */
        gap: 35px; /* Увеличиваем вертикальный отступ между элементами */
    }

    /* * Центрируем выпадающий список сортировки, 
     * когда он находится в своей собственной строке.
     */
    .sort-wrapper {
        text-align: center;
    }
    
    .custom-select-wrapper {
        display: flex; /* Для лучшего выравнивания на мобильных */
        justify-content: center;
        align-items: center;
    }
    
    /* * Немного уменьшаем кнопки главных категорий 
     * для самых маленьких экранов, чтобы они лучше помещались.
     */
    .main-categories {
        gap: 8px;
    }
    .category-btn {
        padding: 12px 16px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-btn {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    .main-categories {
        gap: 5px;
    }
}
/* =================================================================== */
/* ============= СТИЛИ ДЛЯ ВНУТРЕННИХ ИНФО-СТРАНИЦ ============= */
/* =================================================================== */

/* Шапка статьи */
.page-hero {
    padding: 60px 0;
    background: var(--color-background);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Основной контейнер страницы (контент + сайдбар) */
.page-container {
    display: grid;
    grid-template-columns: 1fr 280px; /* Основной контент и сайдбар */
    gap: 50px;
    padding: 60px 0;
}

/* Основная колонка со статьей */
.main-article h2 {
    font-size: 2.2rem;
    margin-top: 40px;
    margin-bottom: 20px;
}
.main-article h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--color-secondary);
}
.main-article p, .main-article li {
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 15px;
}
.main-article ul {
    list-style: disc;
    padding-left: 20px;
}
.main-article a {
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}
.main-article a:hover {
    color: var(--color-primary-dark);
}
.main-article blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--color-text-light);
}

/* Сайдбар */
.sidebar {
    position: sticky;
    top: 100px; /* Отступ от липкой шапки */
    align-self: start; /* "Прилипает" к верху */
}
.sidebar-widget {
    background-color: var(--color-background);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}
.sidebar-widget h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}
.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-widget ul li a {
    display: block;
    padding: 8px 0;
    font-weight: 500;
    transition: color 0.2s;
}
.sidebar-widget ul li a:hover {
    color: var(--color-primary);
}

/* Призыв к действию (CTA) в сайдбаре и в конце статьи */
.cta-box {
    background: linear-gradient(135deg, #eef7ff, #f8f9fa);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
}
.cta-box h4 {
    margin-top: 0;
}
.cta-box p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}
.cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}
.cta-button:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 992px) {
    .page-container {
        grid-template-columns: 1fr; 
    }
    .sidebar {
        position: static; 
        order: -1; 
    }
    .page-hero h1 {
        font-size: 2.2rem;
    }
}

.sidebar-cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

.sidebar-cta-button:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #fff; 
}

.sidebar-cta-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-card-bg), 0 0 0 5px var(--color-accent-dark);
}

.back-to-home {
    text-align: center; 
    margin-top: 60px;  
}

/* style.css */

/* --- Стили для блока "Другие категории" --- */
.other-categories-block {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.other-categories-block h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.other-categories-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-link-tag {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background-color: var(--color-card-bg);
    color: var(--color-primary);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.category-link-tag:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}
