/* ==================================================
   NEWSLETTER HOME
   ================================================== */

.newsletter {
	width: 100%;
	padding: 40px 0;
	background: transparent;
}

/*
 * El fondo no ocupa todo el ancho de la página.
 * Queda como un bloque centrado antes del footer.
 */
.newsletter-home__container {
	position: relative;

	width: calc(100% - 60px);
	max-width: 1320px;

	margin: 0 auto;
	padding: 42px 40px;

	border-radius: 20px;
	overflow: hidden;

	background-image:
		linear-gradient(
			rgba(5, 8, 12, 0.18),
			rgba(5, 8, 12, 0.28)
		),
		url('/wp-content/uploads/2024/12/subscription.png');

	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	box-sizing: border-box;
}

.newsletter-home__content {
	position: relative;
	z-index: 1;

	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
}


/* ==================================================
   TÍTULO
   ================================================== */

.newsletter-home__title {
	width: 100%;
	max-width: 900px;

	margin: 0 auto 30px;

	color: #fff;

	font-size: clamp(22px, 2.2vw, 32px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.2px;
	text-align: center;
	text-transform: uppercase;

	white-space: normal;
}


/* ==================================================
   ELIMINAR BLOQUES VACÍOS DE NINJA FORMS
   ================================================== */

.newsletter .nf-before-form,
.newsletter .nf-before-form-content,
.newsletter .nf-after-form,
.newsletter .nf-after-form-content,
.newsletter .nf-form-title,
.newsletter .nf-input-limit,
.newsletter .nf-debug-msg,
.newsletter .nf-before-field,
.newsletter .nf-after-field {
	display: none !important;

	margin: 0 !important;
	padding: 0 !important;

	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.newsletter .nf-before-form nf-section,
.newsletter .nf-before-form-content nf-section,
.newsletter .nf-after-form nf-section,
.newsletter .nf-after-form-content nf-section {
	display: none !important;
}

.newsletter .nf-before-form:empty,
.newsletter .nf-after-form:empty,
.newsletter .nf-response-msg:empty,
.newsletter .nf-debug-msg:empty {
	display: none !important;
}


/* ==================================================
   CONTENEDORES DEL FORMULARIO
   ================================================== */

.newsletter .nf-form-cont,
.newsletter .nf-form-wrap,
.newsletter .nf-form-layout,
.newsletter .nf-form-layout form,
.newsletter .nf-form-layout form > div {
	width: 100% !important;
	max-width: none !important;

	margin: 0 !important;
	padding: 0 !important;

	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box;
}

.newsletter .nf-form-content {
	width: 100% !important;
	max-width: 1040px !important;

	margin: 8px auto 0 !important;
	padding: 28px 34px !important;

	background: rgba(198, 0, 0, 0.9) !important;

	border: none;
	border-radius: 18px;

	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);

	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
}


/* ==================================================
   ETIQUETAS
   ================================================== */

.newsletter .nf-field-label {
	display: block !important;
	margin: 0 0 7px !important;
	padding: 0 !important;
}

.newsletter .nf-field-label label,
.newsletter .listcheckbox-container .nf-field-label label {
	display: block;

	margin: 0;
	padding: 0;

	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.newsletter .ninja-forms-req-symbol {
	color: #fff !important;
}


/* ==================================================
   GRID PRINCIPAL
   ================================================== */

.newsletter nf-rows-wrap {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 28px;
	row-gap: 20px;

	width: 100% !important;
	max-width: none !important;

	margin: 0 !important;
	padding: 0 !important;

	align-items: start;
}

.newsletter .nf-row,
.newsletter nf-cells,
.newsletter .nf-cell,
.newsletter nf-fields,
.newsletter nf-field,
.newsletter .nf-field-container,
.newsletter .field-wrap,
.newsletter .nf-field,
.newsletter .nf-field-element {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;

	margin: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;

	box-sizing: border-box;
}

.newsletter .nf-row {
	float: none !important;
	clear: none !important;
}

/* Intereses a todo el ancho */
.newsletter .nf-row:nth-child(7) {
	grid-column: 1 / -1;
}

/* Botón a todo el ancho */
.newsletter .nf-row:last-child {
	grid-column: 1 / -1;
	text-align: center;
}


/* ==================================================
   INPUTS Y SELECTORES
   ================================================== */

.newsletter input:not([type="checkbox"]):not([type="submit"]),
.newsletter select:not([multiple]) {
	display: block;

	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	height: 50px !important;

	margin: 0 !important;
	padding: 0 16px !important;

	background-color: rgba(255, 255, 255, 0.98) !important;
	color: #3f3f3f !important;

	border: 1px solid rgba(255, 255, 255, 0.95) !important;
	border-radius: 8px !important;

	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;

	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.11) !important;
	box-sizing: border-box;
}

.newsletter input::placeholder {
	color: #5d5d5d;
	opacity: 1;
}

.newsletter select:not([multiple]) {
	padding-right: 44px !important;
	cursor: pointer;
}

.newsletter input:not([type="checkbox"]):not([type="submit"]):focus,
.newsletter select:not([multiple]):focus {
	border-color: #e30613 !important;
	outline: 3px solid rgba(255, 255, 255, 0.35);
	outline-offset: 1px;
}


/* ==================================================
   CAMPO DE INTERESES
   ================================================== */

.newsletter .listcheckbox-container {
	margin-top: 2px !important;
}

.newsletter .listcheckbox-container .nf-field-label {
	margin-bottom: 11px !important;
}

.newsletter .listcheckbox-container .nf-field-label label {
	font-size: 14px;
	text-transform: none;
}

.newsletter .listcheckbox-wrap,
.newsletter .listcheckbox-wrap .nf-field-element {
	width: 100% !important;
	max-width: none !important;
}


/* ==================================================
   GRID DE TARJETAS: 6 EN UNA FILA
   ================================================== */

.newsletter .listcheckbox-wrap ul {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;

	width: 100% !important;
	max-width: none !important;

	margin: 0 !important;
	padding: 0 !important;

	list-style: none !important;
}

.newsletter .listcheckbox-wrap li {
	position: relative;

	display: flex !important;
	align-items: stretch;

	width: 100% !important;
	min-width: 0;
	min-height: 72px;

	margin: 0 !important;
	padding: 0 !important;

	list-style: none !important;
	box-sizing: border-box;
}


/* ==================================================
   CHECKBOX REAL
   ================================================== */

.newsletter .listcheckbox-wrap input[type="checkbox"] {
	position: absolute;
	z-index: 3;

	left: 12px;
	top: 50%;
	transform: translateY(-50%);

	width: 18px !important;
	height: 18px !important;

	margin: 0 !important;
	padding: 0 !important;

	appearance: none;
	-webkit-appearance: none;

	background: transparent;
	border: 2px solid #fff;
	border-radius: 3px;

	cursor: pointer;
	box-sizing: border-box;
}

.newsletter .listcheckbox-wrap input[type="checkbox"]::after {
	content: '';

	position: absolute;
	left: 5px;
	top: 1px;

	display: none;

	width: 5px;
	height: 10px;

	border-right: 2px solid #b40000;
	border-bottom: 2px solid #b40000;

	transform: rotate(45deg);
}

.newsletter .listcheckbox-wrap input[type="checkbox"]:checked {
	background: #fff;
	border-color: #fff;
}

.newsletter .listcheckbox-wrap input[type="checkbox"]:checked::after {
	display: block;
}


/* ==================================================
   TARJETAS DE INTERÉS
   ================================================== */

.newsletter .listcheckbox-wrap li > label {
	position: relative;

	display: flex !important;
	align-items: center;
	justify-content: flex-start;

	width: 100% !important;
	min-width: 0;
	min-height: 60px;

	margin: 0 !important;
	padding: 8px 6px 8px 70px;

	background-color: #3f3f3f;
	background-repeat: no-repeat;
	background-position: 40px center;
	background-size: 22px auto;

	color: #fff;

	border: none;
	border-radius: 8px;

	font-size: 11px;
	font-weight: 700;
	line-height: 1.15;
	text-align: left;

	cursor: pointer;
	box-sizing: border-box;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

/* Imágenes de cada interés */
.newsletter .listcheckbox-wrap li:nth-child(1) > label {
	background-image: url('../img/newsletter/f1_.png');
	background-size: 22px auto;
}

.newsletter .listcheckbox-wrap li:nth-child(2) > label {
	background-image: url('../img/newsletter/moto_gp.png');
	background-size: 22px auto;
}

.newsletter .listcheckbox-wrap li:nth-child(3) > label {
	background-image: url('../img/newsletter/motor.svg');
	background-size: 22px auto;
}

.newsletter .listcheckbox-wrap li:nth-child(4) > label {
	background-image: url('../img/newsletter/cycling.svg');
	background-size: 22px auto;
}

.newsletter .listcheckbox-wrap li:nth-child(5) > label {
	background-image: url('../img/newsletter/events.svg');
	background-size: 22px auto;
}

.newsletter .listcheckbox-wrap li:nth-child(6) > label {
	background-image: url('../img/newsletter/workplace_.png');
	background-size: 20px auto;
}

.newsletter .listcheckbox-wrap li > label:hover {
	background-color: #505050;

	transform: translateY(-1px);
	box-shadow: 0 5px 13px rgba(0, 0, 0, 0.2);
}

/* Tarjeta seleccionada */
.newsletter
	.listcheckbox-wrap
	input[type="checkbox"]:checked
	+ label {
	background-color: #e30613;
	color: #fff;

	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}

.newsletter
	.listcheckbox-wrap
	input[type="checkbox"]:checked
	+ label:hover {
	background-color: #c60000;
}

.newsletter
	.listcheckbox-wrap
	input[type="checkbox"]:focus-visible
	+ label {
	outline: 3px solid #fff;
	outline-offset: 3px;
}


/* ==================================================
   BOTÓN
   ================================================== */

.newsletter input[type="submit"] {
	display: inline-block;

	width: 100% !important;
	max-width: 420px !important;
	height: 54px !important;

	margin: 2px auto 0 !important;
	padding: 0 24px !important;

	background: #050505 !important;
	color: #fff !important;

	border: none !important;
	border-radius: 8px !important;

	font-family: inherit;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 0.3px;
	line-height: 52px;
	text-align: center;
	text-transform: uppercase;

	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.22) !important;
	box-sizing: border-box;
	cursor: pointer;

	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
}

.newsletter input[type="submit"]:hover,
.newsletter input[type="submit"]:focus {
	background: #e30613 !important;
	color: #fff !important;
	transform: translateY(-1px);
}


/* ==================================================
   ERRORES Y MENSAJES
   ================================================== */

.newsletter .nf-error-msg {
	color: #fff !important;
	font-size: 12px;
	font-weight: 600;
}

.newsletter .nf-error-wrap {
	margin-top: 5px;
}

.newsletter .nf-error.field-wrap .nf-field-element::after {
	display: none !important;
}

.newsletter
	.nf-error
	.ninja-forms-field:not([type="checkbox"]):not([type="submit"]) {
	border-color: #fff !important;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35) !important;
}

.newsletter .nf-response-msg {
	width: 100%;
	max-width: 1040px;

	margin: 0 auto 20px !important;
	padding: 18px 22px;

	background: rgba(198, 0, 0, 0.95);
	color: #fff !important;

	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 10px;

	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;

	box-sizing: border-box;
}

.newsletter .nf-response-msg p,
.newsletter .nf-response-msg div,
.newsletter .nf-response-msg span {
	margin: 0;
	color: #fff !important;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.newsletter .nf-form-errors,
.newsletter .nf-form-errors .nf-error-msg {
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}


/* ==================================================
   TABLET
   ================================================== */

@media (max-width: 1100px) {

	.newsletter-home__container {
		width: calc(100% - 28px);
		padding: 32px 22px;
	}

	.newsletter-home__content {
		width: 100%;
		max-width: 940px;
	}

	.newsletter-home__title{
        max-width:700px;
        font-size:28px;
    }

	.newsletter .nf-form-content {
		padding: 26px 24px !important;
	}

	.newsletter nf-rows-wrap {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 22px;
		row-gap: 18px;
	}

	.newsletter .nf-row:nth-child(7),
	.newsletter .nf-row:last-child {
		grid-column: 1 / -1;
	}

	.newsletter .listcheckbox-wrap ul {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}
}


/* ==================================================
   MÓVIL
   ================================================== */

@media (max-width: 768px) {

	.newsletter {
		padding: 24px 0;
	}

	.newsletter-home__container {
		width: calc(100% - 20px);
		padding: 28px 16px 30px;
		border-radius: 12px;
	}

	.newsletter-home__content {
		width: 100%;
	}

	.newsletter-home__title {
		max-width:100%;
        font-size:24px;
        line-height:1.2;
	}

	.newsletter .nf-form-content {
		padding: 22px 16px !important;
		border-radius: 12px;
	}

	.newsletter nf-rows-wrap {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.newsletter .nf-row:nth-child(7),
	.newsletter .nf-row:last-child {
		grid-column: auto;
	}

	.newsletter input:not([type="checkbox"]):not([type="submit"]),
	.newsletter select:not([multiple]) {
		height: 48px !important;
		font-size: 14px;
	}

	.newsletter .listcheckbox-wrap ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.newsletter .listcheckbox-wrap li,
	.newsletter .listcheckbox-wrap li > label {
		min-height: 66px;
	}

	.newsletter .listcheckbox-wrap li > label {
		padding: 10px 12px 10px 78px;
		background-position: 43px center;
		background-size: 26px auto;
		font-size: 13px;
	}

	.newsletter .listcheckbox-wrap li:nth-child(6) > label {
		background-size: 24px auto;
	}

	.newsletter input[type="submit"] {
		max-width: 100% !important;
		height: 52px !important;
		font-size: 17px;
		line-height: 50px;
	}
}


/* ==================================================
   MÓVIL PEQUEÑO
   ================================================== */

@media (max-width: 480px) {

	.newsletter-home__container {
		width: calc(100% - 16px);
		padding: 24px 12px;
	}

	.newsletter-home__title {
		font-size:20px;
        line-height:1.25;
	}

	.newsletter .nf-form-content {
		padding: 20px 12px !important;
	}

	.newsletter .nf-field-label label {
		font-size: 12px;
	}

	.newsletter input:not([type="checkbox"]):not([type="submit"]),
	.newsletter select:not([multiple]) {
		height: 46px !important;
		padding-right: 12px !important;
		padding-left: 12px !important;
		font-size: 13px;
	}

	.newsletter .listcheckbox-wrap ul {
		grid-template-columns: 1fr;
	}

	.newsletter .listcheckbox-wrap li > label {
		min-height: 62px;
		padding: 10px 12px 10px 76px;
		background-position: 42px center;
		background-size: 25px auto;
		font-size: 12px;
	}

	.newsletter .listcheckbox-wrap li:nth-child(6) > label {
		background-size: 23px auto;
	}

	.newsletter input[type="submit"] {
		height: 50px !important;
		font-size: 16px;
		line-height: 48px;
	}

	.newsletter .nf-response-msg {
		padding: 16px 14px;
		font-size: 16px;
	}
}