/**
 * Programa de Beneficios - Safety Garage
 */

.benefits-program {
	position: relative;
	background-color: #122d5c;
	background-image: var(--benefits-bg, linear-gradient(135deg, #1a3a6e 0%, #122d5c 100%));
	background-size: cover;
	background-position: center right;
	background-repeat: no-repeat;
	overflow: hidden;
}

.benefits-program__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(18, 45, 92, 0.95) 0%,
		rgba(18, 45, 92, 0.85) 40%,
		rgba(18, 45, 92, 0.6) 70%,
		rgba(18, 45, 92, 0.4) 100%
	);
	z-index: 1;
}

.benefits-program__container {
	position: relative;
	z-index: 2;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Grid principal 2x2 */
.benefits-program__grid {
	display: grid;
	grid-template-columns: 1fr 380px;
	grid-template-rows: auto auto;
	column-gap: 3rem;
	row-gap: 1.5rem;
	padding: 4rem 0;
}

/* Fila superior izquierda: Header */
.benefits-program__header {
	align-self: end;
}

/* Fila superior derecha: Imagen - pegada al formulario */
.benefits-program__image-area {
	align-self: end;
	margin-bottom: -1.5rem; /* Compensar el row-gap para pegar al formulario */
	position: relative;
	z-index: 1;
}

/* Fila inferior: Tarjetas y Formulario - alineados */
.benefits-program__cards {
	align-self: stretch; /* Ocupar toda la altura de la fila */
	display: flex;
	flex-direction: column;
}

.benefits-program__form-area {
	align-self: start;
}

/* Las tarjetas deben distribuirse para coincidir con la altura del formulario */
.benefits-program__cards .benefits-list {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* Distribuir uniformemente */
}

.benefits-program__title {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 700;
	color: #fff;
	margin: 0 0 1rem;
	line-height: 1.2;
}

.benefits-program__subtitle {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	line-height: 1.6;
}

.benefits-program__intro {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 2rem;
	line-height: 1.6;
}

.benefits-program__intro strong {
	color: #fff;
	font-weight: 700;
}

/* Lista de beneficios */
.benefits-list {
	display: flex;
	flex-direction: column;
	gap: 0; /* Sin gap fijo, se distribuyen con space-between */
}

.benefit-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	background: rgba(255, 255, 255, 0.95);
	padding: 1rem 1.25rem;
	border-radius: 10px;
	border-left: 3px solid var(--sg-dark, #122d5c);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
	transform: translateX(4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.benefit-item__icon {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	background: linear-gradient(135deg, #e8eef4 0%, #dde5ed 100%);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sg-dark, #122d5c);
}

.benefit-item__icon svg {
	width: 20px;
	height: 20px;
}

.benefit-item__text {
	flex: 1;
}

.benefit-item__title {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--sg-dark, #122d5c);
	margin: 0 0 0.2rem;
}

.benefit-item__desc {
	font-size: 0.85rem;
	color: #5a6a7a;
	margin: 0;
	line-height: 1.4;
}

/* Imagen sobre la card */
.benefits-card__image {
	margin: 0;
	padding: 0;
	background: none !important;
	border: none;
	box-shadow: none;
}

.benefits-card__image img {
	width: 100%;
	height: auto;
	display: block;
	background: transparent;
	border-radius: 16px 16px 0 0; /* Redondear solo arriba para unir con el formulario */
}

/* Card de registro */
.benefits-card {
	background: #fff;
	border-radius: 0 0 16px 16px; /* Solo redondear abajo cuando hay imagen arriba */
	padding: 2rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Si no hay imagen, redondear todo */
.benefits-program__form-area:first-child .benefits-card,
.benefits-program__image-area:empty + .benefits-program__form-area .benefits-card {
	border-radius: 16px;
}

.benefits-card__title {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--sg-dark, #122d5c);
	margin: 0 0 1rem;
}

.benefits-card__desc {
	font-size: 0.9rem;
	color: #5a6a7a;
	margin: 0 0 1.5rem;
	line-height: 1.6;
}

.benefits-card__desc strong {
	color: var(--sg-dark, #122d5c);
}

/* Formulario */
.benefits-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.benefits-form__field {
	position: relative;
}

.benefits-form__field input {
	width: 100%;
	padding: 1rem 2.5rem 1rem 1rem;
	border: 1px solid #dde3ea;
	border-radius: 8px;
	font-size: 0.95rem;
	color: var(--sg-dark, #122d5c);
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.benefits-form__field input::placeholder {
	color: #8a9aa8;
}

.benefits-form__field input:focus {
	outline: none;
	border-color: var(--sg-dark, #122d5c);
	box-shadow: 0 0 0 3px rgba(18, 45, 92, 0.1);
}

.benefits-form__required {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sg-red, #c01617);
	font-size: 1rem;
}

.benefits-form__note {
	font-size: 0.8rem;
	color: #8a9aa8;
	margin: 0.5rem 0;
	font-style: italic;
}

.benefits-card__btn {
	display: block;
	width: 100%;
	background: var(--sg-red, #c01617);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	padding: 1rem 1.5rem;
	border: none;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(192, 22, 23, 0.3);
	transition: all 0.3s ease;
	cursor: pointer;
}

.benefits-card__btn:hover {
	background: var(--sg-red-hover, #a81213);
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(192, 22, 23, 0.4);
}

.benefits-card__btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.benefits-card__footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: #8a9aa8;
	margin: 1rem 0 0;
}

.benefits-card__footer svg {
	flex-shrink: 0;
	opacity: 0.6;
}

/* Mensaje de éxito */
.benefits-form__success {
	text-align: center;
	padding: 2rem 1rem;
}

.benefits-form__success svg {
	margin-bottom: 1rem;
}

.benefits-form__success h4 {
	font-size: 1.25rem;
	color: var(--sg-dark, #122d5c);
	margin: 0 0 0.5rem;
}

.benefits-form__success p {
	font-size: 0.9rem;
	color: #5a6a7a;
	margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
	.benefits-program__grid {
		grid-template-columns: 1fr 320px;
		gap: 1.5rem 2rem;
	}
}

@media (max-width: 768px) {
	.benefits-program__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	
	/* En móvil: Header, Imagen, Tarjetas, Formulario en una columna */
	.benefits-program__header {
		order: 1;
	}
	
	.benefits-program__image-area {
		order: 2;
		max-width: 400px;
		margin: 0 auto;
	}
	
	.benefits-program__cards {
		order: 4;
	}
	
	.benefits-program__form-area {
		order: 3;
		max-width: 400px;
		margin: 0 auto;
	}

	.benefits-program__overlay {
		background: linear-gradient(
			to bottom,
			rgba(18, 45, 92, 0.9) 0%,
			rgba(18, 45, 92, 0.85) 100%
		);
	}
}

@media (max-width: 480px) {
	.benefits-program__grid {
		padding: 3rem 0;
	}

	.benefit-item {
		padding: 1rem;
	}

	.benefits-card {
		padding: 1.5rem;
	}
}
