/* ============================================================
   ЕДИНЫЙ ФАЙЛ СТИЛЕЙ
   Версия: 3.2 (убрано прижатие login-item вправо)
   ============================================================ */

:root {
    --gov-blue: #0b4075;
    --gov-blue-dark: #082d54;
    --gov-red: #d32f2f;
    --text-main: #2b3035;
    --text-muted: #5e6a75;
    --bg-body: #f4f7f9;
    --bg-white: #ffffff;
    --border-light: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(11, 64, 117, 0.05);
    --shadow-md: 0 8px 24px rgba(11, 64, 117, 0.08);
    --shadow-lg: 0 15px 35px rgba(11, 64, 117, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.6; 
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* ===== ПРЕЛОАДЕР ===== */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-white); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.loader { width: 50px; height: 50px; border: 5px solid var(--border-light); border-top-color: var(--gov-red); border-bottom-color: var(--gov-blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ===== ТОП-БАР ===== */
.top-bar { background-color: #f8fafc; border-bottom: 1px solid var(--border-light); font-size: 13px; color: var(--text-muted); padding: 10px 0; width: 100%; }
.top-bar .container { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-bar-links { display: flex; gap: 25px; font-weight: 500; }
.top-bar-links a:hover { color: var(--gov-blue); }

/* ===== ШАПКА ===== */
.header-wrapper { position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-md); }
header { background: var(--bg-white); padding: 20px 0; transition: padding 0.2s ease; }
header.compact { padding: 8px 0; }
.header-content { display: flex; align-items: center; gap: 35px; flex-wrap: wrap; }
.council-logo { height: 100px; width: auto; transition: height 0.2s ease; }
header.compact .council-logo { height: 70px; }
.institution-titles h2 { font-size: 14px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; transition: font-size 0.2s ease; }
.institution-titles h1 { font-size: 28px; color: var(--gov-blue); font-weight: 800; transition: font-size 0.2s ease; }
header.compact .institution-titles h2 { font-size: 11px; }
header.compact .institution-titles h1 { font-size: 22px; }

/* ===== НАВИГАЦИЯ ===== */
.main-nav { background: var(--gov-blue); color: white; border-bottom: 4px solid var(--gov-red); width: 100%; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; position: relative; }
.nav-list { display: flex; width: 100%; margin: 0; }
.nav-list li a { display: block; padding: 18px 25px; font-weight: 600; font-size: 15px; letter-spacing: 0.5px; text-transform: uppercase; border-right: 1px solid rgba(255,255,255,0.08); position: relative; }
.nav-list li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 0; background: rgba(255,255,255,0.15); transition: var(--transition); }
.nav-list li a:hover::after, .nav-list li a.active::after { height: 100%; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 24px; padding: 15px 0; cursor: pointer; }

/* Вкладка "Вход" теперь идёт сразу после "Обращения" (без смещения вправо) */
.nav-list .login-item {
    /* margin-left: auto;  — удалено */
}

@media (max-width: 768px) {
    .nav-list .login-item {
        margin-left: 0;
    }
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs { padding: 30px 0 15px; font-size: 14px; color: var(--text-muted); }
.breadcrumbs a { color: var(--gov-blue); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs i { margin: 0 8px; font-size: 12px; }

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.page-title { font-size: 42px; font-weight: 800; color: var(--gov-blue); margin-bottom: 40px; position: relative; padding-bottom: 15px; }
.page-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100px; height: 4px; background: var(--gov-red); border-radius: 2px; }

/* ===== ГЕРОЙ ===== */
.hero-slider { background: linear-gradient(135deg, var(--gov-blue-dark) 0%, var(--gov-blue) 100%); color: white; padding: 100px 0; margin-bottom: 60px; position: relative; overflow: hidden; width: 100%; }
.slider-content { max-width: 800px; position: relative; z-index: 2; }
.slider-content h2 { font-size: 52px; font-weight: 800; margin-bottom: 25px; line-height: 1.1; text-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.slider-content p { font-size: 20px; margin-bottom: 40px; opacity: 0.9; line-height: 1.6; max-width: 600px; }
.slider-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--gov-red); color: white; padding: 16px 40px; font-size: 16px; font-weight: 700; text-transform: uppercase; border-radius: 6px; box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4); transition: var(--transition); }
.slider-btn:hover { background: #b71c1c; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(211, 47, 47, 0.5); gap: 12px; }
.slider-btn i { transition: transform 0.2s ease; }
.slider-btn:hover i { transform: translateX(4px); }

/* ===== ОБЩИЕ ЗАГОЛОВКИ СЕКЦИЙ ===== */
.section-title { font-size: 32px; font-weight: 800; color: var(--gov-blue); margin-bottom: 40px; position: relative; padding-bottom: 15px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 80px; height: 4px; background: var(--gov-red); border-radius: 2px; }

/* ===== НОВОСТИ ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 70px; }
.news-card { background: var(--bg-white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); display: flex; flex-direction: column; height: 100%; transition: all 0.3s ease; }
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--gov-blue); }
.news-image { height: 220px; background: linear-gradient(135deg, #eef2f5, #e2e8f0); display: flex; align-items: center; justify-content: center; color: var(--gov-blue); transition: all 0.3s ease; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }
.news-image i { font-size: 64px; opacity: 0.3; transition: transform 0.3s ease; }
.news-card:hover .news-image i { transform: scale(1.1); }
.news-content { padding: 28px; flex-grow: 1; display: flex; flex-direction: column; }
.news-date { color: var(--gov-red); font-size: 13px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; }
.news-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--text-main); line-height: 1.4; transition: color 0.2s ease; }
.news-card:hover .news-title { color: var(--gov-blue); }
.news-excerpt { color: var(--text-muted); font-size: 14px; margin-bottom: 0; flex-grow: 1; line-height: 1.5; }

/* ===== ДВЕ КОЛОНКИ ===== */
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 70px; }
.list-box { background: var(--bg-white); border-radius: 12px; padding: 35px; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); }
.list-box-title { color: var(--gov-blue); margin-bottom: 25px; font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 15px; }
.list-item { padding: 20px 0; border-bottom: 1px solid var(--border-light); display: flex; gap: 20px; align-items: center; transition: all 0.2s ease; }
.list-item:hover { background: #f8fafc; padding-left: 10px; border-radius: 6px; border-bottom-color: transparent; }
.list-item:last-child { border-bottom: none; }
.list-date { color: var(--bg-white); background: var(--gov-red); padding: 4px 10px; border-radius: 4px; font-weight: 700; font-size: 13px; min-width: 90px; text-align: center; }
.list-title { font-weight: 600; font-size: 16px; line-height: 1.4; }
.list-title a:hover { color: var(--gov-blue); }

/* ===== НАПРАВЛЕНИЯ ===== */
.directions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-bottom: 70px; }
.direction-card { background: var(--bg-white); border-radius: 16px; padding: 35px 20px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: all 0.3s ease; cursor: pointer; }
.direction-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--gov-blue); }
.direction-card i { font-size: 48px; color: var(--gov-red); margin-bottom: 20px; transition: all 0.3s ease; display: inline-block; }
.direction-card:hover i { transform: scale(1.15) rotate(3deg); color: var(--gov-blue); }
.direction-card h3 { color: var(--gov-blue); font-size: 20px; font-weight: 800; margin-bottom: 12px; transition: color 0.2s ease; }
.direction-card:hover h3 { color: var(--gov-red); }
.direction-card p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

/* ===== ЦИТАТА ===== */
.quote-block { background: linear-gradient(to right, var(--bg-white), #f8fafc); border-left: 5px solid var(--gov-red); border-radius: 0 12px 12px 0; padding: 50px; margin: 70px 0; text-align: center; box-shadow: var(--shadow-md); position: relative; }
.quote-block i.fa-quote-left { font-size: 60px; color: var(--gov-blue); opacity: 0.1; position: absolute; top: 20px; left: 30px; }
.quote-block p.text { font-size: 22px; font-style: italic; font-weight: 500; color: var(--text-main); max-width: 900px; margin: 0 auto; line-height: 1.6; position: relative; z-index: 2; }
.quote-block p.author { margin-top: 25px; font-weight: 800; font-size: 18px; color: var(--gov-blue); text-transform: uppercase; letter-spacing: 1px; }

/* ===== СИМВОЛИКА ===== */
.state-heraldry { background: #ffffff; padding: 80px 0; border-top: 1px solid var(--border-light); border-bottom: 5px solid var(--gov-blue); text-align: center; width: 100%; }
.heraldry-title { font-size: 28px; color: var(--gov-blue); margin-bottom: 60px; text-transform: uppercase; font-weight: 800; letter-spacing: 1.5px; }
.heraldry-title::after { content: ''; display: block; width: 80px; height: 4px; background: var(--gov-red); margin: 20px auto 0; border-radius: 2px; }
.heraldry-grid { display: flex; justify-content: center; align-items: flex-end; gap: 100px; flex-wrap: wrap; }
.heraldry-item { display: flex; flex-direction: column; align-items: center; max-width: 250px; }
.heraldry-item img { height: 160px; object-fit: contain; margin-bottom: 25px; transition: all 0.3s ease; filter: drop-shadow(0 8px 15px rgba(0,0,0,0.1)); }
.heraldry-item:hover img { transform: scale(1.05) translateY(-5px); }
.heraldry-item p { font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.4; text-transform: uppercase; }

/* ===== ПОДВАЛ ===== */
footer { background: var(--gov-blue-dark); color: #b3c2d1; padding: 70px 0 30px; font-size: 15px; width: 100%; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr; gap: 50px; margin-bottom: 50px; }
.footer-logo { margin-bottom: 15px; }
.footer-logo-img { height: 80px; width: auto; }
.footer-title { color: #ffffff; font-size: 20px; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links h4 { color: #ffffff; margin-bottom: 25px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.footer-links li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-links a { color: #ffffff; transition: all 0.2s ease; }
.footer-links a:hover { color: var(--gov-red); padding-left: 5px; }
.footer-links i { color: var(--gov-red); font-size: 16px; width: 20px; text-align: center; transition: all 0.2s ease; }
.footer-links li:hover i { transform: translateX(3px); }
.social-icons { display: flex; gap: 15px; margin-top: 30px; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-radius: 50%; color: #fff; font-size: 22px; border: 1px solid rgba(255,255,255,0.1); transition: all 0.2s ease; }
.social-btn:hover { transform: translateY(-4px) scale(1.05); border-color: transparent; }
.social-btn.vk:hover { background: #0077FF; }
.social-btn.tg:hover { background: #0088cc; }
.social-btn.web:hover { background: var(--gov-red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
    .news-grid, .directions-grid { grid-template-columns: repeat(2, 1fr); }
    .heraldry-grid { gap: 50px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
    .top-bar .container { justify-content: center; }
    .header-content { gap: 15px; }
    .council-logo { height: 70px; }
    .institution-titles h1 { font-size: 20px; }
    .slider-content h2 { font-size: 36px; }
    .news-grid, .directions-grid, .two-columns { grid-template-columns: 1fr; }
    .heraldry-grid { flex-direction: column; align-items: center; gap: 40px; }
    .footer-logo-img { height: 60px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .mobile-menu-btn { display: block; }
    .nav-list { position: absolute; top: 100%; left: 0; flex-direction: column; background: var(--gov-blue-dark); z-index: 100; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; width: 100%; }
    .nav-list.active { max-height: 400px; border-top: 1px solid rgba(255,255,255,0.1); }
    .nav-list li a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 20px; }
    .top-bar-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
}