/* ===== VARIABLES ===== */
:root {
	--pma-explorador-bg: #001339;
	--pma-explorador-text: #fff;
	--pma-explorador-option-bg: rgba(255, 255, 255, 0.1);
	--pma-explorador-option-selected: rgba(255, 255, 255, 0.3);
	--pma-explorador-option-border: rgba(255, 255, 255, 0.2);
	--pma-explorador-filter-green: #63cc4f;
	--pma-explorador-filter-pink: #f42fa0;
	--pma-explorador-filter-grey: #9e9e9e;
}

/* ===== ESTILOS DEL COMPONENTE ===== */
.pma-explorador {
	box-sizing: border-box;
	position: relative;
	min-height: 86vh;
	background: var(--pma-explorador-bg);
	color: var(--pma-explorador-text);
	font-family: var(--pma-font-principal);
	overflow: hidden;
	padding: 40px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: var(--pma-max-width);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	margin: 0 auto;
}

.pma-explorador *,
.pma-explorador *::before,
.pma-explorador *::after {
	box-sizing: border-box;
}

/* Formas geométricas de fondo */
.pma-explorador::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 300px;
	height: 300px;
	background: rgba(255, 255, 255, 0.05);
	clip-path: polygon(0 0, 100% 0, 80% 100%, 0 80%);
	z-index: 0;
}

.pma-explorador::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 250px;
	height: 250px;
	background: rgba(255, 255, 255, 0.03);
	clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
	z-index: 0;
}

/* Contador de herramientas */
.pma-explorador-counter {
	position: absolute;
	top: 40px;
	right: 40px;
	text-align: right;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: auto;
	max-width: 180px;
}

.pma-explorador-counter-label {
	font-size: 14px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 0;
}

.pma-explorador-counter-number {
	font-size: 48px;
	font-weight: 700;
	color: var(--pma-explorador-text);
	line-height: 1;
}

.pma-explorador-toggle-view-btn {
	background: transparent;
	border: none;
	color: var(--pma-explorador-text);
	font-size: 12px;
	font-weight: 500;
	padding: 0;
	cursor: pointer;
	transition: opacity 0.3s ease;
	font-family: var(--pma-font-principal);
	margin-top: 4px;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-align: right;
	white-space: nowrap;
	min-width: unset;
	padding: unset;
	text-wrap: auto;
	text-align: center;
	line-height: 20px;
}

.pma-explorador-toggle-view-btn:hover {
	opacity: 0.8;
	border-color: unset;
	background-color: unset;
}

/* Contenedor principal */
.pma-explorador-container {
	position: relative;
	z-index: 5;
	width: 100%;
	max-width: 1200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	margin-top: 80px;
}

/* Header con título */
.pma-explorador-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	position: relative;
}

.pma-explorador-back-btn {
	background: transparent;
	border: none;
	color: var(--pma-explorador-text);
	font-size: 20px;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease;
	opacity: 0.7;
	position: absolute;
	left: 0;
	z-index: 10;
}

.pma-explorador-back-btn:hover {
	opacity: 1;
}

.pma-explorador-back-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.pma-explorador-step-title {
	font-size: 32px;
	font-weight: 600;
	margin: 0;
	text-align: center;
	width: 100%;
}

/* Contenedor de opciones */
.pma-explorador-options-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	flex-wrap: wrap;
}

.pma-explorador-options-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	flex: 1;
	padding: 12px 0;
	border-radius: 100px;
	background: #ffffff17;
}

.pma-explorador-option {
	background: var(--pma-explorador-option-bg);
	border: 2px solid var(--pma-explorador-option-border);
	color: var(--pma-explorador-text);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	font-family: var(--pma-font-principal);
	white-space: nowrap;
	border-radius: 50px;
	padding: 8px 17px;
	transition: opacity 0.4s, transform 0.4s, all 0.3s;
}

.pma-explorador-option:hover {
	background: var(--pma-explorador-option-selected);
	border-color: rgba(255, 255, 255, 0.4);
	transform: translateY(-2px);
}

.pma-explorador-option.selected {
	background: var(--pma-explorador-option-selected);
	border-color: var(--pma-explorador-text);
	border-width: 3px;
}

.pma-explorador-next-btn {
	background: var(--pma-explorador-text);
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pma-explorador-bg);
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 18px;
	flex-shrink: 0;
	min-width: unset;
	padding: unset;
}

.pma-explorador-next-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pma-explorador-next-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* Indicadores de filtros */
.pma-explorador-filters {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-top: 16px;
}

.pma-explorador-filter-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 8px;
	border-radius: 8px;
}

.pma-explorador-filter-item:hover {
	transform: translateY(-2px);
}

.pma-explorador-filter-item:active {
	transform: translateY(0);
}

.pma-explorador-filter-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--pma-explorador-filter-grey);
	transition: all 0.3s ease;
}

.pma-explorador-filter-item.active .pma-explorador-filter-dot {
	background: var(--pma-explorador-filter-pink);
	transform: scale(1.2);
}

.pma-explorador-filter-item.completed .pma-explorador-filter-dot {
	background: var(--pma-explorador-filter-green);
}

.pma-explorador-filter-label {
	font-size: 14px;
	font-weight: 400;
	color: var(--pma-explorador-filter-grey);
	transition: color 0.3s ease;
}

.pma-explorador-filter-item.active .pma-explorador-filter-label {
	color: var(--pma-explorador-filter-pink);
	font-weight: 600;
}

.pma-explorador-filter-item.completed .pma-explorador-filter-label {
	color: var(--pma-explorador-filter-green);
}

/* Tooltip sutil para indicadores */
.pma-explorador-filter-item[data-tooltip]::before {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #fff;
	color: #333;
	font-size: 12px;
	font-weight: 400;
	padding: 4px 4px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 1000;
	width: auto;
	white-space: normal;
	text-align: center;
	line-height: 1.5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 150px;
}

.pma-explorador-filter-item[data-tooltip]::after {
	content: "";
	position: absolute;
	bottom: calc(100% - 3px);
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1000;
}

.pma-explorador-filter-item[data-tooltip]:hover::before,
.pma-explorador-filter-item[data-tooltip]:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Texto explicativo */
.pma-explorador-explanation {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	max-width: 700px;
	z-index: 5;
	text-align: center;
}

.pma-explorador-explanation p {
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
}

.pma-explorador-explanation strong {
	color: var(--pma-explorador-filter-pink);
	font-weight: 600;
}

/* Ilustración */
.pma-explorador-illustration {
	position: absolute;
	bottom: 0;
	right: 40px;
	z-index: 5;
	opacity: 0.8;
}

.pma-explorador-illustration svg {
	width: 170px;
}

.pma-explorador-option {
	opacity: 0;
	transform: translateY(15px);
}

.pma-explorador-container.fade-out {
	animation: fadeOut 0.3s ease forwards;
}

.pma-explorador-container.fade-in {
	animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ===== ESTILOS DE RESULTADOS ===== */
.pma-explorador-results {
	position: relative;
	z-index: 5;
	width: 100%;
	max-width: 1200px;
	display: none;
	flex-direction: column;
	align-items: center;
	margin-top: 20px;
}

.pma-explorador-results.show {
	display: flex;
}

/* ===== CARDS DECORATIVAS EN EL FONDO ===== */
.pma-explorador-background-cards {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}

.pma-explorador-bg-card {
	position: absolute;
	width: 280px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	pointer-events: none;
	will-change: transform, opacity, top, left, right, bottom;
}

/* Posiciones decorativas para cada card */
.pma-explorador-bg-card:nth-child(1) {
	top: 5%;
	left: -3%;
	transform: rotate(-12deg) scale(0.7);
}

.pma-explorador-bg-card:nth-child(2) {
	top: -5%;
	left: 20%;
	transform: rotate(8deg) scale(0.55);
}

.pma-explorador-bg-card:nth-child(3) {
	bottom: 10%;
	left: -5%;
	transform: rotate(15deg) scale(0.6);
}

.pma-explorador-bg-card:nth-child(4) {
	top: 8%;
	right: -5%;
	transform: rotate(-8deg) scale(0.65);
}

.pma-explorador-bg-card:nth-child(5) {
	bottom: 5%;
	right: -3%;
	transform: rotate(10deg) scale(0.5);
}

/* Estado cuando se animan hacia el centro (posición final) */
.pma-explorador-bg-card.to-center {
	opacity: 0 !important;
	transform: translate(-50%, -50%) rotate(0deg) scale(1) !important;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
}

/* Transición más larga para la animación hacia el centro */
.pma-explorador-bg-card.to-center:nth-child(1) {
	transition-delay: 0s;
}
.pma-explorador-bg-card.to-center:nth-child(2) {
	transition-delay: 0.1s;
}
.pma-explorador-bg-card.to-center:nth-child(3) {
	transition-delay: 0.2s;
}
.pma-explorador-bg-card.to-center:nth-child(4) {
	transition-delay: 0.3s;
}
.pma-explorador-bg-card.to-center:nth-child(5) {
	transition-delay: 0.4s;
}

/* Ocultar cards decorativas cuando resultados están activos */
.pma-explorador.results-active .pma-explorador-background-cards {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease 0.5s;
}

/* Contenedor de cards con efecto stack */
.pma-explorador-results-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 20px;
	position: relative;
}

.pma-explorador-results-cards {
	position: relative;
	width: 350px;
	height: 650px;
}

/* Cards de resultado */
.pma-explorador-result-card {
	position: absolute;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	bottom: 0;
	opacity: 1;
	pointer-events: none;
	transition: all 0.3s ease;
	left: 0;
	right: 0;
}

.pma-explorador-result-card.active {
	pointer-events: auto;
	cursor: pointer;
}

.pma-explorador-result-card.hidden {
	opacity: 0;
	pointer-events: none;
}

/* Header de la card */
.pma-explorador-result-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: #f8f9fa;
}

.pma-explorador-result-card-logo {
	max-height: 32px;
	max-width: 100px;
	object-fit: contain;
}

.pma-explorador-result-card-logo-text {
	font-size: 18px;
	font-weight: 700;
	font-family: var(--pma-font-principal);
}

.pma-explorador-result-card-arrow-icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.pma-explorador-result-card-arrow-icon i {
	display: block;
	font-size: 18px;
	line-height: 1;
	width: 18px;
	height: 18px;
}

.pma-explorador-result-card-link-icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 18px;
	transition: transform 0.3s ease;
}

.pma-explorador-result-card-link-icon:hover {
	transform: scale(1.2);
}

/* Imagen de la card */
.pma-explorador-result-card-image-container {
	width: 100%;
	height: 350px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	padding: 20px;
}

.pma-explorador-result-card-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.pma-explorador-result-card-avatar {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pma-explorador-result-card-avatar svg {
	width: 200px;
	height: 250px;
	max-width: 100%;
	max-height: 100%;
}

.pma-explorador-result-card-image-placeholder {
	width: 180px;
	height: 180px;
	border: 3px solid;
	border-radius: 50%;
	opacity: 0.3;
}

/* Contenido de la card */
.pma-explorador-result-card-content {
	padding: 42px 24px;
	text-align: center;
}

.pma-explorador-result-card-title {
	font-size: 22px;
	font-weight: 600;
	color: #333;
	margin: 0 0 12px 0;
	font-family: var(--pma-font-principal);
	line-height: 1.3;
}

.pma-explorador-result-card-description {
	font-size: 14px;
	color: #666;
	line-height: 1.6;
	margin: 0;
	font-family: var(--pma-font-secundaria);
}

/* Navegación de resultados */
.pma-explorador-results-nav-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	color: var(--pma-explorador-bg);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	font-size: 18px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
	min-width: unset;
	padding: unset;
}

.pma-explorador-results-nav-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Mensaje vacío */
.pma-explorador-results-empty {
	text-align: center;
	color: var(--pma-explorador-text);
	font-size: 18px;
	padding: 60px 20px;
	font-family: var(--pma-font-principal);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
	.pma-explorador-container {
		max-width: 900px;
	}

	.pma-explorador-step-title {
		font-size: 28px;
	}

	.pma-explorador-counter {
		top: 30px;
		right: 30px;
	}

	.pma-explorador-toggle-view-btn {
		font-size: 11px;
		padding: 5px 12px;
	}

	.pma-explorador-explanation {
		bottom: 30px;
		left: 50%;
		transform: translateX(-50%);
		max-width: 400px;
	}

	.pma-explorador-illustration {
		bottom: 0;
		right: 30px;
	}

	.pma-explorador-illustration svg {
		width: 120px;
		height: 120px;
	}

	.pma-explorador-results-cards {
		width: 320px;
		height: 600px;
	}
}

@media (max-width: 768px) {
	.pma-explorador {
		padding: 30px 16px;
	}

	.pma-explorador-container {
		margin-top: 60px;
		gap: 24px;
	}

	.pma-explorador-step-title {
		font-size: 24px;
	}

	.pma-explorador-option {
		font-size: 14px;
		padding: 10px 20px;
	}

	.pma-explorador-counter {
		top: 20px;
		right: 20px;
	}

	.pma-explorador-counter-label {
		font-size: 12px;
	}

	.pma-explorador-counter-number {
		font-size: 36px;
	}

	.pma-explorador-toggle-view-btn {
		font-size: 10px;
		padding: 4px 10px;
	}

	.pma-explorador-explanation {
		bottom: 20px;
		left: 50%;
		transform: translateX(-50%);
		max-width: calc(100% - 200px);
	}

	.pma-explorador-explanation p {
		font-size: 12px;
	}

	.pma-explorador-illustration {
		bottom: 0;
		right: 20px;
	}

	.pma-explorador-illustration svg {
		width: 100px;
		height: 100px;
	}

	.pma-explorador-filters {
		gap: 16px;
	}

	.pma-explorador-filter-label {
		font-size: 12px;
	}

	.pma-explorador-results-cards {
		width: 280px;
		height: 550px;
	}

	.pma-explorador-result-card-image-container {
		height: 200px;
	}

	.pma-explorador-result-card-content {
		padding: 28px 20px;
	}

	.pma-explorador-result-card-title {
		font-size: 18px;
	}

	.pma-explorador-result-card-description {
		font-size: 13px;
	}

	.pma-explorador-results-nav-btn {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}
	.pma-explorador-background-cards {
		display: none !important;
	}
	.pma-explorador-options-wrapper {
		background-color: transparent;
		border-radius: 0;
	}
	.pma-explorador-illustration {
		z-index: 1;
		opacity: 0.3;
	}
	.pma-explorador-filters {
		z-index: 10;
	}
}

@media (max-width: 480px) {
	.pma-explorador {
		padding: 20px 12px;
	}

	.pma-explorador-container {
		margin-top: 50px;
		gap: 20px;
	}

	.pma-explorador-step-title {
		font-size: 20px;
	}

	.pma-explorador-options-container {
		flex-direction: column;
	}

	.pma-explorador-options-wrapper {
		width: 100%;
		justify-content: flex-start;
	}

	.pma-explorador-option {
		width: 100%;
		text-align: center;
	}

	.pma-explorador-next-btn {
		height: 44px;
		width: 44px;
	}

	.pma-explorador-counter {
		position: relative;
		top: auto;
		right: auto;
		text-align: center;
		margin-bottom: 20px;
	}

	.pma-explorador-explanation {
		display: none !important;
	}

	.pma-explorador-illustration {
		display: none;
	}

	.pma-explorador-filters {
		flex-wrap: wrap;
		gap: 12px;
	}

	.pma-explorador-results-content {
		flex-direction: column;
	}

	.pma-explorador-results-cards {
		width: 100%;
		max-width: 300px;
		height: 420px;
	}

	.pma-explorador-results-navigation {
		display: flex;
		gap: 20px;
		margin-top: 20px;
	}
}
