/* ---------- Grid (home / archives) ---------- */

.ng-grid {
	padding: 0;
	margin: 0;
}

.ng-grid > li {
	margin: 0;
	list-style: none;
}

.ng-grid .wp-block-post-featured-image {
	margin: 0;
	background: var(--wp--preset--color--line);
}

.ng-grid .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	transition: opacity 0.15s ease;
}

.ng-grid .wp-block-post-featured-image a:hover img {
	opacity: 0.88;
}

/* ---------- Single post: swipeable carousel ---------- */

.single .wp-block-post-content .wp-block-gallery {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	margin: 0;
}

.single .wp-block-post-content .wp-block-gallery::-webkit-scrollbar {
	display: none;
}

.single .wp-block-post-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100%;
	margin: 0;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.single .wp-block-post-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* A single photo (not in a gallery) gets the same square crop */
.single .wp-block-post-content > .wp-block-image {
	margin: 0;
}

.single .wp-block-post-content > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Dots under the carousel (added by assets/carousel.js) */

.ng-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	padding-top: 0.6rem;
}

.ng-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--line);
	transition: background 0.15s ease;
}

.ng-dots span.is-active {
	background: var(--wp--preset--color--accent);
}

/* ---------- Small screens: edge-to-edge grid ---------- */

@media (max-width: 640px) {
	.wp-block-group.alignwide > .wp-block-query,
	main.wp-block-group.alignwide {
		padding-left: 0;
		padding-right: 0;
	}
}
