/* News Galleries — slider + lightbox. Neutral styling; override via theme or Elementor. */

.ng-slider { position: relative; --ng-gap: 16px; }
.ng-viewport { overflow: hidden; }
.ng-track {
	display: flex;
	gap: var(--ng-gap);
	will-change: transform;
	transition: transform .4s ease;
	touch-action: pan-y;
	cursor: grab;
}
.ng-track.ng-dragging { transition: none; cursor: grabbing; }

.ng-slide { flex: 0 0 auto; }
.ng-slide a, .ng-slide img { display: block; width: 100%; }
.ng-slide img {
	height: var(--ng-img-h, 220px);
	object-fit: cover;
	cursor: zoom-in;
}

.ng-arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 42px; height: 42px; border: 0; border-radius: 50%;
	background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1;
	cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.ng-arrow:hover { background: rgba(0,0,0,.8); }
.ng-arrow[disabled] { opacity: .35; cursor: default; }
.ng-prev { left: 8px; } .ng-next { right: 8px; }

.ng-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.ng-dots button {
	width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(0,0,0,.25); cursor: pointer;
}
.ng-dots button.is-active { background: rgba(0,0,0,.75); }

/* Lightbox */
.ng-lightbox {
	position: fixed; inset: 0; z-index: 99999; display: none;
	background: rgba(0,0,0,.92); align-items: center; justify-content: center;
	user-select: none;
}
.ng-lightbox.is-open { display: flex; }
.ng-lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.ng-lb-btn {
	position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
	font-size: 40px; line-height: 1; padding: 12px;
}
.ng-lb-close { top: 10px; right: 16px; font-size: 34px; }
.ng-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.ng-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.ng-lb-counter { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font: 14px/1 system-ui, sans-serif; opacity: .85; }
body.ng-lb-lock { overflow: hidden; }

@media (max-width: 600px) {
	.ng-arrow { width: 36px; height: 36px; font-size: 22px; }
}

/* Aggregated gallery grid — [news_galleries] shortcode + the archive-ng_gallery.php fallback.
   Flexbox, not CSS grid: 3 columns on large screens, stepping down at the breakpoints below. */
.ng-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
/* Card look + hover matches div.blog article on /novinky/: no border-radius, the same
   0.4s/scale(1.15) photo zoom, uppercase theme-font title that turns --main on hover, and
   the same muted date treatment. h1-h6 already get font-family/weight/letter-spacing from
   the theme's global heading rule, so .ng-grid-title doesn't need to repeat those. */
.ng-grid-item {
	flex: 0 1 calc(33.333% - 16px); /* 3 columns: (100% - 2 gaps) / 3 */
	display: block;
	color: inherit;
	text-decoration: none;
	transition: all 0.2s ease;
}
.ng-grid-cover {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: rgba(0,0,0,.06);
}
.ng-grid-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ng-grid-item:hover .ng-grid-cover img { transform: scale(1.15); }
.ng-grid-cover-placeholder { width: 100%; height: 100%; }
.ng-grid-badge {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 0;
	background-color: #c42221;
	background-color: var(--main);
	color: #ffffff;
	color: var(--white);
	font-family: var(--font-headers), sans-serif;
	letter-spacing: var(--font-headers-letterspacing);
	font-weight: 800;
	font-size: 13px;
	line-height: 1;
	text-align: center;
}
.ng-grid-badge-icon { width: 12px; height: 12px; flex: 0 0 auto; fill: currentColor; position: relative; top: -1px; }
.ng-grid-title {
	margin: 14px 0 0;
	text-transform: uppercase;
	font-size: 24px;
	color: #222222;
	color: var(--black);
	transition: color 0.2s ease;
}
.ng-grid-item:hover .ng-grid-title {
	color: #c42221;
	color: var(--main);
}
.ng-grid-date { margin-top: 4px; font-size: 12px; color: rgba(0,0,0,.6); }

/* Matches the theme's own blog pagination (.page-numbers-function in the Atleticos
   style.css, used by /novinky/) so /fotogaleria/ looks consistent with the rest of the site.
   Colors/font come from the theme's own CSS custom properties (--main, --white, --black,
   --gray, --font-headers) so this stays in sync if the site's brand colors ever change;
   the literal hex values right before each var() are just the fallback if a custom
   property is somehow unset. */
.ng-grid-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
}
.ng-grid-pagination .page-numbers {
	display: inline-block;
	width: 80px;
	height: 80px;
	line-height: 80px;
	font-family: 'Sofia Sans Extra Condensed', serif;
	font-family: var(--font-headers), serif;
	letter-spacing: var(--font-headers-letterspacing);
	font-weight: 800;
	font-size: 24px;
	text-align: center;
	text-decoration: none;
	background-color: #f5f5f5;
	background-color: var(--gray);
	color: #222222;
	color: var(--black);
	transition: all .2s ease;
}
.ng-grid-pagination .page-numbers.current {
	cursor: default;
	background-color: #c42221;
	background-color: var(--main);
	color: #ffffff;
	color: var(--white);
	pointer-events: none;
}
.ng-grid-pagination .page-numbers:not(.dots):not(.current):hover {
	background-color: #222222;
	background-color: var(--black);
	color: #ffffff;
	color: var(--white);
}
.ng-grid-pagination .prev,
.ng-grid-pagination .next {
	position: relative;
	width: 80px;
	font-size: 0; /* hides the "« Staršie" / "Novšie »" text node; the icon below replaces it */
}
.ng-grid-pagination .prev:before,
.ng-grid-pagination .next:before {
	display: inline-block;
	font-family: lte-font;
	font-style: normal;
	font-weight: 400;
	font-size: 24px;
	line-height: 80px;
	content: "\E848";
}
.ng-grid-pagination .prev:before {
	transform: rotate(180deg);
}
@media (max-width: 767px) {
	.ng-grid-pagination .prev,
	.ng-grid-pagination .next {
		display: none;
	}
}

.ng-archive-wrap { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

@media (max-width: 900px) {
	.ng-grid-item { flex-basis: calc(50% - 12px); } /* 2 columns */
}
@media (max-width: 560px) {
	.ng-grid-item { flex-basis: 100%; } /* 1 column */
}

/* A gallery's own page — plain photo grid (auto-appended to the_content). Flexbox, 4 columns
   on large screens, stepping down at the same breakpoints the slider uses for its per-view sizes. */
.ng-photo-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.ng-photo-grid-item {
	flex: 0 1 calc(25% - 9px); /* 4 columns: (100% - 3 gaps) / 4 */
	display: block;
	overflow: hidden; /* clip the hover zoom below to the item's own box, like .ng-grid-cover */
}
.ng-photo-grid-item img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	cursor: zoom-in;
	transition: transform .3s ease;
}
.ng-photo-grid-item:hover img { transform: scale(1.04); }
@media (max-width: 1024px) {
	.ng-photo-grid-item { flex-basis: calc(33.333% - 8px); } /* 3 columns */
}
@media (max-width: 600px) {
	.ng-photo-grid-item { flex-basis: calc(50% - 6px); } /* 2 columns */
}
