/**
 * Plan Ahorro landing page — component styles.
 *
 * Namespaced under `.plan-ahorro-*` so it never collides with global theme
 * rules. Loaded only on the "Plan Ahorro" page template (see loader.php).
 *
 * @package Hyundai Camiones
 */

/* ---------------------------------------------------------------------------
 * Shared tokens
 * ------------------------------------------------------------------------- */
.plan-ahorro-banner,
.plan-ahorro-benefits,
.plan-ahorro-map,
.plan-ahorro-faq,
.plan-ahorro-terms {
	--pa-primary: #35729F;
	--pa-primary-dark: #001a38;
	--pa-card-bg: #F9F7F6;
	--pa-text: #000000;
	--pa-container: 1140px;
}

.plan-ahorro {
	button {
		outline: none !important;
	}
}

/* ---------------------------------------------------------------------------
 * Banner (used for both the hero and the secondary banner — see
 * components/plan-ahorro/banner.php)
 * ------------------------------------------------------------------------- */
.plan-ahorro-banner {
	line-height: 0;
}

.plan-ahorro-banner__image {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------------
 * Benefits ("Descubre lo que Hyundai Plan Ahorro tiene para ti")
 * ------------------------------------------------------------------------- */
.plan-ahorro-benefits {
	padding: 4.5rem 1.5rem;
	text-align: center;

	@media (max-width: 768px) {
		padding: 2.5rem 1.5rem;
	}
}

.plan-ahorro-benefits__container {
	max-width: var(--pa-container);
	margin: 0 auto;
}

.plan-ahorro-benefits__title {
	font-size: 1.75rem;
	font-weight: 400;
	color: var(--pa-text);
	margin: 0 0 1rem;

	@media (max-width: 768px) {
		font-size: 1.5rem;
	}
}

.plan-ahorro-benefits__title mark {
	background: none;
	color: var(--pa-primary);
}

.plan-ahorro-benefits__intro {
	max-width: 640px;
	margin: 0 auto 2.5rem;
	color: var(--pa-text);
}

.plan-ahorro-benefits__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 2.5rem;
	text-align: left;
}

.plan-ahorro-benefits__card {
	background: var(--pa-card-bg);
	overflow: hidden;
}

.plan-ahorro-benefits__icon {
	display: block;
	width: 100%;
	height: auto;
}

.plan-ahorro-benefits__card-body {
	padding: 1.5rem;
}

.plan-ahorro-benefits__card-title {
	font-size: 1rem;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--pa-primary);
	margin: 0 0 0.75rem;
}

.plan-ahorro-benefits__card-text {
	margin: 0;
	color: var(--pa-text);
}

.plan-ahorro-benefits__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	background: var(--pa-primary);
	color: #fff;
	padding: 0.9rem 1.75rem;
	border-radius: 3px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 4px 4px 0 rgba(2, 2, 2, 0.22);

	&:hover {
		color: #fff;
	}
}

@media (max-width: 768px) {
	.plan-ahorro-benefits__grid {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------------------
 * "Activa tu Plan Ahorro" form
 * ------------------------------------------------------------------------- */
.plan-ahorro-form {
	--pa-primary: #35729f;
	--pa-primary-dark: #001a38;
	--pa-link: #29abe2;
	--pa-text: #231f1f;
	background: var(--pa-primary);
	padding: 3.5rem 1.5rem 5rem;
}

.plan-ahorro-form__container {
	max-width: 1150px;
	margin: 0 auto;
}

.plan-ahorro-form__kicker {
	font-weight: 400;
	font-size: 32px;
	line-height: 100%;
	letter-spacing: 0px;
	text-align: center;
	color: #fff;
	margin: 0 0 2rem;

	@media (max-width: 768px) {
		font-size: 1.5rem;
	}
}

.plan-ahorro-form__kicker strong {
	font-weight: 800;
}

.plan-ahorro-form__card {
	max-width: 1086px;
	margin: 0 auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 80px rgba(0, 0, 0, 0.25);
	padding: 48px 76px;
}

.plan-ahorro-form__title {
	font-weight: 500;
	font-size: 24px;
	line-height: 100%;
	letter-spacing: 0px;
	text-align: center;
	color: var(--pa-text);
	margin: 0 0 0.5rem;

	@media (max-width: 768px) {
		font-size: 1.25rem;
	}
}

.plan-ahorro-form__subtitle {
	text-align: center;
	color: #6b6b6b;
	margin: 0 0 2rem;
}

.plan-ahorro-form__form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.plan-ahorro-form__step-title {
	font-weight: 700;
	font-size: 14px;
	line-height: 16px;
	letter-spacing: 0px;	
	color: #666666;
	text-align: center;
	margin: 0 0 1.25rem;
}

.plan-ahorro-form__row {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.plan-ahorro-form__field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.plan-ahorro-form__field label {
	font-size: 0.9rem;
	color: var(--pa-text);
	margin: 0;
}

.plan-ahorro-form__field .form-control {
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	padding: 0.65rem 0.9rem;
	font-size: 0.9rem;
}

.plan-ahorro-form__field label.error {
	color: #c0392b;
	font-size: 0.8rem;
	order: 3;
}

.plan-ahorro-form__footer {
	grid-column: 1 / -1;
}

.plan-ahorro-form__checkboxes {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0.5rem 0 1.5rem;
}

.plan-ahorro-form__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--pa-text);
}

.plan-ahorro-form__checkbox input {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin: 0.1rem 0 0;
	border: 1.5px solid var(--pa-primary-dark);
	border-radius: 3px;
	accent-color: var(--pa-primary-dark);
}

.plan-ahorro-form__checkbox a {
	color: var(--pa-link);
	text-decoration: none;
}

.plan-ahorro-form__checkbox a.plan-ahorro-form__link--underline {
	text-decoration: underline;
}

.plan-ahorro-form__checkbox label.error {
	display: block;
	color: #c0392b;
	font-size: 0.8rem;
}

.plan-ahorro-form__honeypot {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.plan-ahorro-form__submit-error {
	grid-column: 1 / -1;
	color: #c0392b;
	font-size: 0.85rem;
}

.plan-ahorro-form__submit-error[hidden] {
	display: none;
}

.plan-ahorro-form__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.plan-ahorro-form__next,
.plan-ahorro-form__submit {
	display: none;
	box-sizing: border-box;
	width: 224px;
	height: 48px;
	align-items: center;
	justify-content: center;
	background: var(--pa-primary);
	color: #fff;
	border: 0;
	padding: 14px 32px;
	font-weight: 700;
	cursor: pointer;
	justify-self: start;
}

.plan-ahorro-form__submit {
	display: flex;
}

.plan-ahorro-form__success {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--pa-primary);
	font-weight: 600;
	font-size: 1.1rem;
}

@media (max-width: 768px) {
	.plan-ahorro-form__card {
		padding: 2rem 1.25rem;
	}

	.plan-ahorro-form__form {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.plan-ahorro-form__row {
		flex-direction: column;
		gap: 1.25rem;
	}

	.plan-ahorro-form__step--2,
	.plan-ahorro-form__footer {
		display: none;
	}

	.plan-ahorro-form__next,
	.plan-ahorro-form__submit {
		width: 100%;
	}

	.plan-ahorro-form__next {
		display: flex;
	}

	.plan-ahorro-form__form[data-active-step='2'] .plan-ahorro-form__step--1 {
		display: none;
	}

	.plan-ahorro-form__form[data-active-step='2'] .plan-ahorro-form__step--2,
	.plan-ahorro-form__form[data-active-step='2'] .plan-ahorro-form__footer {
		display: block;
	}
}

/* ---------------------------------------------------------------------------
 * Map / dealer network section (interactive locator — behavior in
 * dealer-locator.js, markup in map-section.php).
 * ------------------------------------------------------------------------- */
.plan-ahorro-map {
	padding: 0;
}

.plan-ahorro-map__header {
	max-width: var(--pa-container);
	margin: 3.125rem auto;
	text-align: center;

	@media (max-width: 768px) {
		margin: 1.25rem auto;
	}
}

.plan-ahorro-map__title {
	font-weight: 500;
	font-size: 32px;
	line-height: 100%;
	letter-spacing: 0px;
	color: var(--pa-text);
	margin: 0 0 0.75rem;
}

.plan-ahorro-map__intro {
	font-weight: 700;
	font-size: 20px;
	line-height: 140%;
	letter-spacing: 0px;
	color: var(--pa-text);
	margin: 0;

	@media (max-width: 768px) {
		font-size: 1rem;
	}
}

.dl-locator {
	position: relative;
	width: 100%;
	min-height: 620px;
}

.dl-map {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #e5e3e0;
	z-index: 1;
}

.dl-panel {
	position: absolute;
	top: 32px;
	left: 48px;
	z-index: 2;
	width: 544px;
	max-width: calc(100% - 64px);
	height: calc(100% - 64px);
	max-height: calc(100% - 64px);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	overflow: hidden;
}

.dl-search {
	box-sizing: border-box;
	height: 80px;
	padding: 24px;
	border-bottom: 1px solid #e8e8e8;
}

.dl-search-input {
	width: 100%;
	box-sizing: border-box;
	border: 0;
	border-radius: 0;
	padding: 0 0 0 calc(16px + 10px);
	font-size: 0.95rem;
	color: var(--pa-text);
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23999999' d='M6.5 0a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13Zm0 1.6a4.9 4.9 0 1 0 0 9.8 4.9 4.9 0 0 0 0-9.8Zm5.65 9.44 3.29 3.29a1 1 0 0 1-1.32 1.5l-.1-.09-3.29-3.29a1 1 0 0 1 1.32-1.5l.1.09Z'/%3E%3C/svg%3E") no-repeat left center / 16px 16px;
}

.dl-search-input::placeholder {
	color: #999;
}

.dl-search-input:focus {
	outline: none;
}

.dl-tabs {
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	height: 63px;
	gap: 0;
	padding: 22px 12px 0;
	overflow-x: auto;
}

.dl-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: 0;
	padding: 0 12px 8px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #8a8a8a;
	white-space: nowrap;
	cursor: pointer;
	flex-shrink: 0;
}

.dl-tab::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: transparent;
}

.dl-tab.is-active {
	color: var(--pa-primary);
}

.dl-tab.is-active::after {
	background: var(--pa-primary);
}

.dl-tab__icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	background-color: currentColor;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

.dl-list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: #35729F transparent;
}

.dl-list::-webkit-scrollbar {
	width: 6px;
}

.dl-list::-webkit-scrollbar-track {
	background: transparent;
}

.dl-list::-webkit-scrollbar-thumb {
	background: #35729F;
	border-radius: 3px;
}

.dl-list__empty {
	padding: 2rem 1.5rem;
	text-align: center;
	color: #8a8a8a;
}

.dl-item {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	background: none;
	border: 0;
	border-bottom: 1px solid #eee;
	padding: 1rem 1.5rem;
	cursor: pointer;
}

.dl-item:last-child {
	border-bottom: 0;
}

.dl-item:hover,
.dl-item.is-active {
	background: var(--pa-card-bg);
}

.dl-item__name {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--pa-primary);
	font-weight: 500;
	margin: 0 0 0.35rem;
}

.dl-item__icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background-color: var(--pa-primary);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

.dl-item__address,
.dl-item__phone {
	margin: 0;
	font-size: 0.85rem;
	color: var(--pa-text);
}

.dl-item__address {
	margin-bottom: 0.15rem;
}

.dl-popup strong {
	display: block;
	color: var(--pa-primary);
	margin-bottom: 0.25rem;
}

.dl-popup p {
	margin: 0 !important;
	font-size: 0.85rem;
	color: var(--pa-text);
}

@media (max-width: 768px) {
	.plan-ahorro-map__title {
		font-size: 1.5rem;
	}

	.dl-locator {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.dl-panel {
		display: contents;
	}

	.dl-search,
	.dl-tabs {
		order: 1;
		background: #fff;
	}

	.dl-tabs {
		border-bottom: 1px solid #eee;
	}

	.dl-map {
		order: 2;
		position: relative;
		inset: auto;
		width: 100%;
		height: 350px;
	}

	.dl-list {
		order: 3;
		max-height: 320px;
		background: #fff;
	}
}

/* ---------------------------------------------------------------------------
 * FAQ accordion ("¿Tienes dudas? Aquí te ayudamos")
 * ------------------------------------------------------------------------- */
.plan-ahorro-faq {
	background: var(--pa-card-bg);
	padding: 4.5rem 1.5rem;

	@media (max-width: 768px) {
		padding: 2.5rem 1.5rem;
	}
}

.plan-ahorro-faq__container {
	max-width: var(--pa-container);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: start;
}

.plan-ahorro-faq__title {
	font-weight: 700;
	font-size: 32px;
	line-height: 150%;
	letter-spacing: 0%;
	color: var(--pa-primary);
	margin: 0;
	max-width: 423px;
}

.plan-ahorro-faq__item {
	border: 1px solid #eee;
	border-bottom: 0;
	background: #fff;
}

.plan-ahorro-faq__item:last-child {
	border-bottom: 1px solid #eee;
}

.plan-ahorro-faq__question {
	margin: 0;
}

.plan-ahorro-faq__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: none;
	border: 0;
	padding: 1rem 1.25rem;
	font-weight: 500;
	line-height: 114.99999999999999%;
	letter-spacing: -1%;
	text-align: left;
	color: var(--pa-text);
	cursor: pointer;
}

.plan-ahorro-faq__icon {
	position: relative;
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

.plan-ahorro-faq__icon::before,
.plan-ahorro-faq__icon::after {
	content: '';
	position: absolute;
	background: var(--pa-text);
	transition: transform 0.2s ease;
}

.plan-ahorro-faq__icon::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
}

.plan-ahorro-faq__icon::after {
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	transform: translateX(-50%);
}

.plan-ahorro-faq__toggle[aria-expanded='true'] .plan-ahorro-faq__icon::after {
	transform: translateX(-50%) scaleY(0);
}

.plan-ahorro-faq__answer p {
	margin: 0;
	padding: 0 1.25rem 1.25rem;
	color: var(--pa-text);
}

.leaflet-control-attribution {
	display: none;
}

@media (max-width: 768px) {
	.plan-ahorro-faq__container {
		grid-template-columns: 1fr;
	}

	.plan-ahorro-faq__title {
		text-align: center;
		font-size: 1.5rem;
	}
}

/* ---------------------------------------------------------------------------
 * Terms & conditions
 * ------------------------------------------------------------------------- */
.plan-ahorro-terms {
	padding: 3.5rem 1.5rem;

	@media (max-width: 768px) {
		padding: 2.5rem 1.5rem;
	}
}

.plan-ahorro-terms__container {
	max-width: 860px;
	margin: 0 auto;
}

.plan-ahorro-terms__title {
	font-weight: 500;
	font-size: 28px;
	line-height: 114.99999999999999%;
	letter-spacing: 0%;
	color: var(--pa-primary);
	margin: 0 0 1.25rem;
	text-align: center;

	@media (max-width: 768px) {
		font-size: 1.5rem;
	}
}

.plan-ahorro-terms__intro {
	font-weight: 400;
	font-size: 22px;
	line-height: 140%;
	letter-spacing: 0px;
	text-align: justify;
	color: var(--pa-text);
	margin: 0 0 1rem;

	@media (max-width: 768px) {
		font-size: 1rem;
	}
}

.plan-ahorro-terms__toggle {
	background: none;
	border: 0;
	padding: 0;
	color: #35729F;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.plan-ahorro-terms__toggle::after {
	content: '';
	width: 14px;
	height: 7px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='7' viewBox='0 0 14 7'%3E%3Cpath fill='%2335729F' d='M6.99991 6.9995C6.77191 6.9995 6.54491 6.9225 6.35991 6.7675L0.359909 1.7675C-0.0640909 1.4145 -0.122091 0.783495 0.231909 0.359495C0.584909 -0.0645046 1.21491 -0.121505 1.63991 0.231495L7.01091 4.7075L12.3729 0.392495C12.8029 0.0464955 13.4329 0.114495 13.7789 0.544495C14.1249 0.974495 14.0569 1.6035 13.6269 1.9505L7.62691 6.7785C7.44391 6.9255 7.22191 6.9995 6.99991 6.9995Z'/%3E%3C/svg%3E") no-repeat center / contain;
	transition: transform 0.3s ease;
}

.plan-ahorro-terms__toggle[aria-expanded='true']::after {
	transform: rotate(180deg);
}

.plan-ahorro-terms__extra {
	display: none;
	margin-top: 1.5rem;
	color: var(--pa-text);
}

.plan-ahorro-terms__extra :is(p, ul, ol) {
	font-weight: 400;
	font-size: 22px;
	line-height: 140%;
	letter-spacing: 0px;
	text-align: justify;
	color: var(--pa-text);

	@media (max-width: 768px) {
		font-size: 1rem;
	}
}

.plan-ahorro-terms__extra.is-open {
	display: block;
}

.plan-ahorro-terms__extra p,
.plan-ahorro-terms__extra ul,
.plan-ahorro-terms__extra ol {
	margin: 0 0 1rem;
}
