/*
 * "Η δραστηριότητά μας" - photo strip on the public homepage.
 *
 * Sits inside Hestia's page content, so it keeps its own spacing modest and
 * inherits the surrounding type. Square crops on purpose: the source photos
 * come from phones in every orientation, and a ragged grid looks accidental.
 */

.ssc-activity {
	margin: var(--ssc-space-6) 0;
	text-align: center;
}

.ssc-activity-title {
	margin: 0 0 var(--ssc-space-2);
	/* Hestia uppercases headings and the site is served lang="en-US", so Greek
	   capitals would keep their tonos ("Η ΔΡΑΣΤΗΡΙΌΤΗΤΆ ΜΑΣ"). */
	text-transform: none;
}

.ssc-activity-text {
	margin: 0 auto var(--ssc-space-5);
	max-width: 620px;
	color: var(--ssc-text-muted);
}

.ssc-activity-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: var(--ssc-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ssc-activity-item {
	margin: 0;
	overflow: hidden;
	border-radius: var(--ssc-radius);
	background: var(--ssc-surface-thumb);
	/* Square tiles regardless of the source photo's orientation. */
	aspect-ratio: 1 / 1;
}

.ssc-activity-item a,
.ssc-activity-item img {
	display: block;
	width: 100%;
	height: 100%;
}

.ssc-activity-item img {
	object-fit: cover;
	transition: transform .35s ease;
}

.ssc-activity-item a:hover img,
.ssc-activity-item a:focus-visible img {
	transform: scale(1.06);
}

.ssc-activity-item a:focus-visible {
	outline: none;
	box-shadow: var(--ssc-focus);
}

.ssc-activity-actions {
	margin: var(--ssc-space-5) 0 0;
}

@media (max-width: 600px) {
	.ssc-activity-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: var(--ssc-space-2);
	}
}

/*
 * Some browsers still lack aspect-ratio in the wild; without it the tiles would
 * collapse to the image's natural ratio. A padding-box fallback keeps the grid
 * tidy there too.
 */
@supports not (aspect-ratio: 1 / 1) {
	.ssc-activity-item {
		position: relative;
		height: 0;
		padding-bottom: 100%;
	}

	.ssc-activity-item a,
	.ssc-activity-item img {
		position: absolute;
		inset: 0;
	}
}
