/*
 * Madselek: only what theme.json and core blocks cannot express.
 * Colours come from the theme.json palette (CSS custom properties).
 * Two non-palette values are used on purpose:
 *   #5e5e36  darker olive for small text on cream (the palette olive is borderline AA at small sizes)
 *   #a8371a  accent hover
 */

:root {
	--ms-olive-text: #5e5e36;
	--ms-accent-hover: #a8371a;
	--ms-gutter: var(--wp--preset--spacing--40, 1.5rem);
	--ms-topbar-h: 2.25rem;
	--ms-radius: 6px;
	--ms-shadow: 0 6px 22px rgba(49, 49, 49, 0.1);
	--ms-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
	--ms-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
	--ms-icon-design: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4l16 16z'/%3E%3Cpath d='M4 13h4M4 9h2'/%3E%3C/svg%3E");
	--ms-icon-factory: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V10l6 4v-4l6 4V5h3v16z'/%3E%3C/svg%3E");
	--ms-icon-custom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h18v8H3z'/%3E%3Cpath d='M7 8v3M11 8v4M15 8v3M19 8v4'/%3E%3C/svg%3E");
	--ms-icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- base */
html {
	scroll-padding-top: 6.5rem;
}
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
body {
	overflow-x: clip;
}
/* No gap between header / main / footer template parts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Visible keyboard focus everywhere. */
:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- buttons */
.wp-block-button__link {
	transition: transform 0.2s var(--ms-ease), box-shadow 0.2s var(--ms-ease), background-color 0.2s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
/* WhatsApp buttons use dark text (#313131): white on #25D366 fails contrast. */
.wp-block-button__link.has-whatsapp-background-color:hover {
	background-color: #1fb958;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button__link.has-accent-background-color:hover {
	background-color: var(--ms-accent-hover);
	color: var(--wp--preset--color--white);
}
/* Outline buttons on dark backgrounds. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link.has-white-color:hover {
	background-color: rgba(255, 255, 255, 0.14);
	color: var(--wp--preset--color--white);
}

/* ---------------------------------------------------------------- header */
/* Sticky: the template-part wrapper is the sticky element; the top bar scrolls away. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--ms-topbar-h));
	z-index: 100;
}

.madselek-topbar {
	display: flex;
	align-items: center;
	height: var(--ms-topbar-h);
	padding: 0 var(--ms-gutter);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
}
.madselek-topbar__inner {
	width: 100%;
}
.madselek-topbar p {
	margin: 0;
}
.madselek-topbar a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.madselek-topbar a:hover {
	text-decoration: underline;
}
.wp-block-group.madselek-topbar__links {
	gap: 1.5rem;
}
.madselek-topbar__address {
	opacity: 0.9;
}
@media (max-width: 781px) {
	.madselek-topbar__address {
		display: none;
	}
	.madselek-topbar {
		font-size: 0.78rem;
	}
	.wp-block-group.madselek-topbar__links {
		gap: 1rem;
	}
}

.madselek-navbar {
	padding: 0.7rem var(--ms-gutter);
	box-shadow: 0 1px 0 rgba(120, 45, 24, 0.14), 0 6px 18px rgba(49, 49, 49, 0.06);
}
.madselek-navbar__inner {
	width: 100%;
	flex-wrap: nowrap;
}
.wp-block-group.madselek-navbar__actions {
	gap: 1.5rem;
	flex-wrap: nowrap;
}

/* Brand (header and footer) */
.wp-block-group.madselek-brand {
	gap: 0.75rem;
	flex-wrap: nowrap;
}
.madselek-brand__logo {
	margin: 0;
	flex: none;
}
.madselek-brand__logo img {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	object-fit: cover;
}
.madselek-brand__text {
	line-height: 1.1;
}
.madselek-brand__text > * {
	margin: 0;
}
.madselek-brand__name,
.madselek-brand__name a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}
.madselek-brand__tagline {
	margin-top: 0.2rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ms-olive-text);
}
@media (max-width: 900px) {
	.madselek-navbar .madselek-brand__tagline {
		display: none;
	}
}
@media (max-width: 480px) {
	.madselek-navbar .madselek-brand__logo img {
		width: 40px;
		height: 40px;
	}
	.madselek-navbar .madselek-brand__name,
	.madselek-navbar .madselek-brand__name a {
		font-size: 1.25rem;
	}
	.wp-block-group.madselek-navbar__actions {
		gap: 0.5rem;
	}
}

/* Navigation */
.madselek-nav .wp-block-navigation-item__content {
	padding: 0.5rem 0.25rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}
.madselek-nav .wp-block-navigation__container {
	gap: 1.75rem;
}
@media (max-width: 1000px) {
	.madselek-nav .wp-block-navigation__container {
		gap: 1rem;
	}
}
.madselek-nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45em;
}
.madselek-nav .wp-block-navigation__submenu-container {
	border: 0;
	border-radius: 4px;
	padding: 0.5rem 0;
	box-shadow: 0 12px 30px rgba(49, 49, 49, 0.18);
}
.madselek-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1.1rem;
	text-transform: none;
	letter-spacing: 0.01em;
	font-size: 0.95rem;
}

/* Compact header button */
.madselek-navbar__cta {
	margin: 0;
	flex: none;
}
.madselek-navbar__cta .wp-block-button__link {
	padding: 0.6rem 1.15rem;
	font-size: 0.78rem;
	white-space: nowrap;
}
@media (max-width: 480px) {
	.madselek-navbar__cta .wp-block-button__link {
		padding: 0.5rem 0.8rem;
		font-size: 0.72rem;
	}
}

/* ---------------------------------------------------------------- shared type */
.madselek-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0 0 1rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--ms-olive-text);
}
.madselek-eyebrow::before,
.madselek-eyebrow.has-text-align-center::after {
	content: "";
	flex: none;
	width: 2.25rem;
	height: 1px;
	background: currentColor;
	opacity: 0.7;
}
.madselek-eyebrow.has-text-align-center {
	justify-content: center;
}
.madselek-eyebrow--light {
	color: var(--wp--preset--color--neutral);
}

.madselek-section {
	padding: clamp(3.5rem, 8vw, 7rem) var(--ms-gutter);
}
.madselek-section__title {
	margin: 0 0 1rem;
}
.madselek-section__title.has-text-align-center {
	max-width: 1000px;
}
.madselek-section__lead {
	max-width: 40rem;
	color: #4a4a4a;
}
.madselek-section__lead.has-text-align-center {
	margin-inline: auto;
}

/* ---------------------------------------------------------------- hero */
.madselek-hero {
	padding: clamp(5rem, 10vw, 8rem) var(--ms-gutter);
	background-color: var(--wp--preset--color--primary);
}
.madselek-hero .wp-block-cover__image-background {
	object-position: 60% center;
}
/* Strong left-to-right brand gradient over the photo. */
.madselek-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(58, 22, 11, 0.94) 0%, rgba(58, 22, 11, 0.82) 36%, rgba(58, 22, 11, 0.4) 66%, rgba(58, 22, 11, 0.05) 100%);
	pointer-events: none;
}
.madselek-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	width: 100%;
}
.madselek-hero__title {
	max-width: 14ch;
	margin: 0 0 1.25rem;
	font-size: clamp(2.25rem, 4.4vw, 3.5rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
}
.madselek-hero__lead {
	max-width: 34rem;
	margin: 0;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	line-height: 1.6;
	opacity: 0.94;
}
.madselek-hero__actions {
	margin-top: 2rem;
}
.madselek-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.75rem;
	margin: 2.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--wp--preset--color--white);
}
.madselek-trust li {
	padding: 0;
	margin: 0;
}
.madselek-trust li::before {
	content: "";
	display: inline-block;
	width: 1.05em;
	height: 1.05em;
	margin-right: 0.55em;
	vertical-align: -0.15em;
	background: var(--wp--preset--color--neutral);
	-webkit-mask: var(--ms-icon-check) center / contain no-repeat;
	mask: var(--ms-icon-check) center / contain no-repeat;
}
@media (max-width: 781px) {
	.madselek-hero::after {
		background: linear-gradient(180deg, rgba(58, 22, 11, 0.7) 0%, rgba(58, 22, 11, 0.9) 100%);
	}
}

/* ---------------------------------------------------------------- categories */
.madselek-cards {
	margin-top: clamp(2rem, 4vw, 3.5rem);
	gap: 1.25rem;
}
.madselek-card {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: var(--ms-radius);
	background: var(--wp--preset--color--contrast);
	box-shadow: var(--ms-shadow);
}
.madselek-card > * {
	margin: 0;
}
.madselek-card__media {
	position: absolute;
	inset: 0;
}
.madselek-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
	transition: transform 0.7s var(--ms-ease);
}
.madselek-card:hover .madselek-card__media img {
	transform: scale(1.04);
}
.madselek-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(40, 17, 9, 0.9) 0%, rgba(40, 17, 9, 0.4) 40%, rgba(40, 17, 9, 0) 68%);
	pointer-events: none;
}
.madselek-card__body {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	padding: 1.5rem 1.5rem 1.35rem;
}
.madselek-card__title {
	margin: 0;
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	line-height: 1.2;
}
.madselek-card__title a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
/* Stretched link: the whole card is clickable. */
.madselek-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
}
.madselek-card__more {
	margin: 0.45rem 0 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.9;
	transition: transform 0.25s var(--ms-ease);
}
.madselek-card:hover .madselek-card__more {
	transform: translateX(4px);
}
.madselek-card:has(:focus-visible) {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}
.madselek-card__title a:focus-visible {
	outline: none;
}

/* ---------------------------------------------------------------- why us */
.madselek-why {
	background: var(--wp--preset--color--base);
}
.madselek-split {
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	margin-bottom: 0;
}
.madselek-split--contact {
	align-items: flex-start;
}
.madselek-why__photo {
	position: relative;
	isolation: isolate;
	margin: 0;
}
.madselek-why__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--ms-radius);
}
.madselek-why__photo::after {
	content: "";
	position: absolute;
	inset: 1.1rem -1.1rem -1.1rem 1.1rem;
	z-index: -1;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--ms-radius);
	opacity: 0.55;
}
.madselek-features {
	margin-top: 2rem;
	gap: 1.5rem 2rem;
}
.madselek-feature {
	position: relative;
	padding-left: 3.6rem;
}
.madselek-feature > * {
	margin: 0;
}
.madselek-feature::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--neutral);
}
.madselek-feature::after {
	content: "";
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	width: 1.3rem;
	height: 1.3rem;
	background: var(--wp--preset--color--accent);
	-webkit-mask: var(--ms-icon-design) center / contain no-repeat;
	mask: var(--ms-icon-design) center / contain no-repeat;
}
.madselek-feature--factory::after {
	-webkit-mask-image: var(--ms-icon-factory);
	mask-image: var(--ms-icon-factory);
}
.madselek-feature--custom::after {
	-webkit-mask-image: var(--ms-icon-custom);
	mask-image: var(--ms-icon-custom);
}
.madselek-feature--time::after {
	-webkit-mask-image: var(--ms-icon-time);
	mask-image: var(--ms-icon-time);
}
.madselek-feature__title {
	font-size: 1.1rem;
}
.madselek-feature__text {
	margin-top: 0.25rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #4a4a4a;
}

/* ---------------------------------------------------------------- process */
.madselek-steps {
	margin-top: clamp(2rem, 5vw, 3.5rem);
	gap: 2.5rem 2rem;
}
.madselek-step {
	position: relative;
}
.madselek-step > * {
	margin: 0;
}
.madselek-step__num {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(3rem, 5vw, 4.25rem);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}
.madselek-step__title {
	margin-top: 0.75rem;
	font-size: 1.3rem;
}
.madselek-step__text {
	margin-top: 0.5rem;
	font-size: 0.97rem;
	color: #4a4a4a;
}
@media (min-width: 1024px) {
	.madselek-step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 2.1rem;
		left: 5.25rem;
		right: -1.25rem;
		height: 1px;
		background: var(--wp--preset--color--primary);
		opacity: 0.3;
	}
}

/* ---------------------------------------------------------------- projects */
.madselek-gallery.wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	margin-top: clamp(2rem, 4vw, 3rem);
}
.madselek-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
	position: relative;
	width: auto !important;
	margin: 0 !important;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: var(--ms-radius);
}
.madselek-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.7s var(--ms-ease);
}
.madselek-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:hover img {
	transform: scale(1.04);
}
@media (max-width: 960px) {
	.madselek-gallery.wp-block-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.madselek-gallery.wp-block-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}
}
.madselek-projects__cta {
	justify-content: center;
	margin-top: clamp(2rem, 4vw, 3rem);
}

/* ---------------------------------------------------------------- testimonials */
.madselek-testimonials-section {
	background: var(--wp--preset--color--neutral);
}
.madselek-testimonials {
	margin-top: clamp(2rem, 4vw, 3rem);
	gap: 1.25rem;
}
.madselek-testimonial {
	position: relative;
	padding: 3.25rem 2rem 2rem;
	border-radius: var(--ms-radius);
	background: var(--wp--preset--color--white);
	box-shadow: var(--ms-shadow);
}
.madselek-testimonial::before {
	content: "\201C";
	position: absolute;
	top: 0.9rem;
	left: 1.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 5rem;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}
.madselek-testimonial > * {
	margin: 0;
}
.madselek-testimonial__text {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.15rem;
	font-style: italic;
	line-height: 1.55;
}
.madselek-testimonial__name {
	margin-top: 1.25rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ms-olive-text);
}

/* ---------------------------------------------------------------- CTA + contact */
.madselek-cta {
	padding: clamp(4rem, 9vw, 7rem) var(--ms-gutter);
}
.madselek-cta .wp-block-cover__inner-container {
	width: 100%;
}
.madselek-cta__title {
	margin: 0 0 0.75rem;
	font-size: clamp(2rem, 4.5vw, 3.25rem);
}
.madselek-cta__lead {
	margin: 0;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}
.madselek-cta__actions {
	justify-content: center;
	margin-top: 2rem;
}
.madselek-contact__item {
	padding: 1rem 0;
	border-top: 1px solid rgba(120, 45, 24, 0.16);
}
.madselek-contact__item:last-child {
	border-bottom: 1px solid rgba(120, 45, 24, 0.16);
}
.madselek-contact__item > * {
	margin: 0;
}
.madselek-contact__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ms-olive-text);
}
.madselek-contact__value {
	margin-top: 0.2rem;
	font-size: 1.05rem;
}
.madselek-map iframe {
	display: block;
	width: 100%;
	height: 380px;
	border: 0;
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow);
}

/* ---------------------------------------------------------------- footer */
.madselek-footer {
	padding: clamp(3rem, 6vw, 5rem) var(--ms-gutter) 1.5rem;
}
.madselek-footer a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.madselek-footer a:hover {
	color: var(--wp--preset--color--neutral);
	text-decoration: underline;
}
.madselek-footer .madselek-brand__name,
.madselek-footer .madselek-brand__name a {
	color: var(--wp--preset--color--white);
}
.madselek-footer .madselek-brand__tagline {
	color: var(--wp--preset--color--neutral);
}
.madselek-footer__cols {
	gap: 2.5rem;
	margin-bottom: 0;
}
.madselek-footer__about {
	max-width: 24rem;
	margin-top: 1.25rem;
	opacity: 0.9;
}
.madselek-footer__title {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	color: var(--wp--preset--color--white);
}
.madselek-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.madselek-footer__list li {
	margin: 0 0 0.45rem;
	padding: 0;
}
.madselek-footer__line {
	margin: 0 0 0.5rem;
}
.madselek-footer__bottom {
	margin-top: 3rem;
	padding-top: 1.4rem;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 0.85rem;
}
.madselek-footer__legal {
	margin: 0;
	opacity: 0.88;
}

/* ---------------------------------------------------------------- inner pages */
.madselek-page-title {
	padding: clamp(2.5rem, 6vw, 4.5rem) var(--ms-gutter);
	border-bottom: 1px solid rgba(120, 45, 24, 0.14);
}
.madselek-page-title > * {
	margin-block: 0;
}
.madselek-page-title .wp-block-post-title,
.madselek-page-title .wp-block-query-title {
	margin: 0;
}
.madselek-page-title .wp-block-post-title::after,
.madselek-page-title .wp-block-query-title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 2px;
	margin-top: 1.1rem;
	background: var(--wp--preset--color--accent);
}
.madselek-page-title .wp-block-term-description,
.madselek-page-title .madselek-meta {
	margin-top: 1rem;
	color: var(--ms-olive-text);
}
.madselek-page-content {
	padding: clamp(2.5rem, 6vw, 5rem) var(--ms-gutter);
}
.madselek-page-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	overflow: hidden;
	border-radius: var(--ms-radius);
}
.madselek-page-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	transition: transform 0.7s var(--ms-ease);
}
.madselek-page-content .wp-block-gallery.has-nested-images figure.wp-block-image:hover img {
	transform: scale(1.04);
}
.madselek-post-card {
	overflow: hidden;
	border-radius: var(--ms-radius);
	background: var(--wp--preset--color--white);
	box-shadow: var(--ms-shadow);
	height: 100%;
	padding-bottom: 1.25rem;
}
.madselek-post-card > * {
	margin-block: 0;
}
.madselek-post-card > :not(.wp-block-post-featured-image) {
	padding-inline: 1.25rem;
	margin-top: 0.9rem;
}
.madselek-post-card .wp-block-post-featured-image {
	overflow: hidden;
}
.madselek-post-card .wp-block-post-featured-image img {
	transition: transform 0.7s var(--ms-ease);
}
.madselek-post-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}
.madselek-post-card .wp-block-post-title a {
	text-decoration: none;
}

/* ---------------------------------------------------------------- floating WhatsApp */
.madselek-wa-float {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #25d366;
	color: #0b2e17;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	text-decoration: none;
	transition: transform 0.2s ease;
}
.madselek-wa-float:hover {
	transform: scale(1.08);
}
.madselek-wa-float:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.wp-block-button__link:hover,
	.madselek-card:hover .madselek-card__media img,
	.madselek-card:hover .madselek-card__more,
	.madselek-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:hover img,
	.madselek-post-card:hover .wp-block-post-featured-image img,
	.madselek-wa-float:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------- classic galleries */
/* Wide, responsive grid. Specificity beats the legacy inline gallery <style>. */
.entry-content .gallery,
.madselek-page-content .gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
	gap: 0.75rem;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin: 0 auto 2rem;
	padding: 0;
}
.entry-content .gallery::before,
.entry-content .gallery::after {
	content: none;
	display: none;
}
.entry-content .gallery br {
	display: none;
}
.entry-content .gallery .gallery-item,
.entry-content .gallery.gallery-columns-2 .gallery-item,
.entry-content .gallery.gallery-columns-3 .gallery-item,
.entry-content .gallery.gallery-columns-4 .gallery-item,
.entry-content .gallery.gallery-columns-5 .gallery-item,
.entry-content .gallery.gallery-columns-6 .gallery-item {
	float: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	text-align: left;
}
.entry-content .gallery .gallery-icon {
	margin: 0;
	overflow: hidden;
	border-radius: var(--ms-radius);
	background: var(--wp--preset--color--neutral);
	aspect-ratio: 4 / 3;
}
.entry-content .gallery .gallery-icon a {
	display: block;
	width: 100%;
	height: 100%;
}
.entry-content .gallery .gallery-icon img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
	transition: transform 0.6s var(--ms-ease);
}
.entry-content .gallery .gallery-icon a:hover img {
	transform: scale(1.06);
}
.entry-content .gallery .gallery-icon a:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: -3px;
	border-radius: var(--ms-radius);
}
.entry-content .gallery .gallery-caption {
	margin: 0.4rem 0 0;
	font-size: 0.875rem;
	color: var(--ms-olive-text);
}
@media (max-width: 600px) {
	.entry-content .gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}
}

/* Classic content leftovers inside pages. */
.madselek-page-content .entry-content > .wp-block-image,
.madselek-page-content .entry-content > figure {
	max-width: var(--wp--style--global--wide-size, 1240px);
}
.madselek-page-content .wp-block-image img {
	border-radius: var(--ms-radius);
}
.madselek-page-content .entry-content > h2,
.madselek-page-content .entry-content > h3 {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--primary);
	line-height: 1.25;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}
.madselek-page-content .entry-content > hr {
	border: 0;
	border-top: 1px solid rgba(120, 45, 24, 0.18);
}

/* ---------------------------------------------------------------- page CTA band */
.madselek-page-cta {
	padding: clamp(3rem, 7vw, 5rem) var(--ms-gutter);
	text-align: center;
}
.madselek-page-cta > * {
	margin-block: 0;
}
.madselek-page-cta__title {
	font-family: var(--wp--preset--font-family--heading);
	margin-bottom: 0.6rem;
}
.madselek-page-cta__lead {
	margin-bottom: 1.75rem;
	opacity: 0.92;
}
.page-slug-contacto .madselek-page-cta {
	display: none;
}

/* ---------------------------------------------------------------- lightbox */
.ms-lb-open {
	overflow: hidden;
}
.ms-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 0.75rem 1rem;
	background: rgba(20, 16, 14, 0.94);
	color: #fff;
	touch-action: none;
}
.ms-lb[hidden] {
	display: none;
}
.ms-lb__figure {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	overflow: hidden;
	touch-action: none;
	cursor: zoom-in;
}
.ms-lb__figure.is-zoomed {
	cursor: grab;
}
.ms-lb__figure.is-dragging {
	cursor: grabbing;
}
.ms-lb__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	user-select: none;
	-webkit-user-drag: none;
	transform-origin: 50% 50%;
	will-change: transform;
}
.ms-lb__img.is-animated {
	transition: transform 0.2s ease-out;
}
.ms-lb__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.ms-lb__zoom {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	display: flex;
	gap: 0.4rem;
}
.ms-lb__zoom .ms-lb__btn {
	position: static;
}
.ms-lb__zoom .ms-lb__zoom-reset {
	font-size: 0.8rem;
	font-weight: 700;
}
.ms-lb__btn:disabled {
	opacity: 0.35;
	cursor: default;
}
.ms-lb__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem 1.25rem;
	padding-top: 0.9rem;
}
.ms-lb__count {
	font-size: 0.875rem;
	opacity: 0.8;
}
.ms-lb__quote {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--whatsapp);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	text-decoration: none;
}
.ms-lb__quote:hover {
	background: #1fb958;
}
.ms-lb__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.ms-lb__btn:hover {
	background: rgba(255, 255, 255, 0.28);
}
.ms-lb__btn:focus-visible,
.ms-lb__quote:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}
.ms-lb__close {
	top: 0.75rem;
	right: 0.75rem;
}
.ms-lb__prev,
.ms-lb__next {
	top: 50%;
	transform: translateY(-50%);
}
.ms-lb__prev {
	left: 0.5rem;
}
.ms-lb__next {
	right: 0.5rem;
}
@media (max-width: 600px) {
	/* Keep the counter/quote row clear of the bottom prev/next buttons. */
	.ms-lb__bar {
		padding-inline: 3.6rem;
		gap: 0.4rem 1rem;
	}
	.ms-lb__prev,
	.ms-lb__next {
		top: auto;
		bottom: 0.9rem;
		transform: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ms-lb__img.is-animated {
		transition: none;
	}
	.entry-content .gallery .gallery-icon a:hover img {
		transform: none;
	}
}
