/* Base styles taken from BaseSistemasPublicos/styles.css */
:root {
	--primary-color: #800020;
	--secondary-color: #800020;
	--footer-color: #800020;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background-color: #f5f5f5;
	color: #333;
	line-height: 1.6;
}

.header-top {
	background-color: #ffffff;
	border-bottom: 2px solid #e9ecef;
	padding: 1.5rem 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-top .container-fluid {
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 1800px;
	margin: 0 auto;
	padding: 0 2rem;
}

.logo-img {
	max-height: 90px;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.banner {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
	padding: 60px 40px;
	color: white;
}

.banner-content {
	max-width: 1600px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 30px;
}

.banner-icon {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	width: 100px;
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.banner h1 {
	font-size: 2.5rem;
	font-weight: 400;
	letter-spacing: 0.5px;
}

.main-content {
	max-width: 1600px;
	margin: 40px auto;
	padding: 0 40px;
}

.form-section {
	background-color: white;
	border-radius: 12px;
	padding: 40px;
	margin-bottom: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
}

.section-number {
	/* WCAG AA: #b8516b + blanco = 4.33:1 (falla); #9d4357 + blanco = 5.56:1 ✓ */
	background-color: var(--primary-color);
	color: white;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 1.1rem;
}

.section-icon {
	/* Usar primary en lugar de secondary para coherencia con labels y badges */
	color: var(--primary-color);
}

.section-header h2 {
	/* primary (#9d4357, 5.56:1 > secondary 4.33:1) — ademas cohesiona con el resto */
	color: var(--primary-color);
	font-size: 1.5rem;
	font-weight: 600;
}

.section-description {
	color: #5f6368;
	font-size: 0.95rem;
	margin-bottom: 30px;
	padding-left: 51px;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 25px;
	margin-bottom: 25px;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group.full-width {
	grid-column: 1 / -1;
	margin-bottom: 25px;
}

.form-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	/* WCAG AA – #b8516b = 4.33:1 (falla); --primary-color #9d4357 = 5.56:1 ✓ */
	color: var(--primary-color);
	font-weight: 600;
	margin-bottom: 10px;
	font-size: 0.95rem;
}

.icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.icon-small {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="file"],
input[type="number"],
select,
textarea.text-input {
	padding: 14px 16px;
	/* WCAG AA – border 3:1 vs blanco: #909090 = 3.17:1 ✓ */
	border: 2px solid #909090;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background-color: #fafafa;
	width: 100%;
}

select {
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
	background-position:
		calc(100% - 20px) calc(50% - 3px),
		calc(100% - 15px) calc(50% - 3px);
	background-size:
		6px 6px,
		6px 6px;
	background-repeat: no-repeat;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
select:focus,
textarea.text-input:focus {
	outline: none;
	/* WCAG: usar primary en lugar de secondary para coherencia con labels */
	border-color: var(--primary-color);
	background-color: white;
	box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.15);
}

input::placeholder,
textarea::placeholder {
	color: #6b7280;
}

.help-text {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: #666;
	font-size: 0.85rem;
}

	.help-text .icon-small {
		flex-shrink: 0; /* Evita que el icono se encoja */
		width: 14px; /* Asegura tamaño fijo */
		height: 14px;
	}

.form-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
}

.button-primary {
	/* WCAG AA – #b8516b = 4.33:1 con texto blanco (falla); #9d4357 = 5.56:1 ✓ */
	background-color: var(--primary-color);
	color: white;
	border: none;
	border-radius: 8px;
	padding: 14px 22px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.button-primary:hover {
	background-color: #600018;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(128, 0, 32, 0.35);
}

.button-primary:focus {
	outline: none;
	box-shadow:
		0 0 0 0.1rem white,
		0 0 0 0.25rem rgba(128, 0, 32, 0.55);
}

.button-primary:disabled,
.button-primary[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.footer {
	background: var(--footer-color);
	color: white;
	padding: 40px 40px 30px;
	margin-top: 60px;
}

.footer-content {
	max-width: 1600px;
	margin: 0 auto;
	text-align: center;
}

.footer h3 {
	font-size: 1.3rem;
	font-weight: 500;
	margin-bottom: 20px;
}

.footer-info {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.footer-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.footer-icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.footer-help {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 20px 0;
}

.footer-help a {
	color: white;
	text-decoration: underline;
}

.footer-copyright {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 0.9rem;
}

@media (max-width: 768px) {
	.header-top .container-fluid {
		flex-direction: column;
		gap: 1rem;
	}

	.banner-content {
		flex-direction: column;
		text-align: center;
	}

	.banner h1 {
		font-size: 1.8rem;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.main-content,
	.banner {
		padding-left: 20px;
		padding-right: 20px;
	}

	.form-section {
		padding: 25px;
	}

	.footer-info {
		flex-direction: column;
		gap: 15px;
	}
}

/* ================================================
   InputCheck — Aceptación de términos
   ================================================ */
.terms-acceptance-block {
	background: #fff;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	padding: 18px 20px;
	margin: 8px 0 20px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.terms-acceptance-block:has(input[type="checkbox"]:checked) {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.08);
}

.terms-acceptance-label {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	cursor: pointer;
	margin: 0;
}

/* Contenedor del checkbox custom */
.terms-acceptance-box {
	position: relative;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin-top: 2px;
}

.terms-acceptance-box input[type="checkbox"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
	margin: 0;
	z-index: 1;
}

.terms-acceptance-box::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid #909090;
	border-radius: 5px;
	background: #fff;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.terms-acceptance-box:has(input:checked)::before {
	background: var(--primary-color);
	border-color: var(--primary-color);
}

.terms-acceptance-check-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 0;
	pointer-events: none;
}

.terms-acceptance-box:has(input:checked) .terms-acceptance-check-icon {
	opacity: 1;
}

/* Texto del label */
.terms-acceptance-text {
	font-size: 0.95rem;
	color: #222;
	line-height: 1.55;
	font-weight: 500;
}

.terms-acceptance-required {
	color: var(--primary-color);
	margin-left: 2px;
	font-weight: 700;
}

/* Subtexto / HelpText */
.terms-acceptance-subtext {
	margin: 10px 0 0 36px;
	font-size: 0.83rem;
	color: #666;
	line-height: 1.45;
}

/* ================================================
   Select2 Styles Override
   ================================================ */
.select2-container--default .select2-selection--single {
	padding: 14px 16px;
	border: 2px solid #909090;
	border-radius: 8px;
	background-color: #fafafa;
	height: auto;
	display: flex;
	align-items: center;
	transition: all 0.3s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	font-size: 1rem;
	color: #333;
	line-height: 1.6;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	right: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
	border: none;
	width: 12px;
	height: 6px;
	background-image:
		linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
	background-position: left center, right center;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	margin-top: -3px;
	margin-left: -6px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
	outline: none;
	border-color: var(--primary-color);
	background-color: white;
	box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.15);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #6b7280;
}

