/* Haber metni görselleri — boyut (data-size, % olarak 5'er adım) ve konum (data-align).
   Aynı kurallar hem admin editöründe (.ql-editor img) hem okuyucu sayfasında
   (.news-content .news-figure) kullanılır; böylece editörde görülen sonuç yayında da aynıdır. */

.news-content img,
.ql-editor img {
    max-width: 100%;
    height: auto;
}

/* —— Okuyucu sayfası sarmalayıcısı —— */
.news-content .news-figure {
    display: block;
    margin: 1.25rem 0;
}

.news-content .news-figure > img {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 10px;
}

.news-content .news-figure__caption {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.86em;
    line-height: 1.5;
    color: #64748b;
}

/* —— Boyut —— */
:is(.ql-editor img, .news-content .news-figure)[data-size="10"] { width: 10%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="15"] { width: 15%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="20"] { width: 20%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="25"] { width: 25%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="30"] { width: 30%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="35"] { width: 35%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="40"] { width: 40%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="45"] { width: 45%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="50"] { width: 50%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="55"] { width: 55%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="60"] { width: 60%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="65"] { width: 65%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="70"] { width: 70%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="75"] { width: 75%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="80"] { width: 80%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="85"] { width: 85%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="90"] { width: 90%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="95"] { width: 95%; }
:is(.ql-editor img, .news-content .news-figure)[data-size="100"] { width: 100%; }

/* —— Konum —— */
:is(.ql-editor img, .news-content .news-figure)[data-align="left"] {
    float: left;
    margin: 0.25rem 1.5rem 1rem 0;
}

:is(.ql-editor img, .news-content .news-figure)[data-align="right"] {
    float: right;
    margin: 0.25rem 0 1rem 1.5rem;
}

:is(.ql-editor img, .news-content .news-figure)[data-align="center"] {
    display: block;
    float: none;
    margin: 1.25rem auto;
}

/* Yüzen görseller metin kutusunun dışına taşmasın; başlıklar yüzenlerin altına insin */
.news-content::after {
    content: "";
    display: table;
    clear: both;
}

.news-content h1,
.news-content h2,
.news-content h3 {
    clear: both;
}

/* Mobile-first: dar ekranda yüzen görsel metni sıkıştırmasın, tam genişlikte aksın */
@media (max-width: 575.98px) {
    .news-content .news-figure {
        float: none !important;
        width: 100% !important;
        margin: 1rem 0 !important;
    }
}
