/**
 * single-ficha.css — CSS compartido para fichas de CPT
 * Usado por: single-curso, single-ayuda, single-agenda, single-recurso
 *
 * Layout 2 columnas (main + aside sticky), tarjeta de datos con
 * cabecera negra, badges, CTA final. Basado en la maqueta v2 (jun 2026).
 *
 * @package Astra Child
 */

/* ═══ Variables ══════════════════════════════════════════════════ */
:root {
	--sf-red: #e8312b;
	--sf-red2: #c0211c;
	--sf-black: #0e0e10;
	--sf-ink: #16161a;
	--sf-gray: #5c5c66;
	--sf-gray-light: #9a9aa4;
	--sf-line: #e7e7ec;
	--sf-soft: #f4f4f6;
}

/* ═══ Resets Astra ═══════════════════════════════════════════════ */
.sf-page .site-content .ast-container,
.sf-page .ast-separate-container #primary,
.sf-page .ast-separate-container .ast-article-single,
.sf-page .ast-separate-container .ast-article-post,
.sf-page #primary > .content-area,
.sf-page .site-main,
.sf-page #primary {
	display: block !important;
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	float: none !important;
}
.sf-page .ast-separate-container .ast-article-single .entry-content,
.sf-page .entry-content { margin: 0 !important; padding: 0 !important; }
.sf-page .entry-content > * { max-width: 100% !important; }
.sf-page .ast-single-post .entry-header,
.sf-page .page .entry-header { display: none !important; }
.sf-page #secondary { display: none !important; }
body.sf-page { background: #fff !important; }

/* ═══ Layout 2 columnas ═════════════════════════════════════════ */
.sf-layout {
	max-width: 1180px;
	margin: 30px auto 0;
	padding: 0 28px;
	display: grid;
	grid-template-columns: 1fr 330px;
	gap: 44px;
	align-items: start;
}

/* ═══ MAIN column ════════════════════════════════════════════════ */

/* Título */
.sf-layout h1 {
	font-size: 34px !important;
	font-weight: 900 !important;
	letter-spacing: -1.2px !important;
	line-height: 1.12 !important;
	margin: 0 !important;
	color: var(--sf-ink);
	text-transform: none !important;
}

/* Meta row (badges debajo del título) */
.sf-meta {
	display: flex;
	gap: 9px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 14px;
}

/* Badges de estado */
.sf-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .8px;
	text-transform: uppercase;
	border-radius: 12px;
	padding: 3px 11px;
}
.sf-badge--open { background: #e8f6ef; color: #1d8a5e; }
.sf-badge--closed { background: var(--sf-soft); color: var(--sf-gray); }
.sf-badge--soon { background: #fef3c7; color: #92660a; }
.sf-badge--past { background: var(--sf-soft); color: var(--sf-gray); }
.sf-badge--gold { background: #fef3c7; color: #b45309; }

/* Chips de categoría/tipo */
.sf-chip {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 14px;
	padding: 3px 10px;
	color: #fff;
	background: var(--sf-gray);
}
.sf-chip--red { background: var(--sf-red); }
.sf-chip--green { background: #1d8a5e; }
.sf-chip--blue { background: #2563eb; }
.sf-chip--gold { background: #b45309; }

/* Imagen hero */
.sf-hero-img {
	margin-top: 24px;
	border-radius: 16px;
	overflow: hidden;
	max-height: 400px;
}
.sf-hero-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	display: block;
	border-radius: 16px;
}

/* Cuerpo (wysiwyg) */
.sf-body {
	margin-top: 26px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--sf-ink);
}
.sf-body h2 {
	font-size: 21px !important;
	font-weight: 800 !important;
	letter-spacing: -.5px !important;
	margin: 28px 0 12px !important;
	text-transform: none !important;
}
.sf-body h3 {
	font-size: 18px !important;
	font-weight: 700 !important;
	margin: 22px 0 10px !important;
	text-transform: none !important;
}

body.sf-page .sf-body h4,
body.sf-page .entry-content h4,
body.sf-page .sf-layout h4 {
	font-size: 11.5px !important;
	font-weight: 800 !important;
	letter-spacing: 1.6px !important;
	text-transform: uppercase !important;
	color: var(--sf-gray) !important;
	margin: 22px 0 10px !important;
}
.sf-body p { margin-bottom: 14px; }
.sf-body ul { margin: 0 0 14px 20px; }
.sf-body li { margin-bottom: 6px; }
.sf-body a { color: var(--sf-red); text-decoration: underline; }
.sf-body a:hover { color: var(--sf-red2); }

/* Aviso / nota informativa */
.sf-aviso {
	background: var(--sf-soft);
	border-radius: 14px;
	padding: 18px 22px;
	font-size: 12.5px;
	color: var(--sf-gray);
	margin-top: 24px;
	line-height: 1.6;
}

/* Formulario embebido (WPForms wrapper) */
.sf-form-wrap {
	margin-top: 34px;
	border: 1px solid var(--sf-line);
	border-radius: 20px;
	padding: 30px 34px;
}
.sf-form-wrap h2 {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -.5px;
	margin: 0 0 6px;
}
.sf-form-wrap > p {
	font-size: 13px;
	color: var(--sf-gray);
	margin: 0 0 14px;
}
/* Reset WPForms dentro del wrap */
.sf-form-wrap .wpforms-container { margin: 0 !important; padding: 0 !important; }

/* Estado "pasado" — formulario oculto */
.sf-form-wrap--past {
	border: none;
	background: var(--sf-soft);
}

/* ═══ ASIDE (sidebar) ════════════════════════════════════════════ */
.sf-layout > aside {
	position: sticky;
	top: 90px;
}

/* Tarjeta de datos prácticos */
.sf-datos {
	border: 1px solid var(--sf-line);
	border-radius: 18px;
	overflow: hidden;
	margin-bottom: 18px;
}
.sf-datos__head {
	background: var(--sf-black);
	color: #fff;
	padding: 18px 22px;
}
.sf-datos__head .sf-badge { margin-bottom: 8px; }
.sf-datos__head b {
	display: block;
	font-size: 16px;
	font-weight: 800;
}

/* Filas key/value */
.sf-datos__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--sf-soft);
	font-size: 13px;
}
.sf-datos__row:last-of-type { border-bottom: none; }
.sf-datos__row span { color: var(--sf-gray); }
.sf-datos__row b { font-weight: 700; text-align: right; }
.sf-datos__row a { color: var(--sf-red); font-weight: 700; text-decoration: none; }
.sf-datos__row a:hover { text-decoration: underline; }

/* Bloque precio */
.sf-datos__precio {
	background: var(--sf-soft);
	padding: 14px 22px;
}
.sf-datos__precio b {
	font-size: 19px;
	font-weight: 900;
	color: var(--sf-red);
}
.sf-datos__precio span {
	font-size: 12px;
	color: var(--sf-gray);
	display: block;
}

/* Botón CTA dentro de la tarjeta */
.sf-datos__cta {
	display: block;
	text-align: center;
	background: var(--sf-red);
	color: #fff;
	border-radius: 0 0 18px 18px;
	padding: 14px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: background .15s;
}
.sf-datos__cta:hover { background: var(--sf-red2); color: #fff; }

/* Bloque secundario sidebar (ponente, organiza, etc.) */
.sf-side-box {
	border: 1px solid var(--sf-line);
	border-radius: 18px;
	padding: 20px 22px;
	margin-bottom: 18px;
}
.sf-side-box h4 {
	font-size: 11.5px !important;
	font-weight: 800 !important;
	letter-spacing: 1.6px !important;
	text-transform: uppercase !important;
	color: var(--sf-gray) !important;
	margin: 0 0 12px !important;
}
.sf-side-box b { font-size: 14.5px; }
.sf-side-box p {
	font-size: 12.5px;
	color: var(--sf-gray);
	margin-top: 8px;
	line-height: 1.55;
}

/* Relacionados compactos en sidebar */
.sf-side-box a.sf-rel-item {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	padding: 9px 0;
	border-bottom: 1px solid var(--sf-soft);
	text-decoration: none;
	color: var(--sf-ink);
}
.sf-side-box a.sf-rel-item:last-of-type { border: none; }
.sf-side-box a.sf-rel-item:hover { color: var(--sf-red); }
.sf-side-box a.sf-rel-item small {
	display: block;
	color: var(--sf-gray);
	font-weight: 400;
	font-size: 10.5px;
	margin-top: 2px;
}

/* Sidebar CTA OFEP / asesoramiento */
.sf-side-cta {
	border: 1px solid var(--sf-line);
	border-radius: 18px;
	padding: 20px 22px;
	margin-bottom: 18px;
	background: var(--sf-soft);
}
.sf-side-cta h4 {
	font-size: 14px !important;
	font-weight: 800 !important;
	margin: 0 0 6px !important;
}
.sf-side-cta p {
	font-size: 12.5px;
	color: var(--sf-gray);
	margin: 0 0 12px;
	line-height: 1.5;
}
.sf-side-cta .sf-side-cta__tel {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 12px;
}
.sf-side-cta a.sf-btn {
	display: inline-block;
	background: var(--sf-red);
	color: #fff;
	padding: 10px 22px;
	border-radius: 28px;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
	transition: background .15s, transform .15s;
}
.sf-side-cta a.sf-btn:hover { background: var(--sf-red2); transform: translateY(-1px); }
.sf-side-cta a.sf-btn--outline {
	background: transparent;
	border: 2px solid var(--sf-line);
	color: var(--sf-ink);
}
.sf-side-cta a.sf-btn--outline:hover { border-color: var(--sf-red); color: var(--sf-red); background: transparent; }

/* ═══ CTA FINAL (full width, debajo del layout) ═════════════════ */
.sf-cta-final {
	max-width: 1180px;
	margin: 40px auto 0;
	padding: 0 28px;
}
.sf-cta-final__inner {
	background: var(--sf-black);
	border-radius: 22px;
	color: #fff;
	padding: 38px 44px;
	position: relative;
	overflow: hidden;
}
.sf-cta-final__inner .sf-cta-ey {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #ff7a74;
}
.sf-cta-final__inner b {
	display: block;
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -.5px;
	margin-top: 8px;
}
.sf-cta-final__inner p {
	color: #b9b9c2;
	font-size: 13.5px;
	margin-top: 8px;
	max-width: 560px;
	font-weight: 300;
}
.sf-cta-final__inner .sf-btn-cta {
	display: inline-block;
	margin-top: 18px;
	background: var(--sf-red);
	color: #fff;
	padding: 13px 28px;
	border-radius: 30px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	position: relative;
	z-index: 2;
	transition: transform .2s, box-shadow .2s;
}
.sf-cta-final__inner .sf-btn-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(232,49,43,.3);
	color: #fff;
}

/* Marca decorativa en el CTA (PNG cabecera PIMEM) */
.sf-cta-final__inner::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 280px;
	height: 280px;
	background-image: url('/wp-content/uploads/2026/06/header-capa-pimem.png');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: bottom right;
	opacity: .15;
	pointer-events: none;
}

/* Spacer antes del footer */
.sf-spacer { height: 40px; }

/* ═══ Responsive ═════════════════════════════════════════════════ */
@media (max-width: 920px) {
	.sf-layout {
		grid-template-columns: 1fr;
	}
	.sf-layout > aside {
		position: static;
	}
	.sf-layout h1 {
		font-size: 27px;
	}
	.sf-form-wrap {
		padding: 20px 18px;
	}
	.sf-cta-final__inner {
		padding: 24px 22px;
	}
	.sf-cta-final__inner b {
		font-size: 19px;
	}
}