/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #06b6d4;
    --accent-color: #f97316;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #0f172a; /* Глубокий премиальный цвет, как в футере */
    color: var(--white);
    padding: 20px 0;
    position: relative;
}

/* Декоративная градиентная линия снизу, связывающая шапку с дизайном сайта */
.header-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.logo-text span {
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 1px;
}

.header-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.info-item i {
    font-size: 18px;
    color: var(--secondary-color); /* Акцентный цвет для иконок */
}

/* Navigation */
.navbar {
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ffffff; /* Белый цвет для иконки меню */
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.6), rgba(6, 182, 212, 0.5));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

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

/* Sections */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
}

/* ========================================
   Announcements Slider
   ======================================== */
.announcements {
    background: var(--bg-light);
}

.announcements-slider {
    position: relative;
    padding: 0 10px; /* Отступы для теней карточек */
}

.announcements-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Скрываем скроллбар для Firefox */
    -ms-overflow-style: none; /* Скрываем скроллбар для IE/Edge */
    padding-bottom: 15px; /* Место для тени снизу */
    scroll-padding: 0 20px;
}

.announcements-track::-webkit-scrollbar {
    display: none; /* Скрываем скроллбар для Chrome/Safari */
}

.announcement-card {
    flex: 0 0 calc(33.333% - 17px); /* Десктоп: показываем ~3 карточки */
    scroll-snap-align: start;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.announcement-card.important {
    border-left-color: #ef4444;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ef4444;
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.announcement-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
    flex-grow: 1; /* Чтобы кнопки "Подробнее" были на одном уровне */
}

.announcement-card p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: auto; /* Прижимает ссылку к низу карточки */
}

.card-link:hover {
    gap: 12px;
}

/* Кнопки слайдера (Десктоп) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    display: none; /* Скрыты на мобильных */
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 10;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: -40px; }
.next-btn { right: -40px; }

/* Подсказки для мобильной версии */
.slider-hints {
    display: none; /* Скрыты на десктопе */
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.hint-arrow {
    font-size: 16px;
    color: var(--primary-color);
}

/* Анимация подпрыгивания для стрелочек */
@keyframes bounceLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.left-bounce {
    animation: bounceLeft 1.5s infinite ease-in-out;
}

.right-bounce {
    animation: bounceRight 1.5s infinite ease-in-out;
}

/* ========================================
   Адаптив для слайдера объявлений
   ======================================== */
@media (min-width: 969px) {
    .slider-btn {
        display: flex; /* Показываем кнопки только на десктопе */
    }
}

@media (max-width: 968px) {
    .announcement-card {
        flex: 0 0 85vw; /* Мобильная версия: 1 карточка + 15% следующей для подсказки */
        padding: 25px;
    }
    
    .slider-hints {
        display: flex; /* Показываем подсказки только на мобильных */
    }
    
    .announcement-card h3 {
        font-size: 18px;
    }
}

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.action-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.action-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 28px;
}

.action-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.action-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* About */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-weight: 500;
}

.feature-item i {
    color: #10b981;
    font-size: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* Documents */
.documents-grid {
    display: grid;
    gap: 30px;
}

.document-category h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-category h3 i {
    color: var(--primary-color);
}

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

.document-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.document-item:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.document-item i:first-child {
    font-size: 28px;
    color: #ef4444;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.document-name {
    font-weight: 600;
    color: var(--text-dark);
}

.document-size {
    font-size: 13px;
    color: var(--text-light);
}

.document-item i:last-child {
    color: var(--primary-color);
    font-size: 18px;
}

/* Readings */
.readings {
    background: var(--bg-light);
}

.readings-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.readings-form {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

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

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.file-input {
    padding: 10px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

.readings-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-block {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-block h3 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.info-block p {
    color: var(--text-light);
    font-size: 14px;
}

.app-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.app-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--text-dark);
    color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

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

/* Appeal */
.appeal-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* News */
.news {
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.news-link:hover {
    gap: 12px;
}

/* Instructions */
.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.instruction-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.instruction-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.instruction-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    margin-bottom: 20px;
}

.instruction-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.instruction-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.instruction-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* FAQ */
.faq {
    background: var(--bg-light);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question h3 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

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

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Contacts */
.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contact-details p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-note {
    font-size: 13px;
    color: var(--accent-color);
}

.contacts-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ========================================
   Footer - Премиальный стиль (Обновленный)
   ======================================== */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 50px 0 30px;
    position: relative;
}

/* Декоративная градиентная линия сверху */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Выравнивание логотипа и ссылок по центру по вертикали */
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    margin: 0 0 5px 0;
}

.footer-logo p {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

/* Ссылки выстроены в строку */
.footer-links {
    display: flex;
    flex-direction: row; /* Изменено с column на row */
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px); /* Плавный сдвиг вправо при наведении */
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    font-size: 14px;
}

/* Адаптив для футера на мобильных устройствах */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .footer-links {
        justify-content: center;
        gap: 20px;
    }
    
    .footer-links a:hover {
        transform: none; /* Отключаем сдвиг на мобильных для удобства нажатия */
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-overlay {
        background: linear-gradient(135deg, rgba(30, 64, 175, 0.5), rgba(6, 182, 212, 0.4));
    }
    
    /* Мобильная шапка: иконка слева, текст и инфо справа */
    .header-top {
        padding: 12px 0;
    }
    
    .header-top .container {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 15px;
        padding: 0 15px;
    }
    
    .logo-section {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .logo {
        width: 55px;
        height: 55px;
        font-size: 26px;
        flex-shrink: 0;
    }
    
    .logo-content {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .logo-text {
        text-align: left;
        line-height: 1.2;
    }
    
    .logo-text h1 {
        font-size: 22px;
        letter-spacing: 1.5px;
        margin: 0;
    }
    
    .logo-text span {
        font-size: 12px;
        opacity: 0.85;
        letter-spacing: 1px;
    }
    
    .header-info {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .info-item {
        font-size: 13px;
        gap: 6px;
    }
    
    .info-item i {
        font-size: 15px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .about-content,
    .readings-content,
    .contacts-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-content h2 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
    
    .announcements-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    max-width: 650px;
    width: 100%;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 36px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 30px;
}

.modal-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-light);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 26px;
    color: var(--text-dark);
    line-height: 1.3;
}

.modal-body {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 16px;
    white-space: pre-line; /* Сохраняет абзацы из текста */
}

/* Адаптив для модального окна */
@media (max-width: 640px) {
    .modal-content {
        padding: 25px;
    }
    .modal-header h3 {
        font-size: 22px;
    }
}

/* ========================================
   News Modal Specific Styles (Исправлен скроллинг)
   ======================================== */
.news-modal-content {
    padding: 0;
    max-height: 90vh; /* Ограничиваем высоту 90% от высоты экрана */
    overflow-y: auto; /* Включаем вертикальную прокрутку */
    display: flex;
    flex-direction: column;
}

.news-modal-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    flex-shrink: 0; /* Запрещаем сжатие картинки при скролле */
}

.news-modal-content .modal-header {
    padding: 25px 40px 10px 40px;
    flex-shrink: 0;
}

.news-modal-content .modal-body {
    padding: 10px 40px 40px 40px;
    flex-shrink: 0;
}

/* --- Красивая стилизация полосы прокрутки (для десктопа) --- */
.news-modal-content::-webkit-scrollbar {
    width: 8px;
}
.news-modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 16px 16px 0;
}
.news-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.news-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Адаптив для модалки новостей на мобильных */
@media (max-width: 640px) {
    .news-modal-content {
        max-height: 95vh; /* На мобильных даем чуть больше высоты */
    }
    .news-modal-image {
        height: 200px;
    }
    .news-modal-content .modal-header,
    .news-modal-content .modal-body {
        padding-left: 25px;
        padding-right: 25px;
    }
    .news-modal-content .modal-body {
        padding-bottom: 30px; /* Отступ снизу, чтобы текст не прилипал к краю */
    }
}

/* ========================================
   Documents Accordion Styles
   ======================================== */
.documents-list {
    max-width: 900px;
    margin: 0 auto;
}

.documents-list .document-item {
    background: var(--white);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: block; /* Явно задаем блочное отображение */
}

/* Шапка вкладки (Название категории) */
.documents-list .document-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.documents-list .document-question:hover {
    background: var(--bg-light);
}

.documents-list .document-question h3 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex: 1;
}

.documents-list .document-question h3 i {
    color: var(--primary-color);
}

.documents-list .document-question i.fa-chevron-down {
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
}

.documents-list .document-item.active .document-question i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Контент вкладки (Список документов) - ВСЕГДА под шапкой */
.documents-list .document-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    display: block; /* Явно задаем блочное отображение */
}

.documents-list .document-item.active .document-answer {
    padding: 0 25px 20px;
    max-height: 2000px;
}

.documents-list .document-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Сами файлы */
.documents-list .document-file {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

.documents-list .document-file:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.documents-list .document-file i:first-child {
    font-size: 28px;
    color: #ef4444;
    flex-shrink: 0;
}

.documents-list .document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.documents-list .document-name {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documents-list .document-size {
    font-size: 13px;
    color: var(--text-light);
}

.documents-list .document-file i:last-child {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

/* ========================================
   Адаптив для документов на мобильных
   ======================================== */
@media (max-width: 968px) {
    .documents-list {
        max-width: 100%;
        margin: 0;
    }
    
    .documents-list .document-item {
        display: block; /* Принудительно блочное отображение */
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .documents-list .document-question {
        padding: 18px 20px;
        display: flex;
        flex-direction: row; /* Шапка остается горизонтальной */
        align-items: center;
    }
    
    .documents-list .document-question h3 {
        font-size: 16px;
        flex: 1;
    }
    
    .documents-list .document-answer {
        display: block; /* Контент всегда под шапкой */
        padding: 0 20px;
        width: 100%;
    }
    
    .documents-list .document-item.active .document-answer {
        padding: 0 20px 18px;
    }
    
    .documents-list .document-file {
        padding: 15px;
        gap: 12px;
        width: 100%;
    }
    
    .documents-list .document-file i:first-child {
        font-size: 24px;
    }
    
    .documents-list .document-name {
        font-size: 14px;
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .documents-list .document-question {
        padding: 15px 18px;
    }
    
    .documents-list .document-question h3 {
        font-size: 15px;
        gap: 8px;
    }
    
    .documents-list .document-answer {
        padding: 0 15px;
    }
    
    .documents-list .document-item.active .document-answer {
        padding: 0 15px 15px;
    }
    
    .documents-list .document-file {
        padding: 12px;
        gap: 10px;
    }
    
    .documents-list .document-file i:first-child {
        font-size: 22px;
    }
    
    .documents-list .document-name {
        font-size: 13px;
    }
    
    .documents-list .document-size {
        font-size: 12px;
    }
    
    .documents-list .document-file i:last-child {
        font-size: 16px;
    }
}

/* Адаптив раздела "О нас" для мобильных */
@media (max-width: 968px) {
    .about-content {
        gap: 30px;
    }
    
    /* Features - список в 4 строки (по 1 элементу) */
    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature-item {
        font-size: 14px;
    }
    
    .feature-item i {
        font-size: 18px;
    }
    
    /* Stat-cards - 4 плитки в ряд */
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* Иконка MAX в футере — круглая, как остальные */
.footer-social .max-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent !important;
    padding: 0;
}

.footer-social .max-icon svg {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.footer-social .max-icon:hover svg {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(123, 92, 255, 0.4));
}

/* ========================================
   Council Modal Styles
   ======================================== */

/* --- КРАСИВЫЕ КНОПКИ --- */
.council-btn {
    margin-top: 20px;
    width: 100%;
    justify-content: center;
    padding: 18px 30px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.council-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.council-btn:active {
    transform: translateY(-2px) scale(1);
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.3);
}

.council-btn i {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.council-btn:hover i {
    transform: scale(1.15) rotate(5deg);
}

#openWorksModal {
    background: linear-gradient(135deg, var(--accent-color), #fb923c);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

#openWorksModal:hover {
    background: linear-gradient(135deg, #ea580c, var(--accent-color));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.4);
}

#openWorksModal:active {
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.3);
}

.council-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

/* --- СТИЛЬ МОДАЛЬНОГО ОКНА СОВЕТА --- */
.council-modal-content {
    max-width: 700px;
}

.council-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.5;
}

.council-building h4 {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0 0 10px 0;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 6px;
    line-height: 1.4;
    font-weight: 700;
}

.council-building ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.council-building ul li {
    padding: 6px 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
}

.council-building ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.council-revisor {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

/* Кастомный скроллбар */
.council-list::-webkit-scrollbar {
    width: 8px;
}

.council-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.council-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.council-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Адаптив для мобильных */
@media (max-width: 640px) {
    .council-btn {
        padding: 16px 20px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .council-btn i {
        font-size: 20px;
    }
    
    .council-list {
        max-height: 70vh;
        gap: 18px;
    }
    
    .council-building h4 {
        font-size: 17px;
    }
    
    .council-building ul li {
        font-size: 14px;
        padding: 5px 0;
    }
    
    .council-revisor {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* ========================================
   FAQ - Сдержанный и чистый стиль
   ======================================== */
.faq {
    background: var(--bg-light);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.faq-question {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question h3 {
    font-size: 17px;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    padding-right: 15px;
    line-height: 1.4;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

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

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 15px;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px 25px;
    max-height: 1000px; /* Достаточно для любого текста */
}

/* Чистые абзацы без лишних отступов */
.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Простой и аккуратный список (стандартные маркеры, никаких поломок строк) */
.faq-answer ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 10px 0 15px 0;
}

.faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Выделение важных слов жирным (сдержанный акцент) */
.faq-answer strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Очень сдержанный блок для важной информации (опционально) */
.faq-highlight {
    margin-top: 15px;
    padding: 12px 15px;
    background: var(--bg-light);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Адаптив для мобильных */
@media (max-width: 640px) {
    .faq-question {
        padding: 15px 20px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer {
        font-size: 14px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 18px 20px;
    }
}

/* ========================================
Works Modal Styles (Плановые работы)
======================================== */
.works-modal-content {
    max-width: 750px;
}

.works-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.4;
}

.works-year h4 {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0 0 10px 0;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 5px;
    line-height: 1.3;
}

.works-year ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.works-year ul li {
    padding: 6px 0;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.works-year ul li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.works-note {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.works-note i {
    color: var(--accent-color);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Кастомный скроллбар для модалки работ */
.works-list::-webkit-scrollbar {
    width: 8px;
}

.works-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.works-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.works-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Адаптив для мобильных устройств */
@media (max-width: 640px) {
    .works-list {
        max-height: 70vh;
        gap: 15px;
    }
    
    .works-year h4 {
        font-size: 16px;
    }
    
    .works-year ul li {
        font-size: 14px;
        padding: 4px 0;
    }
    
    .works-note {
        font-size: 13px;
        padding: 10px;
    }
}

/* Анимация переворота иконки дома */
.logo i.fas.fa-building {
    display: inline-block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.logo i.fas.fa-building.flipping {
    animation: flipVertical 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes flipVertical {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(360deg) scale(1); }
}

/* ========================================
   Социальные сети в разделе Контакты
   ======================================== */
.contact-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.contact-social a {
    color: var(--primary-color);
    font-size: 28px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-social a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-social .max-icon-contact {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-social .max-icon-contact svg {
    width: 28px;
    height: 28px;
    transition: var(--transition);
}

.contact-social .max-icon-contact:hover svg {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(123, 92, 255, 0.4));
}

/* По умолчанию (десктоп) переноса нет */
.mobile-break {
    display: inline;
}

/* На мобильных устройствах делаем перенос строки */
@media (max-width: 640px) {
    .mobile-break {
        display: block;
        margin-top: 5px; /* Небольшой отступ для красоты */
    }
}