/* ═══════════════════════════════════════════════════
 * Home PIMEM — front-page.php
 * CSS dedicado para la página de inicio
 * ═══════════════════════════════════════════════════ */

/* ── Variables ── */
.pimem-home {
	--red: #e8312b;
	--red2: #c0211c;
	--black: #0e0e10;
	--ink: #17171c;
	--gray: #5c5c66;
	--muted: #85858f;
	--line: #e7e7ec;
	--soft: #f4f4f6;
	--green: #147a50;
	--greenbg: #e9f7ef;
	--blue: #1d4ed8;
	--bluebg: #e9eefc;
	--gold: #b45309;
	--goldbg: #fef3c7;
	font-family: Poppins, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	color: var(--ink);
}

.pimem-home .hw {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 36px;
}

/* ═══════════════ 1. HERO ═══════════════ */
.hm-hero {
	background: var(--black);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.hm-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(14,14,16,.97), rgba(14,14,16,.82), rgba(14,14,16,.38)),
	            url('/wp-content/uploads/2026/06/PIMEM-FACHADA.jpg');
	background-size: cover;
	background-position: center;
}

.hm-hero .hw {
	position: relative;
	z-index: 2;
	min-height: 560px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 72px;
	padding-bottom: 96px;
}

.hm-hero .eyeb {
	display: block;
	color: #ff8a84;
	font-weight: 900;
	font-size: 12px;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.hm-hero h1 {
	font-size: 58px;
	font-weight: 900;
	line-height: 1.04;
	letter-spacing: -2.2px;
	max-width: 880px;
	margin: 0;
	color: #fff !important;
}

.hm-hero h1 em {
	font-style: normal;
	color: var(--red);
}

.hm-hero .lead {
	margin-top: 20px;
	color: #dedee5;
	font-size: 18px;
	font-weight: 300;
	max-width: 760px;
}

.hm-hero .actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 32px;
}

/* ── Botones ── */
.hm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--isla-radius-pill) !important;
	padding: 13px var(--isla-space-lg) !important;
	font-weight: 800 !important;
	font-size: 0.95rem !important;
	border: 2px solid transparent;
	cursor: pointer;
	line-height: 1.1;
	transition: background var(--isla-transit-fast), color var(--isla-transit-fast), border-color var(--isla-transit-fast), transform var(--isla-transit-fast) !important;
	text-decoration: none !important;
}

.hm-btn-red { background: var(--isla-red); color: #fff; border-color: var(--isla-red); }
.hm-btn-red:hover { background: var(--isla-red-hover); border-color: var(--isla-red-hover); color: #fff; }
.hm-btn-outline { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.hm-btn-outline:hover { background: var(--isla-red-hover); border-color: var(--isla-red-hover); color: #fff; }
.hm-btn-light { background: #fff; color: var(--black); border-color: #fff; }
.hm-btn-light:hover { background: var(--isla-red-hover); border-color: var(--isla-red-hover); color: #fff; }

/* ═══════════════ 2. QUICK BAND ═══════════════ */
.hm-quick-band {
	margin-top: -46px;
	position: relative;
	z-index: 4;
	background: linear-gradient(to bottom, transparent 46px, #fff 46px);
	padding-bottom: 10px;
}

.hm-quick-grid {
	background: var(--black);
	border: 1px solid #23232a;
	border-radius: 8px;
	box-shadow: 0 22px 58px rgba(0,0,0,.25);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	overflow: hidden;
	color: #fff;
}

.hm-quick {
	padding: 24px;
	border-right: 1px solid #23232a;
	min-height: 136px;
	text-decoration: none;
	color: #fff;
	transition: background .18s;
}

.hm-quick:last-child { border-right: 0; }
.hm-quick:hover { background: #1a1a20; }

.hm-quick small {
	font-size: 10px;
	font-weight: 900;
	color: #ff8a84;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.hm-quick b {
	display: block;
	font-size: 15px;
	font-weight: 900;
	letter-spacing: -.35px;
	margin-top: 8px;
}

.hm-quick span {
	display: block;
	font-size: 12.5px;
	color: #9a9aa4;
	margin-top: 5px;
}

/* ═══════════════ SECCIONES BASE ═══════════════ */
.hm-section {
	padding: 68px 0;
	background: #fff;
}

.hm-section.alt {
	background: var(--soft);
}

.hm-section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.hm-kicker {
	color: var(--red);
	font-weight: 900;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.hm-section h2 {
	font-size: 36px;
	font-weight: 900;
	letter-spacing: -1.2px;
	line-height: 1.12;
	margin-top: 8px;
}

.hm-sub {
	color: var(--gray);
	font-size: 15px;
	max-width: 780px;
	margin-top: 9px;
}

.hm-text-link {
	font-size: 13px;
	font-weight: 900;
	color: var(--red);
	white-space: nowrap;
	text-decoration: none;
}

.hm-text-link:hover {
	text-decoration: underline;
	color: var(--red2);
}

/* ═══════════════ 3. NEED GRID ═══════════════ */
.hm-need-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.hm-need {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 24px;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	transition: .18s;
	text-decoration: none;
	color: inherit;
}

.hm-need:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 42px rgba(0,0,0,.08);
}

.hm-need h3 {
	font-size: 18px;
	font-weight: 900;
	letter-spacing: -.45px;
	line-height: 1.22;
	margin: 0;
}

.hm-need p {
	font-size: 13px;
	color: var(--gray);
	margin-top: 9px;
	flex: 1;
}

.hm-need .hm-go {
	font-size: 13px;
	color: var(--red);
	font-weight: 900;
	margin-top: 16px;
	text-decoration: none;
}

/* ═══════════════ 4. SPLIT: Federación + Hazte socio ═══════════════ */
.hm-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.hm-panel {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 30px;
}

.hm-panel.dark {
	background: var(--black);
	color: #fff;
	border: 0;
	position: relative;
	overflow: hidden;
}

.hm-panel.dark::after {
	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: .15;
	pointer-events: none;
}

.hm-panel h3 {
	font-size: 25px;
	font-weight: 900;
	letter-spacing: -.7px;
	margin: 0;
	color: var(--ink);
}

.hm-panel.dark h3 {
	color: #fff;
}

.hm-panel p {
	font-size: 14px;
	color: var(--gray);
	margin-top: 10px;
}

.hm-panel.dark p {
	color: #cfcfd7;
}

.hm-rows {
	display: grid;
	gap: 12px;
	margin-top: 22px;
}

.hm-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 18px;
	align-items: center;
	border-top: 1px solid var(--line);
	padding-top: 14px;
}

.hm-row:first-child {
	border-top: 0;
	padding-top: 0;
}

.hm-row b {
	font-size: 14px;
	font-weight: 900;
}

.hm-row span {
	display: block;
	font-size: 12.5px;
	color: var(--gray);
	margin-top: 2px;
}

.hm-row a {
	font-size: 13px;
	font-weight: 900;
	color: var(--red);
	text-decoration: none;
}

.hm-row a:hover {
	text-decoration: underline;
}

.hm-panel.dark .hm-row {
	border-color: #303038;
}

.hm-panel.dark .hm-row span {
	color: #b9b9c2;
}

.hm-panel.dark .hm-row a {
	color: #ff8a84;
}

/* ═══════════════ 8. SPOTLIGHT (Actualidad) ═══════════════ */
.hm-spotlight {
	background: var(--black);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.hm-spotlight::after {
	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: 310px;
	opacity: .15;
	pointer-events: none;
}

.hm-spotlight .hw { position: relative; z-index: 2; }
.hm-spotlight h2 { color: #fff !important; }
.hm-spotlight .hm-kicker { color: #ff8a84; }
.hm-spotlight .hm-sub { color: #b9b9c2; }
.hm-spotlight .hm-text-link { color: #ff8a84; }

.hm-spot-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 24px;
	align-items: stretch;
}

.hm-mini-stack {
	display: grid;
	gap: 14px;
}

.hm-feature-news {
	position: relative;
	min-height: 430px;
	border-radius: 8px;
	overflow: hidden;
	background: #222;
	display: flex;
	align-items: flex-end;
	text-decoration: none;
	color: #fff;
}

.hm-feature-news img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(.92) contrast(1.04);
}

.hm-feature-news::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(transparent, rgba(0,0,0,.92) 68%);
}

.hm-feature-news .copy {
	position: relative;
	z-index: 2;
	padding: 28px;
}

.hm-feature-news .copy .hm-chip {
	display: inline-flex;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .7px;
	text-transform: uppercase;
	color: #fff;
	background: var(--red);
	border-radius: 999px;
	padding: 5px 12px;
}

.hm-feature-news h3 {
	font-size: 26px;
	font-weight: 900;
	letter-spacing: -.9px;
	line-height: 1.12;
	margin-top: 12px;
	max-width: 680px;
}

.hm-feature-news .copy p {
	font-size: 14px;
	color: #d7d7df;
	margin-top: 10px;
	max-width: 620px;
}

.hm-media-card {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 14px;
	background: #17171c;
	border: 1px solid #2a2a31;
	border-radius: 8px;
	padding: 12px;
	color: #fff;
	text-decoration: none;
	transition: .18s;
}

/* Sin imagen → single column */
.hm-media-card:not(:has(img)) {
	grid-template-columns: 1fr;
}

.hm-media-card:hover {
	background: #1e1e24;
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0,0,0,.3);
	color: #fff;
}

.hm-media-card img {
	width: 120px;
	height: 86px;
	object-fit: cover;
	border-radius: 6px;
}

.hm-media-card .hm-chip {
	display: inline-flex;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .7px;
	text-transform: uppercase;
	color: var(--red);
	background: #fdeceb;
	border-radius: 999px;
	padding: 4px 9px;
	margin-bottom: 6px;
}

.hm-media-card h4 {
	font-size: 14px;
	font-weight: 900;
	line-height: 1.25;
	margin: 0;
	color: #fff !important;
}

.hm-media-card .meta {
	font-size: 11px;
	color: #9a9aa4;
	display: block;
	margin-top: 7px;
}

/* ═══════════════ 9. RECURSOS ═══════════════ */
.hm-resource-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.hm-rcard {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	min-height: 220px;
	transition: .18s;
	text-decoration: none;
	color: inherit;
}

.hm-rcard:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 42px rgba(0,0,0,.08);
}

.hm-rcard .hm-tag {
	display: inline-flex;
	width: max-content;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .7px;
	text-transform: uppercase;
	color: var(--red);
	background: #fdeceb;
	border-radius: 999px;
	padding: 5px 10px;
	margin-bottom: 14px;
}

.hm-rcard .hm-tag.blue { background: var(--bluebg); color: var(--blue); }
.hm-rcard .hm-tag.gold { background: var(--goldbg); color: var(--gold); }

.hm-rcard h4 {
	font-size: 17px;
	font-weight: 900;
	line-height: 1.28;
	letter-spacing: -.3px;
	margin: 0;
}

.hm-rcard p {
	font-size: 13px;
	color: var(--gray);
	margin-top: 9px;
	flex: 1;
}

.hm-rcard .hm-go {
	font-size: 13px;
	color: var(--red);
	font-weight: 900;
	margin-top: 16px;
}

/* ═══════════════ 10. CTA FINAL (rounded box como agenda/premios) ═══════════════ */
.hm-final-cta-wrap {
	padding: 40px 0;
}

.hm-final-cta {
	background: var(--black);
	color: #fff;
	padding: 60px;
	position: relative;
	overflow: hidden;
	border-radius: 22px;
}

.hm-final-cta::after {
	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: .15;
	pointer-events: none;
}

.hm-final-cta > * {
	position: relative;
	z-index: 2;
}

.hm-final-cta .hm-cta-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
}

.hm-final-cta .actions {
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

.hm-final-cta h2 {
	font-size: 34px;
	color: #fff;
	margin: 0;
	letter-spacing: -1px;
	font-weight: 900;
}

.hm-final-cta p {
	color: #b9b9c2;
	max-width: 710px;
	font-weight: 300;
	margin-top: 8px;
	font-size: 16px;
	line-height: 1.5;
}

/* ═══════════════ LINE-CLAMP para mini-cards dentro de la home ═══════════════ */
.pimem-home .pm-acard h4,
.pimem-home .pm-ncard h4,
.pimem-home .ns-card h4,
.pimem-home .scard h3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pimem-home .pm-acard p,
.pimem-home .pm-ncard p,
.pimem-home .ns-card p {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Spacing shortcode grids dentro del split */
.pimem-home .hm-split .pimem-servicios-grid,
.pimem-home .hm-split .ns-grid,
.pimem-home .hm-split .pm-agenda-grid {
	gap: 14px;
}

/* Asegurar que la sección split de formación+agenda no herede fondo blanco */
.pimem-home .hm-split .pimem-servicios-grid,
.pimem-home .hm-split .ns-grid {
	grid-template-columns: 1fr;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 1120px) {
	.hm-hero .hw {
		min-height: auto;
	}

	.hm-split,
	.hm-spot-grid {
		grid-template-columns: 1fr;
	}

	.hm-quick-grid,
	.hm-need-grid,
	.hm-resource-grid {
		grid-template-columns: 1fr 1fr;
	}

	.hm-final-cta .hm-cta-inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.hm-final-cta {
		padding: 40px;
	}
}

@media (max-width: 720px) {
	.pimem-home .hw {
		padding: 0 22px;
	}

	.hm-hero .hw {
		min-height: auto;
		padding-top: 52px;
		padding-bottom: 92px;
	}

	.hm-hero h1 {
		font-size: 38px;
		letter-spacing: -1.4px;
	}

	.hm-hero .lead {
		font-size: 15px;
	}

	.hm-quick-grid,
	.hm-need-grid,
	.hm-resource-grid {
		grid-template-columns: 1fr;
	}

	.hm-quick {
		border-right: 0;
		border-bottom: 1px solid #23232a;
	}

	.hm-section {
		padding: 52px 0;
	}

	.hm-section h2 {
		font-size: 29px;
	}

	.pimem-home .hm-section-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.hm-panel {
		padding: 24px;
	}

	.hm-final-cta {
		padding: 32px 24px;
		border-radius: 16px;
	}

	.hm-media-card {
		grid-template-columns: 1fr;
	}

	.hm-media-card img {
		width: 100%;
		height: 150px;
	}

	.hm-feature-news {
		min-height: 340px;
	}

	.hm-feature-news h3 {
		font-size: 22px;
	}
}
