/* acf/faqs — autocontenido. Inspirado en iter-bloques/frequently-questions
   pero con clases propias dt-faqs__* y soporte de texto top/bottom. */

.dt-faqs {
	padding: 3rem 0;
	font-family: "Roboto", Arial, sans-serif;
}

.dt-faqs--bg-grey {
	background-color: #f5f5f5;
}

.dt-faqs__inner {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	box-sizing: border-box;
}

.dt-faqs__header {
	width: 100%;
}

.dt-faqs__title {
	color: #0f0e0e;
	font-size: 1.75rem;
	line-height: 2rem;
	font-weight: 700;
	margin: 0;
	word-wrap: break-word;
}

.dt-faqs__text {
	font-size: 1rem;
	line-height: 1.55;
	color: #1e1e1e;
}
.dt-faqs__text--top { margin-top: 0.75rem; }
.dt-faqs__text p { margin: 0 0 0.75rem 0; }
.dt-faqs__text p:last-child { margin-bottom: 0; }

.dt-faqs__accordion {
	display: flex;
	flex-direction: column;
}

.dt-faqs__accordion-item {
	display: flex;
	flex-direction: column;
	border-bottom: .0625rem solid #dcdfeb;
}

.dt-faqs__accordion-item.is-active {
	border-bottom: .0625rem solid #0f0e0e;
}

.dt-faqs__accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
	width: 100%;
	background: transparent;
	border: 0;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.dt-faqs__accordion-header:hover .dt-faqs__question {
	color: #5058ff;
}

.dt-faqs__accordion-item.is-active .dt-faqs__question {
	color: #5058ff;
}

.dt-faqs__question {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 700;
	color: #0f0e0e;
	word-wrap: break-word;
}

.dt-faqs__icon {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	position: relative;
	flex-shrink: 0;
}

.dt-faqs__icon::before,
.dt-faqs__icon::after {
	content: '';
	position: absolute;
	background: #5058ff;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.dt-faqs__icon::before {
	width: 100%;
	height: 2px;
}

.dt-faqs__icon::after {
	width: 2px;
	height: 100%;
	transition: transform .2s ease;
}

.dt-faqs__accordion-item.is-active .dt-faqs__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

.dt-faqs__accordion-content {
	display: none;
	flex-direction: column;
	gap: 1rem;
	padding: 0 0 1.5rem 0;
}

.dt-faqs__accordion-item.is-active .dt-faqs__accordion-content {
	display: flex;
}

.dt-faqs__accordion-content p {
	color: #1e1e1e;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 400;
	margin: 0;
}

@media screen and (min-width: 1024px) {
	.dt-faqs {
		padding: 5rem 0;
	}
	.dt-faqs__inner {
		gap: 3rem;
	}
	.dt-faqs__title {
		font-size: 2.375rem;
		line-height: 3rem;
	}
	.dt-faqs__text {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
	.dt-faqs__question {
		font-size: 1.25rem;
		line-height: 1.75rem;
	}
	.dt-faqs__accordion-content {
		gap: 1.5rem;
	}
	.dt-faqs__accordion-content p {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
}

/* Pestañas de color (background_style = colors): réplica de los acordeones de /programas-para-estudiantes-internacionales/ */
.dt-faqs--colors .dt-faqs__accordion { display: flex; flex-direction: column; gap: 0; }
.dt-faqs--colors .dt-faqs__accordion-item { border: 0; }
.dt-faqs--colors .dt-faqs__accordion-header { padding: 14px 24px; background: #ffbc00; }
.dt-faqs--colors .dt-faqs__accordion-item:nth-child(3n+2) .dt-faqs__accordion-header { background: #5058ff; }
.dt-faqs--colors .dt-faqs__accordion-item:nth-child(3n) .dt-faqs__accordion-header { background: #000; }
.dt-faqs--colors .dt-faqs__question,
.dt-faqs--colors .dt-faqs__accordion-item.is-active .dt-faqs__question,
.dt-faqs--colors .dt-faqs__accordion-header:hover .dt-faqs__question { color: #000; font-size: 18px; line-height: 26px; font-weight: 500; }
.dt-faqs--colors .dt-faqs__accordion-item:not(:nth-child(3n+1)) .dt-faqs__question { color: #fff; }
.dt-faqs--colors .dt-faqs__icon::before,
.dt-faqs--colors .dt-faqs__icon::after { background: currentColor; }
.dt-faqs--colors .dt-faqs__icon { color: #000; }
.dt-faqs--colors .dt-faqs__accordion-item:not(:nth-child(3n+1)) .dt-faqs__icon { color: #fff; }
.dt-faqs--colors .dt-faqs__accordion-content { padding: 24px; background: #fff8e0; }
.dt-faqs--colors .dt-faqs__accordion-item:nth-child(3n+2) .dt-faqs__accordion-content { background: #eeefff; }
.dt-faqs--colors .dt-faqs__accordion-item:nth-child(3n) .dt-faqs__accordion-content { background: #f2f2f2; }

/* Tablas dentro de las respuestas (p. ej. asignaturas con ECTS y PDF) */
.dt-faqs__accordion-content table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 22px; }
.dt-faqs__accordion-content th,
.dt-faqs__accordion-content td { padding: 10px 8px; text-align: left; border-bottom: 1px solid rgba(0, 0, 0, .12); vertical-align: middle; }
.dt-faqs__accordion-content th { font-weight: 700; }
.dt-faqs__accordion-content td a { color: #5058ff; white-space: nowrap; }
@media (max-width: 781px) {
	.dt-faqs__accordion-content { overflow-x: auto; }
	.dt-faqs__accordion-content table { font-size: 14px; line-height: 20px; }
	.dt-faqs--colors .dt-faqs__accordion-content { padding: 16px 12px; }
}

/* Listas con chevron azul ">" dentro de la respuesta (como ul.dt-tp-chevrons de title-paragraphs; /doctorado/) */
.dt-faqs__accordion-content ul.dt-tp-chevrons { list-style: none; margin: .5rem 0 .5rem 1.5rem; padding: 0; }
.dt-faqs__accordion-content ul.dt-tp-chevrons li { position: relative; padding-left: 1.1rem; margin: 0; list-style: none; }
.dt-faqs__accordion-content ul.dt-tp-chevrons li + li { margin-top: .5rem; }
.dt-faqs__accordion-content ul.dt-tp-chevrons li::before { content: '>'; position: absolute; left: 0; color: #5058ff; }
.dt-faqs__accordion-content ul.dt-tp-chevrons ul.dt-tp-chevrons { margin: .5rem 0 .5rem 1.5rem; }
/* Botón del tema dentro de la respuesta y desplegable anidado (<details>) */
.dt-faqs__accordion-content .qbutton { margin: 8px 0 !important; }
.dt-faqs__accordion-content details summary { cursor: pointer; color: #5058ff; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; text-align: center; }
@media (max-width: 781px) {
	.dt-faqs__accordion-content ul.dt-tp-chevrons { margin-left: .5rem; }
	.dt-faqs__accordion-content .qbutton { width: calc(100% - 4px) !important; text-align: center; }
}
