/* ==========================================================================
   Fotogalerie — browsing cards (season / term / event levels) and the
   photo grid (event level). Kept in its own file, loaded after main.css,
   so this redesign is easy to review/revert independently of it.
   ========================================================================== */

.gallery-count {
	margin: -10px 0 20px 0;
	color: #777;
	font-size: 13px;
}

/* ---- Folder cards (season / term / event browsing) ---------------------- */
.gallery-folders {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
	margin: 0 0 30px 0;
}

.gallery-folder-card {
	display: block;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
	text-decoration: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-folder-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.gallery-folder-card__media {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eef1f0;
	overflow: hidden;
}
.gallery-folder-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.gallery-folder-card:hover .gallery-folder-card__media img {
	transform: scale(1.06);
}
.gallery-folder-card__media--empty {
	display: flex;
	align-items: center;
	justify-content: center;
}
.gallery-folder-card__media--empty::after {
	content: '';
	width: 40px;
	height: 40px;
	background: url('/templates/nykar/images/icon-point.png') no-repeat center / contain;
	opacity: 0.35;
}

.gallery-folder-card__label {
	display: block;
	padding: 14px 16px 2px 16px;
	color: #1d8294;
	font-family: 'Roboto Slab', 'Arial', sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
}

.gallery-folder-card__meta {
	display: block;
	padding: 4px 16px 14px 16px;
	color: #999;
	font-size: 12px;
}

/* ---- Photo grid (individual event page) ---------------------------------
   Overrides the legacy .gallery / .gallery-item rules in main.css (thin
   bordered 290px boxes, only ever 2 columns wide) with a responsive grid,
   larger thumbnails and a hover zoom instead of a flat hover background. */
div.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	width: 100%;
}
div.gallery .gallery-item {
	display: block;
	min-width: 0;
	min-height: 0;
	padding: 0;
	text-align: initial;
	align-items: initial;
}
div.gallery .gallery-item a {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	text-align: initial;
	align-items: initial;
}
div.gallery .gallery-item a:hover {
	background-color: transparent;
}
div.gallery .gallery-item a img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	background: none;
	padding: 0;
	transition: transform 0.35s ease;
}
div.gallery .gallery-item a:hover img {
	transform: scale(1.06);
}

/* ---- Footer gallery teaser (mod_nykar_gallery_teaser) --------------------
   Same fixed-aspect-ratio + object-fit treatment as the grid/folder cards
   above, so a portrait (non-landscape) source photo crops consistently
   instead of rendering at its own tall natural size and throwing off the
   two-thumbnail footer row. */
.footer-top-gallery-item {
	display: block;
	width: 47%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 6px;
}
.footer-top-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.footer-top-gallery-item:hover img {
	transform: scale(1.06);
}

@media (max-width: 767px) {
	.gallery-folders,
	div.gallery {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}
}

/* main.css switches .footer-top-gallery-list to a centered, stacked
   single column below 799px (each item gets full margin instead of just
   sitting side by side) — match that instead of fighting it with a fixed
   47% width. */
@media (max-width: 799px) {
	.footer-top-gallery-item {
		width: 100%;
		max-width: 320px;
	}
}
