/* ═══════════════════════════════════════════
 * Agenda — Listado /agenda/
 * Scope: #ag-listado, .ag-*
 * ═══════════════════════════════════════════ */

/* Hero */
.ag-hero {
	background: var(--isla-ink, #0e0e10);
	color: #fff;
	padding: 46px 0 40px;
}

.ag-wrap {
	max-width: 1500px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
	z-index: 3;
}

.ag-kicker {
	color: var(--isla-red, #e8312b);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
}

.ag-hero h1 {
	font-size: 36px;
	font-weight: 900;
	letter-spacing: -1.3px;
	margin-top: 6px;
	color: #fff;
}

.ag-hero p {
	color: #d4d4db;
	font-weight: 300;
	margin-top: 8px;
	max-width: 640px;
}

.ag-kpi {
	display: inline-block;
	margin-top: 16px;
	background: #17171c;
	border-radius: 14px;
	padding: 10px 18px;
	font-size: 12px;
	color: #9a9aa4;
}

.ag-kpi b {
	color: #4ade80;
	font-size: 18px;
	margin-right: 6px;
}

/* Section */
.ag-section {
	padding: 44px 0;
}

/* Filtros */
.ag-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 26px;
	background: #fff;
	border: 1px solid var(--isla-line, #e7e7ec);
	border-radius: 16px;
	padding: 16px 18px;
}

.ag-search-btn {
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	background: var(--isla-red, #e8312b);
	color: #fff;
	border: 1.5px solid var(--isla-red, #e8312b);
	border-radius: 17px;
	padding: 0 24px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	letter-spacing: 0.5px;
}

.ag-filters input {
	height: 42px;
	box-sizing: border-box;
}

.ag-search-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(232, 49, 43, 0.2);
	background: #c0211c;
	border-color: #c0211c;
}

/* Custom selects — coherente con Actualidad/Ayudas */
.ag-cselect {
	position: relative;
	min-width: 180px;
}

.ag-cselect .cs-head {
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--isla-ink, #16161a);
	border: 1.5px solid var(--isla-line, #e7e7ec);
	border-radius: 17px;
	padding: 0 36px 0 16px;
	height: 42px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	background: #fff;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c5c66' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	transition: all .2s ease;
	user-select: none;
	white-space: nowrap;
}

.ag-cselect:hover .cs-head {
	border-color: var(--isla-gray, #5c5c66);
}

.ag-cselect.open .cs-head {
	border-color: var(--isla-red, #e8312b);
	box-shadow: 0 0 0 1px var(--isla-red, #e8312b);
}

.ag-cselect .cs-body {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	background: #fff;
	border: 1px solid var(--isla-line, #e7e7ec);
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all .2s ease;
	z-index: 100;
	overflow-y: auto;
	max-height: 260px;
	padding: 6px 0;
}

.ag-cselect .cs-body::-webkit-scrollbar { width: 5px; }
.ag-cselect .cs-body::-webkit-scrollbar-track { background: transparent; }
.ag-cselect .cs-body::-webkit-scrollbar-thumb { background: var(--isla-line, #e7e7ec); border-radius: 10px; }
.ag-cselect .cs-body::-webkit-scrollbar-thumb:hover { background: var(--isla-gray, #5c5c66); }

.ag-cselect.open .cs-body {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ag-cselect .cs-opt {
	padding: 8px 16px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--isla-gray, #5c5c66);
	cursor: pointer;
	transition: background .15s, color .15s;
	white-space: nowrap;
}

.ag-cselect .cs-opt:hover {
	background: #fdeceb;
	color: var(--isla-red, #e8312b);
}

.ag-cselect .cs-opt.selected {
	background: #fff;
	color: var(--isla-ink, #16161a);
	font-weight: 600;
}

/* Toggle segmentado (estilo píldoras individuales como Formación) */
.ag-seg {
	display: flex;
	gap: 8px;
}

.ag-seg__btn {
	font-size: 13px;
	font-weight: 700;
	padding: 8px 20px;
	border-radius: 24px;
	cursor: pointer;
	color: var(--isla-gray, #5c5c66);
	background: #fff;
	border: 1.5px solid var(--isla-line, #e7e7ec);
	transition: all .2s ease;
	user-select: none;
}

.ag-seg__btn:hover {
	background: var(--isla-soft, #f4f4f6);
	color: var(--isla-ink, #0e0e10);
}

.ag-seg__btn.on {
	background: var(--isla-red, #e8312b);
	color: #fff;
	border-color: var(--isla-red, #e8312b);
}

/* Clear button — consistente con pimem-clear-filters */
.ag-clear {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 12px;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--isla-red, #e8312b);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: opacity .2s;
}

.ag-clear:hover {
	opacity: 0.7;
}

/* Grid */
.ag-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin-top: 22px;
	transition: opacity .2s;
}

/* Tarjeta de evento */
.ag-ev {
	border: 1px solid var(--isla-line, #e7e7ec);
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s, box-shadow .2s;
	text-decoration: none;
	color: inherit;
	background: #fff;
}

.ag-ev:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, .09);
	color: inherit;
}

.ag-ev--past {
	opacity: .72;
}

/* Bloque de fecha */
.ag-date {
	background: var(--isla-ink, #0e0e10);
	color: #fff;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.ag-date__d {
	font-size: 26px;
	font-weight: 900;
	line-height: 1;
}

.ag-date__my {
	font-size: 11px;
	color: #9a9aa4;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.ag-date__hm {
	margin-left: auto;
	font-size: 12px;
	color: #d4d4db;
}

/* Cuerpo */
.ag-body {
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ag-row {
	display: flex;
	gap: 7px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 9px;
}

/* Chips */
.ag-chip {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .8px;
	text-transform: uppercase;
	border-radius: 14px;
	padding: 3px 10px;
}

.ag-chip--open {
	background: #e8f6ef;
	color: #1d8a5e;
}

.ag-chip--past {
	background: #f0f0f2;
	color: #9a9aa4;
}

.ag-chip--gold {
	background: #fef3c7;
	color: #b45309;
}

.ag-chip--tipo {
	background: var(--isla-soft, #f4f4f6);
	color: var(--isla-gray, #5c5c66);
}

.ag-ev h3 {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.2px;
	color: var(--isla-ink, #16161a);
}

.ag-lugar {
	font-size: 12.5px;
	color: var(--isla-gray, #5c5c66);
	margin-top: 6px;
	flex: 1;
}

.ag-foot {
	margin-top: 12px;
	padding-top: 11px;
	border-top: 1px solid var(--isla-soft, #f4f4f6);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ag-org {
	font-size: 11.5px;
	color: var(--isla-gray, #5c5c66);
}

.ag-go {
	color: var(--isla-red, #e8312b);
	font-weight: 700;
	font-size: 13px;
}

/* Empty */
.ag-empty {
	font-size: 14px;
	color: var(--isla-gray, #5c5c66);
	padding: 30px 0;
	grid-column: 1 / -1;
}

/* Loading */
.ag-loading {
	text-align: center;
	padding: 30px 0;
}

.ag-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid var(--isla-line, #e7e7ec);
	border-top-color: var(--isla-red, #e8312b);
	border-radius: 50%;
	animation: ag-spin .6s linear infinite;
	margin: 0 auto;
}

@keyframes ag-spin {
	to { transform: rotate(360deg); }
}

/* Pagination */
.ag-pagination {
	display: flex;
	justify-content: center;
	gap: 4px;
	flex-wrap: wrap;
	margin-top: 30px;
}

.ag-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--isla-gray, #5c5c66);
	text-decoration: none;
	border: 1px solid var(--isla-line, #e7e7ec);
	transition: all .2s ease;
	cursor: pointer;
}

.ag-pagination .page-numbers.current {
	background: var(--isla-red, #e8312b);
	color: #fff;
	border-color: var(--isla-red, #e8312b);
}

.ag-pagination .page-numbers:hover:not(.current):not(.dots) {
	background: #fdeceb;
	color: #c0211c;
	border-color: var(--isla-red, #e8312b);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(232, 49, 43, .12);
}

.ag-pagination .page-numbers.dots {
	border: none;
	cursor: default;
}

/* Responsive */
@media (max-width: 980px) {
	.ag-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.ag-grid {
		grid-template-columns: 1fr;
	}

	.ag-hero h1 {
		font-size: 28px;
	}

	.ag-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.ag-cselect {
		min-width: 0;
		width: 100%;
	}

	.ag-seg {
		margin-left: 0;
		justify-content: center;
	}
}

/* Nuevas estructuras Agenda */
.ag-hero { background: #0e0e10; color: #fff; position: relative; overflow: hidden; padding: 0; }
.ag-hero-inner { position: relative; z-index: 2; min-height: 480px; display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 70px; align-items: center; padding: 76px 0 88px; }
.ag-eyeb { display: block; color: #ff8a84; font-weight: 900; font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase; margin-bottom: 14px; }
.ag-hero h1 { font-size: 56px; font-weight: 900; line-height: 1.05; letter-spacing: -2.3px; max-width: 790px; margin: 0; color: #fff; }
.ag-hero h1 em { font-style: normal; color: var(--isla-red, #e8312b); }
.ag-lead { margin-top: 21px; color: #dedee5; font-size: 18px; font-weight: 300; max-width: 760px; line-height: 1.6; }
.ag-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.ag-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 14px 26px; font-weight: 900; font-size: 14px; border: 0; cursor: pointer; line-height: 1.1; transition: 0.18s; text-decoration: none; }
.ag-btn-red { background: var(--isla-red, #e8312b); color: #fff; } .ag-btn-red:hover { opacity: 0.9; transform: translateY(-1px); }
.ag-btn-light { background: #fff; color: var(--isla-ink, #0e0e10); } .ag-btn-light:hover { opacity: 0.9; transform: translateY(-1px); }
.ag-btn-outline { border: 2px solid rgba(255,255,255,0.55); color: #fff; background: transparent; } .ag-btn-outline:hover { background: rgba(255,255,255,0.1); }
.ag-hero-card { background: #fff; color: var(--isla-ink, #0e0e10); border-radius: 8px; padding: 26px; box-shadow: 0 28px 70px rgba(0,0,0,0.36); }
.ag-hero-card h3 { font-size: 19px; font-weight: 900; letter-spacing: -0.45px; margin: 0 0 15px; color: var(--isla-ink, #0e0e10); }
.ag-fact { border-top: 1px solid var(--isla-line, #e7e7ec); padding: 14px 0; }
.ag-fact:first-of-type { border-top: 0; }
.ag-fact b { display: block; font-size: 13.5px; font-weight: 900; color: var(--isla-ink, #0e0e10); }
.ag-fact span { display: block; font-size: 12.5px; color: var(--isla-gray, #5c5c66); margin-top: 2px; }

.ag-section-nav { margin-top: -46px; position: relative; z-index: 4; }
.ag-section-grid.dark-mode { background: var(--isla-ink, #0e0e10); border: 0; border-radius: 12px; box-shadow: 0 22px 58px rgba(0,0,0,0.3); display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; }
.ag-section-link { padding: 28px 24px; border-right: 1px solid #1c1c21; min-height: 126px; text-decoration: none; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.ag-section-link:last-child { border-right: 0; }
.ag-section-link b { font-size: 16px; font-weight: 900; letter-spacing: -0.35px; display: block; color: var(--isla-red, #e8312b); margin-bottom: 6px; }
.ag-section-link span { font-size: 13px; color: #a1a1aa; display: block; line-height: 1.4; margin-top: 0; }
.ag-section-link:hover { background: #1b1b22; color: #fff; }

.ag-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.ag-section-head h2 { font-size: 36px; font-weight: 900; letter-spacing: -1.2px; line-height: 1.12; margin-top: 8px; color: var(--isla-ink, #0e0e10); }
.ag-sub { color: var(--isla-gray, #5c5c66); font-size: 15px; max-width: 780px; margin-top: 9px; line-height: 1.6; }

.ag-section-alt { background: var(--isla-soft, #f4f4f6); padding: 68px 0; }
.ag-premis-band { background: var(--isla-ink, #0e0e10); color: #fff; border-radius: 8px; overflow: hidden; display: flex; }
.ag-premis-copy { padding: 42px; width: 100%; }
.ag-premis-copy h2 { color: #fff; font-size: 32px; font-weight: 900; letter-spacing: -1px; line-height: 1.15; margin-top: 8px; }
.ag-premis-copy p { color: #cfcfd7; font-size: 14.5px; margin-top: 12px; max-width: 720px; line-height: 1.6; }

.ag-section-logic { padding: 68px 0; background: #fff; }
.ag-logic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ag-logic-card { background: #fff; border: 1px solid var(--isla-line, #e7e7ec); border-radius: 8px; padding: 24px; min-height: 180px; }
.ag-logic-card h3 { font-size: 18px; font-weight: 900; letter-spacing: -0.45px; color: var(--isla-ink, #0e0e10); margin: 0; }
.ag-logic-card p { font-size: 13px; color: var(--isla-gray, #5c5c66); margin-top: 8px; line-height: 1.6; }

.ag-section-cta { padding: 20px 0 60px; background: #fff; }
.ag-cta-box { background-color: var(--isla-ink, #0e0e10); border-radius: 22px; color: #fff; padding: 60px; position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.ag-cta-box::before { content: ""; position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; background-image: url('/wp-content/uploads/2026/06/header-capa-pimem.png'); background-repeat: no-repeat; background-position: bottom right; background-size: 220px; opacity: 0.2; z-index: 1; pointer-events: none; }
.ag-cta-box > * { position: relative; z-index: 2; }
.ag-cta-box h2 { font-size: 34px; color: #fff; margin: 0; font-weight: 900; letter-spacing: -1px; }
.ag-cta-box p { color: #b9b9c2; max-width: 700px; font-weight: 300; margin-top: 8px; font-size: 16px; line-height: 1.5; }
.ag-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex: none; }

@media(max-width: 1120px) {
	.ag-hero-inner { grid-template-columns: 1fr; }
	.ag-section-grid.dark-mode, .ag-logic-grid { grid-template-columns: 1fr 1fr; }
	.ag-section-link:nth-child(2) { border-right: 0; }
	.ag-section-link:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #1c1c21; }
}

@media(max-width: 720px) {
	.ag-hero-inner { padding: 52px 0 78px; gap: 34px; }
	.ag-hero h1 { font-size: 40px; letter-spacing: -1.4px; }
	.ag-lead { font-size: 15px; }
	.ag-section-grid.dark-mode, .ag-logic-grid { grid-template-columns: 1fr; }
	.ag-section-link { border-right: 0 !important; border-bottom: 1px solid #1c1c21 !important; }
	.ag-section-link:last-child { border-bottom: 0 !important; }
	.ag-premis-copy { padding: 28px; }
	.ag-cta-box { align-items: flex-start; flex-direction: column; padding: 40px; }
}
