/*
Theme Name: СоюзМаш Иркутск
Theme URI: https://irosouzmash.ru/
Author: Александр Кралько https://vk.com/carbon38
Author URI:
Description: Тема для Иркутского регионального отделения Союза машиностроителей России. Адаптивный дизайн.
Version: 5.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: soyuzmash
*/

/* ==========================================================================
0. СБРОС И БАЗОВЫЕ СТИЛИ
========================================================================== */
@charset "utf-8";
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body, div, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, textarea, p, blockquote, th, td {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
@media (min-width: 1200px) {
    body, div, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, textarea, p, blockquote, th, td {
        font-size: 12px;
    }
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
fieldset, img {
    border: 0;
}
address, caption, cite, code, dfn, em, strong, th, var {
    font-style: normal;
    font-weight: normal;
}
ol, ul {
    list-style: none;
}
caption, th {
    text-align: left;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin: 15px 0;
    color: #2c376e;
}
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1.1em; }
.clear {
    clear: both;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}
body {
    background: url(images/background.jpg) repeat-x left top;
    padding-top: 20px;
}
.left { float: left; }
.right { float: right; }
p { margin: 0 0 10px 0; }
a {
    color: #000;
    text-decoration: underline;
    transition: all 0.3s ease;
}
a:hover { text-decoration: none; }

/* ==========================================================================
ШАПКА (HEADER)
========================================================================== */
#header {
    text-align: center;
    position: relative;
    background: url(images/header_02.jpg) no-repeat top left;
    height: 410px;
    width: 976px;
    margin: 0 auto;
    padding: 0 10px;
    overflow: hidden;
}
@media (max-width: 976px) {
    #header {
        width: 100%;
        height: auto;
        background: none;
        padding: 20px;
    }
}
#head_back {
    position: absolute;
    display: block;
    white-space: nowrap;
    background: #fff;
    width: 100%;
    overflow: hidden;
    left: 0;
    top: 0;
}
#logo {
    z-index: 99;
    position: relative;
    float: left;
    text-align: left;
    font-size: 13px;
    font-weight: bold;
    line-height: 130%;
    font-family: Georgia, serif;
    text-decoration: none;
    color: #024c90;
}
@media (max-width: 976px) {
    #logo {
        float: none;
        text-align: center;
        margin-bottom: 20px;
    }
    #logo .contact-info { text-align: center; }
}
#logo h1 a {
    display: block;
    margin-left: -10px;
    background: url(images/logo_03.png) no-repeat left top;
    height: 155px;
    width: 272px;
    text-indent: -5000px;
}
@media (max-width: 768px) {
    #logo h1 a {
        height: 100px;
        width: 175px;
        background-size: contain;
        margin: 0 auto;
    }
}
@media (max-width: 480px) {
    #logo h1 a {
        height: 70px;
        width: 123px;
    }
}
#logo .contact-info { margin-top: 5px; }

/* ==========================================================================
СТИЛИ ДЛЯ КОНТАКТОВ В ШАПКЕ
========================================================================== */
.contact-info {
    font-size: 13px;
    font-weight: bold;
    line-height: 130%;
    font-family: Georgia, serif;
    color: #024c90;
}
.contact-info p {
    margin: 0 0 5px 0;
    padding: 0;
    color: #024c90;
}
.contact-info p a,
.contact-info p a:link,
.contact-info p a:visited {
    color: #024c90;
    text-decoration: none;
    border-bottom: 1px dotted rgba(2, 76, 144, 0.3);
}
.contact-info p a:hover {
    color: #2c376e;
    text-decoration: none;
    border-bottom: 1px solid #2c376e;
}

/* ==========================================================================
СОЦИАЛЬНЫЕ ИКОНКИ В КОНТАКТАХ
========================================================================== */
.contact-social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 10px;
}
.contact-social-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(2, 76, 144, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 5px;
}
.contact-social-icons .social-icon:hover {
    transform: translateY(-2px);
    background: #2c376e;
}
.contact-social-icons .social-icon img {
    width: 20px;
    height: 20px;
    display: block;
}
.contact-social-icons .social-vk:hover { background: #0077FF; }
.contact-social-icons .social-ok:hover { background: #F58220; }
.contact-social-icons .social-max:hover { background: #00AA00; }
.contact-social-icons .social-tg:hover { background: #0088cc; }
@media (max-width: 976px) and (min-width: 769px) {
    .contact-social-icons {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .contact-social-icons {
        display: none !important;
    }
}

/* Изображения шапки */
#headImages {
    float: left;
    position: relative;
    height: 272px;
}
@media (max-width: 976px) { #headImages { display: none; } }
#headImage1, #headImage2, #headImage3,
#headImage4, #headImage5, #headImage6, #headImage7 {
    position: absolute;
    border: 2px solid #5278a4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#headImage1 { left: 170px; top: 0; z-index: 4; width: 166px; height: 120px; }
#headImage2 { left: 314px; top: 35px; z-index: 2; width: 231px; height: 128px; }
#headImage3 { left: 160px; top: 160px; z-index: 1; width: 312px; height: 92px; }
#headImage4 { left: 90px; top: 110px; z-index: 2; width: 157px; height: 117px; }
#headImage5 { left: 490px; top: 130px; z-index: 4; width: 163px; height: 113px; }
#headImage6 { left: 528px; top: 0px; z-index: 4; width: 170px; height: 102px; }
#headImage7 { left: 0px; top: 12px; z-index: 1; width: 178px; height: 118px; }

/* ==========================================================================
2. НАВИГАЦИЯ
========================================================================== */
#main-nav {
    position: relative;
    margin: 0 auto;
    width: 976px;
    clear: both;
}
@media (max-width: 976px) {
    #main-nav {
        width: 100%;
        clear: both;
    }
}
#menu { margin: 0; padding: 0; }
#menu li {
    display: block;
    float: left;
    margin: 0 30px 0 0;
}
@media (max-width: 768px) {
    #menu li {
        float: none;
        display: inline-block;
        margin: 0 15px;
    }
}
@media (max-width: 480px) {
    #menu li {
        display: block;
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
}
#menu a {
    display: inline-block;
    font-size: 14px;
    color: #2c376e;
    text-decoration: none;
    padding: 0 0 5px 0;
}
@media (max-width: 480px) {
    #menu a {
        display: block;
        padding: 8px;
        background: #f5f5f5;
        border-radius: 5px;
    }
}
#menu a.selected, #menu a:hover {
    background: url(images/menu_11.png) repeat-x bottom left;
}
@media (max-width: 480px) {
    #menu a.selected, #menu a:hover {
        background: #2c376e;
        color: #fff;
    }
}
#menu a.selected { font-weight: bold; }

/* ==========================================================================
3. ПОИСК (БАЗОВЫЕ СТИЛИ - БЕЗ AJAX)
========================================================================== */
#search.search-right, #search.search-left {
    float: right;
    margin: 10px 0;
}
#search.search-left { float: left; }
#search.search-after-menu {
    clear: both;
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #ddd;
}
@media (max-width: 976px) {
    #search.search-right, #search.search-left {
        float: none;
        text-align: center;
        margin: 10px auto;
    }
    #search.search-right form, #search.search-left form {
        display: inline-flex;
        justify-content: center;
    }
}
#search form {
    margin: 0;
    display: flex;
    align-items: center;
}
#search input[type="text"] {
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    outline: none;
    width: 180px;
}
@media (max-width: 768px) {
    #search input[type="text"] {
        width: 150px;
        font-size: 13px;
        padding: 6px 10px;
    }
}
@media (max-width: 480px) {
    #search input[type="text"] {
        width: 120px;
        font-size: 12px;
    }
}
#search input[type="text"]:focus {
    border-color: #2c376e;
    box-shadow: 0 0 3px rgba(44, 55, 110, 0.3);
}
#search button {
    padding: 5px 10px;
    font-size: 11px;
    background: #2c376e;
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}
@media (max-width: 768px) {
    #search button {
        padding: 6px 12px;
        font-size: 13px;
    }
}
#search button:hover { background: #1e2a5e; }

/* ==========================================================================
4. КОНТЕНТ (ОБЩИЙ)
========================================================================== */
#content {
    width: 976px;
    margin: 10px auto 50px auto;
}
@media (max-width: 976px) {
    #content {
        width: 100%;
        padding: 0 20px;
    }
}
#content .left { width: 420px; }
#content #inner .left { width: 550px; }
#content #inner .right { width: 400px; }
#content div.newsItem { margin: 0 0 30px; }
#content .right { width: 515px; }
@media (max-width: 768px) {
    #content .left, #content .right,
    #content #inner .left, #content #inner .right {
        width: 100%;
        float: none;
        margin: 0 0 30px 0;
    }
}
#content img {
    max-width: 100%;
    height: auto;
}
#content .entry-content img {
    float: none;
    margin: 15px 0;
    display: block;
}
@media (max-width: 480px) {
    #content img {
        float: none;
        display: block;
        margin: 15px auto;
    }
}
#content h2 { font-size: 16px; }
#content p.date {
    font-style: italic;
    font-size: 10px;
    margin-bottom: 5px;
}
.news_a {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

/* ==========================================================================
ВНУТРЕННИЙ КОНТЕЙНЕР (для single, page, search, 404, archive)
========================================================================== */
#inner {
    width: 100%;
    max-width: 976px;
    margin: 0 auto;
    overflow: hidden;
}
#inner .left {
    width: calc(100% - 350px);
    float: left;
}
#inner .right-sidebar {
    float: right;
    width: 330px;
    margin-left: 20px;
}
#inner .left.full-width {
    width: 100% !important;
    float: none !important;
    clear: both;
}
#inner .left.full-width .archive-news-list {
    width: 100%;
    max-width: 100%;
}
#inner .left.full-width .archive-news-item {
    width: 100%;
    max-width: 100%;
}
@media (max-width: 976px) {
    #inner .left,
    #inner .right-sidebar,
    #inner .left.full-width {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
    }
    #inner .right-sidebar {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
}

/* ==========================================================================
5. ГЛАВНАЯ СТРАНИЦА (ДЕСКТОП)
========================================================================== */
.home-desktop {
    width: 100%;
    overflow: hidden;
}
.home-categories-header {
    display: flex;
    justify-content: space-between;
    gap: 2%;
    margin-bottom: 30px;
    width: 100%;
}
.home-left-column-header,
.home-right-column-header {
    width: 48%;
}
.home-left-column-header h2,
.home-right-column-header h2 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c376e;
}
.home-columns-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 2%;
    width: 100%;
}
.home-left-column,
.home-right-column {
    width: 48%;
    vertical-align: top;
}
.home-footer-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.home-footer-links .all-news-link {
    display: inline-block;
    margin: 0 15px;
    font-size: 14px;
    color: #2c376e;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: all 0.3s ease;
}
.home-footer-links .all-news-link:hover {
    color: #1e2a5e;
    transform: translateX(5px);
    text-decoration: underline;
}
.home-footer-links .separator {
    color: #ccc;
    font-size: 14px;
    margin: 0 5px;
}
.column-title-link {
    text-decoration: none;
    display: block;
    transition: opacity 0.3s ease;
}
.column-title-link:hover {
    opacity: 0.8;
}
.column-title-link h2,
.column-title-link h2.title {
    margin: 0;
    transition: transform 0.3s ease;
}
.column-title-link:hover h2 {
    transform: translateX(5px);
}
.home .newsItem {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.home .newsItem:hover {
    background: #f5f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.home .news-thumb {
    flex-shrink: 0;
    width: 150px;
}
.home .news-thumb img {
    width: 100%;
    height: auto;
    max-height: 99px;
    object-fit: contain;
    border-radius: 5px;
    transition: transform 0.3s ease;
}
.home .newsItem:hover .news-thumb img {
    transform: scale(1.02);
}
.home .news-content {
    flex: 1;
}
.home .news_a {
    font-size: 16px;
    font-weight: bold;
    color: #2c376e;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}
.home .newsItem:hover .news_a {
    color: #1e2a5e;
    text-decoration: underline;
}
.home .news-excerpt {
    margin: 8px 0 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

/* ==========================================================================
6. МОБИЛЬНАЯ ВЕРСИЯ
========================================================================== */
.home-mobile { display: none; }
@media (max-width: 768px) {
    .home-desktop { display: none; }
    .home-mobile {
        display: block;
        width: 100%;
        padding: 0 20px;
    }
    .home-mobile-title {
        font-size: 24px;
        color: #2c376e;
        margin-bottom: 30px;
        padding-bottom: 10px;
        border-bottom: 2px solid #2c376e;
    }
    .home-mobile-news-list { width: 100%; }
    .home-mobile-news-item {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 25px;
        padding: 15px;
        border-radius: 8px;
        transition: all 0.3s ease;
        cursor: pointer;
        animation: fadeInUp 0.4s ease-out forwards;
        opacity: 0;
    }
    .home-mobile-news-item:hover {
        background: #f5f7ff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .home-mobile-news-item:last-child { border-bottom: none; }
    .home-mobile-news-item.first-item { margin-top: 0; padding-top: 0; }
    .home-mobile-news-item:nth-child(1) { animation-delay: 0.05s; }
    .home-mobile-news-item:nth-child(2) { animation-delay: 0.1s; }
    .home-mobile-news-item:nth-child(3) { animation-delay: 0.15s; }
    .home-mobile-news-item:nth-child(4) { animation-delay: 0.2s; }
    .home-mobile-news-item:nth-child(5) { animation-delay: 0.25s; }
    .home-mobile-news-item:nth-child(6) { animation-delay: 0.3s; }
    .home-mobile-news-item:nth-child(7) { animation-delay: 0.35s; }
    .home-mobile-news-item:nth-child(8) { animation-delay: 0.4s; }
    .home-mobile-news-item:nth-child(9) { animation-delay: 0.45s; }
    .home-mobile-news-item:nth-child(10) { animation-delay: 0.5s; }
    .home-mobile-news-thumb {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }
    .home-mobile-news-thumb img {
        width: 100%;
        height: auto;
        max-width: 100%;
        border-radius: 5px;
        display: block;
        transition: transform 0.3s ease;
    }
    .home-mobile-news-item:hover .home-mobile-news-thumb img {
        transform: scale(1.02);
    }
    .home-mobile-news-content { text-align: center; }
    .home-mobile-news-title {
        font-size: 16px;
        font-weight: bold;
        color: #2c376e;
        text-decoration: none;
        display: block;
        margin-bottom: 8px;
        transition: color 0.3s ease;
    }
    .home-mobile-news-item:hover .home-mobile-news-title {
        color: #1e2a5e;
        text-decoration: underline;
    }
    .home-mobile-news-date {
        font-size: 11px;
        color: #999;
        font-style: italic;
        margin-bottom: 10px;
    }
    .home-mobile-news-excerpt {
        font-size: 13px;
        color: #333;
        line-height: 1.5;
    }
    .home-mobile-footer-links {
        text-align: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
    .home-mobile-footer-links .all-news-link {
        display: inline-block;
        margin: 0 10px;
        font-size: 13px;
        color: #2c376e;
        text-decoration: none;
        font-weight: bold;
        padding: 5px 8px;
        transition: all 0.3s ease;
    }
    .home-mobile-footer-links .all-news-link:hover {
        color: #1e2a5e;
        transform: translateX(3px);
        text-decoration: underline;
    }
    .home-mobile-footer-links .separator {
        color: #ccc;
        font-size: 12px;
    }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .news-thumb { width: 100px; }
    .news_a { font-size: 14px; }
    .news-excerpt { font-size: 12px; }
}
@media (max-width: 480px) {
    .home-mobile-news-thumb { max-width: 180px; }
    .home-mobile-news-title { font-size: 15px; }
    .home-mobile-news-excerpt { font-size: 12px; }
    .news-thumb { width: 80px; }
    .news_a { font-size: 13px; }
}

/* ==========================================================================
7. СТРАНИЦА ЗАПИСИ (SINGLE)
========================================================================== */
.single .newsItem {
    margin-bottom: 30px;
    cursor: default;
    background: transparent;
    transform: none;
    box-shadow: none;
    padding: 0;
    display: block;
}
.single .newsItem:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}
.single .newsItem h2 { margin-bottom: 5px; }
.single .newsItem .date {
    font-style: italic;
    font-size: 10px;
    margin-bottom: 15px;
    color: #666;
}
.single .newsItem .entry-content { margin-bottom: 20px; }
.single .newsItem .button {
    display: inline-block;
    padding: 8px 20px;
    background: #2c376e;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s ease;
    margin-top: 30px;
    margin-bottom: 10px;
}
.single .newsItem .button:hover {
    background: #1e2a5e;
    text-decoration: none;
}
.single .news-thumb,
.single .news-content,
.single .news_a {
    display: block;
    width: auto;
}
.single .news_a {
    font-size: 16px;
    color: #2c376e;
    text-decoration: none;
}

/* ==========================================================================
8. СТИЛИ ДЛЯ ТЕКСТА НОВОСТЕЙ (entry-content)
========================================================================== */
.entry-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.entry-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}
.entry-content ul,
.entry-content ol {
    margin: 10px 0 15px 20px;
    font-size: 14px;
    line-height: 1.6;
}
.entry-content li {
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.6;
}
.entry-content table {
    font-size: 14px;
    line-height: 1.5;
    margin: 15px 0;
    width: 100%;
    border-collapse: collapse;
}
.entry-content th,
.entry-content td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 14px;
}
.entry-content blockquote {
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
    padding: 10px 20px;
    border-left: 3px solid #2c376e;
    background: #f9f9f9;
    font-style: italic;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 20px 0 10px;
}
@media (max-width: 768px) {
    .entry-content,
    .entry-content p,
    .entry-content ul,
    .entry-content ol,
    .entry-content li,
    .entry-content th,
    .entry-content td,
    .entry-content blockquote {
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .entry-content,
    .entry-content p,
    .entry-content ul,
    .entry-content ol,
    .entry-content li,
    .entry-content th,
    .entry-content td,
    .entry-content blockquote {
        font-size: 12px;
    }
}

/* ==========================================================================
9. АРХИВ (ARCHIVE)
========================================================================== */
.archive-title {
    font-size: 24px;
    color: #2c376e;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c376e;
}
.archive-news-list {
    width: 100%;
}
.archive-news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    clear: both;
    overflow: hidden;
}
.archive-news-item:last-child { border-bottom: none; }
.archive-news-thumb {
    flex-shrink: 0;
    width: 150px;
}
.archive-thumb-img {
    width: 100%;
    height: auto;
    max-height: 99px;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}
.archive-thumb-img:hover { opacity: 0.8; }
.archive-news-content { flex: 1; }
.archive-news-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c376e;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}
.archive-news-title:hover { text-decoration: underline; }
.archive-news-date {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-bottom: 10px;
}
.archive-news-excerpt {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}
.archive-read-more {
    color: #2c376e;
    text-decoration: underline;
    font-size: 14px;
    display: inline-block;
}
.archive-read-more:hover {
    text-decoration: none;
    color: #1e2a5e;
}
@media (max-width: 768px) {
    .archive-news-item {
        flex-direction: column;
        gap: 10px;
    }
    .archive-news-thumb {
        max-width: 200px;
        margin: 0 auto;
    }
    .archive-thumb-img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    .archive-news-title {
        font-size: 16px;
        text-align: center;
    }
    .archive-news-date,
    .archive-news-excerpt {
        text-align: center;
    }
}
@media (max-width: 480px) {
    .archive-news-thumb { max-width: 180px; }
    .archive-news-title { font-size: 15px; }
    .archive-news-excerpt { font-size: 12px; }
}

/* ==========================================================================
10. САЙДБАР (SIDEBAR)
========================================================================== */
.sidebar-widget {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 30px;
}
.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c376e;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c376e;
}
.sidebar-news-list { margin: 0; }
.sidebar-news-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.sidebar-news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.sidebar-news-thumb {
    flex-shrink: 0;
    width: 80px;
    overflow: hidden;
    border-radius: 3px;
}
.sidebar-thumb-img {
    width: 80px;
    height: auto;
    max-height: 53px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}
.sidebar-thumb-img:hover { opacity: 0.8; }
.sidebar-news-content { flex: 1; }
.sidebar-news-title {
    font-size: 14px;
    font-weight: bold;
    color: #2c376e;
    text-decoration: none;
    display: block;
    line-height: 1.3;
    margin-bottom: 5px;
}
.sidebar-news-title:hover { text-decoration: underline; }
.sidebar-news-date {
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-bottom: 5px;
}
.sidebar-all-link {
    margin-top: 15px;
    padding-top: 10px;
    text-align: right;
    border-top: 1px solid #eee;
}
.sidebar-link-all {
    font-size: 13px;
    color: #2c376e;
    text-decoration: none;
    font-weight: bold;
}
.sidebar-link-all:hover { text-decoration: underline; }
.sidebar-no-news {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}
@media (max-width: 768px) {
    .sidebar-news-item {
        flex-direction: column;
        text-align: center;
    }
    .sidebar-news-thumb {
        margin: 0 auto;
    }
    .sidebar-thumb-img {
        width: 100%;
        height: auto;
        max-width: 150px;
    }
}

/* ==========================================================================
11. ПОДВАЛ (FOOTER)
========================================================================== */
#footer {
    width: 976px;
    border-top: #cccccc 1px solid;
    padding: 30px 0 30px 0;
    position: relative;
    margin: 0 auto;
    height: auto;
    min-height: 20px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
}
@media (max-width: 976px) {
    #footer {
        width: 100%;
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    #footer .footer-left,
    #footer .footer-center,
    #footer .footer-right {
        width: 100%;
        text-align: center;
        flex: none;
    }
    #footer .footer-left .footer-logo img { margin: 0 auto; }
    #footer .footer-right { text-align: center; }
}
#footer .footer-left {
    flex: 0 0 auto;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}
#footer .footer-left .footer-logo { display: inline-block; }
#footer .footer-left .footer-logo img {
    max-width: 68px;
    height: auto;
    display: block;
}
@media (max-width: 768px) {
    #footer .footer-left .footer-logo img {
        max-width: 57px;
        margin: 0 auto;
    }
}
#footer .footer-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#footer .footer-center .footer-center-spacer { flex: 1; }
#footer .footer-center .copyright {
    margin: 0;
    font-size: 12px;
    color: #666;
    padding-bottom: 0;
}
@media (max-width: 768px) {
    #footer .footer-center .copyright {
        font-size: 11px;
        margin-top: 20px;
    }
    #footer .footer-center .footer-center-spacer { display: none; }
}
#footer .footer-right {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#footer .footer-right p { margin: 0; font-size: 10px; }
#footer .footer-right .widget { margin: 0; padding: 0; }
#footer .footer-right .widget p { font-size: 10px; }
.footer-social {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
}
@media (max-width: 976px) {
    .footer-social {
        justify-content: center;
        margin-top: 10px;
    }
}
.footer-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 4px;
}
.footer-social .social-icon:hover {
    background: #2c376e;
    transform: translateY(-2px);
}
.footer-social .social-icon img {
    width: 22px;
    height: 22px;
    display: block;
}
.footer-social .social-vk:hover { background: #0077FF; }
.footer-social .social-ok:hover { background: #F58220; }
.footer-social .social-max:hover { background: #00AA00; }
.footer-social .social-tg:hover { background: #0088cc; }
@media (max-width: 768px) {
    .footer-social {
        justify-content: center;
        gap: 8px;
    }
    .footer-social .social-icon {
        width: 30px;
        height: 30px;
        padding: 3px;
    }
    .footer-social .social-icon img {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================================================
12. ПАГИНАЦИЯ НА ГЛАВНОЙ СТРАНИЦЕ
========================================================================== */
.home-pagination {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    clear: both;
}
.home-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background: #f5f5f5;
    color: #2c376e;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.home-pagination .page-numbers.current {
    background: #2c376e;
    color: #fff;
    border-color: #2c376e;
}
.home-pagination .page-numbers:hover:not(.current) {
    background: #e0e0e0;
    transform: translateY(-2px);
}
.home-pagination .prev,
.home-pagination .next {
    font-weight: bold;
}
.home-mobile-pagination {
    text-align: center;
    margin: 30px 0 20px;
    padding: 10px 0;
}
.home-mobile-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #f5f5f5;
    color: #2c376e;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}
.home-mobile-pagination .page-numbers.current {
    background: #2c376e;
    color: #fff;
    border-color: #2c376e;
}
@media (max-width: 480px) {
    .home-pagination .page-numbers,
    .home-mobile-pagination .page-numbers {
        padding: 5px 10px;
        font-size: 12px;
        margin: 0 2px;
    }
}

/* ==========================================================================
13. ОСТАЛЬНЫЕ СЕКЦИИ
========================================================================== */
ul.left-menu { list-style: none; margin: 0; padding: 0; margin-bottom: 8px; position: relative; }
ul.left-menu li { padding: 10px 16px; background: #F5F5F5 url(images/left_menu_bg.gif) top repeat-x; }
ul.left-menu li a { font-size: 100%; color: #BC262C; font-weight: bold; text-decoration: none; }
ul.left-menu li a:hover, ul.left-menu li a:visited { color: #BC262C; }
ul.left-menu li a.selected { color: #FC8D3D; }
div.news-list img.preview_picture { float: left; margin: 0 4px 6px 0; }
.news-date-time { color: #486DAA; }
.navigation { margin: 30px 0; text-align: center; clear: both; }
.navigation .page-numbers {
    display: inline-block; padding: 5px 10px; margin: 0 2px;
    background: #f5f5f5; color: #2c376e; text-decoration: none;
    border: 1px solid #ddd; border-radius: 3px; transition: all 0.3s ease;
}
@media (max-width: 480px) { .navigation .page-numbers { padding: 4px 8px; font-size: 11px; } }
.navigation .page-numbers.current { background: #2c376e; color: #fff; border-color: #2c376e; }
.navigation .page-numbers:hover:not(.current) { background: #e0e0e0; }
#error404 { text-align: center; padding: 50px 20px; }
#error404 h1 { font-size: 72px; color: #2c376e; margin: 0 0 20px 0; }
@media (max-width: 480px) { #error404 h1 { font-size: 48px; } }
#error404 h2 { font-size: 24px; color: #666; margin: 0 0 30px 0; }
@media (max-width: 480px) { #error404 h2 { font-size: 20px; } }
#error404 p { font-size: 16px; margin-bottom: 30px; }
#error404 h3, #error404 h4 { color: #2c376e; }
#error404 ul { list-style: disc; padding-left: 20px; text-align: left; max-width: 400px; margin: 40px auto; }
#error404 ul li { margin-bottom: 10px; }
#error404 ul li a { text-decoration: none; color: #2c376e; }
#error404 ul li a:hover { text-decoration: underline; }
#error404 .error-date { color: #999; font-size: 11px; }
#error404 .button {
    display: inline-block; padding: 8px 20px; background: #2c376e; color: #fff;
    text-decoration: none; border-radius: 3px; transition: background 0.3s ease;
}
#error404 .button:hover { background: #1e2a5e; text-decoration: none; }
.search-results { padding: 20px 0; }
.search-results .title { font-size: 24px; color: #2c376e; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #2c376e; }
.search-results .search-info { margin-bottom: 30px; color: #666; font-size: 14px; }
.search-results .newsItem { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; overflow: hidden; }
.search-results .news_a { font-size: 16px; font-weight: bold; display: inline-block; margin-bottom: 5px; color: #2c376e; text-decoration: none; }
.search-results .news_a:hover { text-decoration: underline; }
.search-results .date { font-style: italic; font-size: 11px; color: #999; margin: 5px 0; }
.search-results strong { background: yellow; font-weight: bold; }
.search-results .read-more { color: #2c376e; text-decoration: underline; font-size: 14px; display: inline-block; margin-top: 10px; }
.search-results .read-more:hover { text-decoration: none; color: #1e2a5e; }
.search-results .preview_picture { float: left; margin: 0 15px 10px 0; border-radius: 3px; }
.search-no-results { text-align: center; padding: 50px 20px; }
.search-no-results h3 { font-size: 18px; color: #666; margin-bottom: 20px; }
.search-no-results p { margin-bottom: 30px; }
.search-no-results ul { list-style: disc; padding-left: 20px; text-align: left; max-width: 400px; margin: 40px auto; }
.search-no-results ul li { margin-bottom: 10px; }
.search-no-results ul li a { text-decoration: none; color: #2c376e; }
.search-no-results .error-date { color: #999; font-size: 11px; }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], textarea, select {
    width: 100%; max-width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 3px; font-size: 14px;
}
button, input[type="submit"], .button, a.button {
    display: inline-block; padding: 8px 20px; background: #2c376e; color: #fff;
    border: none; border-radius: 3px; cursor: pointer; font-size: 14px;
    text-decoration: none; transition: all 0.3s ease;
}
button:hover, input[type="submit"]:hover, .button:hover, a.button:hover {
    background: #1e2a5e; text-decoration: none;
}
.widget { margin-bottom: 30px; }
.widget-title { font-size: 1.2em; margin-bottom: 15px; color: #2c376e; }
.footer-widget { margin-bottom: 15px; }
.footer-widget h4 { font-size: 12px; margin: 0 0 10px 0; color: #2c376e; }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget ul li { margin-bottom: 8px; }
.footer-widget ul li a { font-size: 10px; text-decoration: none; }
.footer-widget ul li a:hover { text-decoration: underline; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.gallery-item { margin: 0; padding: 0; overflow: hidden; border-radius: 5px; background: #f5f5f5; }
.gallery-icon a { display: block; line-height: 0; }
.gallery-icon img { width: 100%; height: auto; transition: transform 0.3s ease; cursor: pointer; }
.gallery-icon a:hover img { transform: scale(1.05); }
.gallery-caption { padding: 8px; font-size: 12px; color: #666; text-align: center; background: #f9f9f9; border-top: 1px solid #eee; }
.entry-content a img, .lightbox-enabled a img { transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.entry-content a:hover img, .lightbox-enabled a:hover img { transform: scale(1.02); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
@media (max-width: 768px) {
    .table-responsive { overflow-x: auto; display: block; }
    table { width: 100%; min-width: 500px; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .gallery-caption { font-size: 10px; padding: 5px; }
}
@media (max-width: 480px) {
    .gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .entry-content { font-size: 14px; line-height: 1.5; }
    .entry-content h1 { font-size: 24px; }
    .entry-content h2 { font-size: 20px; }
    .entry-content h3 { font-size: 18px; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.news-item { animation: fadeIn 0.5s ease-out; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #2c376e; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1e2a5e; }
@media print {
    #header, #footer, #search, .navigation, .widget, #headImages, .scroll-to-top { display: none; }
    body { background: white; padding: 0; }
    #content { margin: 0; padding: 0; }
}
.home-left-column .newsItem img, .home-right-column .newsItem img,
.sidebar-thumb-img, .archive-thumb-img, .preview_picture {
    height: auto !important; max-height: 99px !important; object-fit: contain !important;
}
.scroll-to-top {
    background: rgba(200, 200, 200, 0.3); color: #666; bottom: 30px; right: 30px; left: auto;
    cursor: pointer; position: fixed; z-index: 999999; font-size: 28px; text-align: center;
    line-height: 1; height: 50px; width: 50px; border-radius: 50%;
    border: 2px solid rgba(150, 150, 150, 0.5); padding: 0; margin: 0; transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); font-family: Arial, Helvetica, sans-serif;
    font-weight: bold; display: none; text-decoration: none; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.scroll-to-top:hover, .scroll-to-top:focus {
    background: #2c376e; color: #FFFFFF; transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); border-color: #2c376e; outline: none;
}
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 15px; right: 15px; left: auto; height: 44px; width: 44px; font-size: 24px;
        line-height: 1; display: flex; align-items: center; justify-content: center;
        padding: 0; margin: 0; box-sizing: border-box; border: 2px solid rgba(150, 150, 150, 0.5);
        background: rgba(200, 200, 200, 0.3); backdrop-filter: blur(4px);
    }
}
@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 10px; right: 10px; left: auto; height: 40px; width: 40px; font-size: 22px;
        line-height: 1; border-width: 2px; background: rgba(200, 200, 200, 0.3);
    }
}
@media (max-width: 360px) {
    .scroll-to-top { height: 36px; width: 36px; font-size: 20px; line-height: 1; }
}
body.rtl .scroll-to-top { right: auto; left: 30px; }
@media (max-width: 768px) { body.rtl .scroll-to-top { right: auto; left: 15px; } }