/*
 * Съдържанието на новините (news_body) - HTML от редактора в админа.
 *
 * HtmlContent маха всеки style/class/шрифт/цвят, който идва от админа, така че
 * визията се определя САМО от този файл. Файлът е самостоятелен (не разчита на
 * templatemo-festava-live.css), защото се зарежда и в TinyMCE в админа -
 * така там текстът изглежда точно както в сайта.
 */

.news-content {
    color: #3d3a36;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    overflow-wrap: break-word;
}

/* Нищо вътре не сменя шрифта - дори ако някой елемент се изплъзне на почистването. */
.news-content * {
    font-family: inherit;
}

.news-content > :first-child {
    margin-top: 0;
}

.news-content > :last-child {
    margin-bottom: 0;
}

/* ---- Текст ---- */
.news-content p,
.news-content li,
.news-content div {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.news-content p {
    margin: 0 0 1em;
}

.news-content strong,
.news-content b {
    color: #1f1d1a;
    font-weight: 700;
}

.news-content em,
.news-content i {
    font-style: italic;
}

.news-content sub,
.news-content sup {
    font-size: .75em;
}

/* ---- Заглавия в текста (заглавието на новината е отделно, извън .news-content) ---- */
.news-content h2,
.news-content h3,
.news-content h4,
.news-content h5,
.news-content h6 {
    color: #000;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.4em 0 .6em;
}

.news-content h2 { font-size: 26px; }
.news-content h3 { font-size: 22px; }
.news-content h4 { font-size: 19px; }
.news-content h5,
.news-content h6 { font-size: 18px; }

/* ---- Връзки (жълтото на сайта не се чете върху светъл фон) ---- */
.news-content a {
    color: #EE5007;
    display: inline;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.news-content a:hover {
    color: #B22727;
}

/* ---- Списъци ---- */
.news-content ul,
.news-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.news-content li {
    margin-bottom: .3em;
}

.news-content li > ul,
.news-content li > ol {
    margin: .3em 0 0;
}

/* ---- Цитат, линия ---- */
.news-content blockquote {
    border-left: 4px solid #EE5007;
    color: #5a554e;
    font-style: italic;
    margin: 1.2em 0;
    padding: .2em 0 .2em 1em;
}

.news-content blockquote > :last-child {
    margin-bottom: 0;
}

.news-content hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .15);
    margin: 1.5em 0;
    opacity: 1;
}

/* ---- Картинки и видео ---- */
.news-content img {
    border-radius: 10px;
    display: block;
    height: auto;
    margin: 1.2em auto;
    max-width: 100%;
}

.news-content iframe {
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 10px;
    display: block;
    height: auto;
    margin: 1.2em 0;
    width: 100%;
}

.news-content figure {
    margin: 1.2em 0;
}

.news-content figure img {
    margin-bottom: .4em;
}

.news-content figcaption {
    color: #6b665e;
    font-size: 15px;
    text-align: center;
}

/* ---- Таблици ---- */
.news-content table {
    border-collapse: collapse;
    display: block;          /* за хоризонтален скрол на телефон */
    font-size: 16px;
    margin: 1.2em 0;
    max-width: 100%;
    overflow-x: auto;
}

.news-content caption {
    caption-side: top;
    color: #6b665e;
    font-size: 15px;
    padding: 0 0 .4em;
    text-align: left;
}

.news-content th,
.news-content td {
    border: 1px solid rgba(0, 0, 0, .15);
    padding: .45em .75em;
    text-align: left;
    vertical-align: top;
}

.news-content th,
.news-content thead td {
    background: rgba(238, 80, 7, .08);
    color: #000;
    font-weight: 700;
}

.news-content td > :last-child,
.news-content th > :last-child {
    margin-bottom: 0;
}

@media (max-width: 575px) {
    .news-content {
        font-size: 17px;
    }

    .news-content h2 { font-size: 23px; }
    .news-content h3 { font-size: 20px; }
    .news-content h4 { font-size: 18px; }
}
