/*
Theme Name: Pinturas MainDecor
Theme URI: https://maindecor.local
Author: MainDecor
Description: Tema ligero a medida para Pinturas MainDecor (Pollença, Mallorca). Portada editable con bloques, animaciones suaves y adornos florales. Sin dependencias ni plugins de pago.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: maindecor
*/

/* ===================== Fuente local ===================== */
@font-face {
	font-family: "Outfit";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url(assets/fonts/outfit.woff2) format("woff2");
}

/* ===================== Variables ===================== */
:root {
	--md-purple: #7b2cbf;
	--md-purple-2: #9a3fe0;
	--md-purple-d: #5c16a6;
	--md-navy: #14204f;
	--md-navy-d: #0f1940;
	--md-orange: #f7931e;
	--md-orange-2: #ffae3d;
	--md-lav: #f5eefc;
	--md-lav-2: #ebdff8;
	--md-text: #3d4361;
	--md-muted: #646a85;
	--md-white: #fff;
	--md-radius: 18px;
	--md-shadow: 0 12px 32px -14px rgba(20, 32, 79, .28);
	--md-shadow-h: 0 22px 44px -16px rgba(92, 22, 166, .38);
	--md-ease: cubic-bezier(.2, .7, .2, 1);
	--md-wrap: 1180px;
	--md-head: 104px;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--md-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--md-purple); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .25s; }
a:hover { color: var(--md-purple-d); }
h1, h2, h3, h4 { color: var(--md-navy); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
[id] { scroll-margin-top: calc(var(--md-head) - 10px); }
:focus-visible { outline: 3px solid var(--md-orange); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; z-index: 1000;
	top: 8px; left: 8px; padding: 10px 16px; background: #fff; border-radius: 8px; box-shadow: var(--md-shadow);
}
.md-wrap { max-width: var(--md-wrap); margin-inline: auto; padding-inline: 24px; }

/* ===================== Cabecera ===================== */
.md-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff;
	transition: box-shadow .35s, filter .35s;
}
.admin-bar .md-header { top: 32px; }
.md-header::after {
	content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 22px;
	background: url(assets/deco/wave.svg) top / 100% 100% no-repeat;
	pointer-events: none;
}
.md-header.is-scrolled { filter: drop-shadow(0 8px 14px rgba(20, 32, 79, .10)); }
.md-header__in {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	height: var(--md-head); transition: height .35s var(--md-ease);
}
.md-header.is-scrolled .md-header__in { height: 74px; }
.md-brand { flex: 0 0 auto; line-height: 0; }
.md-brand .custom-logo { height: 94px; width: auto; transition: height .35s var(--md-ease), transform .35s; }
.md-header.is-scrolled .md-brand .custom-logo { height: 62px; }
.md-brand a:hover .custom-logo { transform: rotate(-2deg) scale(1.03); }

.md-menu { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); list-style: none; margin: 0; padding: 0; }
.md-menu a {
	position: relative; display: block; padding: 10px 2px;
	color: var(--md-navy); font-weight: 500; font-size: 1.06rem; text-decoration: none;
}
.md-menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; border-radius: 3px;
	background: linear-gradient(90deg, var(--md-purple-2), var(--md-purple-d));
	transform: scaleX(0); transform-origin: left; transition: transform .4s var(--md-ease);
}
.md-menu a:hover, .md-menu .is-active > a, .md-menu .current-menu-item > a { color: var(--md-purple); }
.md-menu a:hover::after, .md-menu .is-active > a::after, .md-menu .current-menu-item > a::after { transform: scaleX(1); }
.md-menu .is-active > a, .md-menu .current-menu-item > a { font-weight: 600; }
body.md-front .md-menu .current-menu-item:not(.is-active) > a { color: var(--md-navy); font-weight: 500; }
body.md-front .md-menu .current-menu-item:not(.is-active) > a::after { transform: scaleX(0); }
.md-nav__call { display: none; }

.md-burger {
	display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--md-lav); padding: 0; position: relative;
}
.md-burger span {
	position: absolute; left: 12px; right: 12px; height: 2.5px; border-radius: 2px; background: var(--md-purple);
	transition: transform .35s var(--md-ease), opacity .25s;
}
.md-burger span:nth-child(1) { top: 15px; }
.md-burger span:nth-child(2) { top: 22px; }
.md-burger span:nth-child(3) { top: 29px; }
.md-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.md-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.md-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Botones ===================== */
.wp-block-buttons { gap: 14px; }
.wp-block-button .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	font-family: inherit; font-weight: 600; font-size: 1.08rem; line-height: 1.2;
	text-decoration: none; border-radius: 14px; padding: 16px 26px; border: 0;
	transition: transform .3s var(--md-ease), box-shadow .3s, background-position .5s;
}
.wp-block-button .wp-block-button__link:hover { transform: translateY(-3px); }

.md-btn-primary .wp-block-button__link, .md-submit {
	color: #fff; background: linear-gradient(135deg, var(--md-purple-2), var(--md-purple-d) 60%, var(--md-purple-2)) 0 0 / 200% 100%;
	box-shadow: 0 12px 26px -10px rgba(92, 22, 166, .7);
}
.md-btn-primary .wp-block-button__link:hover, .md-submit:hover { color: #fff; background-position: 100% 0; box-shadow: 0 18px 34px -12px rgba(92, 22, 166, .75); }
.md-btn-primary .wp-block-button__link::before,
.md-btn-primary .wp-block-button__link::after,
.md-btn-orange .wp-block-button__link::after {
	content: ""; width: 20px; height: 20px; flex: 0 0 auto; background: currentColor;
	-webkit-mask: url(assets/icons/brush.svg) center / contain no-repeat; mask: url(assets/icons/brush.svg) center / contain no-repeat;
}
.md-btn-primary .wp-block-button__link::after,
.md-btn-orange .wp-block-button__link::after {
	width: 18px; height: 18px;
	-webkit-mask-image: url(assets/icons/arrow.svg); mask-image: url(assets/icons/arrow.svg);
	transition: transform .3s var(--md-ease);
}
.wp-block-button__link:hover::after { transform: translateX(4px); }

.md-btn-wa .wp-block-button__link {
	position: relative; display: inline-block; text-align: left;
	color: var(--md-navy); background: #fff; border: 1px solid rgba(20, 32, 79, .08);
	padding: 10px 22px 10px 64px; font-size: .9rem; font-weight: 600; line-height: 1.2;
	box-shadow: var(--md-shadow);
}
.md-btn-wa .wp-block-button__link strong { display: block; font-size: 1.28rem; font-weight: 700; letter-spacing: .01em; }
.md-btn-wa .wp-block-button__link::before {
	content: ""; position: absolute; left: 16px; top: 50%; width: 36px; height: 36px; transform: translateY(-50%);
	background: url(assets/icons/whatsapp.svg) center / contain no-repeat;
}
.md-btn-wa .wp-block-button__link:hover { color: var(--md-navy); box-shadow: var(--md-shadow-h); }

.md-btn-orange .wp-block-button__link {
	color: #fff; border-radius: 999px; padding: 15px 32px;
	background: linear-gradient(180deg, var(--md-orange-2), #f07d00);
	box-shadow: 0 12px 26px -10px rgba(240, 125, 0, .75), inset 0 2px 0 rgba(255, 255, 255, .3);
}
.md-btn-orange .wp-block-button__link:hover { color: #fff; box-shadow: 0 18px 32px -10px rgba(240, 125, 0, .8); }

/* ===================== Hero ===================== */
.wp-block-cover.md-hero {
	position: relative; overflow: hidden; margin: 0;
	min-height: clamp(540px, 46vw, 660px) !important;
	padding: 60px 24px 120px;
	align-items: center; justify-content: flex-start;
}
.wp-block-cover.md-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(22px, 3.2vw, 46px); z-index: 2;
	background: url(assets/deco/wave-bottom.svg) bottom / 100% 100% no-repeat; pointer-events: none;
}
.md-hero .wp-block-cover__image-background {
	object-position: 50% 50%;
	translate: 0 var(--par, 0px);
	animation: md-kenburns 16s ease-out both;
	transform-origin: 70% 40%;
}
.md-hero .wp-block-cover__background.has-background-dim {
	opacity: 1 !important;
	background: linear-gradient(90deg, rgba(240, 247, 255, .72) 0%, rgba(240, 247, 255, .45) 30%, rgba(255, 255, 255, 0) 55%) !important;
}
.md-hero .wp-block-cover__inner-container { width: 100%; max-width: var(--md-wrap); margin: 0 auto; padding-inline: 0; color: var(--md-navy); }
.md-hero .wp-block-cover__inner-container > * { max-width: 620px; }
.md-hero-title {
	font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 700; line-height: 1.06; letter-spacing: -.025em;
	color: var(--md-navy); margin: 0 0 .25em;
}
.md-hero-title mark { background: none !important; color: var(--md-purple) !important; }
.md-hero-title::after {
	content: ""; display: block; width: min(520px, 92%); height: 18px; margin-top: 10px;
	background: url(assets/deco/underline.svg) left / 100% 100% no-repeat;
	clip-path: inset(0 100% 0 0);
	animation: md-draw 1.2s 1s cubic-bezier(.6, 0, .2, 1) forwards;
}
.md-hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--md-navy); font-weight: 400; margin: 0 0 1.6em; }
.md-hero-btns { margin-top: 0; }
.md-hero-title, .md-hero-sub, .md-hero-btns { animation: md-up 1s var(--md-ease) both; }
.md-hero-sub { animation-delay: .25s; }
.md-hero-btns { animation-delay: .45s; }

/* Pétalos flotantes de buganvilla */
.md-petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.md-petal {
	position: absolute; top: -30px; width: var(--s, 16px); height: var(--s, 16px);
	background: url(assets/deco/petal.svg) center / contain no-repeat;
	opacity: 0; will-change: transform;
	animation: md-fall var(--t, 12s) linear var(--dl, 0s) infinite;
}

/* ===================== Secciones ===================== */
.md-section { position: relative; padding: 64px 24px; margin: 0; }
.md-section > * { position: relative; z-index: 1; max-width: var(--md-wrap); margin-left: auto; margin-right: auto; }
.md-main > .wp-block-group, .md-main > section { margin-top: 0; margin-bottom: 0; }

.md-title {
	display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2.5vw, 28px);
	text-align: center; font-size: clamp(1.85rem, 3.4vw, 2.6rem); margin-bottom: .35em;
}
.md-title::before, .md-title::after {
	content: ""; flex: 0 1 170px; height: 16px; min-width: 30px;
	background: url(assets/deco/flower.svg) left center / 16px 16px no-repeat,
		linear-gradient(90deg, transparent, var(--md-purple)) 0 50% / 100% 2px no-repeat;
}
.md-title::after {
	background: url(assets/deco/flower.svg) right center / 16px 16px no-repeat,
		linear-gradient(270deg, transparent, var(--md-purple)) 0 50% / 100% 2px no-repeat;
}
.md-subtitle { text-align: center; color: var(--md-muted); font-size: 1.08rem; max-width: 640px !important; margin: 0 auto 2.2em; }
.md-eyebrow {
	display: inline-flex; align-items: center; gap: 10px; color: var(--md-purple); font-weight: 600;
	text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; margin-bottom: .6em;
}
.md-eyebrow::before { content: ""; width: 18px; height: 18px; background: url(assets/deco/flower.svg) center / contain no-repeat; }

/* Adornos florales de sección */
.md-services::before, .md-about::before, .md-contact::before, .md-works::after {
	content: ""; position: absolute; z-index: 0; pointer-events: none;
	background: center / contain no-repeat;
	animation: md-sway 7s ease-in-out infinite alternate;
}
.md-services::before { top: -18px; right: -30px; width: 280px; height: 210px; background-image: url(assets/deco/branch.svg); opacity: .32; transform-origin: 100% 0; }
.md-works::after { bottom: 10px; left: -40px; width: 230px; height: 170px; background-image: url(assets/deco/branch.svg); opacity: .18; scale: -1 1; transform-origin: 0 100%; }
.md-about::before { bottom: 30px; right: -20px; width: 260px; height: 190px; background-image: url(assets/deco/branch.svg); opacity: .26; scale: 1 -1; transform-origin: 100% 100%; }
.md-contact::before { top: 30px; left: -20px; width: 240px; height: 140px; background-image: url(assets/deco/olive.svg); opacity: .4; transform-origin: 0 100%; }

/* ===================== Servicios ===================== */
.wp-block-columns.md-cards {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-bottom: 0;
}
.md-card {
	position: relative; background: #fff; border-radius: var(--md-radius); overflow: hidden;
	box-shadow: var(--md-shadow); padding-bottom: 30px;
	transition: transform .45s var(--md-ease), box-shadow .45s;
}
.md-card:hover { transform: translateY(-8px); box-shadow: var(--md-shadow-h); }
.md-card .wp-block-image { margin: 0; overflow: hidden; }
.md-card .wp-block-image img { display: block; width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; transition: transform 1s var(--md-ease); }
.md-card:hover .wp-block-image img { transform: scale(1.07); }
.md-card h3 {
	position: relative; font-size: 1.32rem; margin: 34px 22px 8px; color: var(--md-navy);
}
.md-card h3::before {
	content: ""; position: absolute; left: -6px; top: -64px; width: 54px; height: 54px; border-radius: 50%;
	background: #fff center / 28px no-repeat; box-shadow: 0 8px 18px -8px rgba(20, 32, 79, .35);
	transition: transform .5s var(--md-ease);
}
.md-card:hover h3::before { transform: rotate(-10deg) scale(1.08); }
.md-ico-home h3::before { background-image: url(assets/icons/home.svg); }
.md-ico-building h3::before { background-image: url(assets/icons/building.svg); }
.md-ico-roller h3::before { background-image: url(assets/icons/roller.svg); }
.md-card p { margin: 0 22px; font-size: .97rem; line-height: 1.5; color: var(--md-muted); }
.md-card::after {
	content: ""; position: absolute; left: 50%; bottom: 14px; width: 92px; height: 3px; border-radius: 3px;
	background: linear-gradient(90deg, var(--md-orange-2), var(--md-orange)); translate: -50% 0;
	transition: width .45s var(--md-ease);
}
.md-card:hover::after { width: 140px; }

/* ===================== Trabajos (carrusel) ===================== */
.md-works { padding-top: 40px; }
.md-carousel-wrap { position: relative; max-width: var(--md-wrap); margin: 0 auto; }
.wp-block-gallery.md-carousel.has-nested-images {
	display: flex; flex-wrap: nowrap !important; gap: 18px; margin: 0;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	padding: 6px 2px 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wp-block-gallery.md-carousel::-webkit-scrollbar { display: none; }
.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image:not(#individual-image) {
	flex: 0 0 calc((100% - 54px) / 4); width: auto; max-width: none; margin: 0;
	scroll-snap-align: start; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 2;
	box-shadow: var(--md-shadow); cursor: zoom-in;
}
.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image img {
	width: 100%; height: 100% !important; object-fit: cover; transition: transform 1s var(--md-ease);
}
.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image::after {
	content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
	background: linear-gradient(180deg, rgba(92, 22, 166, 0) 40%, rgba(92, 22, 166, .55));
}
.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image:hover img { transform: scale(1.08); }
.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image:hover::after { opacity: 1; }

.md-car-btn {
	position: absolute; top: calc(50% - 32px); z-index: 3; width: 48px; height: 48px; border-radius: 50%;
	border: 0; background: #fff; color: var(--md-purple); display: grid; place-items: center; cursor: pointer;
	box-shadow: 0 10px 24px -8px rgba(20, 32, 79, .4); transition: transform .3s var(--md-ease), background .3s, color .3s;
}
.md-car-btn:hover { background: var(--md-purple); color: #fff; transform: scale(1.08); }
.md-car-prev { left: -22px; }
.md-car-next { right: -22px; }
.md-car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.md-car-dots button {
	width: 10px; height: 10px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
	background: var(--md-lav-2); transition: width .35s var(--md-ease), background .35s;
}
.md-car-dots button[aria-current="true"] { width: 26px; background: var(--md-purple); }

/* Visor de imágenes */
.md-lightbox {
	position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
	background: rgba(15, 25, 64, .88); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.md-lightbox.is-open { opacity: 1; visibility: visible; }
.md-lightbox img { max-height: 86vh; width: auto; border-radius: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); transform: scale(.94); transition: transform .45s var(--md-ease); }
.md-lightbox.is-open img { transform: none; }
.md-lightbox button {
	position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border: 0; border-radius: 50%;
	background: #fff; color: var(--md-navy); font-size: 28px; line-height: 1; cursor: pointer;
}

/* ===================== Franja de ventajas ===================== */
.md-features-band { background: var(--md-lav); padding: 22px 24px; margin: 30px 0 0; }
.wp-block-columns.md-features {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
	max-width: var(--md-wrap); margin: 0 auto;
}
.md-feat { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 12px; }
.md-feat + .md-feat { border-left: 1px solid rgba(123, 44, 191, .22); }
.md-feat::before {
	content: ""; flex: 0 0 44px; height: 44px; background: center / contain no-repeat;
	transition: transform .5s var(--md-ease);
}
.md-feat:hover::before { transform: translateY(-4px) rotate(-6deg); }
.md-ico-check::before { background-image: url(assets/icons/check.svg); }
.md-ico-clipboard::before { background-image: url(assets/icons/clipboard.svg); }
.md-ico-handshake::before { background-image: url(assets/icons/handshake.svg); }
.md-ico-pin::before { background-image: url(assets/icons/pin.svg); }
.md-feat p { margin: 0; color: var(--md-navy); font-weight: 600; line-height: 1.2; font-size: 1.02rem; }

/* ===================== Sobre nosotros ===================== */
.wp-block-columns.md-about-grid {
	display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; margin: 0 auto;
}
.md-about-media { position: relative; }
.md-about-media::before {
	content: ""; position: absolute; inset: 22px -18px -18px 22px; border-radius: 26px;
	background: linear-gradient(135deg, var(--md-purple-2), var(--md-purple-d)); opacity: .9; z-index: 0;
}
.md-about-media::after {
	content: ""; position: absolute; left: -26px; top: -26px; width: 86px; height: 86px; z-index: 2;
	background: url(assets/deco/flower.svg) center / contain no-repeat;
	animation: md-spin 22s linear infinite;
}
.md-about-media .wp-block-image { position: relative; z-index: 1; margin: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--md-shadow); }
.md-about-media .wp-block-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.md-about-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.md-about-text p { color: var(--md-muted); }
ul.md-checks { list-style: none; padding: 0; margin: 1.2em 0 1.8em; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
ul.md-checks li { position: relative; padding-left: 32px; color: var(--md-navy); font-weight: 500; }
ul.md-checks li::before {
	content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
	background: var(--md-lav) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b2cbf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ===================== Contacto ===================== */
.md-contact { background: linear-gradient(180deg, #fff 0%, var(--md-lav) 100%); padding-bottom: 44px; }
.wp-block-columns.md-contact-grid {
	display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 4vw, 48px); align-items: start; margin: 0 auto;
}
.md-contact-info {
	align-self: start; background: #fff; border-radius: 22px; padding: 34px 30px; box-shadow: var(--md-shadow);
	border-top: 4px solid var(--md-purple);
}
.md-contact-info h3 { font-size: 1.6rem; }
.md-contact-info > p { color: var(--md-muted); }
p.md-ci { position: relative; padding-left: 62px; min-height: 48px; margin: 0 0 18px; color: var(--md-navy); line-height: 1.35; }
p.md-ci strong { display: inline-block; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--md-muted); font-weight: 600; }
p.md-ci a { color: var(--md-navy); font-weight: 600; font-size: 1.12rem; text-decoration: none; }
p.md-ci a:hover { color: var(--md-purple); }
p.md-ci::before {
	content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 14px;
	background: var(--md-lav) center / 22px no-repeat;
}
.md-ci-phone::before { background-image: url(assets/icons/phone.svg) !important; }
.md-ci-wa::before { background-image: url(assets/icons/whatsapp.svg) !important; background-size: 24px !important; }
.md-ci-pin::before { background-image: url(assets/icons/pin.svg) !important; }
.md-ci-mail::before { background-image: url(assets/icons/mail.svg) !important; }
.md-ci-clock::before { background-image: url(assets/icons/clock.svg) !important; }

.md-form-card { background: #fff; border-radius: 22px; padding: 34px 30px; box-shadow: var(--md-shadow); }
.md-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.md-field { margin: 0 0 16px; }
.md-field--full { grid-column: 1 / -1; }
.md-field label { display: block; font-size: .9rem; font-weight: 600; color: var(--md-navy); margin-bottom: 6px; }
.md-field input, .md-field select, .md-field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--md-navy); background: #fcfaff;
	border: 1.5px solid #e4d8f3; border-radius: 12px; padding: 13px 14px;
	transition: border-color .25s, box-shadow .25s, background .25s;
}
.md-field textarea { resize: vertical; min-height: 120px; }
.md-field input:focus, .md-field select:focus, .md-field textarea:focus {
	outline: none; border-color: var(--md-purple); background: #fff; box-shadow: 0 0 0 4px rgba(123, 44, 191, .14);
}
.md-form__hint { font-size: .86rem; color: var(--md-muted); margin: -4px 0 10px; }
.md-form__hint.is-error { color: #9b1c1c; font-weight: 600; }
.md-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--md-muted); margin: 4px 0 20px; }
.md-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--md-purple); flex: 0 0 auto; }
.md-submit {
	display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
	font: inherit; font-weight: 600; font-size: 1.08rem; padding: 16px 30px; border-radius: 14px;
	transition: transform .3s var(--md-ease), box-shadow .3s, background-position .5s;
}
.md-submit:hover { transform: translateY(-3px); }
.md-form__note { font-size: .88rem; color: var(--md-muted); margin: 14px 0 0; }
.md-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.md-alert { padding: 14px 16px; border-radius: 12px; font-weight: 500; margin-bottom: 20px; }
.md-alert--ok { background: #e8f8ee; color: #136c34; border: 1px solid #b9e6c8; }
.md-alert--err { background: #fdecec; color: #9b1c1c; border: 1px solid #f5c2c2; }

/* WhatsApp flotante */
.md-wa-float.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility 0s .3s; }
.md-wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
	background: #25d366; box-shadow: 0 12px 26px -8px rgba(37, 211, 102, .7); display: grid; place-items: center;
	transition: transform .35s var(--md-ease);
	animation: md-pop .6s 1.6s var(--md-ease) both;
}
.md-wa-float span {
	width: 30px; height: 30px; background: #fff;
	-webkit-mask: url(assets/icons/whatsapp-mono.svg) center / contain no-repeat; mask: url(assets/icons/whatsapp-mono.svg) center / contain no-repeat;
}
.md-wa-float::before {
	content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366;
	animation: md-ring 2.6s 2.4s ease-out infinite;
}
.md-wa-float:hover { transform: scale(1.08) rotate(-6deg); }

/* ===================== Páginas interiores ===================== */
.md-page-hero {
	position: relative; overflow: hidden; text-align: center; padding: 64px 24px 46px;
	background: linear-gradient(180deg, var(--md-lav), #fff);
}
.md-page-hero::before, .md-page-hero::after {
	content: ""; position: absolute; width: 230px; height: 170px; background: url(assets/deco/branch.svg) center / contain no-repeat; opacity: .25;
}
.md-page-hero::before { top: -20px; right: -30px; }
.md-page-hero::after { bottom: -40px; left: -30px; scale: -1 -1; }
.md-page-hero .md-title { position: relative; margin: 0; }
.md-content { max-width: 860px; margin: 0 auto; padding: 30px 24px 80px; }
.md-content h2 { margin-top: 1.4em; font-size: 1.6rem; }
.md-post { padding: 24px 0; border-bottom: 1px solid var(--md-lav-2); }
.md-post h2 { margin-top: 0; }
.md-post h2 a { color: var(--md-navy); text-decoration: none; }

/* ===================== Animaciones al hacer scroll ===================== */
html.js .md-reveal {
	opacity: 0; transform: translate3d(0, 34px, 0);
	transition: opacity .9s ease, transform 1s var(--md-ease);
	transition-delay: var(--d, 0s);
}
html.js .md-reveal--left { transform: translate3d(-46px, 0, 0); }
html.js .md-reveal--right { transform: translate3d(46px, 0, 0); }
html.js .md-reveal--zoom { transform: scale(.93); }
html.js .md-reveal.is-in { opacity: 1; transform: none; }

@keyframes md-up { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
@keyframes md-draw { to { clip-path: inset(0 0 0 0); } }
@keyframes md-kenburns { from { transform: scale(1.09); } to { transform: scale(1); } }
@keyframes md-fall {
	0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
	10% { opacity: .9; }
	85% { opacity: .85; }
	100% { opacity: 0; transform: translate3d(var(--x, -120px), var(--h, 700px), 0) rotate(var(--r, 360deg)); }
}
@keyframes md-sway { from { rotate: -2.5deg; } to { rotate: 2.5deg; } }
@keyframes md-spin { to { rotate: 360deg; } }
@keyframes md-roll { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-14px, 8px) rotate(-5deg); } }
@keyframes md-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes md-ring { 0% { opacity: .8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.6); } }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
	.wp-block-columns.md-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image:not(#individual-image) { flex-basis: calc((100% - 36px) / 3); }
	.md-car-prev { left: 6px; }
	.md-car-next { right: 6px; }
}

@media (max-width: 900px) {
	:root { --md-head: 80px; }
	.md-header__in { height: var(--md-head); }
	.md-brand .custom-logo { height: 64px; }
	.md-header.is-scrolled .md-brand .custom-logo { height: 52px; }
	.md-header.is-scrolled .md-header__in { height: 66px; }
	.md-burger { display: block; }
	.md-nav {
		position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: #fff;
		padding: 18px 24px 30px; box-shadow: 0 24px 40px -20px rgba(20, 32, 79, .35);
		clip-path: inset(0 0 100% 0); visibility: hidden;
		transition: clip-path .5s var(--md-ease), visibility 0s .5s;
	}
	.md-nav.is-open { clip-path: inset(0 0 -60px 0); visibility: visible; transition: clip-path .5s var(--md-ease), visibility 0s; }
	.md-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.md-menu li { border-bottom: 1px solid var(--md-lav-2); opacity: 0; transform: translateY(-8px); transition: opacity .35s, transform .35s var(--md-ease); }
	.md-nav.is-open .md-menu li { opacity: 1; transform: none; }
	.md-nav.is-open .md-menu li:nth-child(2) { transition-delay: .05s; }
	.md-nav.is-open .md-menu li:nth-child(3) { transition-delay: .1s; }
	.md-nav.is-open .md-menu li:nth-child(4) { transition-delay: .15s; }
	.md-nav.is-open .md-menu li:nth-child(5) { transition-delay: .2s; }
	.md-menu a { padding: 15px 4px; font-size: 1.2rem; }
	.md-menu a::after { display: none; }
	.md-nav__call {
		display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; padding: 15px;
		border-radius: 14px; color: #fff; font-weight: 600; text-decoration: none;
		background: linear-gradient(135deg, var(--md-purple-2), var(--md-purple-d));
	}
	.md-nav__call:hover { color: #fff; }

	.wp-block-cover.md-hero { min-height: 0 !important; padding: 44px 22px 250px; align-items: flex-start; }
	.md-hero .wp-block-cover__image-background { object-position: 78% 50%; }
	.md-hero .wp-block-cover__background.has-background-dim {
		background: linear-gradient(180deg, rgba(244, 249, 255, .9) 0%, rgba(244, 249, 255, .75) 42%, rgba(255, 255, 255, 0) 70%) !important;
	}
	.wp-block-columns.md-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
	.md-feat { justify-content: flex-start; }
	.md-feat:nth-child(3) { border-left: 0; }
	.wp-block-columns.md-about-grid, .wp-block-columns.md-contact-grid { grid-template-columns: 1fr; }
	.md-about-media { max-width: 560px; margin: 0 auto 10px; width: 100%; }
}

@media (max-width: 782px) {
	.admin-bar .md-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .md-header { top: 0; }
	body { font-size: 16px; }
	.md-section { padding: 48px 18px; }
	.md-contact { padding-bottom: 32px; }
	.wp-block-cover.md-hero { padding: 36px 18px 220px; }
	.md-hero-btns { flex-direction: column; align-items: stretch; }
	.md-hero-btns .wp-block-button, .md-hero-btns .wp-block-button__link { width: 100%; }
	.md-btn-primary .wp-block-button__link { padding-block: 17px; }
	.md-btn-wa .wp-block-button__link { text-align: left; }
	.md-title::before, .md-title::after { flex-basis: 36px; }
	.wp-block-columns.md-cards { grid-template-columns: 1fr; gap: 26px; }
	.wp-block-gallery.md-carousel.has-nested-images figure.wp-block-image:not(#individual-image) { flex-basis: 84%; }
	.md-car-btn { width: 40px; height: 40px; top: calc(50% - 28px); }
	.md-features-band { padding: 20px 18px; }
	.md-feat { padding: 4px 8px; gap: 10px; }
	.md-feat::before { flex-basis: 34px; height: 34px; }
	.md-feat p { font-size: .92rem; }
	ul.md-checks { grid-template-columns: 1fr; }
	.md-form__grid { grid-template-columns: 1fr; }
	.md-form-card, .md-contact-info { padding: 26px 20px; }
	.md-submit { width: 100%; justify-content: center; }
	.md-services::before, .md-contact::before, .md-works::after, .md-about::before { display: none; }
	.md-wa-float { width: 54px; height: 54px; right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html.js .md-reveal { opacity: 1; transform: none; }
	.md-hero-title::after { clip-path: none; }
	.md-petals { display: none; }
}

/* ===================== Selector de idioma (ES / EN / DE) ===================== */
.md-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.md-lang { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 3px; border-radius: 999px; background: var(--md-lav); }
.md-lang a {
	display: block; min-width: 38px; padding: 6px 9px; border-radius: 999px; text-align: center;
	font-size: .82rem; font-weight: 600; letter-spacing: .06em; line-height: 1.2; color: var(--md-navy); text-decoration: none;
	transition: background .3s, color .3s;
}
.md-lang a:hover { color: var(--md-purple); background: #fff; }
.md-lang .is-current a { color: #fff; background: linear-gradient(135deg, var(--md-purple-2), var(--md-purple-d)); }
@media (max-width: 900px) {
	.md-nav { display: block; }
	.md-lang { justify-content: center; width: max-content; margin: 18px auto 0; padding: 4px; }
	.md-lang a { min-width: 54px; padding: 10px 12px; font-size: .95rem; }
}

/* Evita desplazamiento horizontal por los adornos del pie (no cambia el diseño) */
.mdf { overflow-x: clip; }

/* Información básica de protección de datos del formulario */
.md-form__legal { margin: 4px 0 10px; font-size: .8rem; line-height: 1.45; color: var(--md-muted); }
.md-form__legal a { color: var(--md-purple); }
