/*
 * Dra. Camila Rojido — estilos base del tema.
 *
 * Solo contiene lo que Elementor no gestiona: reset, accesibilidad,
 * plantillas de respaldo y las clases de animación opcionales
 * (se aplican en Elementor → Avanzado → Clases CSS).
 */

:root {
	--cr-brown: #554839;
	--cr-taupe: #b2967d;
	--cr-taupe-text: #866b55;
	--cr-beige: #e7d8c9;
	--cr-pink: #efbab3;
	--cr-blush: #fcefed;
	--cr-white: #fafafa;
	--cr-ease: cubic-bezier(.2, .7, .2, 1);
	--cr-serif: "Playfair Display", Georgia, serif;
	--cr-sans: "Poppins", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--cr-white);
	color: var(--cr-brown);
	font-family: var(--cr-sans);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip; /* Los gráficos decorativos que sobresalen nunca generan scroll lateral. */
}

img,
svg,
video { max-width: 100%; height: auto; }

a { color: inherit; }

::selection { background: var(--cr-pink); color: var(--cr-brown); }

:focus-visible { outline: 2px solid var(--cr-taupe); outline-offset: 3px; }

/* Imagen con enlace: el enlace ocupa el ancho del widget para que "Ancho 100 %" se aplique a la imagen. */
.elementor .elementor-widget-image > a,
.elementor .elementor-widget-image .elementor-widget-container > a { display: block; }

/* Palabras en cursiva dentro de los títulos ("Naturalidad con <em>carácter</em>"). */
.elementor-heading-title em,
.elementor-heading-title i { font-style: italic; font-weight: inherit; }

/* Accesibilidad */
.cr-sr-only,
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.cr-skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	padding: 12px 20px; background: var(--cr-brown); color: var(--cr-white);
	font-size: 14px; text-decoration: none; transition: top .2s;
}
.cr-skip-link:focus { top: 16px; }

/* Cabecera fija: aplica tanto a la del Theme Builder como a la de respaldo. */
.cr-site-header,
.elementor-location-header {
	position: sticky; top: 0; z-index: 100;
	transition: box-shadow .4s var(--cr-ease);
}
.admin-bar .cr-site-header,
.admin-bar .elementor-location-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .cr-site-header,
	.admin-bar .elementor-location-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .cr-site-header,
	.admin-bar .elementor-location-header { top: 0; }
}
.cr-site-header.is-scrolled,
.elementor-location-header.is-scrolled { box-shadow: 0 1px 0 rgba(85, 72, 57, .1); }

/* ---------------------------------------------------------------
 * Clases de animación (Elementor → Avanzado → Clases CSS)
 *   cr-reveal   revelado de imagen con cortinilla al entrar en pantalla
 *   cr-zoom     zoom suave de la imagen al pasar el ratón
 *   cr-link     botón convertido en enlace con subrayado animado
 *   cr-card     contenedor tarjeta: hace zoom en su imagen .cr-zoom
 *   cr-float    flotación lenta (para gráficos de órbita)
 * ------------------------------------------------------------- */

.cr-js .cr-reveal img {
	clip-path: inset(0 0 100% 0);
	transform: scale(1.08);
	transition: clip-path 1.4s var(--cr-ease), transform 1.8s var(--cr-ease);
}
.cr-js .cr-reveal.is-inview img { clip-path: inset(0 0 0 0); transform: none; }

.cr-zoom,
.cr-zoom .elementor-widget-container { overflow: hidden; }
.cr-zoom img { transition: transform 1.2s var(--cr-ease); }
.cr-zoom:hover img,
.cr-card:hover .cr-zoom img,
.cr-card:focus-within .cr-zoom img { transform: scale(1.045); }
.cr-js .cr-reveal.cr-zoom.is-inview:hover img,
.cr-card:hover .cr-reveal.cr-zoom.is-inview img { transform: scale(1.045); }

.cr-link .elementor-button {
	position: relative;
	background: transparent !important;
	padding-left: 0 !important; padding-right: 0 !important;
	border-radius: 0 !important;
}
.cr-link .elementor-button::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 6px;
	height: 1px; background: currentColor;
	transform-origin: right; transition: transform .6s var(--cr-ease);
}
.cr-link .elementor-button:hover::after,
.cr-link .elementor-button:focus-visible::after { transform: scaleX(0); }

/* Toda la tarjeta es clicable: el enlace del título se estira sobre ella. */
.cr-card { position: relative; cursor: pointer; }
.cr-card .elementor-heading-title a::before { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Cinta en movimiento: el texto del widget se desplaza en bucle (debe estar escrito dos veces). */
.cr-marquee { width: 100%; overflow: hidden; }
.cr-marquee p {
	display: inline-block; margin: 0; white-space: nowrap; padding-right: 0;
	animation: cr-marquee 45s linear infinite;
}
.cr-marquee span { display: inline-block; margin: 0 .6em; font-size: .7em; vertical-align: middle; color: var(--cr-taupe); }
.cr-marquee:hover p { animation-play-state: paused; }
@keyframes cr-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.elementor-editor-active .cr-marquee p { animation: none; }

@keyframes cr-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(2deg); } }
.cr-float img { animation: cr-float 9s ease-in-out infinite; }

/* En el editor de Elementor todo se ve sin esperar al scroll. */
.elementor-editor-active .cr-reveal img { clip-path: none !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.cr-js .cr-reveal img { clip-path: none; transform: none; }
	.elementor-invisible { visibility: visible !important; }
}

/* ---------------------------------------------------------------
 * Plantillas de respaldo (blog, entradas sin Elementor, 404)
 * ------------------------------------------------------------- */

.cr-wrap { width: min(1320px, 100% - 32px); margin-inline: auto; }

.cr-overline {
	margin: 0 0 16px; color: var(--cr-taupe-text);
	font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
}

.cr-entry { max-width: 760px; padding: 96px 0; }
.cr-entry__title,
.cr-archive__title,
.cr-404__title { font-family: var(--cr-serif); font-weight: 400; line-height: 1.1; font-size: clamp(36px, 5vw, 60px); margin: 0 0 24px; }
.cr-entry__meta { color: var(--cr-taupe-text); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.cr-entry__media { margin: 0 0 40px; }
.cr-entry__content h2,
.cr-entry__content h3 { font-family: var(--cr-serif); font-weight: 400; line-height: 1.2; }

.cr-archive { padding: 96px 0; }
.cr-archive__grid { display: grid; gap: 48px 32px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cr-card__link { display: block; text-decoration: none; }
.cr-card__media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; display: block; }
.cr-card__meta { display: block; margin-top: 16px; color: var(--cr-taupe-text); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.cr-card__title { font-family: var(--cr-serif); font-weight: 400; font-size: 24px; line-height: 1.25; margin: 8px 0; }

.cr-404 { padding: 140px 0; text-align: center; }

/* Lista con marcas ✓ (candidatos de cada tratamiento) */
.cr-check-list { list-style: none; margin: 0 0 1.5em; padding: 0; }
.cr-check-list li { position: relative; padding: 14px 0 14px 36px; border-top: 1px solid var(--cr-beige); }
.cr-check-list li::before {
	content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 7px;
	border-left: 1.5px solid var(--cr-taupe); border-bottom: 1.5px solid var(--cr-taupe); transform: rotate(-45deg);
}

/* Ficha de tratamiento (sin plantilla de Elementor Pro) */
.cr-treatment__hero { background: var(--cr-beige); padding: 88px 0; }
.cr-treatment__hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.cr-treatment__title { font-family: var(--cr-serif); font-weight: 400; font-size: clamp(40px, 5.5vw, 72px); line-height: 1.05; margin: 0 0 24px; }
.cr-treatment__lead { font-size: 18px; max-width: 520px; margin: 0 0 36px; }
.cr-treatment__media { margin: 0; justify-self: end; width: min(100%, 460px); }
.cr-treatment__media img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 400px 400px 0 0; }
.cr-treatment__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 96px; padding: 110px 0; align-items: start; }
.cr-treatment__body .cr-entry__content { font-size: 17px; }
.cr-treatment__body h2 { font-family: var(--cr-serif); font-weight: 400; font-size: 34px; line-height: 1.2; margin: 56px 0 20px; }
.cr-treatment__aside { position: sticky; top: 130px; padding: 36px; background: var(--cr-blush); }
.cr-treatment__aside p { margin: 0 0 24px; }
.cr-treatment__related { padding: 0 0 120px; }
.cr-treatment__related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; list-style: none; margin: 24px 0 0; padding: 0; }
.cr-treatment__related-list a { display: block; padding-top: 24px; border-top: 1px solid var(--cr-taupe); text-decoration: none; }
.cr-treatment__related-title { display: block; font-family: var(--cr-serif); font-size: 24px; line-height: 1.25; margin-bottom: 8px; }
.cr-treatment__related-text { display: block; font-size: 14px; font-weight: 300; }
.cr-treatment__related-list a:hover .cr-treatment__related-title { font-style: italic; }

/* Piezas de la «Plantilla de tratamiento» ([cr_tratamiento campo="…"]) */
.cr-t-title { margin: 0; }
.cr-t-lead { font-size: 18px; margin: 0; }
.cr-t-image { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 400px 400px 0 0; }
.cr-t-content h2 { font-family: var(--cr-serif); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin: 48px 0 20px; }
.cr-t-content > :first-child { margin-top: 0; }
body a.cr-t-whatsapp { display: inline-block; padding: 8px 0; border-bottom: 1px solid currentColor; color: var(--cr-brown); text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
body a.cr-t-whatsapp:hover { color: var(--cr-taupe-text); }
.elementor-widget-text-editor .cr-button { margin: 0; }

@media (max-width: 1024px) {
	.cr-treatment__hero-inner,
	.cr-treatment__body { grid-template-columns: 1fr; gap: 48px; }
	.cr-treatment__media { justify-self: start; }
	.cr-treatment__aside { position: static; }
	.cr-treatment__related-list { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	.cr-treatment__hero { padding: 56px 0; }
	.cr-treatment__body { padding: 72px 0; }
}

.cr-button {
	display: inline-block; padding: 16px 32px; border-radius: 999px;
	background: var(--cr-brown); color: var(--cr-white); text-decoration: none;
	font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
	transition: background .4s var(--cr-ease);
}
body a.cr-button,
body a.cr-button:visited,
body a.cr-button:hover { color: var(--cr-white); }
.cr-button:hover { background: var(--cr-taupe-text); }

.cr-fallback-header { background: var(--cr-white); border-bottom: 1px solid var(--cr-beige); }
.cr-fallback-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.cr-fallback-header__brand img { max-height: 56px; width: auto; display: block; }
.cr-fallback-header ul,
.cr-fallback-footer ul { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cr-fallback-header a,
.cr-fallback-footer a { text-decoration: none; }
.cr-fallback-footer { background: var(--cr-brown); color: var(--cr-beige); padding: 48px 0; font-size: 14px; }
