/* ==========================================================================
   qrz.if.ua — articles (2026-11): the article page and the news list.
   Builds on the content layer in pages.css (.base.fullstory .dpad: block, title strip, headings, lists,
   tables). Keep engine/editor/css/content.css in step: the editor shows text the way it is set here.
   ========================================================================== */

/* --- article text: left-aligned, as in the editor (styles.css justified .maincont) --- */
.base .maincont { text-align: left; }

/* --- lead: the short story opens the article --- */
.base.fullstory .lead { margin: 0 0 6px; }
.base.fullstory .lead > p:first-of-type,
.base.fullstory .lead > p:first-child + p { font-size: 1.07em; color: #2d3538; }
.base.fullstory .maincont p { hyphens: auto; -webkit-hyphens: auto; }

/* --- pictures: DLE thumbnails ([thumb]) open in the viewer --- */
.maincont a[onclick*="hs.expand"] { display: inline-block; max-width: 100%; cursor: zoom-in; line-height: 0; }
.maincont a[onclick*="hs.expand"] img { padding: 0; border-radius: 6px; transition: opacity .15s; }
.maincont a[onclick*="hs.expand"]:hover img { opacity: .92; }
.base.fullstory .lead a[onclick*="hs.expand"] img,
.base.fullstory .lead > p > img:only-child { box-shadow: 0 1px 4px rgba(63,75,81,.18); }
.maincont img[align="left"] { float: left; max-width: 48%; margin: 4px 16px 10px 0; }
.maincont img[align="right"] { float: right; max-width: 48%; margin: 4px 0 10px 16px; }
/* caption under a picture: [thumb=|caption] */
.maincont .highslide-caption { display: block; margin: 4px 0 12px; font-size: 12px; line-height: 1.4; color: #6c838e; text-align: center; }
.maincont figure.image { display: table; margin: 0 auto 14px; }
.maincont figure.image img { display: block; }
.maincont figure.image figcaption { display: table-caption; caption-side: bottom; padding: 4px 2px 0; font-size: 12px; color: #6c838e; text-align: center; }

/* --- tables wider than the article (pasted results) scroll inside their frame --- */
.base.fullstory .maincont table.dtable { display: block; max-width: 100%; overflow-x: auto; }
.base.fullstory .maincont table.dtable > tbody { display: table; width: 100%; border-collapse: collapse; }

/* --- quotes and spoilers in the block's own look --- */
.maincont .quote {
	margin: 0 0 12px; padding: 8px 12px; color: #516168; font-style: normal;
	background: #f8fbfc; border: 1px solid #dbe8ed; border-left: 4px solid #398dd8; border-radius: 0 6px 6px 0;
}
.maincont .title_quote { margin: 0; padding: 4px 12px; font-weight: bold; color: #516168; background: #f0f5f8; border: 1px solid #dbe8ed; border-bottom: 0; border-radius: 6px 6px 0 0; }
.maincont .title_spoiler { padding: 6px 12px; background: #f0f5f8; border: 1px solid #cbdfe8; border-radius: 6px; font-weight: bold; }
.maincont .title_spoiler img { display: none; }
.maincont .title_spoiler a:before { content: "▸ "; }
.maincont .text_spoiler { margin: -1px 0 12px; padding: 10px 12px; border: 1px solid #cbdfe8; border-radius: 0 0 6px 6px; }

/* --- attached files ([attachment=N]) as file rows --- */
.maincont .attachment {
	display: inline-block; margin: 2px 0; padding: 5px 12px 5px 30px; position: relative;
	color: #8a9ca5; font-size: 13px; background: #f0f5f8; border: 1px solid #cbdfe8; border-radius: 6px;
}
.maincont .attachment:before { content: "📎"; position: absolute; left: 9px; top: 4px; }
.maincont .attachment a { font-weight: bold; font-size: 14px; }

/* --- previous / next article of the section --- */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; padding: 14px 0 0; border-top: 1px solid #e3edf2; }
.prev-next a { display: block; padding: 8px 12px; border: 1px solid #cbdfe8; border-radius: 8px; color: #398dd8; text-decoration: none; line-height: 1.35; }
.prev-next a:hover { background: #f0f5f8; text-decoration: none; }
.prev-next a:before { display: block; margin: 0 0 2px; font-size: 12px; color: #8a9ca5; }
.prev-next .pn-prev:before { content: "‹ Попередня стаття"; }
.prev-next .pn-next { grid-column: 2; text-align: right; }
.prev-next .pn-next:before { content: "Наступна стаття ›"; }

/* --- «Редагувати» for those who may edit --- */
.isicons li.art-editli { width: auto; }
.isicons .art-editbtn {
	display: inline-block; padding: 1px 9px; font-size: 12px; line-height: 18px; color: #516168;
	background: #f0f5f8; border: 1px solid #cbdfe8; border-radius: 10px; white-space: nowrap;
}
.isicons a:hover .art-editbtn { background: #e3edf2; color: #2b7cc4; }

/* --- the news list: a cover picture reads as one --- */
.shortstory .maincont a[onclick*="hs.expand"] img,
.shortstory .maincont > p > img:only-child { box-shadow: 0 1px 4px rgba(63,75,81,.15); }

/* --- picture viewer (js/article-lightbox.js), same look as the gallery's --- */
.art-lb { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; background: rgba(12,16,18,.97); color: #ddd; font: 14px Arial, Helvetica, sans-serif; -webkit-user-select: none; user-select: none; }
.art-lb-stage { flex: 1 1 auto; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 12px; }
.art-lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 0 40px rgba(0,0,0,.6); border-radius: 2px; }
.art-lb-stage img.art-lb-loading { opacity: .4; }
.art-lb-btn { position: absolute; z-index: 2; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; cursor: pointer; font: 36px/42px Georgia, serif; text-align: center; }
.art-lb-btn:hover { background: rgba(0,0,0,.75); }
.art-lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.art-lb-next { right: 12px; top: 50%; margin-top: -23px; }
.art-lb-close { right: 12px; top: 12px; font: 28px/44px Arial, sans-serif; }
.art-lb-count { position: absolute; left: 14px; top: 16px; font-size: .9em; color: #aaa; }
.art-lb-cap { flex: 0 0 auto; padding: 10px 16px 14px; color: #e6e6e6; text-align: center; background: rgba(0,0,0,.5); }
html.art-lb-open, html.art-lb-open body { overflow: hidden; }

@media screen and (max-width: 620px) {
	.maincont img[align="left"], .maincont img[align="right"] { float: none; max-width: 100%; margin: 4px auto 10px; display: block; }
	.prev-next { grid-template-columns: 1fr; }
	.prev-next .pn-next { grid-column: auto; }
	.art-lb-btn { width: 40px; height: 40px; font-size: 30px; line-height: 36px; }
	.art-lb-prev { left: 6px; } .art-lb-next { right: 6px; }
}
