/**
 * Galerijas modernais izskats + lightbox.
 * Papildina (nepārraksta) gallery-slider.css un style.css. Ielādējas pēc tiem,
 * tāpēc vienādas specifikas noteikumi uzvar pēc secības.
 */

/* ============================================================
   1. Bultiņas — apaļas, centrētas, ar chevron (FA ikonu paslēpjam)
   ============================================================ */
.section-gallery .prev,
.section-gallery .next,
.gallery .prev,
.gallery .next {
	position: absolute;
	top: 50%;
	bottom: auto;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.42);
	color: #fff;
	transition: background 0.2s ease;
	z-index: 3;
}

.section-gallery .prev { left: 14px; }
.section-gallery .next { right: 14px; }
.gallery .prev { left: 10px; }
.gallery .next { right: 10px; }

.section-gallery .prev:hover,
.section-gallery .next:hover,
.gallery .prev:hover,
.gallery .next:hover {
	background: #ff0060;
}

.section-gallery .prev i,
.section-gallery .prev svg,
.section-gallery .next i,
.section-gallery .next svg,
.gallery .prev i,
.gallery .prev svg,
.gallery .next i,
.gallery .next svg {
	display: none;
}

.section-gallery .prev::before,
.section-gallery .next::before,
.gallery .prev::before,
.gallery .next::before {
	content: '';
	width: 9px;
	height: 9px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
}

.section-gallery .prev::before,
.gallery .prev::before {
	transform: rotate(135deg);
	margin-left: 3px;
}

.section-gallery .next::before,
.gallery .next::before {
	transform: rotate(-45deg);
	margin-right: 3px;
}

/* ============================================================
   2. Attēla skaitītājs "3 / 8" un palielināšanas mājiens
   ============================================================ */
.piedz-gallery-counter {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 4px 10px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	z-index: 2;
	pointer-events: none;
}

.section-gallery-slider-container,
.gallery .gallery-slider-container {
	cursor: zoom-in;
}

.section-gallery-slider-container::after,
.gallery .gallery-slider-container::after {
	content: '';
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.45);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
	opacity: 0.85;
	pointer-events: none;
	z-index: 2;
}

/* ============================================================
   3. Punkti — mazāki, apaļi
   ============================================================ */
.section-gallery .dot,
.gallery .dot {
	border-radius: 50%;
	opacity: 0.85;
	transition: background 0.2s ease, transform 0.2s ease;
}

.section-gallery .dot.active,
.gallery .dot.active {
	transform: scale(1.15);
}

/* ============================================================
   4. Section-gallery izkārtojums: liels attēls augšā, sīktēlu
      lente zem tā (visos ekrānos) — atbilst apstiprinātajam maketam
   ============================================================ */
.section-gallery.tablet-flexbox-wrap {
	display: block;
	margin-top: 20px;
	/* Kad section-gallery ir flex-item (piem. .day-info flexbox-wrap iekšā),
	   min-width:0 ļauj sarukt zem satura, lai nowrap sīktēli neizspiež pārplūdumu. */
	min-width: 0;
	max-width: 100%;
}

.section-gallery .section-gallery-slider-container {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	border-radius: 10px;
	overflow: hidden;
}

.section-gallery .gallery-slide img {
	border-radius: 10px;
}

.section-gallery .section-gallery-thumbnails {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 10px 0 0 0;
}

.section-gallery .section-gallery-thumbnails ul {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.section-gallery .section-gallery-thumbnails li {
	flex: 0 0 auto;
	width: 90px;
	height: 62px;
	margin: 0;
	border-radius: 6px;
	overflow: hidden;
	opacity: 0.6;
	transition: opacity 0.2s ease, outline-color 0.2s ease;
	outline: 2px solid transparent;
	outline-offset: -2px;
}

.section-gallery .section-gallery-thumbnails li img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.section-gallery .section-gallery-thumbnails li:hover,
.section-gallery .section-gallery-thumbnails li.active {
	opacity: 1;
	outline-color: #ff0060;
}

/* ============================================================
   5. Lightbox (pilnekrāns)
   ============================================================ */
html.piedz-lb-open {
	overflow: hidden;
}

.piedz-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
}

.piedz-lb[hidden] {
	display: none;
}

.piedz-lb-stage {
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.piedz-lb-img {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	display: block;
}

.piedz-lb-close,
.piedz-lb-prev,
.piedz-lb-next {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.2s ease;
	z-index: 2;
}

.piedz-lb-close:hover,
.piedz-lb-prev:hover,
.piedz-lb-next:hover {
	background: rgba(255, 255, 255, 0.28);
}

.piedz-lb-close {
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
}

/* × zīme zīmēta ar CSS — neatkarīga no FontAwesome (SVG-JS režīmā webfonts nav) */
.piedz-lb-close::before,
.piedz-lb-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2.5px;
	background: #fff;
	border-radius: 2px;
}

.piedz-lb-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.piedz-lb-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.piedz-lb-prev,
.piedz-lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
}

.piedz-lb-prev { left: 16px; }
.piedz-lb-next { right: 16px; }

.piedz-lb-prev::before,
.piedz-lb-next::before {
	content: '';
	width: 13px;
	height: 13px;
	border-right: 2.5px solid #fff;
	border-bottom: 2.5px solid #fff;
}

.piedz-lb-prev::before { transform: rotate(135deg); margin-left: 4px; }
.piedz-lb-next::before { transform: rotate(-45deg); margin-right: 4px; }

.piedz-lb-counter {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 14px;
	z-index: 2;
}

@media (max-width: 576px) {
	.piedz-lb-prev,
	.piedz-lb-next {
		width: 44px;
		height: 44px;
	}
	.section-gallery .section-gallery-thumbnails li {
		width: 74px;
		height: 52px;
	}
}
