.age-gallery-widget,
.age-gallery-widget * {
	box-sizing: border-box;
}

.age-albums-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

.age-album-card {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	min-width: 0;
	min-height: 360px;
	margin: 0;
	padding: 0;
	background: #252525;
	border: 0 solid transparent;
	border-radius: 20px;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	appearance: none;
	transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.age-album-card:focus {
	outline: none;
}

.age-album-card:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 4px;
}

.age-album-cover,
.age-album-overlay,
.age-album-content {
	position: absolute;
	inset: 0;
}

.age-album-cover {
	background: #e9e9e9;
}

.age-album-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.age-album-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .22), transparent 34%),
		linear-gradient(145deg, #777, #333);
}

.age-album-placeholder svg {
	width: 72px;
	height: 72px;
	fill: rgba(255, 255, 255, .7);
}

.age-album-overlay {
	background: rgba(0, 0, 0, .42);
	transition: background .3s ease;
}

.age-album-content {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 28px;
	color: #fff;
	text-align: left;
}

.age-album-title {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(24px, 2.2vw, 36px);
	font-weight: 700;
	line-height: 1.12;
}

.age-album-description-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
}

.age-album-description {
	display: block;
	width: 100%;
	margin: 0;
	color: rgba(255, 255, 255, .88);
	font-size: 15px;
	line-height: 1.45;
}

.age-album-read-more {
	display: inline-block;
	width: auto;
	text-align: inherit;
	margin-top: 8px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .2s ease, opacity .2s ease;
}

.age-album-card:hover .age-album-read-more,
.age-album-card:focus-visible .age-album-read-more {
	opacity: .82;
}

.age-album-count {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	margin-top: 16px;
	padding: 7px 12px;
	background: rgba(0, 0, 0, .48);
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.age-album-modal[hidden],
.age-lightbox[hidden] {
	display: none !important;
}

.age-album-modal {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 3vw;
	opacity: 0;
	transition: opacity .22s ease;
}

.age-album-modal.is-open {
	opacity: 1;
}

.age-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 12, .78);
	backdrop-filter: blur(var(--age-modal-blur, 0px)) !important;
	-webkit-backdrop-filter: blur(var(--age-modal-blur, 0px)) !important;
}

.age-album-dialog {
	position: relative;
	z-index: 1;
	overflow: hidden;
	width: 1280px;
	max-width: 100%;
	max-height: calc(100vh - 8vh);
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
	contain: layout paint style;
	opacity: 0;
	transform: translate3d(0, 16px, 0);
	transition: opacity .22s ease, transform .22s ease;
}

.age-album-modal.is-open .age-album-dialog {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

.age-album-dialog-inner {
	overflow-y: auto;
	width: 100%;
	height: 100%;
	max-height: inherit;
	padding: 34px;
	overscroll-behavior: contain;
}

.age-modal-header {
	padding-right: 54px;
	margin-bottom: 26px;
}

.age-modal-title {
	margin: 0;
	padding: 0;
	color: #111;
	font-size: clamp(28px, 3vw, 46px);
	font-weight: 700;
	line-height: 1.12;
}

.age-modal-description-wrap {
	max-width: 860px;
	margin: 12px 0 0;
}

.age-modal-description {
	margin: 0;
	color: #555;
	font-size: 16px;
	line-height: 1.55;
}

.age-modal-description-excerpt,
.age-modal-description-full {
	display: inline;
}

/*
 * Author CSS can override the browser's default [hidden] rule.
 * Keep the inactive description version genuinely hidden.
 */
.age-modal-description-excerpt[hidden],
.age-modal-description-full[hidden] {
	display: none !important;
}

.age-modal-description-toggle {
	display: inline-block;
	width: auto;
	margin: 10px 0 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: #111;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
	appearance: none;
	transition: color .2s ease, opacity .2s ease;
}

.age-modal-description-toggle:hover,
.age-modal-description-toggle:focus-visible {
	opacity: .78;
}

.age-modal-description-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.age-modal-close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0 0 3px;
	background: #f1f1f1;
	border: 0;
	border-radius: 999px;
	color: #111;
	font: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	transition: background-color .2s ease, transform .2s ease;
}

.age-modal-close:hover,
.age-modal-close:focus-visible {
	background: #e2e2e2;
	transform: rotate(4deg);
}

.age-modal-close:focus-visible,
.age-lightbox-close:focus-visible,
.age-lightbox-arrow:focus-visible,
.age-photo-button:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.age-photos-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	contain: layout style;
}

.age-photo-button {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	background: #efefef;
	border: 0 solid transparent;
	border-radius: 12px;
	cursor: zoom-in;
	appearance: none;
	contain: layout paint;
	content-visibility: auto;
	contain-intrinsic-size: 240px 240px;
}

.age-photo-button::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .16);
	opacity: 0;
	transition: opacity .22s ease;
}

.age-photo-button:hover::after,
.age-photo-button:focus-visible::after {
	opacity: 1;
}

.age-photo-button img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: transform .28s ease, opacity .18s ease;
}

.age-photo-button img.is-loaded {
	opacity: 1;
}

.age-photo-zoom {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, .92);
	border-radius: 999px;
	color: #111;
	opacity: 0;
	transform: translate(-50%, -46%) scale(.86);
	transition: opacity .22s ease, transform .22s ease;
}

.age-photo-button:hover .age-photo-zoom,
.age-photo-button:focus-visible .age-photo-zoom {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.age-photo-zoom svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.age-empty-album {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 260px;
	padding: 30px;
	background: #f6f6f6;
	border: 1px dashed #d2d2d2;
	border-radius: 14px;
	color: #666;
	text-align: center;
}

.age-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 34px 84px;
	background: rgba(0, 0, 0, .94);
	opacity: 0;
	transition: opacity .18s ease;
}

.age-lightbox.is-open {
	opacity: 1;
}

.age-lightbox-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
}

.age-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 130px);
	border-radius: 8px;
	object-fit: contain;
}

.age-lightbox-caption {
	max-width: min(900px, 90vw);
	margin-top: 14px;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	text-align: center;
}

.age-lightbox-close,
.age-lightbox-arrow {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: rgba(255, 255, 255, .12);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	transition: background-color .2s ease, transform .2s ease;
}

.age-lightbox-close {
	top: 22px;
	right: 22px;
	padding-bottom: 3px;
	font-size: 30px;
}

.age-lightbox-arrow {
	top: 50%;
	line-height: 0;
	transform: translateY(-50%);
}

.age-lightbox-arrow svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.25;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.age-lightbox-prev {
	left: 22px;
}

.age-lightbox-next {
	right: 22px;
}

.age-lightbox-close:hover,
.age-lightbox-close:focus-visible,
.age-lightbox-arrow:hover,
.age-lightbox-arrow:focus-visible {
	background: rgba(255, 255, 255, .22);
}

.age-lightbox-close:hover,
.age-lightbox-close:focus-visible {
	transform: rotate(4deg);
}

.age-lightbox-arrow:hover,
.age-lightbox-arrow:focus-visible {
	transform: translateY(-50%) scale(1.06);
}

.age-gallery-empty {
	width: 100%;
}

body.age-gallery-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.age-albums-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.age-album-card {
		min-height: 320px;
	}

	.age-photos-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.age-albums-grid {
		grid-template-columns: 1fr;
	}

	.age-album-card {
		min-height: 280px;
	}

	.age-album-content {
		text-align: center;
	}

	.age-album-count {
		align-self: center;
	}

	.age-album-modal {
		align-items: flex-end;
		padding: 0;
	}

	.age-album-dialog {
		width: 100%;
		max-width: 100%;
		max-height: 100vh;
		border-radius: 22px 22px 0 0;
		transform: translate3d(0, 30px, 0);
	}

	.age-album-dialog-inner {
		padding: 68px 18px 28px;
	}

	.age-modal-header {
		padding-right: 0;
		margin-bottom: 20px;
		text-align: center;
	}

	.age-modal-close {
		top: 12px;
		right: 12px;
	}

	.age-photos-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.age-lightbox {
		padding: 70px 12px 88px;
	}

	.age-lightbox-image {
		max-height: calc(100vh - 180px);
	}

	.age-lightbox-close {
		top: 14px;
		right: 14px;
	}

	.age-lightbox-arrow {
		top: auto;
		bottom: 18px;
		transform: none;
	}

	.age-lightbox-arrow:hover,
	.age-lightbox-arrow:focus-visible {
		transform: scale(1.06);
	}

	.age-lightbox-prev {
		left: calc(50% - 62px);
	}

	.age-lightbox-next {
		right: calc(50% - 62px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.age-album-card,
	.age-album-cover img,
	.age-album-overlay,
	.age-album-modal,
	.age-album-dialog,
	.age-lightbox,
	.age-photo-button img,
	.age-photo-button::after,
	.age-photo-zoom {
		transition-duration: .01ms !important;
	}
}



/* Voliteľné HTML značky názvov albumov. */
.age-album-card[role="button"] {
	font: inherit;
}

.age-album-title,
.age-modal-title {
	margin-top: 0;
}
