/* =========================================================
   HGC Calculadora de Costos de Compraventa
   Mobile-first. Paleta de marca HGC Consultoria Juridica.
   ========================================================= */

.hgc-calc-wrapper {
	--hgc-azul: #0066CC;
	--hgc-azul-hover: #0052a3;
	--hgc-rojo: #E23030;
	--hgc-gris-oscuro: #333333;
	--hgc-gris-secundario: #666666;
	--hgc-gris-claro: #F5F5F5;
	--hgc-blanco: #FFFFFF;

	font-family: 'Inter', 'Lato', 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--hgc-gris-oscuro);
	max-width: 720px;
	margin: 0 auto;
	padding: 16px;
	box-sizing: border-box;
	line-height: 1.55;
}

.hgc-calc-wrapper *,
.hgc-calc-wrapper *::before,
.hgc-calc-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Header / Logo ---------- */

.hgc-calc-header {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
}

.hgc-calc-logo {
	max-width: 220px;
	height: auto;
}

/* ---------- Tipografia ---------- */

.hgc-calc-h1 {
	font-size: 28px;
	font-weight: 700;
	color: var(--hgc-azul);
	margin: 0 0 8px;
	line-height: 1.2;
}

.hgc-calc-subtitle {
	font-size: 16px;
	font-style: italic;
	color: var(--hgc-gris-secundario);
	margin: 0 0 20px;
}

.hgc-calc-h2 {
	font-size: 22px;
	font-weight: 700;
	color: var(--hgc-azul);
	margin: 0 0 12px;
	line-height: 1.25;
}

.hgc-calc-h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--hgc-azul);
	margin: 0 0 8px;
}

.hgc-calc-intro-text {
	font-size: 15px;
	color: var(--hgc-gris-oscuro);
	margin: 0 0 14px;
}

.hgc-calc-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Tarjeta principal / Formulario ---------- */

.hgc-calc-card {
	background: var(--hgc-blanco);
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	padding: 24px 20px;
	margin: 24px 0 32px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hgc-calc-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hgc-calc-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--hgc-gris-oscuro);
}

.hgc-calc-input-group {
	display: flex;
	align-items: center;
	border: 2px solid #dcdcdc;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.hgc-calc-input-group:focus-within {
	border-color: var(--hgc-azul);
}

.hgc-calc-input-prefix {
	padding: 0 0 0 14px;
	font-weight: 700;
	color: var(--hgc-gris-secundario);
}

.hgc-calc-input {
	flex: 1;
	border: none;
	outline: none;
	padding: 14px 14px 14px 6px;
	font-size: 16px;
	color: var(--hgc-gris-oscuro);
	background: transparent;
	width: 100%;
}

.hgc-calc-input-email {
	border: 2px solid #dcdcdc;
	border-radius: 10px;
	padding: 14px;
}

.hgc-calc-input-email:focus {
	outline: none;
	border-color: var(--hgc-azul);
}

.hgc-calc-error {
	color: var(--hgc-rojo);
	font-size: 13px;
	margin: 0;
	min-height: 16px;
}

/* ---------- Botones ---------- */

.hgc-calc-btn {
	display: inline-block;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 28px;
	padding: 14px 28px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
	transition: background-color 0.15s ease, transform 0.1s ease;
	text-align: center;
}

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

.hgc-calc-btn-primary {
	background-color: var(--hgc-azul);
	color: var(--hgc-blanco);
}

.hgc-calc-btn-primary:hover {
	background-color: var(--hgc-azul-hover);
}

.hgc-calc-btn-whatsapp {
	background-color: #25D366;
	color: var(--hgc-blanco);
	width: 100%;
	margin: 16px 0 8px;
}

.hgc-calc-btn-whatsapp:hover {
	background-color: #1fb855;
}

.hgc-calc-form .hgc-calc-btn-primary,
.hgc-calc-lead-form .hgc-calc-btn-primary {
	width: 100%;
	margin-top: 6px;
}

/* ---------- Resultados ---------- */

.hgc-calc-resultado {
	margin-top: 24px;
	border-top: 1px solid #eee;
	padding-top: 20px;
}

.hgc-calc-tabla {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.hgc-calc-tabla td {
	padding: 12px 8px;
	border-bottom: 1px solid #eee;
	vertical-align: top;
}

.hgc-calc-monto {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.hgc-calc-fila-total td {
	border-bottom: none;
	border-top: 2px solid var(--hgc-azul);
	color: var(--hgc-azul);
	font-size: 17px;
	padding-top: 14px;
}

.hgc-calc-nota {
	font-size: 13px;
	color: var(--hgc-gris-secundario);
	background: var(--hgc-gris-claro);
	border-radius: 8px;
	padding: 10px 12px;
	margin: 14px 0 0;
}

/* ---------- Captura de lead ---------- */

.hgc-calc-lead-capture {
	margin-top: 28px;
	background: var(--hgc-gris-claro);
	border-radius: 12px;
	padding: 20px;
}

.hgc-calc-lead-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px;
}

.hgc-calc-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: var(--hgc-gris-secundario);
	line-height: 1.4;
}

.hgc-calc-checkbox-label input {
	margin-top: 3px;
	flex-shrink: 0;
}

.hgc-calc-lead-mensaje {
	font-size: 14px;
	margin: 4px 0 0;
	min-height: 18px;
}

.hgc-calc-lead-mensaje.hgc-calc-exito {
	color: #1a8f4d;
	font-weight: 600;
}

.hgc-calc-lead-mensaje.hgc-calc-fallo {
	color: var(--hgc-rojo);
	font-weight: 600;
}

.hgc-calc-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

/* ---------- Secciones informativas ---------- */

.hgc-calc-section {
	padding: 28px 0;
}

.hgc-calc-section-alt {
	background: var(--hgc-gris-claro);
	padding: 28px 20px;
	border-radius: 16px;
	margin: 0 -20px;
}

@media (min-width: 480px) {
	.hgc-calc-section-alt {
		margin: 0;
		padding: 28px 24px;
	}
}

.hgc-calc-section p {
	font-size: 15px;
	margin: 0 0 12px;
}

.hgc-calc-link-cta {
	color: var(--hgc-azul);
	font-weight: 700;
	text-decoration: underline;
	background: none;
	border: none;
	font-size: 15px;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
}

.hgc-calc-link-button {
	display: inline-block;
}

/* ---------- Acordeones ---------- */

.hgc-calc-accordion {
	background: var(--hgc-blanco);
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 8px 0 16px;
}

.hgc-calc-accordion summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--hgc-azul);
	list-style: none;
}

.hgc-calc-accordion summary::-webkit-details-marker {
	display: none;
}

.hgc-calc-accordion summary::before {
	content: '+ ';
}

.hgc-calc-accordion[open] summary::before {
	content: '- ';
}

.hgc-calc-accordion p {
	font-size: 14px;
	margin: 10px 0 0;
	color: var(--hgc-gris-oscuro);
}

/* ---------- Modal ---------- */

.hgc-calc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hgc-calc-modal[hidden] {
	display: none;
}

.hgc-calc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.hgc-calc-modal-contenido {
	position: relative;
	background: var(--hgc-blanco);
	border-radius: 16px;
	padding: 28px 24px;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hgc-calc-modal-cerrar {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--hgc-gris-secundario);
	cursor: pointer;
	padding: 4px 8px;
}

.hgc-calc-lista {
	padding-left: 20px;
	font-size: 14px;
	margin: 0 0 20px;
}

.hgc-calc-lista li {
	margin-bottom: 10px;
}

/* ---------- Herramientas relacionadas (hub futuro) ---------- */

.hgc-calc-herramientas-relacionadas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hgc-calc-herramientas-relacionadas a {
	display: inline-block;
	background: var(--hgc-blanco);
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 10px 16px;
	color: var(--hgc-azul);
	font-weight: 600;
	text-decoration: none;
}

/* ---------- Disclaimer ---------- */

.hgc-calc-disclaimer {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.hgc-calc-disclaimer p {
	font-size: 12px;
	color: var(--hgc-gris-secundario);
	line-height: 1.5;
}

/* ---------- Breakpoints: tablet / desktop ---------- */

@media (min-width: 640px) {
	.hgc-calc-wrapper {
		padding: 32px 24px;
	}

	.hgc-calc-h1 {
		font-size: 36px;
	}

	.hgc-calc-h2 {
		font-size: 26px;
	}

	.hgc-calc-card {
		padding: 32px;
	}

	.hgc-calc-btn-whatsapp {
		width: auto;
	}

	.hgc-calc-form .hgc-calc-btn-primary,
	.hgc-calc-lead-form .hgc-calc-btn-primary {
		width: auto;
	}
}
