/* AA Posts for Elementor – základné štýly.
   Typografiu a farby dedí z témy / Elementor Global; všetko sa dá prepísať v záložke Štýl. */

.aa-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 30px;
	row-gap: 36px;
}

.aa-post {
	--aa-img-gap: 20px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	transition: box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}

/* ---------- Obrázok ---------- */

.aa-post__thumb-link {
	position: relative;
	display: block;
	flex-shrink: 0;
	width: 100%;
}

.aa-post__thumb {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / .66;
	background: rgba(0, 0, 0, .05);
}

.aa-post__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .5s ease, filter .3s ease;
}

.aa-hover-zoom .aa-post:hover .aa-post__thumb img { transform: scale(1.06); }
.aa-hover-dim  .aa-post:hover .aa-post__thumb img { filter: brightness(.8); }

@media (prefers-reduced-motion: reduce) {
	.aa-post, .aa-post__thumb img { transition: none; }
	.aa-hover-zoom .aa-post:hover .aa-post__thumb img { transform: none; }
}

/* Pozícia obrázka (Classic) */
.aa-posts--img-top .aa-post__thumb-link { margin-bottom: var(--aa-img-gap); }

.aa-posts--img-left  .aa-post,
.aa-posts--img-right .aa-post {
	flex-direction: row;
	align-items: flex-start;
	gap: var(--aa-img-gap);
}
.aa-posts--img-right .aa-post { flex-direction: row-reverse; }

.aa-posts--img-left  .aa-post__thumb-link,
.aa-posts--img-right .aa-post__thumb-link { width: 30%; }

/* ---------- Text ---------- */

.aa-post__text {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}

.aa-post__title {
	margin: 0 0 10px;
	line-height: 1.3;
}
.aa-post__title a {
	color: inherit;
	text-decoration: none;
}

.aa-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 .45em;
	margin-bottom: 12px;
	font-size: .85em;
	opacity: .75;
}
.aa-post__meta a { color: inherit; }

.aa-post__excerpt { margin-bottom: 14px; }
.aa-post__excerpt p { margin: 0; }

.aa-post__read-more {
	align-self: flex-start;
	margin-top: auto;
	font-weight: 600;
	text-decoration: none;
}
.aa-post a:focus-visible,
.aa-posts__pagination a:focus-visible,
.aa-posts__load-more:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ---------- Cards ---------- */

.aa-posts--cards .aa-post {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
}
.aa-posts--cards .aa-post__thumb-link { margin-bottom: 0; }
.aa-posts--cards .aa-post__text { padding: 24px 26px 26px; }

.aa-post__badge {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1;
	padding: .55em 1.1em;
	border-radius: 999px;
	background: #1f2a33;
	color: #fff;
	font-size: 12px;
	line-height: 1;
}
.aa-badge-left .aa-post__badge { right: auto; left: 14px; }

/* ---------- Stránkovanie ---------- */

.aa-posts__pagination,
.aa-posts__load-more-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 40px;
}

.aa-posts__pagination { gap: 6px; }

.aa-posts__pagination .page-numbers {
	display: inline-block;
	min-width: 2.2em;
	padding: .35em .6em;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
}
.aa-posts__pagination .current { font-weight: 700; }
.aa-posts__pagination .is-disabled { opacity: .35; }

.aa-posts__load-more {
	padding: .85em 2em;
	border: 0;
	border-radius: 4px;
	background: #1f2a33;
	color: #fff;
	font: inherit;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.aa-posts__load-more.is-loading {
	opacity: .6;
	pointer-events: none;
}
.aa-posts__load-more.is-error { outline: 2px solid #c0392b; }

.aa-posts__load-more[data-mode="infinite"]:not(.is-error) {
	/* pri nekonečnom načítavaní slúži tlačidlo len ako záchytný bod a záloha */
	opacity: .7;
}

.aa-posts__empty { margin: 0; }
