/* Apartmani Migros: what the blocks' own settings can't express. Colours and fonts are Blocksy's
   palette and typography; the icons are the starter template's (uploads/2025/08). */

/* header images: the site header floats over them */
.migros-hero .migros-hero-title {
	font-size: clamp(2.3rem, 5.4vw, 4.2rem);
	line-height: 1.12;
	margin-bottom: 0.45em;
}
.migros-page .migros-lead {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}
.migros-hero .wp-block-buttons,
.migros-cta .wp-block-buttons {
	gap: 14px;
}

/* the Booking.com rating */
.migros-page .migros-rating {
	width: fit-content;
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--theme-palette-color-5);
	font-size: 14px;
}
.migros-rating strong {
	margin-right: 4px;
	color: var(--theme-palette-color-2);
	font-size: 16px;
}
.migros-page .migros-rating-hero {
	margin-left: auto;
	margin-right: auto;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.migros-rating-hero strong {
	color: var(--theme-palette-color-1);
}

/* buttons: the template's arrow, as in the site header */
.migros-page .wp-block-button:not(.is-style-outline) .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	margin-left: 0.7em;
	margin-right: -0.6em;
	vertical-align: -0.3em;
	background: currentColor;
	-webkit-mask: url(../../uploads/2025/08/arrow-right.svg) center / contain no-repeat;
	mask: url(../../uploads/2025/08/arrow-right.svg) center / contain no-repeat;
}
/* outline buttons on a photo: white (Blocksy colours buttons through these variables) */
.migros-page .wp-block-cover .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link {
	--theme-button-text-initial-color: #fff;
	--theme-button-background-initial-color: rgba(255, 255, 255, 0.7);
}

/* lists with an icon on each item (migros-site/icons) */
.migros-icons,
.migros-scores,
.migros-chips {
	list-style: none;
	padding-left: 0;
}
.migros-icons li {
	position: relative;
	margin-bottom: 11px;
	padding-left: 36px;
}
.migros-icons li > img.migros-icon:first-child {
	position: absolute;
	left: 0;
	top: 0.05em;
	width: 24px;
	height: 24px;
}
img.migros-icon {
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
}
.migros-scores li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	border-bottom: 1px solid rgba(15, 26, 23, 0.08);
}
.migros-scores li strong {
	color: var(--theme-palette-color-2);
}

/* cards fill their column, so a row lines up */
.wp-block-column > .migros-card,
.wp-block-column > .migros-feature,
.wp-block-column > .wp-block-group.has-background {
	height: 100%;
	box-sizing: border-box;
}
.migros-card {
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(15, 26, 23, 0.06);
}
.migros-card > .migros-card-image {
	margin: 0;
}
.migros-card > .migros-card-image img {
	width: 100%;
}
.migros-note {
	margin-top: -0.6em;
	color: var(--theme-palette-color-2);
	font-weight: 500;
}

/* an apartment's photos: the first one shows, the lightbox steps through all of them. The others
   stay laid out under it, invisible: the lightbox takes each photo's size from the page. */
.wp-block-gallery.has-nested-images.migros-unit-gallery {
	position: relative;
	margin-bottom: 20px;
}
.wp-block-gallery.has-nested-images.migros-unit-gallery > figure.wp-block-image {
	width: 100%;
	margin: 0;
}
.wp-block-gallery.has-nested-images.migros-unit-gallery > figure.wp-block-image:not(:first-of-type) {
	position: absolute;
	top: 0;
	left: 0;
	visibility: hidden;
}
.migros-unit-gallery > .wp-block-image img {
	aspect-ratio: 3 / 2;
	border-radius: 14px;
}
.wp-block-gallery.has-nested-images.migros-unit-gallery > figcaption.blocks-gallery-caption {
	position: absolute;
	right: 12px;
	bottom: 12px;
	flex-basis: auto;
	margin: 0;
	padding: 6px 13px;
	border-radius: 999px;
	background: rgba(24, 51, 66, 0.86);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	pointer-events: none;
}

/* a house's photos */
.migros-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
	border-radius: 12px;
}

/* questions and answers */
.migros-faq .wp-block-details {
	padding: 18px 0;
	border-bottom: 1px solid rgba(15, 26, 23, 0.1);
}
.migros-faq .wp-block-details summary {
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
}
.migros-faq .wp-block-details[open] summary {
	margin-bottom: 0.6em;
}

@media (max-width: 781px) {
	.migros-hero {
		min-height: 520px !important;
		padding-top: 140px !important;
		padding-bottom: 72px !important;
	}
	.migros-page .wp-block-group.alignfull {
		padding-top: 64px !important;
		padding-bottom: 64px !important;
	}
}

/* small labels above headings */
.migros-page .migros-overline {
	margin-bottom: 0.4em;
	color: var(--theme-palette-color-2);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* the two houses on the home page: three photos, a rating badge, the pitch and its chips */
.migros-houses-section .migros-showcase {
	margin-top: 64px;
}
@media (min-width: 782px) {
	.migros-showcase-reverse {
		flex-direction: row-reverse;
	}
}
.migros-mosaic-wrap {
	position: relative;
}
.wp-block-gallery.has-nested-images.migros-mosaic {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 14px;
	aspect-ratio: 16 / 11;
}
.wp-block-gallery.has-nested-images.migros-mosaic figure.wp-block-image:not(#individual-image) {
	width: auto;
	height: 100%;
	margin: 0;
	overflow: hidden;
	border-radius: 18px;
	box-shadow: 0 14px 34px rgba(15, 26, 23, 0.12);
}
.wp-block-gallery.has-nested-images.migros-mosaic figure.wp-block-image:first-child {
	grid-row: span 2;
}
.wp-block-gallery.has-nested-images.migros-mosaic figure.wp-block-image img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.7s ease;
}
.wp-block-gallery.has-nested-images.migros-mosaic figure.wp-block-image:hover img {
	transform: scale(1.05);
}
.migros-page .migros-badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 2;
	margin: 0;
	padding: 10px 16px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 26px rgba(15, 26, 23, 0.18);
	font-size: 13px;
	line-height: 1.35;
	pointer-events: none;
}
.migros-badge strong {
	color: var(--theme-palette-color-2);
	font-size: 22px;
}
.migros-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.migros-chips li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 15px 8px 12px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(15, 26, 23, 0.06);
	font-size: 14px;
}
.migros-chips li > img.migros-icon {
	width: 20px;
	height: 20px;
}

/* cards with an icon on top, and places (beaches, restaurants, sights) */
.migros-page .wp-block-image.migros-card-icon {
	margin-block-end: 10px;
}
.migros-feature {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.migros-feature:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(15, 26, 23, 0.09);
}
.migros-place .migros-distance {
	margin-top: -0.4em;
	color: var(--theme-palette-color-2);
}
.migros-place .migros-map-link {
	margin-top: auto;
}
.migros-place {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(15, 26, 23, 0.06);
	box-shadow: 0 6px 24px rgba(15, 26, 23, 0.06);
}

/* contacts from Settings > Apartmani Migros */
.migros-contact li a {
	font-weight: 600;
}
.migros-contact-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
}
.migros-contact-buttons .wp-block-button__link img.migros-icon {
	margin-right: 0.35em;
	filter: brightness(0) invert(1);
}

/* the gallery viewer: the photo's place and description, and a slide from one photo to the next */
.migros-lightbox-caption {
	position: fixed;
	left: 50%;
	bottom: 22px;
	z-index: 3000001;   /* above WordPress's backdrop (2000000) and the photo (3000000) */
	display: flex;
	gap: 14px;
	align-items: baseline;
	max-width: min(760px, calc(100vw - 32px));
	padding: 11px 20px;
	border-radius: 14px;
	background: rgba(24, 51, 66, 0.9);
	color: #fff;
	font-size: 15px;
	line-height: 1.45;
	transform: translateX(-50%);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.migros-lightbox-caption[hidden] {
	display: none;
}
.migros-lightbox-count {
	flex: none;
	color: var(--theme-palette-color-1);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.wp-lightbox-overlay:not(.active) .migros-lightbox-caption {
	display: none;
}
.lightbox-image-container.migros-in-next figure {
	animation: migros-in-next 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lightbox-image-container.migros-in-prev figure {
	animation: migros-in-prev 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.migros-lightbox-caption.migros-in-text {
	animation: migros-in-text 0.45s ease;
}
@keyframes migros-in-next {
	from { opacity: 0; transform: translateX(60px) scale(0.98); }
	to { opacity: 1; transform: none; }
}
@keyframes migros-in-prev {
	from { opacity: 0; transform: translateX(-60px) scale(0.98); }
	to { opacity: 1; transform: none; }
}
@keyframes migros-in-text {
	from { opacity: 0; transform: translate(-50%, 8px); }
	to { opacity: 1; transform: translateX(-50%); }
}

/* sections fade in as they scroll into view (only where site.js runs) */
html.migros-js .migros-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.migros-js .migros-reveal.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	html.migros-js .migros-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.wp-block-gallery.has-nested-images.migros-mosaic figure.wp-block-image img,
	.migros-feature {
		transition: none;
	}
}

/* the language switcher (Polylang, in the menu): flags and the language's code */
.lang-item img,
.pll-parent-menu-item img {
	width: 22px;
	height: auto;
	margin-right: 6px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(15, 26, 23, 0.12);
	vertical-align: -0.2em;
}
header .lang-item a.ct-menu-link,
header .pll-parent-menu-item a.ct-menu-link,
#offcanvas .lang-item a,
#offcanvas .pll-parent-menu-item a {
	text-transform: uppercase !important;
}

/* the header has the language switcher; the footer's menu doesn't need it again */
footer .pll-parent-menu-item,
footer .lang-item {
	display: none !important;
}

/* the mobile menu's panel is dark: the logo in white */
#offcanvas .site-logo-container img {
	filter: brightness(0) invert(1);
}
