/* ============ GEINCOR Noticias — frontend ============ */

.gnx-wrap { background: #fff; }
.gnx-container { max-width: 1000px !important; width: 100%; margin-left: auto !important; margin-right: auto !important; padding-top: 48px; padding-bottom: 64px; }

/* Vista de todas las noticias / categorías: todo el ancho */
.gnx-container--full { max-width: 1564px !important; padding-left: 4vw !important; padding-right: 4vw !important; }

/* Encabezado */
.gnx-header { border-bottom: 1px solid #e5e5e5; padding-bottom: 18px; margin-bottom: 22px; }
.gnx-header__title { font-size: 2.4em; font-weight: 800; letter-spacing: .5px; margin: 0; }

/* Filtros (pills) */
.gnx-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.gnx-pill {
	display: inline-block; padding: 7px 16px; border-radius: 6px;
	background: #efefef; color: #333 !important; font-size: 13px; font-weight: 600;
	text-decoration: none !important; transition: background .2s, color .2s;
}
.gnx-pill:hover { background: #dcdcdc; }
.gnx-pill.is-active { background: #1a1a1a; color: #fff !important; }

/* Fila destacada: tarjeta grande + una normal */
.gnx-hero-row { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }

/* Grilla */
.gnx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Tarjeta */
.gnx-card { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: #f4f4f4; }
.gnx-card__media { display: block; position: relative; }
.gnx-card__media img { display: block; width: 100%; height: 220px; object-fit: cover; }
.gnx-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gnx-card__meta { display: flex; justify-content: space-between; align-items: center; }
.gnx-card__date { font-size: 12px; color: #777; }
.gnx-card__cat { font-size: 12px; font-weight: 700; color: #333; }
.gnx-card__title { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 700; }
.gnx-card__title a { color: #1a1a1a !important; text-decoration: none !important; }
.gnx-card__title a:hover { text-decoration: underline !important; }

/* Botón "Ver nota" */
.gnx-vernota { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #1a1a1a !important; text-decoration: none !important; margin-top: auto; }
.gnx-vernota__icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #1a1a1a; color: #fff; font-size: 13px; }
.gnx-vernota:hover .gnx-vernota__icon { background: #c00; }

/* Tarjeta destacada con overlay */
.gnx-card--featured { background: #111; }
.gnx-card--featured .gnx-card__media, .gnx-card--featured .gnx-card__media img { height: 100%; min-height: 420px; }
.gnx-card--featured .gnx-card__overlay {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
	padding: 26px; background: linear-gradient(180deg, rgba(0,0,0,.15) 40%, rgba(0,0,0,.75) 100%);
}
.gnx-card--featured .gnx-card__date { position: absolute; top: 20px; left: 26px; color: #fff; }
.gnx-card--featured .gnx-card__cat { position: absolute; top: 20px; right: 26px; color: #fff; }
.gnx-card--featured .gnx-card__title { color: #fff; font-size: 24px; }
.gnx-card--featured .gnx-vernota { color: #fff !important; }
.gnx-card--featured .gnx-vernota__icon { background: #fff; color: #111; }

/* Paginación */
.gnx-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.gnx-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px;
	border-radius: 6px; background: #efefef; color: #333 !important; text-decoration: none !important; font-size: 13px; font-weight: 600;
}
.gnx-pagination .page-numbers.current { background: #1a1a1a; color: #fff !important; }
.gnx-empty { color: #666; padding: 40px 0; }

/* ---------- Nota individual ---------- */
.gnx-single { max-width: 1000px; }
.gnx-single__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.gnx-single__cats { display: flex; gap: 8px; }
.gnx-single__title { font-size: 2em; line-height: 1.25; font-weight: 800; margin: 0 0 14px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 18px 0; }
.gnx-single__byline { display: flex; align-items: center; gap: 10px; color: #777; font-size: 13px; margin-bottom: 22px; }
.gnx-single__hero { margin: 0 0 28px; }
.gnx-single__hero img { width: 100%; height: auto; border-radius: 12px; display: block; }
.gnx-single__content { font-size: 16px; line-height: 1.8; color: #444; }
.gnx-single__section { margin-top: 40px; }
.gnx-single__subtitle { font-size: 1.3em; font-weight: 800; margin: 0 0 16px; }

/* Galería */
.gnx-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gnx-gallery__item { position: relative; display: block; border-radius: 8px; overflow: hidden; }
.gnx-gallery__item img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform .25s, opacity .25s; }
.gnx-gallery__item:hover img { transform: scale(1.03); opacity: .85; }
.gnx-gallery__zoom {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-size: 40px; font-weight: 300; color: #fff; background: rgba(0,0,0,.35);
	opacity: 0; transition: opacity .25s;
}
.gnx-gallery__item:hover .gnx-gallery__zoom { opacity: 1; }

/* Videos (miniaturas que abren popup) */
.gnx-videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gnx-videos__item { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.gnx-videos__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, opacity .25s; }
.gnx-videos__item:hover img { transform: scale(1.03); opacity: .8; }
.gnx-videos__play {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 62px; height: 62px; border-radius: 50%; background: rgba(200,0,0,.92); color: #fff;
	display: flex; align-items: center; justify-content: center; padding-left: 4px;
	box-shadow: 0 4px 20px rgba(0,0,0,.4); transition: transform .2s, background .2s;
}
.gnx-videos__item:hover .gnx-videos__play { transform: translate(-50%, -50%) scale(1.1); background: #c00; }

/* ---------- Popup / Lightbox ---------- */
body.gnx-lb-open { overflow: hidden; }
.gnx-lb {
	position: fixed; inset: 0; z-index: 99999; display: none;
	align-items: center; justify-content: center;
	background: rgba(0,0,0,.9); padding: 24px;
}
.gnx-lb.is-open { display: flex; }
.gnx-lb__counter { position: absolute; top: 24px; left: 24px; z-index: 2; color: #fff; font-size: 14px; font-weight: 600; opacity: .85; }
.gnx-lb__content { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gnx-lb__content img { max-width: 90vw; max-height: 88vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.gnx-lb__video { position: relative; width: min(1000px, 92vw); aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.gnx-lb__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gnx-lb__close {
	position: absolute; top: 16px; right: 20px; z-index: 2;
	width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1;
	transition: background .2s;
}
.gnx-lb__close:hover { background: #c00; }
.gnx-lb__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.12); color: #fff; font-size: 18px;
	transition: background .2s;
}
.gnx-lb__nav:hover { background: rgba(255,255,255,.3); }
.gnx-lb__prev { left: 18px; }
.gnx-lb__next { right: 18px; }

.gnx-single__back { margin-top: 44px; }

/* ---------- Responsive ---------- */
@media (max-width: 990px) {
	.gnx-hero-row { grid-template-columns: 1fr; }
	.gnx-grid { grid-template-columns: repeat(2, 1fr); }
	.gnx-card--featured .gnx-card__media img { min-height: 300px; }
}
@media (max-width: 640px) {
	.gnx-grid, .gnx-gallery, .gnx-videos { grid-template-columns: 1fr; }
	.gnx-single__title { font-size: 1.5em; }
}
