/* =====================================================================
   FAQs — Destino Castilla (LTSM-5685 / LTSM-5461)
   Figma cb3izHyJ3uWqfAzbtHjEGP · página "11. Preguntas Frecuentes"
     desktop 1366 x 2305 -> 31139:184768 · mobile 375 x 3253 -> 31139:184816

   Tres bloques: encabezado, las categorías con su acordeón y el bloque de
   contacto.

   Mobile-first, igual que home.css, ubicacion.css y amenidades.css: la base
   es el frame de 375 y el layout de 1366 entra en @media (min-width:1200px).
   El Figma NO trae frame de tablet; el tramo de 768 se derivó aquí.

   Esta es la primera pantalla CLARA de Castilla (el frame es #FFFFFF); las
   otras tres son oliva. El header del chrome ya es blanco con borde
   `--chrome-line` por defecto, así que no hace falta variante: si algún día
   se le pone una, revisar que no rompa aquí.

   --fq-accent / --fq-on-accent / --fq-scale las escribe la plantilla inline
   desde la pestaña "Estilo" de la página de opciones. Los valores de abajo
   son el diseño aprobado y el que se usa si ACF no está.
   ===================================================================== */

.fq-page {
	--fq-accent:    #b08524;   /* secondary/base — dorado de marca        */
	--fq-on-accent: #ffffff;   /* texto sobre el acento (lo calcula PHP)  */
	--fq-scale:     1;

	--fq-ink:    #14142b;      /* Alias/Grayscale/Header — títulos        */
	--fq-body:   #4e4b66;      /* Alias/Grayscale/Body — preguntas        */
	--fq-label:  #6e7191;      /* Alias/Grayscale/Label — bajada y resp.  */
	--fq-paper:  #fcfcfc;      /* Alias/Grayscale/Background — tarjetas   */
	--fq-line:   #d9dbe9;      /* Alias/Grayscale/Line — bordes           */
	--fq-white:  #ffffff;

	--fq-max:    900px;        /* ancho del contenido en el frame de 1366 */

	background: var(--fq-white);
	color: var(--fq-ink);
	font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
	overflow-x: hidden;
}
.fq-page *,
.fq-page *::before,
.fq-page *::after { box-sizing: border-box; }
.fq-page * { margin: 0; }
.fq-page img { display: block; max-width: 100%; }

/* castilla.css trae reglas globales para `p` dentro del contenido heredado
   (fondo, padding, text-align: center). Se neutralizan aquí, igual que hace
   chrome.css con el header y el pie. */
.fq-page :where(p) {
	background: none;
	padding: 0;
	letter-spacing: normal;
	text-align: left;
}

/* ------------------------------ tipografía ------------------------------ */

.fq-eyebrow {
	font-size: calc(16px * var(--fq-scale));
	line-height: 1.5;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--fq-accent);
}
.fq-display {
	font-size: calc(36px * var(--fq-scale));
	line-height: 1.1;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--fq-ink);
}
.fq-lead {
	font-size: calc(16px * var(--fq-scale));
	line-height: 1.4;
	font-weight: 500;
	color: var(--fq-label);
}

/* ============================= ENCABEZADO ============================== */

.fq-intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: var(--fq-max);
	margin: 0 auto;
	padding: 48px 16px 0;
}

/* ============================= CATEGORÍAS ============================== */

.fq-grupos {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: var(--fq-max);
	margin: 0 auto;
	padding: 48px 16px 0;
}
.fq-grupo {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.fq-grupo__titulo {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: calc(24px * var(--fq-scale));
	line-height: 1.1;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--fq-ink);
}
.fq-grupo__icono {
	flex: none;
	font-size: calc(28px * var(--fq-scale));
	line-height: 1;
	color: var(--fq-accent);
}

/* ------------------------------ acordeón ------------------------------- */

.fq-lista { display: flex; flex-direction: column; }

/* En el Figma cada fila lleva su propio borde de 2px y las filas se tocan,
   así que el separador que se ve entre dos preguntas es UN borde, no dos.
   Sin el margen negativo la línea saldría de 4px y el bloque crecería 2px
   por pregunta. El z-index sube la fila abierta para que su borde gane al
   de la vecina y no quede recortado. */
.fq-item {
	position: relative;
	background: var(--fq-paper);
	border: 2px solid var(--fq-line);
	margin-bottom: -2px;
}
.fq-item:first-child {
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
}
.fq-item:last-child {
	margin-bottom: 0;
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
}
.fq-item.is-open { z-index: 1; }

.fq-item__head { margin: 0; font: inherit; }

.fq-item__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 20px 16px;
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
	color: inherit;
	font: inherit;
}
.fq-item__btn:focus-visible {
	outline: 2px solid var(--fq-accent);
	outline-offset: -4px;
}

.fq-item__q {
	font-size: calc(16px * var(--fq-scale));
	line-height: 1.35;
	font-weight: 500;
	color: var(--fq-body);
}

/* El +/− del Figma (`Line Lightmode/Actions Plus`, 24x24). Se dibuja con dos
   barras en vez de un glifo: la fuente de iconos de Castilla trae `icon-plus`
   y `icon-less`, pero intercambiarlos al abrir obliga a tocar clases desde
   el JS y no se puede animar el giro. */
.fq-item__icono {
	position: relative;
	flex: none;
	width: 24px;
	height: 24px;
}
.fq-item__icono::before,
.fq-item__icono::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	background: var(--fq-accent);
	transform: translate(-50%, -50%);
	transition: transform .18s ease, opacity .18s ease;
}
.fq-item__icono::after { transform: translate(-50%, -50%) rotate(90deg); }
.fq-item.is-open .fq-item__icono::after {
	transform: translate(-50%, -50%) rotate(0deg);
	opacity: 0;
}

.fq-item__panel { padding: 0 16px 20px; }
.fq-item__a,
.fq-item__a :where(p, li) {
	font-size: calc(16px * var(--fq-scale));
	line-height: 1.4;
	font-weight: 500;
	color: var(--fq-label);
}
.fq-item__a :where(p) + :where(p) { margin-top: 12px; }
.fq-item__a :where(ul, ol) { margin: 12px 0 0; padding-left: 20px; }
.fq-item__a :where(ul) { list-style: disc; }
.fq-item__a :where(ol) { list-style: decimal; }
.fq-item__a :where(a) {
	color: var(--fq-accent);
	text-decoration: underline;
}
/* :visited explícito: sin él el navegador pinta el enlace con su morado por
   defecto en cuanto la URL entra al historial. Mismo motivo que en el chrome
   y en amenidades.css. */
.fq-item__a :where(a):visited { color: var(--fq-accent); }

/* Layout "lista": el marcado ya viene sin botones desde PHP, sólo hay que
   darle a la pregunta el aire que en el acordeón pone el botón. */
.fq-page--lista .fq-item__head { padding: 20px 16px 0; }
.fq-page--lista .fq-item__panel { padding-top: 8px; }

/* ============================== CONTACTO =============================== */

.fq-contacto {
	display: flex;
	flex-direction: column-reverse; /* en móvil el Figma pone la foto arriba */
	max-width: var(--fq-max);
	margin: 48px auto 64px;
	background: var(--fq-paper);
	border: 1px solid var(--fq-line);
}
.fq-contacto__info {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px 16px;
	overflow: hidden;
}
.fq-contacto__titulo {
	font-size: calc(28px * var(--fq-scale));
	line-height: 1.1;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--fq-ink);
}
.fq-contacto__foto img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

/* La "Ð" de marca que en el Figma asoma detrás del texto. Mismo isotipo y
   misma técnica de máscara que el cierre de Amenidades. */
.fq-contacto__isotipo {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 180px;
	height: 180px;
	background: #dfe2bc;
	-webkit-mask: url(../../images/isotipo-castilla.svg) no-repeat center / contain;
	        mask: url(../../images/isotipo-castilla.svg) no-repeat center / contain;
	pointer-events: none;
}
/* Detrás del texto, no encima. */
.fq-contacto__info > :not(.fq-contacto__isotipo) { position: relative; }

.fq-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	align-self: flex-start;
	padding: 11px 24px;
	border-radius: 999px;
	background: var(--fq-accent);
	color: var(--fq-on-accent);
	font-size: calc(14px * var(--fq-scale));
	line-height: 1.3;
	font-weight: 600;
	text-decoration: none;
	transition: filter .18s ease;
}
.fq-btn:hover,
.fq-btn:focus-visible { filter: brightness(.92); }
.fq-btn:visited { color: var(--fq-on-accent); }
.fq-btn:focus-visible {
	outline: 2px solid var(--fq-ink);
	outline-offset: 2px;
}
.fq-btn i { font-size: 18px; line-height: 1; }

/* ========================= TABLET (derivado) =========================== */
/* El Figma no trae frame de 768. Se interpola: el contenido se ensancha y
   la tipografía sube a medio camino entre el móvil y el desktop. */
@media (min-width: 768px) {
	.fq-intro,
	.fq-grupos { padding-left: 40px; padding-right: 40px; }
	.fq-contacto { margin-left: 40px; margin-right: 40px; width: auto; }

	.fq-display { font-size: calc(42px * var(--fq-scale)); }
	.fq-grupo__titulo { font-size: calc(30px * var(--fq-scale)); }
	.fq-grupo__icono { font-size: calc(32px * var(--fq-scale)); }
	.fq-contacto__titulo { font-size: calc(32px * var(--fq-scale)); }

	.fq-item__btn { padding: 20px 24px; }
	.fq-item__panel { padding: 0 24px 24px; }
	.fq-page--lista .fq-item__head { padding: 20px 24px 0; }

	.fq-contacto__info { padding: 40px; }
	.fq-contacto__foto img { height: 280px; }
}

/* ========================== DESKTOP (1366) ============================= */
@media (min-width: 1200px) {
	/* 188px desde el borde del frame menos los 84px del header sticky. */
	.fq-intro { padding: 104px 0 0; }
	/* Encabezado a 188 + 131 de alto, categorías a 391 -> 72px de aire. */
	.fq-grupos { padding: 72px 0 0; gap: 80px; }

	.fq-display { font-size: calc(48px * var(--fq-scale)); }
	.fq-grupo__titulo { font-size: calc(36px * var(--fq-scale)); }
	.fq-grupo__icono { font-size: calc(37px * var(--fq-scale)); }

	.fq-item__btn { padding: 24px; min-height: 72px; }
	.fq-item__q { line-height: 1; }
	/* Fila abierta: 208px de alto con 32 de padding arriba y abajo, y 54 de
	   aire entre la pregunta y la respuesta (el space-between del Figma). */
	.fq-item.is-open .fq-item__btn { padding-top: 32px; padding-bottom: 0; }
	.fq-item__panel { padding: 54px 24px 32px; }
	.fq-page--lista .fq-item__head { padding: 32px 24px 0; }
	.fq-page--lista .fq-item__panel { padding: 24px 24px 32px; }

	.fq-contacto {
		flex-direction: row;
		align-items: stretch;
		margin: 80px auto 120px;
		min-height: 340px;
	}
	.fq-contacto__info {
		flex: 1 1 613px;
		gap: 24px;
		justify-content: center;
		padding: 56px;
	}
	.fq-contacto--sin-foto .fq-contacto__info { flex-basis: 100%; }
	.fq-contacto__foto { flex: 0 0 287px; }
	.fq-contacto__foto img { height: 100%; min-height: 340px; }
	.fq-contacto__titulo { font-size: calc(36px * var(--fq-scale)); }
	.fq-contacto__isotipo { right: 40px; width: 228px; height: 228px; }
}

/* ============================ ACCESIBILIDAD =========================== */
@media (prefers-reduced-motion: reduce) {
	.fq-page *,
	.fq-page *::before,
	.fq-page *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
