<style>
	/* ============================================================ */
	/* ========== VARIABLES GLOBALES (EDITABLES DESDE JS) ========= */
	/* ============================================================ */
    :root {
        --ribbon-top-start: #f9c74f;
        --ribbon-top-mid: #f8961e;
        --ribbon-top-end: #f9c74f;

        --header-bg: #FEF6EB;
        --header-border-bottom: 3px solid #dc3545;

        --lema-color: #000000;
        --lema-bg: rgba(255, 255, 255, 0.85);
        --lema-border-color: #f9c74f;

        --badge-color: #2A78BC;
        --badge-icon-color: #2A78BC;
        --badge-link-color: #2A78BC;
        --badge-link-hover: #2A78BC;
        --badge-border-color: rgba(249, 199, 79, 0.08);

        --form-bg: rgba(255, 255, 255, 0.96);

        --body-bg-start: #0b2a4a;
        --body-bg-mid: #1a4b6d;
        --body-bg-end: #0d3b5a;
    }

	/* ============================================================ */
	/* ========== RESET Y FONDO ========== */
	/* ============================================================ */
	* {
		box-sizing: border-box;
	}

	body {
		min-height: 100vh;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 1rem;
		font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
		background: linear-gradient(145deg, var(--body-bg-start) 0%, var(--body-bg-mid) 40%, var(--body-bg-end) 100%);
		position: relative;
		overflow-x: hidden;
		margin: 0;
		transition: background 0.5s ease;
	}

	body::before {
		content: '';
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background:
			radial-gradient(ellipse at 10% 20%, rgba(249, 199, 79, 0.06) 0%, transparent 50%),
			radial-gradient(ellipse at 90% 80%, rgba(0, 200, 255, 0.05) 0%, transparent 50%);
		pointer-events: none;
		z-index: 0;
	}

	/* ========== FONDO TEXTUAL DECORATIVO ========== */
	.hero-bg {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		color: white;
		z-index: 0;
		padding: 1rem;
		pointer-events: none;
	}

	.hero-bg .numero-edicion {
		font-size: clamp(3rem, 12vw, 9rem);
		font-weight: 900;
		letter-spacing: 0.05em;
		color: rgba(255, 255, 255, 0.05);
		line-height: 1;
		user-select: none;
		text-shadow: 0 0 60px rgba(249, 199, 79, 0.03);
	}

	.hero-bg .titulo-fondo {
		font-size: clamp(1.2rem, 3.5vw, 3.5rem);
		font-weight: 700;
		color: rgba(255, 255, 255, 0.06);
		letter-spacing: 0.08em;
		text-transform: uppercase;
		user-select: none;
	}

	.hero-bg .subtitulo-fondo {
		font-size: clamp(0.8rem, 1.8vw, 1.6rem);
		font-weight: 300;
		color: rgba(255, 255, 255, 0.05);
		letter-spacing: 0.15em;
		user-select: none;
	}

	.hero-bg .lema-fondo {
		font-size: clamp(0.7rem, 1.2vw, 1.2rem);
		font-style: italic;
		color: rgba(255, 255, 255, 0.04);
		margin-top: 0.3rem;
		user-select: none;
	}

	/* ========== TARJETA PRINCIPAL ========== */
	.card-form {
		background: var(--form-bg);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border: 1px solid rgba(255, 255, 255, 0.2);
		border-radius: 32px 32px 24px 24px;
		box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
		max-width: 920px;
		width: 100%;
		position: relative;
		z-index: 10;
		overflow: hidden;
		transition: background 0.5s ease;
	}

	.ribbon-top {
		height: 5px;
		background: linear-gradient(90deg, var(--ribbon-top-start), var(--ribbon-top-mid), var(--ribbon-top-end));
		width: 100%;
		flex-shrink: 0;
	}

	/* ========== HEADER DE LA TARJETA ========== */
	.card-header-form {
		background-color: var(--header-bg) !important;
		border-bottom: var(--header-border-bottom);
		padding: 1rem 1.5rem;
		color: white;
		display: flex;
		align-items: center;
		gap: 0.8rem;
		flex-wrap: wrap;
		transition: all 0.5s ease;
	}

	.card-header-form .icono-header {
		font-size: 1.6rem;
		color: #f9c74f;
		flex-shrink: 0;
	}

	.card-header-form h5 {
		font-weight: 700;
		margin: 0;
		font-size: 1rem;
		flex: 1;
		min-width: 120px;
	}

	.card-header-form h5 small {
		font-weight: 300;
		font-size: 0.7rem;
		display: block;
		color: rgba(255, 255, 255, 0.7);
	}

	.card-header-form .badge-fecha {
		background: transparent;
		color: var(--badge-color);
		padding: 0.3rem 0.9rem;
		border-radius: 40px;
		font-weight: 600;
		font-size: 0.75rem;
		white-space: nowrap;
		flex-shrink: 0;
		transition: color 0.5s ease;
	}

	/* ========== CUERPO DEL FORMULARIO ========== */
	.form-section {
		padding: 1.5rem;
		background: transparent;
		transition: background 0.5s ease;
	}

	.form-label {
		font-weight: 600;
		font-size: 0.75rem;
		color: #0b2a4a;
		letter-spacing: 0.02em;
		margin-bottom: 0.2rem;
		text-transform: uppercase;
		display: block;
	}

	.form-label i {
		color: #f8961e;
		margin-right: 4px;
		width: 1.1rem;
		font-size: 0.8rem;
	}

	.form-control,
	.form-select {
		border: 2px solid #e2e8f0;
		border-radius: 12px;
		padding: 0.5rem 0.8rem;
		font-size: 0.9rem;
		transition: all 0.2s ease;
		background: #fafcff;
		width: 100%;
		display: block;
	}

	.form-control:focus,
	.form-select:focus {
		border-color: #f9c74f;
		box-shadow: 0 0 0 3px rgba(249, 199, 79, 0.2);
		background: white;
		outline: none;
	}

	.form-control::placeholder {
		color: #adb5bd;
		font-size: 0.8rem;
	}

	/* ============================================================ */
	/* ========== ESTILOS GLOBALES UNIFICADOS ===================== */
	/* ============================================================ */
	.form-control,
	.form-select,
	.ts-wrapper .ts-control {
		height: 44px !important;
		padding: 0.5rem 0.8rem !important;
		font-size: 0.9rem !important;
		line-height: 1.5 !important;
		border: 2px solid #e2e8f0 !important;
		border-radius: 12px !important;
		background-color: #fafcff !important;
		color: #0b2a4a !important;
		transition: all 0.2s ease !important;
	}

	.form-control:focus,
	.form-select:focus,
	.ts-wrapper.focus .ts-control,
	.ts-wrapper:focus .ts-control,
	.ts-wrapper .ts-control:focus {
		border-color: #f9c74f !important;
		box-shadow: 0 0 0 3px rgba(249, 199, 79, 0.25) !important;
		background: white !important;
		outline: none !important;
	}

	.form-control:not(:focus),
	.form-select:not(:focus),
	.ts-wrapper .ts-control:not(:focus) {
		border-color: #e2e8f0 !important;
		box-shadow: none !important;
	}

	/* ============================================================ */
	/* ========== TOMSELECT ======================================= */
	/* ============================================================ */
	#inputPrefijo + .ts-wrapper .ts-control {
		padding-left: 3px !important;
	}
	#inputDocumentoPais + .ts-wrapper .ts-control {
		padding-left: 3px !important;
	}
	#inputNacionalidad + .ts-wrapper .ts-control {
		padding-left: 3px !important;
	}

	.ts-wrapper {
		display: block !important;
	}

	.ts-wrapper .ts-control {
		width: 100% !important;
		background-color: #fafcff !important;
		cursor: text !important;
		padding-right: 2rem !important;
	}

	.ts-wrapper .ts-dropdown {
		border: 2px solid #f9c74f !important;
		border-top: none !important;
		border-radius: 0 0 12px 12px !important;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
		background: white !important;
	}

	.ts-wrapper .ts-dropdown .active {
		background-color: #f9c74f !important;
		color: #0b2a4a !important;
	}

	.ts-wrapper .ts-dropdown .selected {
		background-color: #f9c74f20 !important;
		color: #0b2a4a !important;
	}

	.ts-wrapper .ts-control .ts-arrow {
		border-top-color: #0b2a4a !important;
	}

	.ts-wrapper.focus .ts-control .ts-arrow {
		border-top-color: #f9c74f !important;
	}

	.ts-wrapper .ts-control .item {
		color: #adb5bd !important;
	}

	.ts-wrapper.focus .ts-control .item {
		color: #0b2a4a !important;
	}

	/* ========== INPUT GROUP ========== */
	.input-group {
		display: flex;
		flex-wrap: nowrap;
		align-items: stretch;
		width: 100%;
	}

	.input-group .form-control {
		border-radius: 0;
	}

	.input-group .form-control:first-child {
		border-radius: 12px 0 0 12px;
	}

	.input-group .form-control:last-child {
		border-radius: 0 12px 12px 0;
	}

	.input-group .btn {
		border: 2px solid #e2e8f0;
		border-left: none;
		border-radius: 0 12px 12px 0;
		background: #fafcff;
		color: #0b2a4a;
		padding: 0.5rem 0.8rem;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;
	}

	.input-group .btn:hover {
		background: #f9c74f;
		border-color: #f9c74f;
		color: #0b2a4a;
	}

	.input-group .btn i {
		font-size: 0.9rem;
	}

	.input-group .btn:focus,
	.input-group .btn-default:focus {
		border-color: #f9c74f !important;
		border-left: none !important;
		box-shadow: 0 0 0 3px rgba(249, 199, 79, 0.25) !important;
		background: #f9c74f !important;
		color: #0b2a4a !important;
		outline: none !important;
	}

	.input-group .btn:focus-visible,
	.input-group .btn-default:focus-visible {
		outline: 3px solid #f9c74f !important;
		outline-offset: -2px !important;
	}

	.input-group .form-control:first-child,
	.input-group .form-select:first-child {
		border-radius: 12px 0 0 12px !important;
	}

	.input-group .form-control:last-child,
	.input-group .form-select:last-child {
		border-radius: 0 12px 12px 0 !important;
	}

	.input-group .ts-wrapper {
		border-radius: 12px 0 0 12px !important;
	}

	/* ========== BOTÓN INSCRIBIRSE ========== */
	.btn-inscribir {
		background: linear-gradient(135deg, #f9c74f, #f8961e);
		border: none;
		color: #0b2a4a;
		font-weight: 700;
		padding: 0.8rem 1.5rem;
		border-radius: 60px;
		font-size: 1rem;
		box-shadow: 0 6px 24px rgba(248, 150, 30, 0.3);
		transition: all 0.25s ease;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		width: 100%;
		margin-top: 0.5rem;
	}

	.btn-inscribir:hover {
		transform: scale(1.02) translateY(-2px);
		box-shadow: 0 10px 32px rgba(248, 150, 30, 0.45);
		background: linear-gradient(135deg, #fad06a, #f9a43e);
		color: #0b2a4a;
	}

	.btn-inscribir i {
		margin-right: 8px;
	}

	/* ========== BOTÓN CANCELAR ========== */
	.btn-cancelar {
		background: linear-gradient(135deg, #dc3545, #c0392b);
		border: none;
		color: white;
		font-weight: 700;
		padding: 0.8rem 1.5rem;
		border-radius: 60px;
		font-size: 1rem;
		box-shadow: 0 6px 24px rgba(220, 53, 69, 0.3);
		transition: all 0.25s ease;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		width: 100%;
		margin-top: 0.5rem;
		cursor: pointer;
	}

	.btn-cancelar:hover {
		transform: scale(1.02) translateY(-2px);
		box-shadow: 0 10px 32px rgba(220, 53, 69, 0.45);
		background: linear-gradient(135deg, #e74c5e, #dc3545);
		color: white;
	}

	.btn-cancelar:focus {
		border-color: #f9c74f !important;
		box-shadow: 0 0 0 3px rgba(249, 199, 79, 0.25) !important;
		outline: none !important;
	}

	/* ========== FOOTER ========== */
	.footer-form {
		border-top: 2px solid rgba(11, 42, 74, 0.06);
		padding-top: 0.8rem;
		margin-top: 0.5rem;
		font-size: 0.7rem;
		color: #1a4b6d;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 0.3rem;
	}

	.footer-form i {
		color: #f8961e;
	}

	.footer-form span {
		white-space: nowrap;
	}

	/* ========== FOOTER EXTERNO ========== */
	.footer-externo {
		margin-top: 1.5rem;
		text-align: center;
		color: #1a4b6d;
		font-size: 0.8rem;
		position: relative;
		z-index: 10;
	}

	.footer-externo a {
		color: rgba(255, 255, 255, 0.4);
		text-decoration: none;
	}

	.footer-externo a:hover {
		color: rgba(255, 255, 255, 0.6);
	}

	/* ========== VALIDACIÓN ========== */
	.invalid-feedback {
		display: none;
		font-size: 0.75rem;
		color: #dc3545;
		margin-top: 0.2rem;
	}

	.invalid-feedback.float-left {
		float: left;
		width: 100%;
	}

	.is-invalid {
		border-color: #dc3545 !important;
	}

	.is-invalid:focus {
		box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
	}

	#info {
		margin-top: 0.5rem;
		font-size: 0.9rem;
	}

	#promises {
		display: none;
	}

	.clearfix::after {
		content: "";
		clear: both;
		display: table;
	}

	/* ============================================================ */
	/* ========== BADGE FECHA Y LUGAR ============================= */
	/* ============================================================ */
	.badge-fecha {
		background: rgba(249, 199, 79, 0.12);
		border: 1px solid var(--badge-border-color);
		color: var(--badge-color);
		padding: 0.4rem 1rem;
		border-radius: 40px;
		display: flex;
		flex-direction: column;
		gap: 2px;
		min-width: 150px;
		backdrop-filter: blur(4px);
		transition: all 0.5s ease;
	}

	.badge-fecha .badge-item {
		display: flex;
		align-items: center;
		gap: 8px;
		font-weight: 600;
		font-size: 0.75rem;
		white-space: nowrap;
		color: var(--badge-color);
		transition: color 0.5s ease;
	}

	.badge-fecha .badge-item i {
		font-size: 0.85rem;
		width: 16px;
		text-align: center;
		color: var(--badge-icon-color);
		opacity: 0.9;
		transition: color 0.5s ease;
	}

	.badge-fecha .badge-item-mapa {
		font-size: 0.85rem;
		font-weight: 500;
		padding-top: 3px;
		margin-top: 1px;
		border-top: 1px solid var(--badge-border-color);
		opacity: 0.8;
		color: var(--badge-color);
		transition: all 0.5s ease;
	}

	.badge-fecha .badge-item-mapa i {
		font-size: 0.85rem;
		color: var(--badge-icon-color);
		transition: color 0.5s ease;
	}

	.badge-fecha .mapa-link {
		color: var(--badge-link-color);
		text-decoration: none;
		border-bottom: 1px dashed var(--badge-link-color);
		transition: all 0.25s ease;
	}

	.badge-fecha .mapa-link:hover {
		color: var(--badge-link-hover);
		border-bottom-color: var(--badge-link-hover);
	}

	.badge-fecha .mapa-link::after {
		content: '\f35d';
		font-family: 'Font Awesome 6 Free';
		font-weight: 900;
		font-size: 0.5rem;
		margin-left: 4px;
		opacity: 0.5;
	}

	/* ============================================================ */
	/* ========== LEMA ============================================ */
	/* ============================================================ */
	.lema {
		text-align: center !important;
		color: var(--lema-color) !important;
		font-weight: 600;
		font-size: 1.1rem;
		padding: 0;
		width: 100%;
		font-style: italic;
		letter-spacing: 0.02em;
		background: var(--lema-bg);
		border-left: 4px solid var(--lema-border-color);
		border-right: 4px solid var(--lema-border-color);
		transition: all 0.5s ease;
	}

	/* ============================================================ */
	/* ========== RESPONSIVE ====================================== */
	/* ============================================================ */

	@media (max-width: 575.98px) {
		body {
			padding: 0.5rem;
			align-items: flex-start;
			padding-top: 1rem;
		}

		.card-form {
			border-radius: 20px 20px 16px 16px;
			margin: 0 auto;
		}

		.card-header-form {
			padding: 0.8rem 1rem;
			gap: 0.5rem;
			flex-direction: row;
			flex-wrap: wrap;
		}

		.card-header-form .icono-header {
			font-size: 1.3rem;
		}

		.card-header-form h5 {
			font-size: 0.85rem;
			min-width: 80px;
			flex: 1 1 100%;
		}

		.card-header-form h5 small {
			font-size: 0.65rem;
		}

		.card-header-form .badge-fecha {
			font-size: 0.65rem;
			padding: 0.2rem 0.7rem;
			margin-left: 0;
		}

		.form-section {
			padding: 1rem;
		}

		.form-section .row>[class^="col-"] {
			flex: 0 0 100%;
			max-width: 100%;
			margin-bottom: 0.8rem;
		}

		.form-section .row>[class^="col-"]:last-child {
			margin-bottom: 0;
		}

		.form-label {
			font-size: 0.7rem;
		}

		.form-control,
		.form-select {
			font-size: 0.85rem;
			padding: 0.45rem 0.7rem;
			border-radius: 10px;
		}

		.input-group .form-control {
			font-size: 0.85rem;
			padding: 0.45rem 0.7rem;
		}

		.input-group .btn {
			padding: 0.45rem 0.7rem;
		}

		.btn-inscribir {
			font-size: 0.9rem;
			padding: 0.7rem 1rem;
			border-radius: 50px;
		}

		.footer-form {
			font-size: 0.65rem;
			flex-direction: column;
			align-items: center;
			gap: 0.2rem;
		}

		.footer-form span {
			white-space: normal;
		}

		.footer-externo {
			font-size: 0.7rem;
			margin-top: 1rem;
		}

		.badge-fecha {
			min-width: 100%;
			width: 100%;
			align-items: center;
			padding: 0.3rem 0.7rem;
			border-radius: 30px;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: center;
			gap: 0.2rem 0.8rem;
		}

		.badge-fecha .badge-item {
			font-size: 0.65rem;
			white-space: nowrap;
			justify-content: center;
			text-align: center;
			gap: 4px;
		}

		.badge-fecha .badge-item i {
			font-size: 0.85rem;
			width: 14px;
		}

		.badge-fecha .badge-item-mapa {
			font-size: 0.85rem;
			text-align: center;
			white-space: nowrap;
			justify-content: center;
			border-top: none;
			padding-top: 0;
			margin-top: 0;
			opacity: 0.9;
		}

		.badge-fecha .badge-item-mapa::before {
			content: '•';
			margin-right: 6px;
			opacity: 0.3;
		}

		.badge-fecha .badge-item-mapa i {
			font-size: 0.85rem;
		}

		.badge-fecha .mapa-link::after {
			font-size: 0.4rem;
		}
	}

	@media (min-width: 576px) and (max-width: 767.98px) {
		.form-section .row>[class^="col-"] {
			flex: 0 0 100%;
			max-width: 100%;
			margin-bottom: 0.8rem;
		}

		.form-section .row>[class^="col-"]:last-child {
			margin-bottom: 0;
		}

		.card-header-form {
			padding: 1rem 1.2rem;
		}

		.card-header-form h5 {
			font-size: 0.9rem;
		}

		.form-section {
			padding: 1.2rem;
		}

		.badge-fecha {
			min-width: 100%;
			width: 100%;
			align-items: center;
			padding: 0.3rem 0.7rem;
			border-radius: 30px;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: center;
			gap: 0.2rem 0.8rem;
		}

		.badge-fecha .badge-item {
			font-size: 0.85rem;
			white-space: nowrap;
			justify-content: center;
			text-align: center;
			gap: 4px;
		}

		.badge-fecha .badge-item i {
			font-size: 0.85rem;
			width: 14px;
		}

		.badge-fecha .badge-item-mapa {
			font-size: 0.85rem;
			text-align: center;
			white-space: nowrap;
			justify-content: center;
			border-top: none;
			padding-top: 0;
			margin-top: 0;
			opacity: 0.9;
		}

		.badge-fecha .badge-item-mapa::before {
			content: '•';
			margin-right: 6px;
			opacity: 0.3;
		}

		.badge-fecha .badge-item-mapa i {
			font-size: 0.85rem;
		}

		.badge-fecha .mapa-link::after {
			font-size: 0.4rem;
		}
	}

	@media (min-width: 768px) and (max-width: 991.98px) {
		.form-section {
			padding: 1.5rem;
		}

		.badge-fecha {
			padding: 0.4rem 1rem;
			min-width: 160px;
			border-radius: 40px;
			gap: 2px;
		}

		.badge-fecha .badge-item {
			font-size: 0.75rem;
			gap: 8px;
		}

		.badge-fecha .badge-item i {
			font-size: 0.85rem;
			width: 16px;
		}

		.badge-fecha .badge-item-mapa {
			font-size: 0.85rem;
			padding-top: 3px;
			margin-top: 1px;
			border-top: 1px solid rgba(249, 199, 79, 0.08);
		}

		.badge-fecha .badge-item-mapa i {
			font-size: 0.85rem;
		}

		.badge-fecha .mapa-link::after {
			font-size: 0.5rem;
		}
	}

	@media (min-width: 992px) {
		.form-section {
			padding: 2rem;
		}

		.card-header-form {
			padding: 1.2rem 2rem;
		}

		.card-header-form h5 {
			font-size: 1.1rem;
		}

		.badge-fecha {
			padding: 0.5rem 1.2rem;
			min-width: 180px;
			border-radius: 50px;
			gap: 3px;
		}

		.badge-fecha .badge-item {
			font-size: 0.85rem;
			gap: 10px;
		}

		.badge-fecha .badge-item i {
			font-size: 0.85rem;
			width: 18px;
		}

		.badge-fecha .badge-item-mapa {
			font-size: 0.85rem;
			padding-top: 4px;
			margin-top: 2px;
		}

		.badge-fecha .badge-item-mapa i {
			font-size: 0.85rem;
		}

		.badge-fecha .mapa-link::after {
			font-size: 0.55rem;
		}
	}
</style>