/* ==========================================================================
   1. СБРОС И БАЗОВАЯ ТИПОГРАФИКА (ОПТИМИЗИРОВАНО ДЛЯ 50+)
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    background-color: #eef1f5;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
article, aside, footer, header, nav, section, main { display: block; }

a {
    color: #14569b;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover, a:focus {
    color: #0b3460;
    text-decoration: underline;
}

/* ==========================================================================
   2. СЕТКА И КОНТЕЙНЕРЫ (FLEXBOX)
   ========================================================================== */
.fx-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.fx-middle {
    align-items: center;
}

.wrap {
    min-width: 320px;
    padding: 15px 10px;
}

.center {
    max-width: 1200px;
    margin: 0 auto;
}

.block {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cols {
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    margin: 20px 0;
    background: #fff;
}

.main {
    width: calc(100% - 350px);
    padding: 25px;
    min-height: 70vh;
}

.side {
    width: 350px;
    padding: 25px 20px;
    border-left: 1px solid #dcdfe6;
    background-color: #fafbfc;
}

/* ==========================================================================
   3. ШАПКА И ПОДВАЛ
   ========================================================================== */
.h-inf {
    background: linear-gradient(135deg, #123e6b 0%, #1e5a99 100%);
    border-radius: 6px;
    padding: 22px 25px;
    color: #ffffff;
}

.logo {
    display: block;
    color: #ffffff !important;
    text-decoration: none !important;
}

.logo-title {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.logo-sub {
    display: block;
    font-size: 16px;
    color: #d0e1f9;
    margin-top: 4px;
}

.footer {
    background-color: #f4f6f9;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    padding: 20px 25px;
    color: #4a5568;
}

.ft-title {
    font-size: 17px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.ft-disclaimer {
    font-size: 14px;
    line-height: 1.5;
    color: #647082;
}

/* ==========================================================================
   4. КАРТОЧКИ ВЫПУСКОВ (КОРОТКИЕ И ПОЛНЫЕ НОВОСТИ)
   ========================================================================== */
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

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

.full-header {
    border-bottom: 2px solid #eef1f5;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.news-item-img {
    flex: 0 0 220px;
    width: 220px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item-img img {
    width: 100%;
    height: auto;
    transition: opacity 0.2s;
}

.news-item-img:hover img {
    opacity: 0.85;
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item-title {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
    color: #111;
}

.news-item-title a {
    color: #123e6b;
}

.news-item-title a:hover {
    color: #d92d20;
    text-decoration: underline;
}

.news-item-text {
    font-size: 18px;
    line-height: 1.6;
    color: #2d3748;
    margin-bottom: 16px;
}

/* Крупная кнопка для аудитории 50+ */
.btn-watch {
    display: inline-block;
    background-color: #1964b3;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(25, 100, 179, 0.25);
}

.btn-watch:hover {
    background-color: #114782;
}

.admin-edit a {
    display: inline-block;
    background: #fef08a;
    color: #854d0e;
    padding: 4px 10px;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* ==========================================================================
   5. ВИДЕОПЛЕЕР И РЕКЛАМНЫЙ БЛОК
   ========================================================================== */
.rkl-bx {
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto 25px auto;
    text-align: center;
}

.video-box {
    margin: 20px 0 30px 0;
    background: transparent; /* Убираем черный фон у общего контейнера */
    color: #1a1a1a;
    font-size: 19px;
    font-weight: 600;
}

/* Отступы для подписей над плеерами ("1 часть", "2 часть", "Полный выпуск") */
.video-box p, 
.video-box h2, 
.video-box h3, 
.video-box h4, 
.video-box b, 
.video-box strong {
    margin: 25px 0 10px 0;
    color: #1a1a1a;
    font-size: 19px;
    font-weight: 600;
}

.video-box > *:first-child {
    margin-top: 0;
}

/* Стилизация самих плееров */
iframe, object, embed, video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 8px auto 28px auto; /* Воздух между плеерами и текстом */
    background-color: #000; /* Черный фон строго внутри самого плеера */
    border-radius: 4px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Аккуратное оформление кнопки/спойлера "Запасной плеер" */
.video-box details, 
.video-box .title_spoiler {
    margin: 15px 0 25px 0;
}

.full-text, .comm-two, .news-item-text, .full-comms {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ==========================================================================
   6. БОКОВАЯ КОЛОНКА (ПОСЛЕДНИЕ ВЫПУСКИ)
   ========================================================================== */
.side-bt {
    padding: 14px 18px;
    font-size: 20px;
    font-weight: 700;
    background-color: #123e6b;
    color: #ffffff;
    border-radius: 6px;
    margin-bottom: 12px;
}

ul.side-bc li {
    border-bottom: 1px solid #e2e8f0;
}

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

ul.side-bc a {
    display: block;
    padding: 14px 10px;
    font-size: 17px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
    border-radius: 4px;
}

ul.side-bc a:hover {
    background-color: #eef2f6;
    color: #14569b;
    text-decoration: none;
}

/* ==========================================================================
   7. ПАГИНАЦИЯ (НАВИГАЦИЯ ПО СТРАНИЦАМ)
   ========================================================================== */
.bottom-nav {
    text-align: center;
    padding: 30px 0 10px 0;
}

.navigation a, .navigation span {
    display: inline-block;
    min-width: 48px;
    height: 48px;
    line-height: 46px;
    padding: 0 16px;
    margin: 6px 4px;
    font-size: 19px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #1e293b;
    text-decoration: none;
}

.navigation span {
    background-color: #1964b3;
    border-color: #1964b3;
    color: #ffffff;
}

.navigation span.nav_ext {
    background: transparent;
    border: none;
    color: #64748b;
}

.navigation a:hover {
    background-color: #123e6b;
    border-color: #123e6b;
    color: #ffffff;
}

/* ==========================================================================
   8. ФОРМА И СПИСОК КОММЕНТАРИЕВ
   ========================================================================== */
.comms-title {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.add-comm-form {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 22px;
    margin-bottom: 30px;
}

.ac-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #0f172a;
}

.ac-soc {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ac-soc:before {
    content: attr(data-label);
    font-size: 16px;
    color: #475569;
    margin-right: 6px;
}

.ac-soc img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.ac-inputs {
    gap: 15px;
    margin-bottom: 15px;
}

.ac-inputs input {
    flex: 1 1 250px;
}

input[type="text"], input[type="password"], input[type="email"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    font-family: inherit;
    color: #111;
    background-color: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 6px;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    border-color: #1964b3;
    box-shadow: 0 0 0 3px rgba(25, 100, 179, 0.15);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.ac-textarea {
    margin-bottom: 18px;
}

.ac-protect {
    margin-bottom: 18px;
}

.form-item {
    margin-bottom: 15px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-secur {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.form-secur input {
    max-width: 260px;
}

.button, button[type="submit"], input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 12px 28px;
    min-height: 48px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background-color: #1964b3;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}

.button:hover, button[type="submit"]:hover {
    background-color: #123e6b;
}

.comm-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.comm-one {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 16px;
}

.comm-author {
    font-weight: 700;
    font-size: 18px;
    color: #123e6b;
}

.comm-date {
    color: #64748b;
    font-size: 15px;
}

.comm-two {
    font-size: 18px;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 12px;
}

.comm-three {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 15px;
}

.comm-three a {
    font-weight: 600;
    color: #1964b3;
}

/* ==========================================================================
   9. СИСТЕМНЫЕ СТИЛИ DLE (ВМЕСТО ENGINE.CSS)
   ========================================================================== */
.berrors {
    background-color: #fef2f2;
    border: 1px solid #f87171;
    color: #991b1b;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 17px;
}

.quote, blockquote {
    background-color: #f1f5f9;
    border-left: 4px solid #1964b3;
    padding: 14px 18px;
    margin: 12px 0;
    font-style: italic;
}

/* Всплывающие окна DLE (jQuery UI) и Загрузка */
#loading-layer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(18, 62, 107, 0.95);
    color: #fff;
    padding: 16px 28px;
    border-radius: 8px;
    font-size: 18px;
    z-index: 9999;
}

.ui-dialog {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 15px;
    z-index: 9998;
    max-width: 95vw !important;
}

.ui-dialog-titlebar {
    font-size: 19px;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.ui-dialog-buttonset {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bb-pane {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    padding: 6px;
    border-radius: 6px 6px 0 0;
}

/* ==========================================================================
   10. АДАПТИВНОСТЬ (ПЛАНШЕТЫ И СМАРТФОНЫ)
   ========================================================================== */
@media screen and (max-width: 980px) {
    .main {
        width: 100%;
        padding: 20px;
    }
    .side {
        width: 100%;
        border-left: none;
        border-top: 2px solid #dcdfe6;
        padding: 20px;
    }
    .logo-title {
        font-size: 24px;
    }
}

@media screen and (max-width: 640px) {
    .wrap {
        padding: 0;
    }
    .block {
        padding: 12px;
        border-radius: 0;
    }
    .h-inf {
        padding: 16px;
        text-align: center;
        justify-content: center;
    }
    .logo-title {
        font-size: 21px;
    }
    .logo-sub {
        font-size: 14px;
    }
    .cols {
        margin: 12px 0;
    }
    .main, .side {
        padding: 15px 12px;
    }
    .news-item {
        flex-direction: column;
        gap: 15px;
    }
    .news-item-img {
        width: 100%;
        flex: none;
        max-width: 320px;
        margin: 0 auto;
    }
    .news-item-title {
        font-size: 20px;
    }
    .btn-watch {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    .navigation a, .navigation span {
        min-width: 44px;
        height: 44px;
        line-height: 42px;
        padding: 0 12px;
        font-size: 17px;
    }
    .add-comm-form {
        padding: 15px;
    }
    .button, button[type="submit"] {
        width: 100%;
    }
}