/*
 * DDC Elementor Libre — estilo base de los bloques.
 *
 * Es un suelo, no un techo: solo pone lo imprescindible para que cada bloque se
 * vea bien por sí mismo. Los colores y tipografías que el sitio ya tenía
 * guardados se aplican en línea desde PHP y ganan a lo de aquí, así que las
 * páginas conservan su aspecto.
 */

/* ---------- Formularios ---------- */
.ddc-el-form .elementor-form-fields-wrapper {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px;
}
.ddc-el-form .elementor-field-group {
	padding: 0 5px 14px;
	flex: 0 0 100%;
	max-width: 100%;
}
.ddc-el-form .elementor-col-50 { flex-basis: 50%; max-width: 50%; }
.ddc-el-form .elementor-col-33 { flex-basis: 33.333%; max-width: 33.333%; }
.ddc-el-form .elementor-col-25 { flex-basis: 25%; max-width: 25%; }
@media (max-width: 767px) {
	.ddc-el-form .elementor-field-group { flex-basis: 100%; max-width: 100%; }
}

.ddc-el-form .elementor-field-label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	line-height: 1.3;
}
.elementor-mark-required .elementor-field-required > .elementor-field-label:after {
	content: " *";
	color: #d9534f;
}

.ddc-el-form .elementor-field,
.ddc-el-form .elementor-field-textual {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.5;
}
.ddc-el-form textarea.elementor-field { min-height: 110px; resize: vertical; }
.ddc-el-form .elementor-field:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}
.ddc-el-form .elementor-field-type-acceptance .elementor-field {
	width: auto;
	margin-right: 6px;
	padding: 0;
	vertical-align: middle;
}
.ddc-el-form .elementor-field-option { font-weight: 400; cursor: pointer; }
.ddc-el-form .elementor-select-wrapper { position: relative; }

.ddc-el-form .elementor-button {
	display: inline-block;
	padding: 11px 26px;
	border: 0;
	border-radius: 4px;
	background: #61ce70;
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter .2s ease;
}
.ddc-el-form .elementor-button:hover { filter: brightness(.92); }
.ddc-el-form .elementor-button[disabled] { opacity: .6; cursor: progress; }

/* El cepo para robots: fuera de la vista, pero no con display:none (algunos
   robots se saltan lo que está oculto del todo). */
.ddc-el-cepo {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ddc-el-aviso {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 4px;
	line-height: 1.5;
}
.ddc-el-aviso.es-bien { background: #e6f6e9; color: #14632a; border: 1px solid #b6e0c0; }
.ddc-el-aviso.es-mal  { background: #fdecea; color: #7a1c15; border: 1px solid #f3c3bd; }
.ddc-el-form .elementor-field.es-mal { border-color: #d9534f; }

/* ---------- Rejilla de entradas ---------- */
.ddc-el-entradas {
	display: grid;
	grid-template-columns: repeat(var(--ddcel-cols, 3), minmax(0, 1fr));
	gap: 24px;
}
@media (max-width: 1024px) { .ddc-el-entradas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .ddc-el-entradas { grid-template-columns: 1fr; gap: 18px; } }

.ddc-el-tarjeta {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 6px;
	background: rgba(0, 0, 0, .03);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.ddc-el-foto {
	position: relative;
	display: block;
	aspect-ratio: 1 / var(--ddcel-ratio, .66);
	background: #e9e9e9;
	overflow: hidden;
}
.ddc-el-foto img,
.ddc-el-sin-foto { width: 100%; height: 100%; object-fit: cover; display: block; }
.ddc-el-pegatina {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 9px;
	border-radius: 3px;
	background: #61ce70;
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}
.ddc-el-cuerpo { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ddc-el-titulo { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.ddc-el-titulo a { color: inherit; text-decoration: none; }
.ddc-el-titulo a:hover { text-decoration: underline; }
.ddc-el-meta { font-size: .82rem; opacity: .7; }
.ddc-el-resumen { margin: 0; font-size: .92rem; line-height: 1.55; }
.ddc-el-mas { margin-top: auto; font-weight: 600; text-decoration: none; }
.ddc-el-mas:hover { text-decoration: underline; }

/* ---------- Tabla de precios ---------- */
.ddc-el-precio {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 6px;
	background: rgba(0, 0, 0, .02);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
	text-align: center;
}
.ddc-el-precio-cinta {
	position: absolute;
	top: 0;
	left: 0;
	width: 150px;
	height: 150px;
	overflow: hidden;
	pointer-events: none;
	z-index: 2;
}
.ddc-el-precio-cinta-texto {
	position: absolute;
	top: 32px;
	left: -40px;
	width: 200px;
	padding: 6px 0;
	transform: rotate(-45deg);
	background: #61ce70;
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-align: center;
	text-transform: uppercase;
}
.ddc-el-precio-cabecera { padding: 22px 20px 14px; }
.ddc-el-precio-titulo { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.ddc-el-precio-subtitulo { margin: 6px 0 0; font-size: .95rem; opacity: .85; }

.ddc-el-precio-cifra {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
	padding: 14px 20px 18px;
	line-height: 1;
}
.ddc-el-precio-valor { display: inline-flex; align-items: flex-start; font-size: 3rem; font-weight: 700; }
.ddc-el-precio-moneda { font-size: .45em; line-height: 1.2; }
.ddc-el-precio-decimal { font-size: .45em; line-height: 1.2; }
.ddc-el-precio-periodo { font-size: .95rem; opacity: .75; }
.ddc-el-precio-antes { margin-right: 8px; font-size: 1.1rem; text-decoration: line-through; opacity: .6; }

.ddc-el-precio-lista { margin: 0; padding: 6px 0 14px; list-style: none; }
.ddc-el-precio-fila {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	padding: 9px 22px;
	font-size: .95rem;
	line-height: 1.45;
	text-align: left;
}
.ddc-el-precio-fila + .ddc-el-precio-fila { border-top: 1px solid rgba(0, 0, 0, .07); }
.ddc-el-precio-icono { flex: 0 0 auto; margin-top: .2em; opacity: .85; }
.ddc-el-precio-texto { flex: 1; }

.ddc-el-precio-pie { margin-top: auto; padding: 18px 20px 24px; }
.ddc-el-precio-boton {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 4px;
	background: #61ce70;
	color: #fff;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: filter .2s ease;
}
.ddc-el-precio-boton:hover { filter: brightness(.92); color: #fff; }
.ddc-el-precio-nota { margin: 12px 0 0; font-size: .82rem; opacity: .7; }

/* ---------- Titular animado ---------- */
.ddc-el-titular-texto { margin: 0; }
.ddc-el-titular-marca { position: relative; display: inline-block; white-space: nowrap; }
.ddc-el-titular-palabra { position: relative; z-index: 1; }
.ddc-el-trazo {
	position: absolute;
	left: -6%;
	bottom: -12%;
	width: 112%;
	height: 100%;
	fill: none;
	stroke: var(--ddcel-trazo, currentColor);
	stroke-width: 7;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1500;
	stroke-dashoffset: 1500;
	pointer-events: none;
}
.ddc-el-titular.es-visible .ddc-el-trazo {
	animation: ddc-el-trazar var(--ddcel-dur, 1200ms) ease forwards;
}
@keyframes ddc-el-trazar { to { stroke-dashoffset: 0; } }

.ddc-el-titular-giro {
	position: relative;
	display: inline-grid;
	vertical-align: bottom;
}
.ddc-el-titular-item {
	grid-area: 1 / 1;
	opacity: 0;
	transform: translateY(.3em);
	transition: opacity .4s ease, transform .4s ease;
}
.ddc-el-titular-item.es-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.ddc-el-titular.es-visible .ddc-el-trazo { animation: none; stroke-dashoffset: 0; }
	.ddc-el-titular-item { transition: none; }
}

/* ---------- Llamada a la acción ---------- */
.ddc-el-llamada {
	position: relative;
	display: flex;
	overflow: hidden;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}
.ddc-el-llamada-above { display: block; }
.ddc-el-llamada-foto { position: relative; flex: 1 1 50%; min-height: 220px; }
.ddc-el-llamada-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ddc-el-llamada-velo { position: absolute; inset: 0; }
.ddc-el-llamada-panel {
	flex: 1 1 50%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: 28px;
}
.ddc-el-llamada-right { flex-direction: row-reverse; }
.ddc-el-llamada-top    { flex-direction: column-reverse; }
.ddc-el-llamada-bottom { flex-direction: column; }
.ddc-el-llamada-above .ddc-el-llamada-panel {
	position: absolute;
	inset: 0;
	align-items: center;
	text-align: center;
}
.ddc-el-llamada-titulo { margin: 0; line-height: 1.2; }
.ddc-el-llamada-texto  { line-height: 1.6; }
.ddc-el-llamada-texto p:last-child { margin-bottom: 0; }
.ddc-el-llamada-boton {
	align-self: flex-start;
	display: inline-block;
	padding: 12px 26px;
	border-radius: 4px;
	background: #61ce70;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.ddc-el-llamada-above .ddc-el-llamada-boton { align-self: center; }
@media (max-width: 767px) {
	.ddc-el-llamada { flex-direction: column; }
	.ddc-el-llamada-panel { padding: 20px; }
}

/* ---------- Carrusel de opiniones ---------- */
.ddc-el-opiniones { position: relative; display: flex; align-items: center; gap: 8px; }
.ddc-el-op-pista {
	display: flex;
	gap: var(--ddcel-hueco, 20px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 4px;
}
.ddc-el-op-pista::-webkit-scrollbar { display: none; }
.ddc-el-op-ficha {
	flex: 0 0 calc((100% - var(--ddcel-hueco, 20px) * 2) / 3);
	scroll-snap-align: start;
	margin: 0;
	padding: 22px;
	border-radius: var(--ddcel-radio, 6px);
	background: rgba(0, 0, 0, .03);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
@media (max-width: 1024px) { .ddc-el-op-ficha { flex-basis: calc((100% - var(--ddcel-hueco, 20px)) / 2); } }
@media (max-width: 767px)  { .ddc-el-op-ficha { flex-basis: 100%; } }
.ddc-el-op-texto { margin: 0; border: 0; padding: 0; font-style: italic; line-height: 1.6; }
.ddc-el-op-firma { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ddc-el-op-foto { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.ddc-el-op-nombre { display: block; }
.ddc-el-op-cargo { display: block; font-size: .85rem; opacity: .7; }
.ddc-el-op-flecha {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 50%;
	background: #fff;
	color: inherit;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}
.ddc-el-op-flecha:hover { background: rgba(0, 0, 0, .05); }
.ddc-el-op-flecha[hidden] { visibility: hidden; }

/* ---------- Fondo de diapositivas ---------- */
.ddc-el-diapos { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.ddc-el-diapo {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	opacity: 0;
	transition: opacity 1.2s ease;
}
.ddc-el-diapo.es-visible { opacity: 1; }
