/* ===== ESTILOS DEL COMPONENTE ===== */
.news-pma {
	box-sizing: border-box;
	font-family: var(--pma-font-principal);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 20px;
	background: var(--pma-azul-claro-2);
	padding: 32px 0;
	width: var(--pma-full-width);
}

/* Reset y box-sizing para todos los elementos dentro del componente */
.news-pma *,
.news-pma *::before,
.news-pma *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Encabezado */
.news-pma-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 40px;
	width: var(--pma-max-width);
}

/* Título principal */
.news-title {
	font-size: 48px;
	font-weight: 700;
	color: var(--pma-azul-principal);
	text-align: center;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-shrink: 0;
}

.news-title::before {
	content: "";
	width: 20px;
	height: 20px;
	background: var(--pma-amarillo-acento);
	border-radius: 50%;
	flex-shrink: 0;
}

.news-subtitle {
	font-size: 18px;
	font-weight: 400;
	color: var(--pma-negro);
	text-align: center;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.4;
}

/* Contenedor principal del slider */
.news-container {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--pma-max-width);
	gap: 12px;
}

/* Botones de navegación */
.news-button {
	border: none;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: transparent;
	transition: all 0.3s ease;
	width: 60px;
	height: 60px;
	flex-shrink: 0;
	align-self: center;
}

.news-button:hover {
	opacity: 0.7;
	transform: translateY(-2px);
}

/* Ventana del slider - Swiper */
.news-window {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	position: relative;
}

.news-window a {
	text-decoration: none;
}

/* Swiper container */
.news-pma .swiper {
	width: 100%;
	height: 100%;
}

.news-pma .swiper-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
}

.news-pma .swiper-slide {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: transparent;
	border-radius: 10px;
	text-align: center;
	font-size: 18px;
}

/* Cards de noticias */
.news-card {
	width: 276px;
	height: 320px;
	background-color: var(--pma-blanco);
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.news-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
.news-button img {
	width: 100%;
}

.news-card:focus-within {
	border: solid #000 1px;
}

.news-card a:hover {
	text-decoration: none;
}

.news-card-image {
	width: 100% !important;
	height: 50% !important;
	object-fit: cover !important;
	display: block !important;
	flex-shrink: 0;
}

.news-card-content {
	padding: 12px;
	flex-shrink: 0;
}

.news-card-title {
	font-family: var(--pma-font-principal);
	font-weight: 700;
	color: #333;
	font-size: 18px;
	line-height: 20px;
	min-height: 50px;
	margin: 0;
	transition-duration: 0.5s;
}

.news-card-text {
	font-family: var(--pma-font-secundaria);
	font-weight: 400;
	color: #333;
	margin: 0;
	font-size: 15px;
	line-height: 18px;
	padding: 10px 0;
}

/* Ocultar controles por defecto de Swiper (botones, usaremos los personalizados) */
.news-pma .swiper-button-next,
.news-pma .swiper-button-prev {
	display: none !important;
}

/* Personalizar paginación de Swiper */
.news-pma .swiper-pagination {
	position: static !important;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 35px;
	padding: 0 16px;
	margin-top: 20px;
}

.news-pma .swiper-pagination-bullet {
	width: 16px;
	height: 16px;
	background-color: transparent;
	border: solid 2px #3366cc;
	border-radius: 50%;
	margin: 0 8px !important;
	opacity: 1;
	transition: all 0.3s ease;
}

.news-pma .swiper-pagination-bullet-active {
	background-color: #3366cc;
}

.news-pma .swiper-pagination-bullet:hover {
	background-color: var(--pma-azul-claro);
}

/* Ocultar botones cuando está en estado vacío o error */
.news-pma.pma-state-active .news-button {
	display: none !important;
}

.news-pma.pma-state-active .swiper-pagination {
	display: none !important;
}

/* Responsive */
/* Desktop grande: >= 1024px */
@media (min-width: 1024px) {
	.news-container {
		gap: 16px;
	}

	.news-window {
		flex: 1;
		min-width: 0;
	}

	.news-pma .swiper-slide {
		display: flex;
		justify-content: center;
		align-items: stretch;
		height: auto;
	}

	.news-card {
		width: 100%;
		max-width: 280px;
		height: 350px;
	}
}

/* Tablet: >= 768px y < 1024px */
@media (min-width: 768px) and (max-width: 1023px) {
	.news-container {
		gap: 12px;
	}

	.news-window {
		flex: 1;
		min-width: 0;
		height: auto;
	}

	.news-pma .swiper {
		width: 100%;
	}

	.news-pma .swiper-slide {
		display: flex;
		justify-content: center;
		align-items: stretch;
		height: auto;
	}

	.news-card {
		width: 100%;
		max-width: 320px;
		height: 380px;
		border-radius: 12px;
	}

	.news-card-image {
		width: 100%;
		height: 50%;
		object-fit: cover;
		display: block;
	}

	.news-card-content {
		padding: 16px;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		flex: 1;
	}

	.news-card-title {
		font-size: 18px;
		line-height: 1.4;
		margin-bottom: 8px;
		min-height: auto;
	}

	.news-card-text {
		font-size: 15px;
		line-height: 1.5;
		padding: 0;
		min-height: auto;
	}

	.news-button {
		margin-top: 0;
		align-self: center;
	}
}

/* Mobile: < 768px */
@media (max-width: 767px) {
	.news-pma {
		padding: 24px 8px;
		gap: 16px;
	}

	.news-pma-header {
		margin-bottom: 24px;
		gap: 12px;
	}

	.news-title {
		font-size: 32px;
	}

	.news-subtitle {
		font-size: 16px;
	}

	.news-container {
		display: flex;
		align-items: center;
		justify-content: center;
		width: var(--pma-max-width);
		gap: 8px;
	}

	.news-button {
		display: flex;
		width: 40px;
		height: 40px;
		margin-top: 0;
		flex-shrink: 0;
	}

	.news-window {
		flex: 1;
		min-width: 0;
		height: auto;
		max-width: calc(100% - 96px);
	}

	.news-pma .swiper {
		width: 100%;
	}

	.news-pma .swiper-slide {
		display: flex;
		justify-content: center;
		align-items: stretch;
		height: auto;
	}

	.news-card {
		width: 100%;
		max-width: 280px;
		height: 360px;
		border-radius: 12px;
	}

	.news-card-image {
		width: 100%;
		height: 50%;
		object-fit: cover;
	}

	.news-card-content {
		padding: 12px;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		flex: 1;
	}

	.news-card-title {
		font-size: 18px;
		line-height: 1.3;
		margin-bottom: 8px;
		min-height: auto;
	}

	.news-card-text {
		font-size: 14px;
		line-height: 1.4;
		padding: 0;
		min-height: auto;
	}
}

/* Mobile pequeño: < 480px */
@media (max-width: 480px) {
	.news-pma {
		padding: 20px 6px;
		gap: 12px;
	}

	.news-title {
		font-size: 28px;
	}

	.news-subtitle {
		font-size: 15px;
	}

	.news-container {
		gap: 6px;
	}

	.news-button {
		width: 36px;
		height: 36px;
	}

	.news-window {
		max-width: calc(100% - 84px);
	}

	.news-card {
		max-width: 260px;
		height: 340px;
	}

	.news-card-content {
		padding: 10px;
	}

	.news-card-title {
		font-size: 16px;
		margin-bottom: 6px;
	}

	.news-card-text {
		font-size: 13px;
	}
}
