/* =========================================================
   Formació 3.0 — Plugin de inscripción (interfaz moderna)
   Todo el CSS está namespaced bajo .f30
   ========================================================= */

.f30 {
	--f30-brand: #006eb7;
	--f30-brand-dark: #005a96;
	--f30-ink: #10233b;
	--f30-muted: #5b6b7f;
	--f30-line: #e4e9f0;
	--f30-bg: #f5f7fa;
	--f30-card: #ffffff;
	--f30-radius: 16px;
	--f30-radius-sm: 10px;
	--f30-shadow: 0 1px 2px rgba(16, 35, 59, .06), 0 12px 28px -12px rgba(16, 35, 59, .18);
	--f30-shadow-hover: 0 2px 4px rgba(16, 35, 59, .08), 0 22px 40px -16px rgba(16, 35, 59, .28);

	box-sizing: border-box;
	width: 100%;
	color: var(--f30-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

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

.f30-viewport {
	animation: f30-fade .28s ease;
}

@keyframes f30-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Cabeceras ─────────────────────────────────────────── */

.f30-head {
	margin-bottom: 1.75rem;
}

.f30-head h2 {
	margin: 0 0 .35rem;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.15;
	color: var(--f30-ink);
}

.f30-head p {
	margin: 0;
	color: var(--f30-muted);
}

.f30-month {
	margin: 2rem 0 1rem;
	font-size: .8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--f30-brand);
}

.f30-month:first-of-type {
	margin-top: 0;
}

/* ── Grid de tarjetas ─────────────────────────────────── */

.f30-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}

.f30-card {
	display: flex;
	flex-direction: column;
	background: var(--f30-card);
	border: 1px solid var(--f30-line);
	border-radius: var(--f30-radius);
	overflow: hidden;
	box-shadow: var(--f30-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}

.f30-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--f30-shadow-hover);
}

.f30-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #dbe6f1, #eef2f7);
	background-size: cover;
	background-position: center;
}

.f30-badge {
	position: absolute;
	top: .75rem;
	left: .75rem;
	padding: .28rem .6rem;
	border-radius: 999px;
	font-size: .68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #fff;
	background: rgba(16, 35, 59, .78);
	backdrop-filter: blur(4px);
}

.f30-badge--urbana    { background: #d1495b; }
.f30-badge--carretera { background: #e8871e; }

.f30-card__body {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: 1.15rem 1.25rem 1.35rem;
	flex: 1;
}

.f30-card__date {
	font-size: .82rem;
	font-weight: 700;
	color: var(--f30-muted);
	text-transform: capitalize;
}

.f30-card__title {
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: -.01em;
}

.f30-card__place {
	color: var(--f30-muted);
	font-size: .95rem;
}

.f30-card .f30-btn {
	margin-top: auto;
}

/* ── Chip de disponibilidad ───────────────────────────── */

.f30-chip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin: .35rem 0 .1rem;
	font-size: .82rem;
	font-weight: 600;
	color: #1a7a4b;
}

.f30-chip::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.f30-chip--full {
	color: #d1495b;
}

/* ── Botones ──────────────────────────────────────────── */

.f30-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .8rem 1.4rem;
	border: 1.5px solid transparent;
	border-radius: var(--f30-radius-sm);
	font: inherit;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.f30-btn:active { transform: translateY(1px); }

.f30-btn--primary {
	background: var(--f30-brand);
	border-color: var(--f30-brand);
	color: #fff;
	width: 100%;
}

.f30-btn--primary:hover {
	background: var(--f30-brand-dark);
	border-color: var(--f30-brand-dark);
	color: #fff;
}

.f30-btn--ghost {
	background: transparent;
	border-color: var(--f30-line);
	color: var(--f30-muted);
}

.f30-btn--ghost:hover {
	border-color: var(--f30-brand);
	color: var(--f30-brand);
}

.f30-btn--danger {
	background: #fff;
	border-color: #e6b0b8;
	color: #b83a4b;
}

.f30-btn--danger:hover {
	background: #fdf0f2;
	border-color: #d1495b;
}

.f30-btn:disabled,
.f30-btn[disabled] {
	opacity: .45;
	cursor: not-allowed;
}

.f30-btn--link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--f30-brand);
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
}

.f30-btn--link:hover { text-decoration: underline; }

/* ── Detalle de sesión ────────────────────────────────── */

.f30-back {
	margin-bottom: 1.25rem;
}

.f30-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: .9rem 1.5rem;
	padding: 1.25rem 1.4rem;
	background: var(--f30-bg);
	border: 1px solid var(--f30-line);
	border-radius: var(--f30-radius);
	margin-bottom: 1.75rem;
}

.f30-meta div {
	font-size: .95rem;
}

.f30-meta span {
	display: block;
	font-size: .72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--f30-muted);
	margin-bottom: .15rem;
}

.f30-section-title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 800;
}

/* ── Lista de horarios ────────────────────────────────── */

.f30-slots {
	display: flex;
	flex-direction: column;
	gap: .7rem;
	margin-bottom: 2rem;
}

.f30-slot {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: .9rem 1.1rem;
	border: 1px solid var(--f30-line);
	border-radius: var(--f30-radius-sm);
	background: var(--f30-card);
}

.f30-slot__time {
	font-size: 1.15rem;
	font-weight: 800;
	min-width: 4rem;
}

.f30-slot__info {
	flex: 1;
	font-size: .88rem;
	color: var(--f30-muted);
}

.f30-slot .f30-btn {
	width: auto;
	flex-shrink: 0;
}

.f30-slot--full {
	opacity: .7;
}

/* ── Notas / recomendaciones ──────────────────────────── */

.f30-notes {
	padding: 1.25rem 1.4rem;
	background: #f0f6fb;
	border: 1px solid #d7e6f2;
	border-radius: var(--f30-radius);
}

.f30-notes h4 {
	margin: 0 0 .75rem;
	font-size: .78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--f30-brand);
}

.f30-notes ul {
	margin: 0;
	padding-left: 1.15rem;
	color: var(--f30-muted);
	font-size: .9rem;
}

.f30-notes li { margin-bottom: .5rem; }
.f30-notes li:last-child { margin-bottom: 0; }

/* ── Formularios ──────────────────────────────────────── */

.f30-panel {
	max-width: 560px;
	margin: 0 auto;
}

.f30-panel--wide {
	max-width: 760px;
}

.f30-tabs {
	display: flex;
	gap: .35rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--f30-line);
}

.f30-tab {
	padding: .7rem .3rem;
	margin-bottom: -1px;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	font: inherit;
	font-size: .9rem;
	font-weight: 700;
	color: var(--f30-muted);
	cursor: pointer;
}

.f30-tab.is-active {
	color: var(--f30-brand);
	border-bottom-color: var(--f30-brand);
}

.f30-pane { display: none; }
.f30-pane.is-active { display: block; }

.f30-field {
	margin-bottom: 1.1rem;
}

.f30-field > label {
	display: block;
	margin-bottom: .4rem;
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--f30-muted);
}

.f30-field input[type="text"],
.f30-field input[type="email"],
.f30-field input[type="tel"],
.f30-field input[type="password"],
.f30-field input[type="date"],
.f30-field select {
	width: 100%;
	padding: .78rem .9rem;
	font: inherit;
	font-size: .95rem;
	color: var(--f30-ink);
	background: #fff;
	border: 1.5px solid var(--f30-line);
	border-radius: var(--f30-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.f30-field input:focus,
.f30-field select:focus {
	outline: none;
	border-color: var(--f30-brand);
	box-shadow: 0 0 0 3px rgba(0, 110, 183, .14);
}

.f30-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.1rem;
}

.f30-form-section {
	margin: 1.75rem 0 1rem;
	font-size: .8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--f30-brand);
}

.f30-check {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	margin-bottom: 1rem;
	font-size: .9rem;
	color: var(--f30-ink);
}

.f30-check input {
	margin-top: .2rem;
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	accent-color: var(--f30-brand);
}

.f30-check label { cursor: pointer; }

.f30-radio-group {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	margin: .5rem 0 1.25rem;
}

.f30-radio {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-size: .88rem;
}

.f30-radio input {
	margin-top: .2rem;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: var(--f30-brand);
}

.f30-fieldlabel {
	display: block;
	margin-bottom: .3rem;
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--f30-muted);
}

.f30-links {
	margin-top: 1.1rem;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	font-size: .9rem;
}

/* ── Alertas ──────────────────────────────────────────── */

.f30-alert {
	padding: .8rem 1rem;
	border-radius: var(--f30-radius-sm);
	margin-bottom: 1rem;
	font-size: .9rem;
	line-height: 1.5;
}

.f30-alert--error {
	background: #fdf0f2;
	color: #9b2c3b;
	border-left: 3px solid #d1495b;
}

.f30-alert--success {
	background: #eefaf3;
	color: #1a5c39;
	border-left: 3px solid #2fa36b;
}

/* ── Estado / mensaje ─────────────────────────────────── */

.f30-state {
	max-width: 520px;
	margin: 1rem auto;
	text-align: center;
	padding: 2.5rem 1.5rem;
}

.f30-state__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1.25rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.9rem;
	color: #fff;
	background: var(--f30-brand);
}

.f30-state--success .f30-state__icon { background: #2fa36b; }
.f30-state--error   .f30-state__icon { background: #d1495b; }

.f30-state p {
	color: var(--f30-muted);
	margin: 0 0 1.5rem;
}

.f30-state strong { color: var(--f30-ink); }

.f30-empty {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--f30-muted);
	font-style: italic;
}

.f30-spinner {
	width: 34px;
	height: 34px;
	margin: 2.5rem auto;
	border: 3px solid var(--f30-line);
	border-top-color: var(--f30-brand);
	border-radius: 50%;
	animation: f30-spin .8s linear infinite;
}

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

.f30-userbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: .75rem;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 560px) {
	.f30-grid-2 { grid-template-columns: 1fr; }
	.f30-slot { flex-wrap: wrap; }
	.f30-slot .f30-btn { width: 100%; }
}
