/* "Sezona, ne katalog." (Figma 1:707, 1:708, 1:740): white section, the heading and text in the
   lower middle, photos standing on a large circle around them. The "Krug" gallery style puts
   each photo on the circle, 20° apart and tilted along it; the circle turns slowly. Geometry
   from Figma at 1440 wide: radius 1090, centre 1392 below the section top, photos 273 square. */

.mano-season.mano-season {
	margin-block: 0;
}

.mano-season {
	--ring-r: 75.7vw;
	--ring-y: 96.7vw;
	--ring-item: 18.96vw;
	position: relative;
	min-height: 71.04vw; /* Figma 1023 of 1440 */
	overflow: hidden;
	background: var(--wp--preset--color--bijela);
	color: var(--wp--preset--color--dark-kaptol);
}

.mano-season__text {
	position: relative;
	z-index: 1;
	max-width: 759px; /* Figma 242:697 */
	margin-inline: auto;
	padding-top: 43.82vw; /* heading top: Figma 631 of 1440 */
	padding-bottom: var(--wp--preset--spacing--100);
}

.mano-season__text.mano-season__text {
	margin-top: 0; /* no block gap after the (absolutely placed) gallery */
}

.mano-season__text > p {
	margin-top: clamp(48px, 4.24vw, 61px); /* Figma 242:696 → 242:697: 61 between heading and text; at least 48 on phones */
	font-weight: 400;
	line-height: 1.333;
}

/* --- "Krug" gallery style --- the gallery is a zero-size pivot at the circle's centre. */
.wp-block-gallery.is-style-ring.is-style-ring {
	position: absolute;
	top: var(--ring-y, 96.7vw);
	left: 50%;
	display: block;
	width: 0;
	height: 0;
	margin: 0;
	animation: mano-ring 240s linear infinite;
}

.wp-block-gallery.is-style-ring > .wp-block-image.wp-block-image {
	--angle: calc(var(--i, 0) * 20deg - 50deg);
	position: absolute;
	top: calc(var(--ring-item, 18.96vw) / -2);
	left: calc(var(--ring-item, 18.96vw) / -2);
	/* !important: core sizes gallery images with an ID-level selector. */
	width: var(--ring-item, 18.96vw) !important;
	max-width: none; /* core caps it at 100% of the gallery, which here is a zero-size pivot */
	height: var(--ring-item, 18.96vw);
	margin: 0;
	transform: rotate(var(--angle)) translateY(calc(-1 * var(--ring-r, 75.7vw)));
}

.wp-block-gallery.is-style-ring > .wp-block-image > img {
	width: 100%;
	height: 100%;
	border-radius: 2px;
	object-fit: cover;
}

.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(2) { --i: 1; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(3) { --i: 2; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(4) { --i: 3; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(5) { --i: 4; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(6) { --i: 5; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(7) { --i: 6; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(8) { --i: 7; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(9) { --i: 8; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(10) { --i: 9; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(11) { --i: 10; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(12) { --i: 11; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(13) { --i: 12; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(14) { --i: 13; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(15) { --i: 14; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(16) { --i: 15; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(17) { --i: 16; }
.wp-block-gallery.is-style-ring > .wp-block-image:nth-child(18) { --i: 17; }

@keyframes mano-ring {
	to {
		transform: rotate(360deg);
	}
}

/* Only a full circle may turn; with fewer photos (no script) they stay on the arc as in Figma. */
.wp-block-gallery.is-style-ring:not(.is-full) {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.is-style-ring {
		animation: none;
	}
}

/* Phones (Figma 353:152, Groups 15 and 38, Frame 37): a full screen (874px) on the page colour.
   Two arcs of six 100px photos, 20° apart on circles of radius 400: the top arc on a circle 531px
   under the section top, the bottom arc mirrored on one 347px under it (184px higher). The heading
   is 354px under the top, the text 50px under the heading. The ring stands still here. */
@media (max-width: 781px) {
	.mano-season {
		--ring-r: 400px;
		--ring-y: 531px;
		--ring-item: 100px;
		min-height: 0;
		background: var(--wp--preset--color--topla-bijela);
	}

	.mano-season .wp-block-gallery.is-style-ring {
		animation: none;
	}

	.mano-season .wp-block-gallery.is-style-ring > .wp-block-image:nth-child(n+7) {
		--angle: calc((var(--i, 0) - 6) * 20deg + 130deg);
		transform: translateY(-184px) rotate(var(--angle)) translateY(calc(-1 * var(--ring-r)));
	}

	.mano-season .wp-block-gallery.is-style-ring > .wp-block-image:nth-child(n+13) {
		display: none;
	}

	.mano-season .wp-block-gallery.is-style-ring > .wp-block-image > img {
		border-radius: 0.73px;
	}

	.mano-season__text {
		padding: 354px 16px 308px;
	}

	.mano-season__text > h2.has-display-font-size {
		font-size: 40px !important; /* core preset classes are !important */
		line-height: 42px;
	}

	.mano-season__text > p {
		max-width: 309px;
		margin: 50px auto 0;
		font-size: 14px;
		line-height: 20px;
		letter-spacing: 0.02em;
	}
}

/* In the editor the photos sit in a normal grid, so each one can be selected and replaced. */
.editor-styles-wrapper .wp-block-gallery.is-style-ring {
	position: relative;
	top: auto;
	left: auto;
	display: flex;
	width: auto;
	height: auto;
	animation: none;
}

.editor-styles-wrapper .wp-block-gallery.is-style-ring > .wp-block-image.wp-block-image {
	position: relative;
	top: auto;
	left: auto;
	transform: none;
}
