/* ============================================
   SET BASE — Минимализм, черно-белые цвета
   ============================================ */
:root {
    --color-primary: #000000;
    --color-bg: #f5f5f5;
    --color-bg-card: #ffffff;
    --color-text: #000000;
    --color-text-secondary: #333333;
    --color-border: #cccccc;
    --font-family: Arial, Helvetica, sans-serif;
    --radius: 4px; /* Минимальные скругления */
}

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

ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
input, select, textarea {
    font-family: var(--font-family);
}
article, aside, figure, footer, header, nav, section, main {
    display: block;
}

html {
    scroll-behavior: smooth;
}

body {
    font: 16px/1.5 var(--font-family);
    padding: 0;
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.clr, .clearfix:after {
    clear: both;
}
.clearfix:after {
    content: "";
    display: table;
}

/* Ссылки — строгие и простые */
a {
    color: #0055cc;
    text-decoration: none;
}
a:hover {
    color: #000000;
    text-decoration: none !important; /* Полностью отключаем подчеркивание при наведении */
}

h1, h2, h3, h4, h5 {
    font-weight: bold;
    line-height: 1.3;
    color: #000000;
}

/* ============================================
   БАЗОВАЯ СЕТКА — ОГРАНИЧЕННАЯ ШИРИНА
   ============================================ */
.wrap {
    min-width: 320px;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

.center {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto !important; /* Жестко по центру */
    padding: 0 15px;
    position: relative;
}

.block {
    background: var(--color-bg-card);
    padding: 20px;
    margin: 15px 0;
    border: 1px solid var(--color-border);
}

.cols {
    display: flex;
    flex-wrap: nowrap;
    margin: 15px auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    margin-bottom: 15px;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
}

.h-inf {
    padding: 15px 20px;
    min-height: 60px;
    display: block;
}

.logo {
    display: block;
    text-decoration: none;
}

.logo-icon {
    display: inline-block;
    vertical-align: middle;
    font-size: 24px;
    margin-right: 6px; /* Отступ между иконкой и текстом */
}

.logo p {
    display: inline-block;
    vertical-align: middle;
    font-size: 20px; /* Чуть уменьшили для мобильных */
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    margin: 0;
    white-space: normal !important; /* Разрешаем тексту красиво переноситься на телефонах */
    line-height: 1.2;
}

.logo-tagline {
    display: block;
    font-size: 13px;
    color: #666666;
    margin-top: 6px; /* Отступ от главного названия */
}

/* На всякий случай жестко скрываем кнопку меню, если она где-то осталась */
.btn-menu {
    display: none !important;
}

/* ============================================
   MAIN & SIDEBAR
   ============================================ */
.main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px;
}

.side {
    width: 300px;
    flex-shrink: 0;
    padding: 20px;
    border-left: 1px solid var(--color-border);
    background: #fafafa;
}

.side-bt {
    padding-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    border-bottom: 2px solid #000;
    margin-bottom: 10px;
}

ul.side-bc a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #eeeeee;
    font-size: 14px;
    color: #333;
}

ul.side-bc a:hover {
    color: #000;
    background: #f5f5f5;
    padding-left: 5px;
}

ul.side-bc li:last-child a {
    border-bottom: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-card);
    font-size: 13px;
    color: var(--color-text-secondary);
    display: flex;
    justify-content: space-between;
}

/* ============================================
   НОВОСТНЫЕ КАРТОЧКИ (Shortstory)
   ============================================ */
.news-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-img {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background: #eeeeee;
    border: 1px solid var(--color-border);
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.news-item-title {
    font-size: 18px;
    font-weight: bold;
}

.news-item-title a {
    color: #000;
}
.news-item-title a:hover {
    color: #0055cc;
}

.news-item-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.news-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 15px;
    background: #eeeeee;
    color: #000;
    border: 1px solid #cccccc;
    font-size: 13px;
    font-weight: bold;
}
.news-link:hover {
    background: #dddddd;
    text-decoration: none;
}

/* ============================================
   FULLSTORY
   ============================================ */
.full .news-item {
    padding: 0 0 15px 0;
    border-bottom: none;
    display: flex; /* Возвращаем правильную сетку */
    align-items: flex-start; /* Прижимаем картинку и текст к верхнему краю */
}

.full .news-item-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.full .news-item-text {
    font-size: 15px;
    color: #000;
}

/* ============================================
   КОММЕНТАРИИ
   ============================================ */
.full-comms {
    margin-top: 30px;
    border-top: 2px solid #000;
    padding-top: 20px;
}

.add-comm-form {
    background: #fafafa;
    padding: 15px;
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.ac-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.ac-inputs input,
.ac-textarea textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    margin-bottom: 10px;
    background: #fff;
}

.ac-textarea textarea {
    height: 80px;
    resize: vertical;
}

.ac-submit input {
    background: #333;
    color: #fff;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: bold;
    border: none;
}
.ac-submit input:hover {
    background: #000;
}

.comm-item {
    padding: 10px 0;
    border-bottom: 1px solid #eeeeee;
}

.comm-author {
    font-weight: bold;
    color: #000;
}

.comm-two {
    color: #333;
    font-size: 14px;
    margin-top: 5px;
}

/* ============================================
   НАВИГАЦИЯ (Pagination)
   ============================================ */
.bottom-nav {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 20px;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.navigation a,
.navigation span {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
    font-size: 14px;
}

.navigation a:hover {
    background: #eee;
    text-decoration: none;
}

.navigation span {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ============================================
   АДАПТИВНОСТЬ (Мобильные)
   ============================================ */
@media screen and (max-width: 820px) {
    .cols {
        flex-direction: column;
    }
    .side {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    .main {
        padding: 15px;
    }
    .news-item {
        flex-direction: column;
    }
    .news-item-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .btn-menu {
        display: flex;
    }
    .logo-tagline {
        display: none;
    }
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* ============================================
   ТЕХНИЧЕСКИЕ ИСПРАВЛЕНИЯ
   ============================================ */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}
.full-text, .comm-two, .news-item-text {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}


/* ============================================
   АВТО-ОФОРМЛЕНИЕ ПЛЕЕРОВ И СПОЙЛЕРОВ
   ============================================ */

/* 1. Плееры всегда 100% ширины, без теней, ровные */
iframe[src*="ok.ru"], 
iframe[src*="vk.com"], 
iframe[src*="vkvideo.ru"], 
iframe[src*="youtube.com"] {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    display: block !important;
    margin: 5px 0 20px 0 !important;
    background: #000 !important;
    border: 1px solid #000 !important;
}

/* 2. Текст "Полный выпуск" (тот, что внутри <p><b>) */
p:has(iframe) b {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #000000 !important;
    display: block !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* 3. Спойлер (Светло-серый, плоский, строгий) */
div:has(> .spoiler-content) {
    background-color: #ebebeb !important;
    border: 1px solid #cccccc !important;
    margin: -10px 0 25px 0 !important;
    padding: 0 !important;
}

/* Текст кнопки спойлера */
div:has(> .spoiler-content) > div:first-child {
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 10px 15px !important;
}

/* Открытая часть спойлера */
.spoiler-content {
    padding: 0 10px 10px 10px !important;
    margin-top: 0 !important;
}

/* 4. Убираем стандартные отступы у самого абзаца, в котором лежит видео */
p:has(iframe) {
    margin: 15px 0 0 0 !important; /* Оставляем только отступ сверху от предыдущего плеера */
    padding: 0 !important;
}

/* 5. Убиваем лишний тег <br>, который создает дыру между текстом и плеером */
p:has(iframe) br {
    display: none !important;
}

/* ============================================
   ОФОРМЛЕНИЕ КОММЕНТАРИЕВ И ФОРМЫ (Строгий стиль)
   ============================================ */

/* Блок добавления комментария */
.add-comm-form {
    background: #f9f9f9 !important;
    padding: 20px !important;
    border: 1px solid var(--color-border) !important;
    margin: 30px 0 20px 0 !important;
    border-radius: 4px !important;
}

/* Заголовок "Прокомментировать" */
.ac-title {
    font-weight: bold !important;
    font-size: 18px !important;
    margin-bottom: 20px !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
    padding-bottom: 10px !important;
    display: inline-block !important;
}

/* Инпуты (Имя, Email) */
.ac-inputs {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 15px !important;
}

.ac-inputs input,
.form-secur input {
    flex: 1 !important;
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #000 !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.ac-inputs input:focus,
.form-secur input:focus,
.ac-textarea textarea:focus {
    border-color: #000000 !important;
}

/* Текстовое поле */
.ac-textarea {
    margin-bottom: 15px !important;
}

.ac-textarea textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: 12px !important;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #000 !important;
    font-size: 14px !important;
    resize: vertical !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Капча и защита (вопрос/ответ) */
.ac-protect {
    margin-bottom: 15px !important;
    padding: 15px !important;
    background: #ffffff !important;
    border: 1px dashed #cccccc !important;
}

.form-item label {
    display: block !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    color: #000 !important;
}

/* Кнопка отправки */
.ac-submit button {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 10px 30px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background 0.2s !important;
}

.ac-submit button:hover {
    background: #333333 !important;
}

/* Иконки соцсетей (если включены) */
.ac-soc {
    margin-bottom: 15px !important;
    display: flex !important;
    gap: 8px !important;
}

.ac-soc img {
    width: 32px !important;
    height: 32px !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s !important;
}

.ac-soc img:hover {
    opacity: 1 !important;
}

/* ============================================
   ВЫВОД САМИХ КОММЕНТАРИЕВ
   ============================================ */

.comm-item {
    padding: 20px 0 !important;
    border-bottom: 1px solid #eeeeee !important;
}

.comm-item:last-child {
    border-bottom: none !important;
}

/* Шапка комментария (автор, дата) */
.comm-one {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
}

.comm-author {
    font-weight: bold !important;
    font-size: 16px !important;
    color: #000000 !important;
}

/* Дата и название группы (админ/пользователь) */
.comm-one span:not(.comm-author) {
    font-size: 12px !important;
    color: #888888 !important;
}

/* Текст комментария */
.comm-two {
    font-size: 15px !important;
    color: #222222 !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
    word-wrap: break-word !important;
}

/* Кнопки управления (Ответить, Редактировать, Удалить) */
.comm-three {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    font-size: 13px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.comm-three li {
    display: inline-flex !important;
    align-items: center !important;
    color: #666666 !important;
}

.comm-three a {
    color: #0055cc !important; /* Строгий синий цвет для ссылок действий */
    font-weight: bold !important;
    text-decoration: none !important;
}

.comm-three a:hover {
    color: #000000 !important;
}

.comm-three span.fa {
    margin-right: 6px !important;
}

/* Инфо-плашка для админов (IP) */
.comm-three b {
    color: #000 !important;
    margin-right: 4px !important;
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ ФОРМЫ КОММЕНТАРИЕВ
   ============================================ */
@media screen and (max-width: 600px) {
    .ac-inputs {
        flex-direction: column !important;
        gap: 10px !important;
    }
}