/* ==========================================================
   Academia Más Estética · capa interactiva y acabados premium
   ========================================================== */

/* ---------- Pantalla de carga ---------- */
.mas-loader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	transition: opacity .6s var(--mas-ease), visibility .6s;
	animation: mas-loader-out .6s 2.6s forwards; /* respaldo si el JS no carga */
}
.mas-loader img { width: 170px; height: auto; animation: mas-breathe 1.6s ease-in-out infinite; position: relative; z-index: 1; }
.mas-loader__ring {
	position: absolute;
	width: 230px;
	height: 230px;
	border-radius: 50%;
	border: 2px solid var(--mas-mist);
	border-top-color: var(--mas-teal);
	border-right-color: var(--mas-gold);
	animation: mas-spin 1s linear infinite;
}
.mas-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes mas-spin { to { transform: rotate(360deg); } }
@keyframes mas-breathe { 50% { transform: scale(.94); opacity: .75; } }
@keyframes mas-loader-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ---------- Hero: luces, texto dorado animado, palabras rotativas ---------- */
.mas-blobs { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.mas-blobs span {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .45;
	mix-blend-mode: screen;
	animation: mas-drift 18s ease-in-out infinite;
}
.mas-blobs span:nth-child(1) { width: 420px; height: 420px; background: var(--mas-teal); top: -120px; left: 35%; }
.mas-blobs span:nth-child(2) { width: 360px; height: 360px; background: var(--mas-gold); bottom: -160px; right: 8%; animation-delay: -6s; opacity: .3; }
.mas-blobs span:nth-child(3) { width: 300px; height: 300px; background: #3B7FB8; top: 30%; left: -100px; animation-delay: -12s; }
@keyframes mas-drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(60px, 40px) scale(1.1); }
	66% { transform: translate(-40px, 30px) scale(.9); }
}
.mas-hero .elementor-heading-title em {
	background: linear-gradient(100deg, #CCB48E 0%, #F3E6CC 25%, #CCB48E 50%, #9FD8D6 75%, #CCB48E 100%);
	background-size: 250% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: mas-shine 7s linear infinite;
	padding-right: .08em;
}
@keyframes mas-shine { to { background-position: 250% center; } }
.mas-rotate.is-typing::after {
	content: "";
	display: inline-block;
	width: 3px;
	height: .85em;
	margin-left: 4px;
	vertical-align: -.05em;
	background: var(--mas-gold);
	animation: mas-blink 1s steps(1) infinite;
}
.mas-scroll-hint {
	position: absolute;
	left: 50%;
	bottom: 28px;
	z-index: 3;
	width: 28px;
	height: 46px;
	margin-left: -14px;
	border: 2px solid rgba(255, 255, 255, .6);
	border-radius: 20px;
	transition: border-color .3s;
}
.mas-scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px; border-radius: 4px; background: var(--mas-gold); animation: mas-scroll 1.8s ease-in-out infinite; }
.mas-scroll-hint:hover { border-color: var(--mas-gold); }
@keyframes mas-scroll { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 767px) { .mas-scroll-hint { display: none; } }
.mas-glass { transition: transform .5s var(--mas-ease); transform-style: preserve-3d; will-change: transform; }

/* ---------- Tarjetas 3D con brillo ---------- */
.mas-card, .mas-cat, .mas-step { position: relative; transform-style: preserve-3d; }
.mas-card.is-tilt { transform: perspective(1000px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-10px); transition: transform .12s linear, box-shadow .5s; }
.mas-cat.is-tilt, .mas-step.is-tilt { transform: perspective(1000px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .12s linear; }
.mas-feature.is-tilt { transform: perspective(1000px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-10px); transition: transform .12s linear, box-shadow .45s; }
.mas-card::after, .mas-feature::before, .mas-step::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 180, 177, .13), transparent 45%);
	opacity: 0;
	transition: opacity .4s;
	pointer-events: none;
	z-index: 2;
}
.mas-card.is-tilt::after, .mas-feature.is-tilt::before, .mas-step.is-tilt::after { opacity: 1; }
.mas-cat::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .18), transparent 45%);
	opacity: 0;
	transition: opacity .4s;
	pointer-events: none;
}
.mas-cat.is-tilt::after { opacity: 1; }

/* Pie de la tarjeta de curso con dos botones */
.mas-card__foot { align-items: flex-end; }
.mas-card__cuotas { font-size: 12px; font-weight: 600; color: var(--mas-teal); background: rgba(37, 180, 177, .1); padding: 6px 10px; border-radius: 20px; }
.mas-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
body .mas-card__wa {
	width: auto;
	height: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 14px;
	border-radius: 40px;
	background: var(--mas-wa);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 10px 22px -12px rgba(37, 211, 102, .9);
	transition: transform .3s var(--mas-ease), background .3s;
}
body .mas-card__wa i { font-size: 18px; }
body .mas-card__wa:hover { background: #1EBE5A; color: #fff; transform: translateY(-2px); }
.mas-card__more { justify-content: center; padding: 12px 14px; }

/* Insignia de estado más visible */
.mas-card__badge { backdrop-filter: blur(6px); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }

/* ---------- Revelado de imágenes ---------- */
.mas-img-reveal:not(.is-revealed) { clip-path: inset(0 0 100% 0); }
.mas-img-reveal.is-revealed { animation: mas-reveal 1.2s var(--mas-ease) both; }
@keyframes mas-reveal {
	from { clip-path: inset(0 0 100% 0); }
	to { clip-path: inset(0 0 0 0); }
}

/* ---------- Test "Encuentra tu curso ideal" ---------- */
.mas-quiz {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	padding: 44px;
	border-radius: 28px;
	background: #fff;
	box-shadow: var(--mas-shadow-lg);
	overflow: hidden;
}
.mas-quiz::before {
	content: "";
	position: absolute;
	width: 340px;
	height: 340px;
	right: -140px;
	top: -160px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(37, 180, 177, .18), transparent 70%);
	pointer-events: none;
}
.mas-quiz__bar { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--mas-mist); }
.mas-quiz__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mas-teal), var(--mas-gold)); transition: width .6s var(--mas-ease); }
.mas-quiz__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; min-height: 34px; }
.mas-quiz__step { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mas-gold); }
.mas-quiz__step b { color: var(--mas-teal); }
body .mas-quiz__back { border: 0; background: none; padding: 6px 0; color: var(--mas-navy); font-size: 14px; font-weight: 600; cursor: pointer; }
body .mas-quiz__back:hover, body .mas-quiz__back:focus { background: none; color: var(--mas-teal); }
.mas-quiz__panel { display: none; }
.mas-quiz__panel.is-active { display: block; animation: mas-quiz-in .5s var(--mas-ease); }
@keyframes mas-quiz-in { from { opacity: 0; transform: translateX(24px); } }
.mas-quiz__panel h3 { margin: 0 0 24px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: var(--mas-navy); line-height: 1.25; }
.mas-quiz__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
body .mas-quiz__opt {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 18px 20px;
	border: 1.5px solid #E2E8EE;
	border-radius: 16px;
	background: #FAFCFD;
	color: var(--mas-ink);
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	white-space: normal;
	line-height: 1.4;
	cursor: pointer;
	transition: transform .3s var(--mas-ease), border-color .3s, box-shadow .3s, background .3s;
}
body .mas-quiz__opt i {
	flex: 0 0 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--mas-mist);
	color: var(--mas-teal);
	font-size: 19px;
	transition: background .3s, color .3s, transform .4s var(--mas-ease);
}
body .mas-quiz__opt:hover, body .mas-quiz__opt:focus { transform: translateY(-3px); border-color: var(--mas-teal); background: #fff; color: var(--mas-ink); box-shadow: 0 14px 30px -18px rgba(16, 39, 61, .5); }
body .mas-quiz__opt:hover i { transform: rotate(-8deg) scale(1.08); }
body .mas-quiz__opt.is-picked { border-color: var(--mas-teal); background: var(--mas-teal); color: #fff; }
body .mas-quiz__opt.is-picked i { background: rgba(255, 255, 255, .2); color: #fff; }
.mas-quiz__match { display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: center; }
.mas-quiz__match img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: var(--mas-shadow); }
.mas-quiz__tag { display: inline-flex; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 30px; background: rgba(204, 180, 142, .18); color: #8A6F43; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mas-quiz__match h3 { margin: 14px 0 8px; font-size: 28px; color: var(--mas-navy); line-height: 1.2; }
.mas-quiz__match p { margin: 0 0 14px; }
.mas-quiz__match ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 500; color: var(--mas-ink); }
.mas-quiz__match ul i { color: var(--mas-teal); margin-right: 7px; }
.mas-quiz__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.mas-quiz__go { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 40px; background: var(--mas-navy); color: #fff !important; font-weight: 600; font-size: 14.5px; text-decoration: none; transition: transform .3s var(--mas-ease), background .3s; }
.mas-quiz__go:hover { transform: translateY(-2px); background: var(--mas-teal); }
.mas-quiz__go.is-wa { background: var(--mas-wa); }
.mas-quiz__go.is-wa:hover { background: #1EBE5A; }
body .mas-quiz__restart { margin-top: 16px; padding: 0; border: 0; background: none; color: var(--mas-text); font-size: 13px; cursor: pointer; }
body .mas-quiz__restart:hover, body .mas-quiz__restart:focus { background: none; color: var(--mas-teal); }
@media (max-width: 767px) {
	.mas-quiz { padding: 32px 20px; border-radius: 22px; }
	.mas-quiz__match { grid-template-columns: 1fr; gap: 20px; }
	.mas-quiz__match img { aspect-ratio: 16 / 10; }
}

/* ---------- Pasos de inscripción ---------- */
.mas-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: paso; position: relative; }
.mas-steps::before {
	content: "";
	position: absolute;
	top: 64px;
	left: 12%;
	right: 12%;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--mas-gold) 0 10px, transparent 10px 20px);
	opacity: .6;
}
.mas-step {
	padding: 34px 26px 30px;
	border-radius: 22px;
	background: #fff;
	box-shadow: var(--mas-shadow);
	text-align: center;
	transition: transform .45s var(--mas-ease), box-shadow .45s;
}
.mas-step:hover { box-shadow: var(--mas-shadow-lg); }
.mas-step__num { position: absolute; top: 16px; right: 20px; font-size: 38px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--mas-gold); opacity: .7; }
.mas-step__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--mas-teal), var(--mas-navy));
	color: #fff;
	font-size: 24px;
	box-shadow: 0 0 0 8px #fff, 0 0 0 9px rgba(37, 180, 177, .25);
	transition: transform .5s var(--mas-ease);
}
.mas-step:hover .mas-step__icon { transform: rotate(-10deg) scale(1.08); }
.mas-step h3 { margin: 0 0 8px; font-size: 19px; color: var(--mas-navy); }
.mas-step p { margin: 0; font-size: 14.5px; line-height: 1.65; }
@media (max-width: 1024px) { .mas-steps { grid-template-columns: repeat(2, 1fr); } .mas-steps::before { display: none; } }
@media (max-width: 600px) { .mas-steps { grid-template-columns: 1fr; } }

/* ---------- Barra fija del curso ---------- */
.mas-coursebar {
	position: fixed;
	left: 50%;
	bottom: 20px;
	z-index: 993;
	width: min(860px, calc(100% - 32px));
	transform: translate(-50%, 140%);
	transition: transform .55s var(--mas-ease);
}
.mas-coursebar.is-visible { transform: translate(-50%, 0); }
.mas-coursebar__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 10px 10px 12px;
	border-radius: 60px;
	background: rgba(11, 46, 76, .94);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 20px 50px -15px rgba(11, 46, 76, .6);
	border: 1px solid rgba(255, 255, 255, .12);
}
.mas-coursebar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--mas-gold); }
.mas-coursebar__info { flex: 1; min-width: 0; color: #fff; line-height: 1.3; }
.mas-coursebar__info strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mas-coursebar__info span { font-size: 12.5px; color: var(--mas-gold); }
.mas-coursebar__btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 40px; background: var(--mas-teal); color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: transform .3s var(--mas-ease), background .3s; }
.mas-coursebar__btn:hover { transform: translateY(-2px); background: var(--mas-teal-dark); }
.mas-coursebar__btn.is-wa { background: var(--mas-wa); }
.mas-coursebar__btn.is-wa:hover { background: #1EBE5A; }
.mas-coursebar__btn i { font-size: 17px; }
body.mas-has-coursebar .mas-wa { bottom: 104px; }
body.mas-has-coursebar .mas-top { bottom: 184px; }
.mas-wa, .mas-top { transition: bottom .5s var(--mas-ease), opacity .4s, transform .4s, visibility .4s; }
@media (max-width: 767px) {
	.mas-coursebar { bottom: 10px; width: calc(100% - 20px); }
	.mas-coursebar img { display: none; }
	.mas-coursebar__info strong { font-size: 13.5px; }
	.mas-coursebar__btn { padding: 12px 14px; }
	.mas-coursebar__btn span { display: none; }
	body.mas-has-coursebar .mas-wa { bottom: 90px; }
	body.mas-has-coursebar .mas-top { bottom: 160px; }
}

/* ---------- Volver arriba con anillo de progreso ---------- */
body button.mas-top { overflow: visible; }
.mas-top svg { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.mas-top circle { fill: none; stroke: var(--mas-gold); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset .15s linear; }

/* ---------- Detalles generales ---------- */
.mas-accordion .elementor-tab-title { cursor: pointer; transition: background .3s, padding .3s; }
.mas-accordion .elementor-tab-title:not(.elementor-active):hover { background: var(--mas-mist); padding-left: 30px !important; }
.mas-faq .mas-accordion .elementor-accordion-item { box-shadow: 0 8px 24px -18px rgba(16, 39, 61, .45); }
.mas-eyebrow .elementor-heading-title::before { transition: width .6s var(--mas-ease); }
.elementor-widget:hover > .elementor-widget-container .elementor-heading-title::before { width: 40px; }
@media (prefers-reduced-motion: reduce) {
	.mas-blobs, .mas-scroll-hint, .mas-marquee__track, .mas-hero .elementor-heading-title em { animation: none !important; }
	.mas-img-reveal { clip-path: none !important; }
}

/* Prioridad sobre el color de enlaces del kit y el reset de botones del tema */
body a.mas-card__wa, body a.mas-card__wa:hover { color: #fff; }
body a.mas-card__more, body a.mas-card__more:hover { color: #fff; }
body .mas-quiz__back[hidden] { display: none; }
