/* ── Layout general ── */
.analysis-main-card {
	overflow: hidden;
}

.analysis-content-container {
	margin-right: 0;
	margin-left: 0;
}

.analysis-introduction-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin-right: auto;
	margin-left: auto;
}

/* ── Tabla responsiva ── */
.analysis-table-wrapper {
	width: 100%;
	overflow-x: auto;
	border-radius: 10px;
	-webkit-overflow-scrolling: touch;
}

.analysis-data-table {
	width: 100%;
	min-width: 720px;
	margin-bottom: 0;
	background-color: #ffffff;
}

.analysis-data-table th,
.analysis-data-table td {
	vertical-align: middle;
}

.analysis-data-table thead th {
	white-space: nowrap;
}

/* ── Explicaciones progresivas ── */
.analysis-step-row {
	align-items: flex-start;
}

.analysis-step-button-container {
	flex: 0 0 auto;
}

.analysis-step-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 2px;
	border: 0;
	background-color: transparent;
	cursor: pointer;
}

.analysis-step-button:focus {
	outline: 2px solid #1f6feb;
	outline-offset: 3px;
}

.analysis-step-button img {
	display: block;
	width: 50px;
	max-width: 100%;
	height: auto;
}

.analysis-step-content {
	min-width: 0;
}

.analysis-step-content p:last-child {
	margin-bottom: 0;
}

/* ── Teléfonos: botón "+" apila sobre el contenido (≤767px) ── */
@media (max-width: 767.98px) {
	.analysis-step-row {
		flex-direction: column !important;
		margin-bottom: 8px;
	}

	.analysis-step-button-container {
		padding: 8px 0 !important;
	}

	.analysis-step-content {
		width: 100%;
		padding: 0 0 12px !important;
	}

	.analysis-step-content p {
		margin-bottom: 0;
		font-size: 1rem;
		line-height: 1.65;
		overflow-wrap: break-word;
	}
}

/* ── Diseño exclusivo para teléfonos pequeños: tabla → tarjetas (≤575px) ── */
@media (max-width: 575.98px) {
	.analysis-content-container {
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	.analysis-main-card-content {
		margin-right: 14px !important;
		margin-left: 14px !important;
	}

	.analysis-introduction-image-column {
		margin-bottom: 10px;
	}

	.analysis-table-wrapper {
		overflow: visible;
		border-radius: 0;
	}

	.analysis-data-table {
		min-width: 0;
		border-collapse: separate;
		border-spacing: 0;
		background-color: transparent;
	}

	.analysis-data-table thead {
		display: none;
	}

	.analysis-data-table tbody,
	.analysis-data-table tr,
	.analysis-data-table th,
	.analysis-data-table td {
		display: block;
		width: 100%;
	}

	.analysis-data-table tbody tr {
		overflow: hidden;
		margin-bottom: 14px;
		border: 1px solid #d9e2ec;
		border-radius: 14px;
		background-color: #ffffff;
		box-shadow: 0 8px 18px rgba(31, 41, 51, 0.08);
	}

	.analysis-data-table tbody tr:last-child {
		margin-bottom: 0;
	}

	.analysis-data-table tbody th,
	.analysis-data-table tbody td {
		display: grid;
		grid-template-columns: minmax(118px, 42%) minmax(0, 1fr);
		gap: 10px;
		align-items: start;
		margin: 0;
		padding: 10px 12px !important;
		border: 0 !important;
		border-bottom: 1px solid #e9eef5 !important;
		background-color: #ffffff !important;
		color: #243b53;
		text-align: left;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.analysis-data-table tbody td:last-child {
		border-bottom: 0 !important;
	}

	.analysis-data-table tbody th::before,
	.analysis-data-table tbody td::before {
		content: attr(data-label);
		color: #52616f;
		font-weight: 700;
	}
}

/* ── Teléfonos extra pequeños ── */
@media (max-width: 359.98px) {
	.analysis-data-table tbody th,
	.analysis-data-table tbody td {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* Contenido de las columnas centrado (en teléfonos la tabla se convierte en tarjetas) */
@media (min-width: 576px) {
	.analysis-data-table tbody th,
	.analysis-data-table tbody td {
		text-align: center;
	}
}
