/* Replacement for the discontinued Sj Dynamic Slideshow extension.
   Reproduces the original look: full-width slide, caption bar lower-left,
   bullet navigation centred at the bottom. */
.pslider { position: relative; overflow: hidden; width: 100%; }
.pslider__track { position: relative; width: 100%; }
.pslider__slide {
	position: absolute; inset: 0; opacity: 0;
	transition: opacity .8s ease-in-out; pointer-events: none;
}
.pslider__slide.is-active { opacity: 1; pointer-events: auto; }
.pslider__slide:first-child { position: relative; }
.pslider__slide img { display: block; width: 100%; height: auto; }
.pslider__caption {
	position: absolute; left: 10px; bottom: 34px;
	max-width: 560px; padding: 8px 14px;
	background: rgba(120, 85, 60, .72);
	color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.pslider__title { display: block; font-size: 21px; font-weight: bold; line-height: 1.2; }
.pslider__sub   { display: block; font-size: 14px; margin-top: 3px; }
.pslider__dots {
	position: absolute; bottom: 8px; left: 0; right: 0;
	text-align: center; line-height: 0;
}
.pslider__dot {
	display: inline-block; width: 11px; height: 11px; margin: 0 4px;
	border: 0; padding: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.55);
}
.pslider__dot.is-active { background: #fff; }
.pslider__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* --- Phoca Gallery: reproduce the old .phocagallery-box-file thumbnail frame.
   Phoca 6 renamed the classes, so the original rules in layout.css no longer match. */
.pg-item-box, .pg-category-box {
	background: #fcfcfc;
	border: 1px solid #4EAED4 !important;
	border-radius: 6px;
	padding: 3px;
}
.pg-item-box:hover, .pg-category-box:hover {
	border-color: #0165A1 !important;
}
.pg-item-box-image img, .pg-category-box-image img {
	border-radius: 4px;
	box-shadow: none;
}

/* --- Pagination: Joomla 4 emits Bootstrap markup (ul.pagination > li.page-item),
   but this template does not load Bootstrap, so the page numbers stack vertically.
   These rules restore the original inline row. */
ul.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	list-style: none;
	margin: 6px 0 16px;
	padding: 0;
}
ul.pagination li { margin: 0; }
ul.pagination .page-link {
	display: inline-block;
	padding: 1px 3px;
	color: #0165A1;
	text-decoration: underline;
}
ul.pagination .page-link:hover { color: #0C86EB; text-decoration: none; }
ul.pagination .active .page-link,
ul.pagination .disabled .page-link { color: #555; text-decoration: none; }
.com-content-category-blog__counter, p.counter { margin: 10px 0 2px; }
/* Joomla's pagination arrows are icon-font glyphs; this template does not load that
   font, so they would render as invisible-but-clickable links. Give them real text. */
ul.pagination [class^="icon-angle"], ul.pagination [class*=" icon-angle"] { font-style: normal; }
ul.pagination .icon-angle-double-left::before  { content: "\00AB"; }
ul.pagination .icon-angle-left::before         { content: "\2039"; }
ul.pagination .icon-angle-right::before        { content: "\203A"; }
ul.pagination .icon-angle-double-right::before { content: "\00BB"; }

/* --- Phoca Download: the component emits Bootstrap grid + modal markup, which this
   template does not load. Without it the columns stack, the description jumps above
   the title, and hidden modal dialogs render inline (the stray "Назва"). */
.modal, .pd-modal { display: none !important; }

.pd-category .row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border: 1px solid #d5e6ef;
	border-radius: 4px;
	background: #fff;
	padding: 6px 10px;
	margin: 0 0 8px;
	clear: both;                 /* sit below the category image, not beside it */
}
/* original order: title + download button first, description underneath */
.pd-category .row > [class*="col-sm-12"] { order: 3; }
.pd-category .pd-filenamebox-bt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
/* Download button — reproduces the original Phoca 3 button, which the site
   recoloured to #4EAED4. Joomla 4's Phoca emits Bootstrap classes instead. */
#phoca-dl-category-box .pd-button-box-bt a.btn,
.pd-category .pd-button-box-bt a.btn {
	background: url('/media/com_phocadownload/images/btn.png') repeat-x,
	            url('/media/com_phocadownload/images/icon-download.png') 6px center no-repeat;
	background-color: #4EAED4;
	display: inline-block;
	padding: 7px 12px 8px 28px;
	border: 0;
	border-bottom: 1px solid rgba(0,0,0,.25);
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,.6);
	color: #fff;
	font-weight: bold;
	font-size: 110%;
	text-decoration: none;
	text-shadow: 0 -1px 1px rgba(0,0,0,.25);
}
#phoca-dl-category-box .pd-button-box-bt a.btn:hover,
.pd-category .pd-button-box-bt a.btn:hover { background-color: #0C86EB; color: #fff; }

/* 32px file-type icon, as the original used */
.pd-category .pd-document32 { height: 32px; line-height: 32px; padding-left: 36px; }

/* the title carries the download link, as on the original site */
.pd-category .pd-title { font-weight: normal; }
.pd-category .row > [class*="col-sm-6"]:nth-child(2) { flex: 0 0 74%; max-width: 74%; }
.pd-category .row > [class*="col-sm-6"]:nth-child(3) { flex: 0 0 26%; max-width: 26%; }
.pd-category .row > [class*="col-sm-6"]  { flex: 0 0 50%;  max-width: 50%; }
.pd-category .row > [class*="col-sm-12"] { flex: 0 0 100%; max-width: 100%; }
.pd-category .pd-button-box-bt { text-align: right; }
.pd-category .pd-button-box-bt:empty { display: none; }
.pd-category .pd-title { font-weight: bold; }
.pd-category .pd-fdesc { padding: 2px 0; }
/* the old site did not show a "back to categories" button */
.pd-category .ph-top { display: none; }
/* invisible icon-font glyphs inside read-more buttons add nothing here */
.post-main .readmore .icon-chevron-right { display: none; }
/* Phoca's rating/extra rows are unused on this site and render as empty boxes */
.pd-category .row.pd-row2-bp { display: none; }
.pd-category .row:not(:has(*:not(:empty))) { display: none; }

/* --- Header contact cloud -------------------------------------------------
   The parish address changed from mic-minsk@tut.by (16 chars) to
   marianchurch.minsk@gmail.com (28), which overflows the painted cloud.
   Scale the cloud graphic to suit, and keep the email on one line. */
.customtopcontact {
	box-sizing: border-box;      /* so width/height include padding and match the graphic */
	width: 258px;
	height: 152px;
	background-size: 258px 152px;
	padding: 44px 16px 8px;
	right: 4px;
	font-size: 13px;
}
.customtopcontact p { margin: 0 0 2px; line-height: 1.3; }
.customtopcontact a { white-space: nowrap; word-break: keep-all; }
/* article images must never break the column, whatever size they were uploaded at */
.post-main .item-page img,
.post-main .com-content-article img { max-width: 100%; height: auto; }
.post-main a.highslide { cursor: zoom-in; }
/* Subcategories are listed with the articles (see com_content/category/default_articles.php);
   Joomla 4's shared layout also renders them in a separate block with a heading. */
.post-main .cat-children { display: none; }
