/* ==========================================================================
   Noticias — Educational Material Grid
   ========================================================================== */

.noticias-em-wrapper { width: 100%; }

.noticias-em-sidebar { display: flex; flex-direction: column; }

.noticias-em-filters-inner { display: flex; flex-direction: column; gap: 22px; }

.noticias-em-filter-group { margin: 0; }
.noticias-em-filter-heading { margin: 0 0 10px; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.noticias-em-filter-list { list-style: none; margin: 0; padding: 0; }
.noticias-em-filter-list li { margin: 0 0 7px; }
.noticias-em-filter-item { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.noticias-em-filter-cb { width: 15px; height: 15px; cursor: pointer; margin: 0; flex-shrink: 0; }

.noticias-em-showall { font-weight: 600; align-self: flex-start; background: transparent; border-radius: 6px; padding: 8px 18px; cursor: pointer; transition: opacity .2s; }
.noticias-em-showall:hover { opacity: .8; }

/* Mobile toggle */
.noticias-em-mobile-toggle { display: none; align-items: center; justify-content: space-between; width: 100%; background: transparent; border-radius: 6px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.noticias-em-toggle-icon { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; margin-left: 8px; }
.noticias-em-mobile-toggle[aria-expanded="true"] .noticias-em-toggle-icon { transform: rotate(-135deg); }

/* Cards */
.noticias-em-card-link { display: block; text-decoration: none; color: inherit; }
.noticias-em-card-image { position: relative; }
.noticias-em-card-title { margin: 10px 0 0; line-height: 1.35; font-weight: 700; }

/* Play overlay for video cards */
.noticias-em-card.is-video .noticias-em-card-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.25);
	transition: background .2s;
}
.noticias-em-card.is-video:hover .noticias-em-card-image::after { background: rgba(0,0,0,.4); }
.noticias-em-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 14px 0 14px 22px;
	border-color: transparent transparent transparent #7b1d3f;
	z-index: 2;
	filter: drop-shadow(0 0 6px rgba(0,0,0,.5));
}
.noticias-em-card.is-video .noticias-em-play {
	background: rgba(255,255,255,.9);
	border-radius: 50%;
	width: 54px;
	height: 54px;
	border: none;
	display: flex;
}
.noticias-em-card.is-video .noticias-em-play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	width: 0; height: 0;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #7b1d3f;
}

.noticias-em-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: #777; }

/* Loading */
.noticias-em-main { position: relative; }
.noticias-em-loading { display: none; position: absolute; inset: 0; background: rgba(255,255,255,.6); z-index: 5; }
.noticias-em-loading.is-active { display: block; }
.noticias-em-grid.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }

/* Pagination */
.noticias-em-pagination-wrap { margin-top: 28px; display: flex; justify-content: center; }
.noticias-em-pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.noticias-em-page-btn { min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #ddd; background: #fff; color: #333; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1; transition: background .2s, color .2s, border-color .2s; }
.noticias-em-page-btn:hover:not(:disabled):not(.is-active) { border-color: #999; }
.noticias-em-page-btn:disabled { opacity: .4; cursor: default; }

/* Video Modal */
.noticias-em-modal { display: none; position: fixed; inset: 0; z-index: 99999; }
.noticias-em-modal.is-open { display: block; }
.noticias-em-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.noticias-em-modal-box {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(900px, 92vw);
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.noticias-em-modal-video { position: relative; width: 100%; padding-top: 56.25%; }
.noticias-em-modal-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.noticias-em-modal-close {
	position: absolute;
	top: -42px;
	right: 0;
	width: 36px;
	height: 36px;
	background: #fff;
	color: #000;
	border: none;
	border-radius: 50%;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
}
@media (max-width: 768px) {
	.noticias-em-mobile-toggle { display: flex; }
	.noticias-em-filters-inner { display: none; margin-top: 16px; }
	.noticias-em-sidebar.is-open .noticias-em-filters-inner { display: flex; }
	.noticias-em-modal-close { top: 6px; right: 6px; }
}
