/* Ficha Técnica del Videojuego — acordeón */

.ftv {
	--ftv-color: #7b2ff7;
	--ftv-color-hover: #5f16d4;
	--ftv-texto: #fff;
	--ftv-radio: 8px;
	--ftv-borde: rgba(0, 0, 0, 0.12);
	--ftv-fondo-panel: rgba(0, 0, 0, 0.02);
	--ftv-duracion: 0.3s;
	margin: 1.25em 0;
}

.ftv__boton {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.7em;
	padding: 0.75em 1.4em;
	border: 0;
	border-radius: var(--ftv-radio);
	background: var(--ftv-color);
	color: var(--ftv-texto);
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.ftv__boton:hover,
.ftv__boton:focus-visible {
	background: var(--ftv-color-hover);
	color: var(--ftv-texto);
}

.ftv__boton:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ftv__boton:active {
	transform: translateY(1px);
}

/* Flecha que gira al desplegar. */
.ftv__chevron {
	flex: 0 0 auto;
	width: 0.5em;
	height: 0.5em;
	margin-top: -0.25em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform var(--ftv-duracion) ease, margin-top var(--ftv-duracion) ease;
}

.ftv__boton[aria-expanded="true"] .ftv__chevron {
	margin-top: 0.2em;
	transform: rotate(-135deg);
}

/* Panel desplegable: 0fr -> 1fr anima la altura sin JS ni max-height fijo. */
.ftv__panel {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition:
		grid-template-rows var(--ftv-duracion) ease,
		visibility var(--ftv-duracion) linear;
}

.ftv__panel.is-open {
	grid-template-rows: 1fr;
	visibility: visible;
}

.ftv__panel-interior {
	min-height: 0;
	overflow: hidden;
}

/* Navegadores sin soporte de 0fr: sin animación, pero sin hueco fantasma. */
@supports not (grid-template-rows: 0fr) {
	.ftv__panel {
		display: none;
	}

	.ftv__panel.is-open {
		display: block;
		visibility: visible;
	}
}

.ftv__contenido {
	margin-top: 0.9em;
	padding: 1.1em 1.3em;
	border: 1px solid var(--ftv-borde);
	border-radius: var(--ftv-radio);
	background: var(--ftv-fondo-panel);
}

.ftv__contenido > :first-child {
	margin-top: 0;
}

.ftv__contenido > :last-child {
	margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ftv {
		--ftv-duracion: 0s;
	}

	.ftv__boton {
		transition: none;
	}
}
