/* ==========================================================================
   PokerNoticias - Página Galería (índice de eventos con fotos)
   Los títulos usan doble clase para ganar a los h1/h2/h3 blancos del kit de Elementor.
   ========================================================================== */

.pkn-gi {
	--pkn-gi-ink: #111827;
	--pkn-gi-muted: #6b7280;
	--pkn-gi-line: #e5e7eb;
	--pkn-gi-soft: #f3f4f6;
	--pkn-gi-blue: #0067FE;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 0 48px;
	color: var(--pkn-gi-ink);
}

.pkn-gi *,
.pkn-gi *::before,
.pkn-gi *::after {
	box-sizing: border-box;
}

/* ---------- Cabecera y buscador ---------- */

.pkn-gi .pkn-gi__head {
	margin-bottom: 8px;
}

.pkn-gi .pkn-gi__h1 {
	margin: 0 0 8px;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.15;
	color: var(--pkn-gi-ink);
}

.pkn-gi .pkn-gi__intro {
	max-width: 760px;
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--pkn-gi-muted);
}

.pkn-gi__search {
	position: sticky;
	top: 0;
	z-index: 5;
	margin: 0;
	padding: 10px 0 6px;
	background: linear-gradient(#fff 80%, rgba(255, 255, 255, 0));
}

.pkn-gi .pkn-gi__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.pkn-gi__field {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 640px;
	border: 1.5px solid var(--pkn-gi-line);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pkn-gi__field:focus-within {
	border-color: var(--pkn-gi-blue);
	box-shadow: 0 0 0 4px rgba(0, 103, 254, 0.12);
}

.pkn-gi__field svg {
	flex: none;
	margin-left: 16px;
	color: var(--pkn-gi-muted);
}

.pkn-gi .pkn-gi__input {
	flex: 1;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--pkn-gi-ink);
	font: inherit;
	font-size: 16px; /* 16px evita el zoom automático en iPhone */
}

.pkn-gi .pkn-gi__input::-webkit-search-cancel-button {
	display: none;
}

.pkn-gi .pkn-gi__clear {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin-right: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pkn-gi-soft);
	color: var(--pkn-gi-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.pkn-gi .pkn-gi__clear[hidden] {
	display: none;
}

.pkn-gi .pkn-gi__status {
	min-height: 20px;
	margin: 8px 0 0 4px;
	font-size: 13px;
	color: var(--pkn-gi-muted);
}

/* ---------- Años y rejilla ---------- */

.pkn-gi__year {
	margin-top: 28px;
}

.pkn-gi__year[hidden] {
	display: none;
}

.pkn-gi .pkn-gi__h2 {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--pkn-gi-ink);
}

.pkn-gi__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

/* ---------- Tarjeta de evento ---------- */

.pkn-gi__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--pkn-gi-line);
	border-radius: 14px;
	background: #fff;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.pkn-gi__card[hidden] {
	display: none;
}

.pkn-gi__card:hover {
	border-color: #d1d5db;
	box-shadow: 0 10px 28px rgba(17, 24, 39, 0.1);
	transform: translateY(-2px);
}

.pkn-gi__mosaic {
	position: relative;
	display: grid;
	gap: 2px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--pkn-gi-soft);
}

.pkn-gi__mosaic--3 {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
}

.pkn-gi__mosaic--3 img:first-child {
	grid-row: 1 / 3;
}

.pkn-gi__mosaic--2 {
	grid-template-columns: 1fr 1fr;
}

.pkn-gi__mosaic img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.35s ease;
}

.pkn-gi__card:hover .pkn-gi__mosaic img {
	transform: scale(1.04);
}

.pkn-gi__count {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.78);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
}

.pkn-gi__body {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
	padding: 14px 16px 16px;
	text-align: center;
}

/* Logo del evento como marca de agua, detrás del título y los torneos. */
.pkn-gi .pkn-gi__watermark {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 0;
	width: auto;
	max-width: 70%;
	height: 85%;
	margin: 0;
	object-fit: contain;
	border-radius: 0;
	opacity: 0.1;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.pkn-gi__body > :not(.pkn-gi__watermark) {
	position: relative;
	z-index: 1;
}

.pkn-gi .pkn-gi__h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--pkn-gi-ink);
}

.pkn-gi .pkn-gi__h3 a {
	color: inherit;
	text-decoration: none;
}

.pkn-gi .pkn-gi__h3 a:hover {
	color: var(--pkn-gi-blue);
}

.pkn-gi .pkn-gi__meta {
	margin: 6px 0 0;
	font-size: 13.5px;
	color: var(--pkn-gi-muted);
}

.pkn-gi__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.pkn-gi__chips li {
	margin: 0;
	padding: 0;
}

.pkn-gi .pkn-gi__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border: 1px solid var(--pkn-gi-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pkn-gi-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pkn-gi .pkn-gi__chip span {
	color: var(--pkn-gi-muted);
	font-weight: 500;
}

.pkn-gi .pkn-gi__chip:hover {
	border-color: var(--pkn-gi-blue);
	color: var(--pkn-gi-blue);
}

.pkn-gi .pkn-gi__chip--muted {
	background: var(--pkn-gi-soft);
}

/* Torneo que coincide con la búsqueda */
.pkn-gi .pkn-gi__chip.is-match {
	border-color: var(--pkn-gi-blue);
	background: rgba(0, 103, 254, 0.08);
	color: var(--pkn-gi-blue);
}

.pkn-gi .pkn-gi__empty {
	margin: 32px 0;
	padding: 24px;
	border: 1px dashed var(--pkn-gi-line);
	border-radius: 14px;
	color: var(--pkn-gi-muted);
	text-align: center;
}

.pkn-gi .pkn-gi__empty[hidden] {
	display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.pkn-gi__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.pkn-gi {
		padding-top: 12px;
	}

	.pkn-gi .pkn-gi__h1 {
		font-size: 26px;
	}

	.pkn-gi__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.pkn-gi .pkn-gi__h2 {
		font-size: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pkn-gi *,
	.pkn-gi__card {
		transition: none !important;
	}
}
