/* === Стили ТенторВокс (общие для всех страниц) === */

:root {
    --primary-color: #0a556d;
    --secondary-color: #e29a00;
    --dark-bg: #1d1d1d;
    --light-gray-bg: #f5f5f5;
    --text-color: #333;
    --text-light: #555;
    --border-color: #e0e0e0;
    --border-radius: 8px;
    --font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--light-gray-bg);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--secondary-color); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--border-radius); }

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

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* --- Верхний заголовок (sticky) --- */
.top-header {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 15px 0;
    border-bottom: 4px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo { display: flex; align-items: center; }

.site-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-menu a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.main-menu a:hover,
.main-menu a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* --- Поиск в хедере --- */
.header-search { display: flex; }
.header-search .search-input {
    padding: 8px 12px; border: 1px solid #555; border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 0.9rem; background-color: #333; color: #fff; min-width: 180px;
}
.header-search .search-input::placeholder { color: #aaa; }
.header-search .search-input:focus {
    outline: none; border-color: var(--secondary-color); background-color: #444;
}
.header-search .search-button {
    background-color: var(--primary-color); color: #fff; border: none;
    padding: 0 15px; border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer; transition: background-color 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
.header-search .search-button svg { width: 16px; height: 16px; fill: currentColor; }
.header-search .search-button:hover { background-color: var(--secondary-color); }

/* --- Баннер --- */
.hero-banner {
    background-color: var(--primary-color);
    color: #fff;
    min-height: 200px;
    height: 30vh;
    max-height: 300px;
    position: relative;
    border-bottom: 4px solid var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 20px;
}

.hero-title {
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
    margin: 0;
}

.hero-title span { color: var(--secondary-color); }

/* --- Навигационная цепочка --- */
.breadcrumb {
    background-color: #e9e9e9;
    padding: 14px 0;
    margin-bottom: 35px;
    border-bottom: 1px solid #dcdcdc;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb-item a {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a:hover { color: var(--secondary-color); }

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #aaa;
}

/* --- Сетка (row/col) --- */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }

.col-md-3,
.col-sidebar { width: 25%; padding: 0 15px; }
.col-md-6 { width: 50%; padding: 0 15px; }
.col-md-9,
.col-main { width: 75%; padding: 0 15px; }
.col-sidebar { order: 1; }
.col-main { order: 2; }
.col-sidebar-right { width: 25%; padding: 0 15px; order: 3; }

/* --- Боковое меню (виджеты) --- */
.sidebar-widget {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    margin-bottom: 35px;
}

.sidebar-widget-title {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.sidebar-widget-content {
    padding: 15px 20px;
}

/* --- Виджет рекламы --- */
.ad-block { text-align: center; }
.ad-title { font-size: 0.75rem; color: #999; margin-bottom: 8px; text-transform: uppercase; }
.ad-image { border: 1px solid var(--border-color); }

/* --- Контактный блок в сайдбаре --- */
.contact-box { background-color: var(--primary-color); color: #fff; padding: 20px; border-radius: 4px; margin-bottom: 30px; }
.contact-box .contact-info { margin-bottom: 15px; font-size: 0.95rem; line-height: 1.6; }
.contact-box .contact-info strong { color: var(--secondary-color); }
.contact-box .contact-email a { color: #fff; text-decoration: underline; font-weight: 600; }
.contact-box .contact-email a:hover { color: var(--secondary-color); }

/* --- Календарь --- */
.calendar-widget .sidebar-widget-content { padding: 10px; }
.calendar-month { text-align: center; padding: 10px 0; font-weight: 700; color: var(--primary-color); font-size: 1.1rem; margin-bottom: 10px; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-table th, .calendar-table td { text-align: center; padding: 6px 0; font-size: 0.9rem; height: 32px; }
.calendar-table th { font-weight: 600; color: var(--text-light); border-bottom: 1px solid var(--border-color); padding-bottom: 8px; font-size: 0.8rem; }
.calendar-table td { color: var(--text-color); }
.calendar-table td.other-month { color: #bbb; }
.calendar-table td > span.current-day { background-color: var(--secondary-color); color: #fff !important; font-weight: bold; border-radius: 50%; width: 30px; height: 30px; line-height: 30px; padding: 0; display: inline-block; }

/* --- Статистика и популярное --- */
.stats-list, .popular-list { list-style: none; }
.stats-list li, .popular-item { padding: 12px 0; border-bottom: 1px dotted #ddd; font-size: 0.95rem; line-height: 1.5; }
.stats-list li strong { color: var(--primary-color); margin-left: 5px; }
.stats-list li:last-child, .popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item:first-child { padding-top: 0; }
.popular-link { display: block; color: var(--text-color); font-weight: 600; transition: color 0.3s ease; }
.popular-link:hover { color: var(--primary-color); }
.popular-date { font-size: 0.85rem; color: #888; display: block; margin-top: 4px; }

/* --- Контентная страница --- */
.content-area {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 35px 40px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    margin-bottom: 40px;
}

.page-content,
.article-full {
    padding: 35px 40px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
}

.content-header {
    margin-bottom: 25px;
}

.content-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.content-description {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

.page-title,
.article-full .article-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.article-full .article-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

/* --- Статьи --- */
.article-list-title {
    font-size: 1.8rem;
    margin-bottom: 35px;
    color: var(--primary-color);
    font-weight: 700;
}

.article-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    margin-bottom: 35px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background-color: #eee;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img { transform: scale(1.05); }

.article-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(10, 85, 109, 0.9);
    color: #fff;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content {
    padding: 25px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a { color: var(--text-color); }
.article-title a:hover { color: var(--primary-color); }

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    color: #fff;
    background-color: var(--primary-color);
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.read-more:hover { background-color: var(--secondary-color); color: #fff; }

.no-articles { padding: 40px; text-align: center; font-size: 1.1rem; color: #777; }

/* --- Полная статья --- */
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    color: #777;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    gap: 10px 25px;
}

.article-meta span { display: inline-flex; align-items: center; }
.article-meta svg { margin-right: 8px; opacity: 0.8; width: 18px; height: 18px; }

.article-full .article-image {
    margin-bottom: 35px;
    border-radius: var(--border-radius);
    height: auto;
}

.article-full .article-image img {
    height: auto;
    object-fit: contain;
}

.article-text,
.page-text {
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-text p, .page-text p { margin-bottom: 1.6em; }

.article-text h3, .article-text h4,
.page-text h3, .page-text h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.4;
}

.article-text h3, .page-text h3 { font-size: 1.5rem; }
.article-text h4, .page-text h4 { font-size: 1.3rem; }

.article-text strong, .page-text strong { font-weight: 700; color: #111; }
.article-text a, .page-text a { text-decoration: underline; }

.article-text ul, .article-text ol,
.page-text ul, .page-text ol {
    padding-left: 30px;
    margin-bottom: 1.6em;
}

.article-text li, .page-text li { margin-bottom: 0.6em; }

.article-text table, .page-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 25px 0;
    font-size: 0.95rem;
}

.article-text th, .article-text td,
.page-text th, .page-text td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.article-text th, .page-text th {
    background-color: #f5f7fa;
    font-weight: 700;
    color: var(--primary-color);
}

.article-text tr:nth-child(even),
.page-text tr:nth-child(even) { background-color: #fafafa; }

.article-text blockquote, .page-text blockquote {
    margin: 1.8em 0;
    padding: 20px 25px;
    background-color: #f7f9fa;
    border-left: 5px solid var(--secondary-color);
    font-style: italic;
    color: var(--text-light);
}

/* --- Контакты --- */
.contact-details { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.contact-details li { margin-bottom: 1rem; display: flex; align-items: start; }
.contact-details svg { width: 20px; height: 20px; margin-right: 12px; color: var(--primary-color); flex-shrink: 0; margin-top: 3px; }
.contact-details strong { display: block; font-weight: 700; color: #333; margin-bottom: 0.2em; }
.contact-details .contact-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.contact-details .contact-col { width: 50%; padding: 0 15px; }

.map-placeholder {
    background-color: #e9e9e9; border: 1px dashed #ccc;
    min-height: 300px; display: flex; align-items: center;
    justify-content: center; color: #888; font-style: italic;
    border-radius: var(--border-radius); margin-top: 2rem;
}

/* --- Кнопка поделиться --- */
.share-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Пагинация --- */
.pagination {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 50px;
}

.pagination-item { margin: 0 6px; }

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: #fff;
}

.pagination-link:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: var(--primary-color);
}

.pagination-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Футер --- */
.footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 40px;
    margin-top: 60px;
    border-top: 6px solid var(--primary-color);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo { margin-bottom: 30px; }
.footer-logo .site-title { font-size: 1.8rem; color: #fff; }

.footer-nav {
    display: flex;
    list-style: none;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 25px;
}

.footer-nav-link {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-nav-link:hover { color: var(--secondary-color); }

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* --- Стили для базы знаний --- */
.sidebar-menu {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    margin-bottom: 35px;
}

.sidebar-menu-title {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.sidebar-menu-list { list-style: none; padding: 0; }

.sidebar-menu-item { border-bottom: 1px solid var(--border-color); }
.sidebar-menu-item:last-child { border-bottom: none; }

.sidebar-menu-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu-link:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.sidebar-menu-link.active {
    background-color: #e9f0f3;
    color: var(--primary-color);
    font-weight: 700;
}

.specs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background-color: var(--light-gray-bg);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.spec-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.spec-value {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- Адаптивность --- */
@media (max-width: 991px) {
    .col-main, .col-sidebar, .col-sidebar-right,
    .col-md-3, .col-md-6, .col-md-9 { width: 100%; order: 0; }
    .col-sidebar { order: 1; }
    .col-main { order: 2; }
    .col-sidebar-right { order: 3; }
    .main-menu { display: none; }
    .header-right { gap: 15px; justify-content: flex-end; flex-grow: 1; }
    .header-search { max-width: 250px; }
    .site-title { font-size: 1.4rem; }
    .top-header .container { gap: 10px; }
    .hero-title { font-size: 1.6rem; }
    .article-title { font-size: 1.2rem; }
    .article-image { height: 180px; }
    .article-content { padding: 20px; }
    .content-area, .page-content, .article-full { padding: 25px; }
}

@media (max-width: 767px) {
    .hero-banner { min-height: 150px; height: 25vh; }
    .hero-title { font-size: 1.4rem; }
    .content-title { font-size: 1.5rem; }
    .article-list-title { font-size: 1.3rem; }
    .article-image { height: 160px; }
    .article-content { padding: 15px; }
    .breadcrumb { padding: 10px 0; margin-bottom: 25px; }
    .header-search { width: 100%; max-width: none; margin-top: 10px; }
    .header-right { flex-basis: 100%; justify-content: center; }
    .contact-details .contact-col { width: 100%; padding: 0; }
    .contact-details .contact-col:first-child { margin-bottom: 1.5rem; }
}

@media (max-width: 575px) {
    .container { padding: 0 10px; }
    .content-area, .page-content, .article-full { padding: 15px; }
    .hero-banner { min-height: 120px; height: 20vh; }
    .hero-title { font-size: 1.2rem; }
    .content-title { font-size: 1.3rem; padding-bottom: 10px; }
    .article-title { font-size: 1.1rem; }
    .article-image { height: 140px; }
    .article-meta { flex-direction: column; gap: 5px; font-size: 0.85rem; }
}
