/* Servicios detail pages (e.g. Orientación para el empleo): light header with
   CTA, intro + checklist, media + promo card, banner, and appointment form. */

/* ---------- Header (eyebrow + H1 + lead, CTA on the right) ---------- */
.svc-header { background: linear-gradient(180deg, rgba(28, 59, 91, 0.08), rgba(28, 59, 91, 0)); }
.svc-header__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: clamp(24px, 4vw, 64px);
	padding-block: clamp(56px, 8vw, 112px) clamp(40px, 6vw, 80px);
}
/* Title runs as wide as it needs (one line on desktop); the lead/body keeps a
   readable measure. Figma gaps: eyebrow→title 32, title→body 48, para→para 16. */
.svc-header__text { max-width: none; }
.svc-header__eyebrow {
	font-size: var(--fs-eyebrow);
	line-height: var(--lh-eyebrow);
	letter-spacing: 0.64px;
	text-transform: uppercase;
	color: var(--neutral-500);
	margin: 0 0 var(--space-8);
}
.svc-header__title {
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
	letter-spacing: var(--ls-h1);
	font-weight: var(--fw-medium);
	color: var(--bida-blue);
	margin: 0;
}
.svc-header__title--regular { font-weight: var(--fw-regular); }
.svc-header__title .hl { color: var(--bida-green); }
.svc-header__lead {
	max-width: 560px;
	margin: var(--space-12) 0 0;
	font-size: var(--fs-sub1);
	line-height: var(--lh-sub1);
	color: var(--neutral-700);
}
.svc-header__lead + .svc-header__lead { margin-top: var(--space-4); }
.svc-header__cta { flex: none; }

/* Auto-use has the same centred 1128px content frame as its Figma screen,
   while the copy itself stays on a readable 375px measure. */
:is(.page-id-746, .page-id-2122) .svc-header__inner {
	max-width: calc(1128px + (2 * var(--container-pad)));
}
:is(.page-id-746, .page-id-2122) .svc-header__text {
	width: 100%;
	max-width: 375px;
}

/* ---------- Checklist (banner + intro + check pills) ---------- */
.checklist { padding-bottom: clamp(48px, 8vw, 96px); }
.checklist__banner { margin-bottom: clamp(40px, 6vw, 64px); }
.checklist__banner img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1130 / 419;
	object-fit: cover;
	border-radius: var(--radius-lg);
}
.checklist__grid {
	display: grid;
	grid-template-columns: minmax(0, 440px) minmax(0, 555px);
	justify-content: space-between;
	gap: clamp(32px, 6vw, 135px);
}
.checklist__eyebrow {
	font-size: var(--fs-eyebrow);
	line-height: var(--lh-eyebrow);
	letter-spacing: 0.64px;
	text-transform: uppercase;
	color: var(--neutral-500);
	margin: 0 0 var(--space-6);
}
.checklist__title {
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: -0.36px;
	font-weight: var(--fw-medium);
	color: var(--bida-blue);
	margin: 0 0 var(--space-6);
}
.checklist__text { margin: clamp(32px, 5vw, 64px) 0 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--neutral-700); }
.checklist__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.checklist__item {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: 14px 12px;
	background: var(--neutral-50);
	border-radius: var(--radius-pill);
}
.checklist__check {
	flex: none;
	width: 22px;
	height: 22px;
	color: var(--bida-green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.checklist__check-icon { width: 22px; height: 22px; }
.checklist__label { font-size: var(--fs-sub2); line-height: var(--lh-sub2); font-weight: var(--fw-medium); color: var(--bida-blue); }

/* ---------- Media + promo card ---------- */
.media-card { padding-bottom: clamp(48px, 8vw, 96px); }
.media-card__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-5, 20px);
	align-items: stretch;
}
.media-card__media { border-radius: var(--radius-lg); overflow: hidden; }
.media-card__media img { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.media-card__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--space-8, 32px);
	padding: 32px 40px 40px;
	background: var(--bida-blue);
	color: var(--white);
	border-radius: var(--radius-lg);
	transition: background var(--dur) var(--ease);
}
.media-card__eyebrow {
	font-size: var(--fs-eyebrow);
	line-height: var(--lh-eyebrow);
	letter-spacing: 0.64px;
	text-transform: uppercase;
	color: var(--neutral-200);
	margin: 0 0 var(--space-4);
}
.media-card__title {
	max-width: 334px;
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: -0.36px;
	font-weight: var(--fw-regular);
	margin: 0;
}
.media-card__title .hl { color: var(--bida-yellow); }
.media-card__foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-6);
}
.media-card__text { margin: 0; max-width: 392px; font-size: var(--fs-sub2); line-height: var(--lh-sub2); color: var(--neutral-200); }
.media-card__arrow {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--white);
	border: 0;
	color: var(--bida-blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
	cursor: pointer;
	text-decoration: none;
}
a.media-card__arrow:hover { background: var(--neutral-50); }
.media-card__arrow-icon { width: 20px; height: 20px; }
/* Espacios stacks several media-cards; tighten the inter-card gap to the Figma 32px
   (the standalone bottom padding still applies to the last one, before the CTA). */
.media-card:has(+ .media-card) { padding-bottom: 32px; }

/* ---------- Banner (photo + coloured panel) ---------- */
.svc-banner { padding-bottom: clamp(48px, 8vw, 96px); }
.svc-banner > .container {
	max-width: calc(1129px + (2 * var(--container-pad)));
}
/* Optional: the whole banner is a link (stretched over the panel). */
.svc-banner--link .container { position: relative; }
.svc-banner__link { color: inherit; text-decoration: none; }
.svc-banner__link:hover { text-decoration: none; }
.svc-banner__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.svc-banner__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1130 / 303;
	object-fit: cover;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.svc-banner__panel {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(24px, 5vw, 80px);
	padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
	background: var(--bida-blue);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.svc-banner__title {
	flex: 0 0 auto;
	max-width: 300px;
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: -0.36px;
	font-weight: var(--fw-regular);
	color: var(--white);
	margin: 0;
}
.svc-banner__title .hl { color: #d0d828; }
.svc-banner__text { margin: 0; max-width: 449px; font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: -0.24px; color: var(--neutral-200); }

/* El Espazio uses the same tall crop in Orientation, Formation and Auto-use.
   Its panel overlaps the final 44px of the photograph in the desktop Figma
   frames; the overlap scales down on narrow screens. */
:is(.page-id-683, .page-id-746, .page-id-2121, .page-id-2122, .page-id-2255, .page-id-2256) .svc-banner {
	--svc-banner-overlap: clamp(20px, 3.9vw, 44px);
}
:is(.page-id-683, .page-id-746, .page-id-2121, .page-id-2122, .page-id-2255, .page-id-2256) .svc-banner__media {
	background: #221a09;
	overflow: hidden;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
:is(.page-id-683, .page-id-746, .page-id-2121, .page-id-2122, .page-id-2255, .page-id-2256) .svc-banner__media img {
	aspect-ratio: 1129 / 489;
	object-position: 50% 62.6%;
	opacity: 0.9;
}
:is(.page-id-683, .page-id-746, .page-id-2121, .page-id-2122, .page-id-2255, .page-id-2256) .svc-banner__panel {
	position: relative;
	margin-top: calc(-1 * var(--svc-banner-overlap));
	border-radius: var(--radius-lg);
}
:is(.page-id-746, .page-id-2122) .svc-banner {
	/* Desktop review 06/08, item 8: the service header already contributes the
	   intended 32px handoff. Do not stack a second 32–48px gap above the image. */
	padding-top: 0;
}

/* ---------- Appointment form ---------- */
.appointment { padding-bottom: clamp(48px, 8vw, 96px); }
.appointment__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(24px, 4vw, 48px);
	align-items: stretch;
}
/* The photo fills its column at the form's height (cover) instead of imposing
   its own aspect — a tall portrait source must not stretch the section. */
.appointment__media { position: relative; min-height: 360px; border-radius: var(--radius-lg); overflow: hidden; }
.appointment__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.appointment__panel {
	padding: clamp(32px, 4vw, 64px) clamp(24px, 3vw, 40px);
	background: var(--neutral-50);
	border-radius: var(--radius-lg);
}
.appointment__title {
	font-size: var(--fs-h3, 32px);
	line-height: var(--lh-h3, 40px);
	font-weight: var(--fw-medium);
	color: var(--bida-blue);
	margin: 0 0 var(--space-8, 32px);
}
.appointment__fields { display: flex; flex-wrap: wrap; gap: var(--space-5, 20px); }
.appointment__field { margin: 0; flex: 1 1 100%; }
.appointment__field--half { flex: 1 1 calc(50% - var(--space-5, 20px)); }
.appointment__input {
	width: 100%;
	font: inherit;
	font-size: var(--fs-body);
	color: var(--bida-blue);
	background: var(--white);
	border: 1px solid var(--neutral-200);
	border-radius: var(--radius-sm);
	padding: 12px;
}
.appointment__input::placeholder { color: rgba(28, 59, 91, 0.6); }
.appointment__input:focus-visible { outline: 2px solid var(--bida-blue); outline-offset: 1px; border-color: var(--bida-blue); }
.appointment__input--area { resize: vertical; min-height: 100px; }
.appointment__privacy { margin: var(--space-5, 20px) 0 var(--space-6); font-size: var(--fs-caption); color: var(--bida-blue); }
.appointment__privacy a { color: var(--bida-green); text-decoration: underline; }
.appointment__submit { margin-top: var(--space-2); }
/* Optional line under the title (image + panel layout). */
.appointment__intro {
	max-width: 46ch;
	margin: calc(-1 * var(--space-4)) 0 var(--space-8);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text-muted);
}

/* Collapsible variant (orientación ES/EU): a compact photo + panel whose title
   is the disclosure button; the form drops down under the intro. The photo
   keeps one height in both states (and stays beside the long open form on
   desktop) instead of stretching with it. Toggle wiring: accordion.js. */
.appointment--collapsible .appointment__grid { align-items: start; }
.appointment--collapsible .appointment__media { min-height: 0; height: 320px; }
.appointment--collapsible .appointment__media img { object-position: center 20%; } /* keep the face in the shorter crop */
.appointment--collapsible .appointment__panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 320px;
}
.appointment--collapsible .appointment__title { margin: 0; }
.appointment--collapsible .appointment__intro { margin: var(--space-3) 0 0; }
.appointment__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6);
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}
.appointment__toggle:focus-visible { outline: 2px solid var(--bida-blue); outline-offset: 6px; border-radius: var(--radius-sm); }
/* Round green "+" that turns into "−" while the form is open. */
.appointment__toggle-icon {
	position: relative;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--bida-green);
	transition: background-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.appointment__toggle-icon::before,
.appointment__toggle-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	margin: -1px 0 0 -9px;
	border-radius: 2px;
	background: var(--color-on-accent);
	transition: transform var(--dur) var(--ease);
}
.appointment__toggle-icon::after { transform: rotate(90deg); }
@media (hover: hover) {
	.appointment__toggle:hover .appointment__toggle-icon { background: var(--bida-green-300); }
}
.appointment__toggle[aria-expanded="true"] .appointment__toggle-icon { transform: rotate(180deg); }
.appointment__toggle[aria-expanded="true"] .appointment__toggle-icon::after { transform: rotate(0deg); }
.appointment__body { padding-top: var(--space-8); }
.appointment__body:not([hidden]) { animation: appointment-reveal var(--dur) var(--ease); }
@keyframes appointment-reveal {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: none; }
}
@media (min-width: 901px) {
	.appointment--collapsible .appointment__media { position: sticky; top: 120px; }
}
@media (max-width: 900px) {
	.appointment--collapsible .appointment__media { height: 200px; }
	.appointment--collapsible .appointment__panel { min-height: 0; }
}
@media (max-width: 560px) {
	.appointment__toggle-icon { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.appointment__body:not([hidden]) { animation: none; }
	.appointment__toggle-icon,
	.appointment__toggle-icon::after { transition: none; }
}

@media (max-width: 900px) {
	.svc-header__inner { flex-direction: column; align-items: flex-start; }
	.checklist__grid { grid-template-columns: 1fr; }
	.media-card__grid,
	.appointment__grid { grid-template-columns: 1fr; }
	.svc-banner__panel { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
	.svc-header__title { font-size: 30px; line-height: 38px; }
	.appointment__field--half { flex: 1 1 100%; }
	/* Responsive reviews 06/08 and 07/08: let the copy use the full card width
	   and place the arrow below it on every affected ES/EUS service page. */
	:is(
		.page-id-810,
		.page-id-1250,
		.page-id-1630,
		.page-id-1634,
		.page-id-2129,
		.page-id-2133,
		.page-id-2135,
		.page-id-2152
	) .media-card__foot {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-4);
	}
	:is(
		.page-id-810,
		.page-id-1250,
		.page-id-1630,
		.page-id-1634,
		.page-id-2129,
		.page-id-2133,
		.page-id-2135,
		.page-id-2152
	) .media-card__text {
		width: 100%;
		max-width: none;
	}
	:is(
		.page-id-810,
		.page-id-1250,
		.page-id-1630,
		.page-id-1634,
		.page-id-2129,
		.page-id-2133,
		.page-id-2135,
		.page-id-2152
	) .media-card__arrow { align-self: flex-end; }
}
