/* ==========================================================================
   Globalfinanz — Design base
   --------------------------------------------------------------------------
   Estilos base de marca para HTML plano, extraídos del sitio de referencia
   globalfinanz.es (Divi: Montserrat, headings navy #00008F; botón navy con
   hover #4054B2 del Kit de Elementor). El objetivo es que el contenido y la
   salida de los plugins de tarificador hereden la imagen de marca SIN
   necesidad de un page builder (Elementor/Divi) en esta web.

   Todos los selectores son a nivel de elemento (especificidad baja): actúan
   como valores por defecto, de modo que cualquier componente con sus propias
   clases (formularios de tarificador, etc.) los sobreescribe sin esfuerzo.
   ========================================================================== */

:root {
	/* ── Tokens de marca (canónicos) ── */
	--gf-navy:        #00008F; /* primario / accent_color Divi */
	--gf-navy-dark:   #000063;
	--gf-navy-hover:  #4054B2; /* hover de botón (Kit Elementor) */
	--gf-green:       #23A455; /* secundario / énfasis */
	--gf-red:         #f8262f; /* rojo de marca */
	--gf-ink:         #1c1c2b; /* texto */
	--gf-muted:       #6b6b80;
	--gf-line:        #e2e2ee;
	--gf-bg:          #ffffff;
	--gf-blue-soft:   #D7DEFF; /* "Fondos claros" */
	--gf-blue-softer: #F2F1FF; /* "Fondos más claros" */

	--gf-font-head:   "Montserrat", "Segoe UI", Arial, sans-serif;
	--gf-font-body:   "Montserrat", "Segoe UI", Arial, sans-serif;

	--gf-radius:      14px;
	--gf-radius-btn:  9px;
	--gf-shadow:      0 24px 60px rgba(0, 0, 30, .28);

	/* ── Alias compatibles con Elementor ──
	   Por si se pega markup/CSS que referencie los tokens del Kit. */
	--e-global-color-primary:   var(--gf-navy);
	--e-global-color-secondary: var(--gf-green);
	--e-global-color-text:      var(--gf-ink);
	--e-global-color-accent:    var(--gf-green);
	--e-global-color-3ac4c989:  var(--gf-navy-hover);
	--e-global-color-3f4737d:   var(--gf-blue-soft);
	--e-global-color-f61fad4:   var(--gf-blue-softer);
}

/* ── Documento / cuerpo ───────────────────────────────────────────────────── */

html, body { overflow-x: hidden; }

body {
	font-family: var(--gf-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.8;          /* body_font_height de Divi */
	color: var(--gf-ink);
	background: var(--gf-bg);
}

/* ── Titulares (Montserrat 700, navy) ─────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--gf-font-head);
	font-weight: 700;          /* heading_font_weight de Divi */
	line-height: 1.25;
	color: var(--gf-navy);     /* header_color de Divi */
	margin: 0 0 .6em;
}

h1 { font-size: 2.25rem; }     /* 36px — body_header_size */
h2 { font-size: 1.75rem; }     /* 28px */
h3 { font-size: 1.375rem; }    /* 22px */
h4 { font-size: 1.125rem; }    /* 18px */
h5 { font-size: 1rem; }        /* 16px */
h6 { font-size: .875rem; text-transform: uppercase; letter-spacing: .04em; }

p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

/* ── Enlaces ──────────────────────────────────────────────────────────────── */

a {
	color: var(--gf-navy);     /* link_color de Divi */
	text-decoration: none;
	transition: color .15s ease;
}
a:hover, a:focus { color: var(--gf-navy-hover); text-decoration: underline; }

/* ── Botones ──────────────────────────────────────────────────────────────── */

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.button,
.wp-element-button {
	display: inline-block;
	font-family: var(--gf-font-head);
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .01em;
	color: #fff;
	background-color: var(--gf-navy);   /* button_background = primary */
	border: 0;
	border-radius: var(--gf-radius-btn);
	padding: .8em 1.8em;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, transform .05s ease;
}
button:hover, button:focus,
input[type="submit"]:hover, input[type="submit"]:focus,
input[type="button"]:hover, input[type="button"]:focus,
input[type="reset"]:hover, input[type="reset"]:focus,
.button:hover, .button:focus,
.wp-element-button:hover, .wp-element-button:focus {
	color: #fff;
	background-color: var(--gf-navy-hover);   /* hover #4054B2 */
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
.button:active { transform: translateY(1px); }

/* Variante secundaria (verde de marca) */
.button--secondary,
.is-secondary > .wp-element-button {
	background-color: var(--gf-green);
}
.button--secondary:hover { background-color: #1c8a47; }

/* ── Campos de formulario ─────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
	font-family: var(--gf-font-body);
	font-size: 15px;
	color: var(--gf-ink);
	background-color: #fff;
	border: 1px solid var(--gf-line);
	border-radius: var(--gf-radius-btn);
	padding: .7em .85em;
	max-width: 100%;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--gf-navy);
	box-shadow: 0 0 0 3px rgba(0, 0, 143, .14);
}
textarea { min-height: 120px; resize: vertical; }

label { font-weight: 600; }

/* Checkbox / radio personalizados (marca Globalfinanz, portado de gfz.es).
   Se conservan los selectores .elementor-field-type-* por compatibilidad si
   algún día se pega markup de formularios Elementor. */
input[type="checkbox"],
input[type="radio"],
.elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option input,
.elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input,
.elementor-field-type-radio .elementor-field-subgroup .elementor-field-option input {
	display: inline-block;
	height: 25px;
	width: 25px;
	border: 1px solid #818a91 !important;
	overflow: hidden;
	vertical-align: middle;
	-webkit-appearance: none;
	appearance: none;
	background-color: #fff;
	background-size: 0;
	background-position: center;
	background-repeat: no-repeat;
	text-decoration: none !important;
	border-radius: 8px;
	font-size: 14px;
	line-height: 16px;
	cursor: pointer;
	transition: all 0.2s ease-in-out 0s;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus,
.elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option input:focus,
.elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input:focus,
.elementor-field-type-radio .elementor-field-subgroup .elementor-field-option input:focus {
	outline: 0;
}

@media (min-width: 1025px) {
	input[type="checkbox"]:not(:checked):not(:indeterminate):hover,
	input[type="radio"]:not(:checked):not(:indeterminate):hover,
	.elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option input:not(:checked):not(:indeterminate):hover,
	.elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input:not(:checked):not(:indeterminate):hover,
	.elementor-field-type-radio .elementor-field-subgroup .elementor-field-option input:not(:checked):not(:indeterminate):hover {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='405.272' height='405.272'%3E%3Cpath d='M393.4 124.425L179.603 338.208c-15.832 15.835-41.514 15.835-57.36 0L11.878 227.836c-15.838-15.835-15.838-41.52 0-57.358s41.52-15.84 57.355-.006l81.698 81.7L336.037 67.064c15.84-15.84 41.523-15.83 57.358 0 15.835 15.838 15.835 41.514.006 57.36z' fill='%23999'/%3E%3C/svg%3E");
		background-size: 12px;
	}
}

input[type="checkbox"]:checked,
input[type="checkbox"]:indeterminate,
input[type="radio"]:checked,
.elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option input:checked,
.elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input:indeterminate,
.elementor-field-type-checkbox .elementor-field-subgroup .elementor-field-option input:checked,
.elementor-field-type-radio .elementor-field-subgroup .elementor-field-option input:checked {
	border-color: var(--e-global-color-primary) !important;
	background-color: var(--e-global-color-primary) !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='405.272' height='405.272'%3E%3Cpath d='M393.4 124.425L179.603 338.208c-15.832 15.835-41.514 15.835-57.36 0L11.878 227.836c-15.838-15.835-15.838-41.52 0-57.358s41.52-15.84 57.355-.006l81.698 81.7L336.037 67.064c15.84-15.84 41.523-15.83 57.358 0 15.835 15.838 15.835 41.514.006 57.36z' fill='%23fff'/%3E%3C/svg%3E");
	background-size: 12px;
	background-position: center;
	background-repeat: no-repeat;
	animation: 0.5s isa-pulse;
}

@-webkit-keyframes isa-pulse {
	0%   { box-shadow: 0 0 0 0 var(--e-global-color-primary); }
	100% { box-shadow: 0 0 0 15px transparent; }
}
@keyframes isa-pulse {
	0%   { box-shadow: 0 0 0 0 var(--e-global-color-primary); }
	100% { box-shadow: 0 0 0 15px transparent; }
}

/* ── Otros ────────────────────────────────────────────────────────────────── */

hr { border: 0; border-top: 1px solid var(--gf-line); margin: 1.6em 0; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--gf-line); padding: .6em .8em; text-align: left; }
th { background: var(--gf-blue-softer); color: var(--gf-navy); font-family: var(--gf-font-head); }

::selection { background: rgba(0, 0, 143, .15); }
