/* =========================================================================
   Páginas «Contacto» (Prototipado/Contacto.png) y «Pedir cita» (Pedir cita.png),
   con los formularios de Contact Form 7.
   ========================================================================= */

.ct-contact,
.ct-booking {
	padding-top: 8px;
}

/* -------------------------------------------------------------------------
   Contacto: tarjetas de datos
   ------------------------------------------------------------------------- */

.ct-info-cards {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.75fr);
	gap: 18px;
}

.ct-info {
	display: flex;
	flex-direction: column;
	padding: 26px;
	border: 1px solid var(--ct-line);
	border-radius: 18px;
	background: var(--ct-white);
	color: var(--ct-ink);
	text-decoration: none;
	transition: border-color .2s;
}

.ct-info:hover {
	border-color: var(--ct-terra);
	color: var(--ct-ink);
}

.ct-info__ico {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 18px;
	border-radius: 12px;
	background: var(--ct-sage-soft);
	color: var(--ct-forest);
}

.ct-info__ico .ct-icon {
	width: 20px;
	height: 20px;
}

.ct-info__label {
	margin-bottom: 6px;
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ct-muted);
}

.ct-info__value {
	font-weight: 500;
	line-height: 1.6;
	color: var(--ct-forest);
	word-break: break-word;
}

/* -------------------------------------------------------------------------
   Contacto: formulario y mapa
   ------------------------------------------------------------------------- */

.ct-contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 22px;
	margin-top: 22px;
}

.ct-form-card {
	padding: 40px;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius);
	background: var(--ct-white);
}

.ct-form-card h2 {
	margin: 0 0 24px;
	font-size: 1.8rem;
}

.ct-form-card__notice {
	padding: 16px 18px;
	border-left: 4px solid var(--ct-terra);
	border-radius: 0 12px 12px 0;
	background: var(--ct-peach-soft);
	color: var(--ct-ink);
}

.ct-form-card__fallback {
	color: var(--ct-muted);
}

.ct-map {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 420px;
	overflow: hidden;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius);
	background: linear-gradient(135deg, var(--ct-sage-soft), var(--ct-peach-soft));
	text-decoration: none;
}

.ct-map img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ct-map__pin,
.ct-map__label {
	position: relative;
}

.ct-map__pin {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--ct-white);
	box-shadow: var(--ct-shadow);
	color: var(--ct-terra);
}

.ct-map__pin .ct-icon {
	width: 26px;
	height: 26px;
}

.ct-map__label {
	padding: 7px 16px;
	border-radius: var(--ct-radius-pill);
	background: rgba(255, 255, 255, .92);
	font-size: .92rem;
	font-weight: 600;
	color: var(--ct-terra);
}

.ct-alt-contact {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 36px;
}

/* -------------------------------------------------------------------------
   Formularios de Contact Form 7 con el aspecto de la web.
   Marcado recomendado en el README (.ct-cf7, .ct-cf7__row, .ct-cf7__field…);
   sin él, los campos también toman el diseño.
   ------------------------------------------------------------------------- */

.ct-form-card .wpcf7 form {
	margin: 0;
}

.ct-cf7__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0 16px;
}

.ct-cf7__field,
.ct-form-card .wpcf7 form > p {
	margin: 0 0 18px;
}

.ct-form-card .wpcf7 label,
.ct-cf7__label {
	display: block;
	margin-bottom: 6px;
	font-size: .88rem;
	font-weight: 600;
	color: var(--ct-forest);
}

.ct-form-card .wpcf7-form-control-wrap {
	display: block;
}

.ct-form-card .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea) {
	box-sizing: border-box;
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--ct-line);
	border-radius: 12px;
	background-color: var(--ct-cream);
	font-family: var(--ct-sans);
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ct-ink);
	box-shadow: none;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.ct-form-card .wpcf7 :is(input, select, textarea):focus {
	border-color: var(--ct-terra);
	background-color: var(--ct-white);
	outline: none;
	box-shadow: 0 0 0 3px rgba(180, 83, 46, .14);
}

.ct-form-card .wpcf7 ::placeholder {
	color: #8B938F;
	opacity: 1;
}

.ct-form-card .wpcf7 textarea {
	min-height: 150px;
	resize: vertical;
}

.ct-form-card .wpcf7 select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E4A41' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 16px center;
	background-repeat: no-repeat;
	background-size: 18px;
	cursor: pointer;
	appearance: none;
}

/* Opciones (radio y casillas) */
.ct-form-card .wpcf7 :is(.wpcf7-radio, .wpcf7-checkbox) {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	padding-top: 2px;
}

.ct-form-card .wpcf7 .wpcf7-list-item {
	margin: 0;
}

.ct-form-card .wpcf7 .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: .95rem;
	font-weight: 400;
	color: var(--ct-ink);
	cursor: pointer;
}

.ct-form-card .wpcf7 :is(input[type="checkbox"], input[type="radio"]) {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--ct-terra);
}

/* Privacidad */
.ct-cf7__legal,
.ct-form-card .wpcf7 .wpcf7-acceptance {
	display: block;
	margin-bottom: 12px;
}

.ct-form-card .wpcf7 .wpcf7-acceptance .wpcf7-list-item label {
	font-size: .9rem;
	color: var(--ct-muted);
}

.ct-cf7__info,
.ct-cf7__hint {
	margin: 0 0 22px;
	font-size: .8rem;
	line-height: 1.5;
	color: var(--ct-muted);
}

.ct-cf7__hint {
	margin-top: -10px;
}

.ct-form-card .wpcf7 a {
	color: var(--ct-terra-dark);
}

/* Botón */
.ct-cf7__submit,
.ct-form-card .wpcf7 form > p:has(.wpcf7-submit) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.ct-form-card .wpcf7 .wpcf7-submit {
	padding: 14px 30px;
	border: 0;
	border-radius: var(--ct-radius-pill);
	background: var(--ct-terra);
	box-shadow: var(--ct-shadow-button);
	font-family: var(--ct-sans);
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--ct-white);
	cursor: pointer;
	transition: background .15s, transform .15s, opacity .15s;
}

.ct-form-card .wpcf7 .wpcf7-submit:hover,
.ct-form-card .wpcf7 .wpcf7-submit:focus-visible {
	background: var(--ct-terra-dark);
	color: var(--ct-white);
	transform: translateY(-1px);
}

.ct-form-card .wpcf7 .wpcf7-submit:focus-visible {
	outline: 2px solid var(--ct-terra);
	outline-offset: 3px;
}

.ct-form-card .wpcf7 .wpcf7-submit:disabled {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

/* Por si el formulario trae los <br> automáticos de Contact Form 7 (el tema los
   desactiva, pero un formulario copiado de otra web puede traerlos escritos) */
.ct-cf7__field > br,
.ct-cf7 p > br:first-child {
	display: none;
}

/* Campo trampa antispam (plugin «Honeypot for Contact Form 7»): su hoja de estilos
   llega vacía y el campo se veía como una caja en blanco. Oculto para las personas;
   los robots lo siguen encontrando en el HTML. */
.ct-form-card .wpcf7 p:has(> .cf7apps-honeypot-wrap),
.wpcf7 .cf7apps-honeypot-wrap,
.wpcf7 .wpcf7-form-control-wrap[class*="honeypot"] {
	display: none !important;
}

.ct-form-card .wpcf7 .wpcf7-spinner {
	margin: 0;
	background-color: var(--ct-sage);
}

/* Errores y avisos */
.ct-form-card .wpcf7 :is(input, select, textarea).wpcf7-not-valid {
	border-color: #B32D2E;
}

.ct-form-card .wpcf7 .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: .85rem;
	color: #B32D2E;
}

.ct-form-card .wpcf7 form .wpcf7-response-output {
	margin: 20px 0 0;
	padding: 14px 18px;
	border: 0;
	border-left: 4px solid var(--ct-terra);
	border-radius: 0 12px 12px 0;
	background: var(--ct-peach-soft);
	font-size: .95rem;
	line-height: 1.5;
	color: var(--ct-ink);
}

.ct-form-card .wpcf7 form.sent .wpcf7-response-output {
	border-left-color: var(--ct-sage);
	background: var(--ct-sage-soft);
	color: var(--ct-forest);
}

.ct-form-card .wpcf7 form:is(.failed, .aborted, .spam) .wpcf7-response-output {
	border-left-color: #B32D2E;
	background: #FBE9E7;
	color: #7A1F1F;
}

/* Pedir cita: formulario bajo el calendario */
.ct-booking-form {
	max-width: 760px;
	margin: 32px auto 0;
}

.ct-booking-form h2 {
	margin-bottom: 8px;
}

.ct-form-card .ct-form-card__intro {
	margin: 0 0 24px;
	color: var(--ct-muted);
}

/* -------------------------------------------------------------------------
   Pedir cita: tarifas
   ------------------------------------------------------------------------- */

.ct-rates {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ct-rate {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 28px 22px 26px;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius);
	background: var(--ct-white);
	text-align: center;
}

.ct-rate.is-featured {
	border-color: var(--ct-forest);
	background: var(--ct-forest);
}

.ct-rate__ico {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--ct-peach-soft);
	color: var(--ct-terra);
}

.ct-rate__ico .ct-icon {
	width: 22px;
	height: 22px;
}

.ct-rate__name {
	font-family: var(--ct-serif);
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--ct-forest);
}

.ct-rate__price {
	margin-top: 6px;
	font-family: var(--ct-serif);
	font-size: 2.3rem;
	line-height: 1.1;
	color: var(--ct-terra);
}

.ct-rate__detail {
	margin-top: 8px;
	font-size: .85rem;
	color: var(--ct-muted);
}

.ct-rate.is-featured .ct-rate__name {
	color: var(--ct-on-dark);
}

.ct-rate.is-featured .ct-rate__price {
	color: var(--ct-white);
}

.ct-rate.is-featured .ct-rate__detail {
	color: var(--ct-on-dark);
}

/* -------------------------------------------------------------------------
   Pedir cita: calendario
   ------------------------------------------------------------------------- */

.ct-calendar {
	margin-top: 32px;
	padding: 40px 24px 32px;
	border: 1px solid var(--ct-line);
	border-radius: 24px;
	background: var(--ct-white);
	box-shadow: var(--ct-shadow);
	text-align: center;
}

.ct-calendar .ct-calendar__text {
	max-width: 480px;
	margin: 0 auto 22px;
	font-family: var(--ct-serif);
	font-size: 1.3rem;
	line-height: 1.45;
	color: var(--ct-forest);
}

.ct-calendar__widget {
	min-width: 300px;
	height: 720px;
	margin: 0 -8px;
}

/* Mientras no está el calendario de Calendly, solo se ve el botón (sin hueco en blanco) */
.ct-calendar__widget:not(:has(iframe)) {
	height: auto;
}

.ct-calendar__widget:has(iframe) .ct-calendar__fallback {
	display: none;
}

.ct-calendar .ct-calendar__alt {
	margin: 12px 0 0;
	font-size: .88rem;
	color: var(--ct-muted);
}

.ct-calendar__alt a {
	color: var(--ct-terra-dark);
}

/* -------------------------------------------------------------------------
   Tableta y móvil
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.ct-info-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ct-info.is-wide {
		grid-column: span 2;
	}

	.ct-rates {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 880px) {
	.ct-contact__grid {
		grid-template-columns: 1fr;
	}

	.ct-map {
		min-height: 260px;
	}
}

@media (max-width: 600px) {
	.ct-info-cards {
		grid-template-columns: 1fr;
	}

	.ct-info.is-wide {
		grid-column: auto;
	}

	.ct-form-card {
		padding: 28px 22px;
	}

	.ct-cf7__row {
		grid-template-columns: 1fr;
	}

	.ct-rates {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.ct-rate {
		padding: 22px 12px 20px;
	}

	.ct-rate__price {
		font-size: 1.9rem;
	}

	.ct-calendar__widget {
		height: 1050px;
	}

	.ct-alt-contact .btn {
		width: 100%;
	}
}

/* «¿No se ve el calendario?» solo tiene sentido cuando el calendario ya está */
.ct-calendar:not(:has(iframe)) .ct-calendar__alt {
	display: none;
}

/* Móviles muy estrechos (320–370 px): una tarifa por fila y el calendario al ancho disponible */
@media (max-width: 370px) {
	.ct-rates {
		grid-template-columns: 1fr;
	}

	.ct-calendar__widget {
		min-width: 0;
		margin: 0;
	}
}
