/* ==========================================================================
   gisDESK – Mejoras de accesibilidad (WCAG 2.2 AA), cookies, transiciones
   y ajustes móviles. Brainworks Solutions S.L.
   Este archivo se carga DESPUÉS del resto de hojas de estilo del tema.
   ========================================================================== */

/* ---------- Fuentes locales -------------------------------------------- */
@font-face {
	font-family: 'Atkinson Hyperlegible';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Atkinson Hyperlegible';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
}

:root {
	--gd-teal: #4cc2c0;          /* color de marca (uso decorativo) */
	--gd-teal-text: #1c7674;     /* variante AA para texto / fondos con texto */
	--gd-green-bg: #1f7a4a;      /* variante AA de #3cb878 */
	--gd-text: #5c5c5c;          /* texto de cuerpo (6.7:1 sobre blanco) */
	--gd-dark: #2f2c2c;
	--gd-focus: #0b57d0;
	--gd-zoom: 1;
	--gd-fast: 120ms;
}

/* ---------- Utilidades -------------------------------------------------- */
.gd-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* Saltar al contenido (WCAG 2.4.1) */
.gd-skip-link {
	position: absolute;
	left: 8px; top: -100px;
	z-index: 100000;
	background: #111; color: #fff !important;
	padding: 12px 18px;
	border-radius: 0 0 8px 8px;
	font-size: 16px; text-decoration: underline;
}
.gd-skip-link:focus { top: 0; }

/* Foco visible siempre (WCAG 2.4.7 / 2.4.11 / 2.4.13) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
	outline: 3px solid var(--gd-focus) !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #fff !important;
}
#main-content:focus { outline: none; }

/* ---------- Contraste mínimo (WCAG 1.4.3) en zonas claras --------------- */
.content-wrapper { color: var(--gd-text); }
.content-wrapper .heading-text,
.pricing-tables-item .position-item,
.info-box-content .text,
.content-wrapper p { color: var(--gd-text); }
.content-wrapper .c-white,
.testimonial-slider .text { color: inherit; }
input::placeholder, textarea::placeholder { color: #6b6b6b; opacity: 1; }
.input-white::placeholder { color: #595959; }

.pricing-tables-item .rate { color: var(--gd-teal-text); }
.btn--breez, .btn--primary { background-color: var(--gd-teal-text) !important; }
.bg-green-color { background-color: var(--gd-green-bg) !important; }
.content-wrapper .subscribe .sub-title, .subscribe .sub-title { color: #ffffff !important; }
/* Testimonios: texto oscuro sobre fondo amarillo */
.testimonial-slider .heading .heading-text.c-white { color: var(--gd-dark) !important; }

/* Barra superior oscura */
.top-bar.top-bar-dark .contact-item,
.top-bar.top-bar-dark .contact-item span,
.top-bar.top-bar-dark .follow_us > span,
.top-bar.top-bar-dark span { color: #c9c9c9 !important; }
.top-bar.top-bar-dark a { color: #ffffff; }

/* Pie: textos secundarios */
.footer .sub-title, .sub-footer, .sub-footer span { color: #bdbdbd; }
.sub-footer a { color: #ffffff; text-decoration: underline; }

/* Enlaces de texto distinguibles (WCAG 1.4.1) */
.content-wrapper p a, .gd-legal-links a, .gd-privacy-note a { text-decoration: underline; }

/* Áreas táctiles mínimas (WCAG 2.5.8) */
.social__item, .gd-lang a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Reset de botones que sustituyen a <a href="javascript:"> ---- */
button.menu-icon-trigger, button.top-bar-close, button.popup-close, button.back-to-top, button.top-bar-link {
	background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
button.top-bar-link { background-color: var(--gd-teal-text); color: #fff; padding: 6px 16px 8px; font-size: 14px; }

/* ---------- Selector de idioma accesible ------------------------------- */
.gd-lang { display: inline-flex; gap: 4px; margin: 0; padding: 0; list-style: none; align-items: center; }
.gd-lang li { margin: 0; padding: 0; }
.gd-lang li::after, .gd-lang li::before { display: none !important; }
.gd-lang a { padding: 0 8px; border-radius: 6px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.gd-lang a[aria-current="true"] { background: var(--gd-teal-text); color: #fff !important; }
.gd-lang a:hover { text-decoration: underline; }
.gd-mobile-lang { display: none; }

/* ---------- Enlaces legales en el pie ---------------------------------- */
.gd-legal { padding: 18px 0 6px; text-align: center; }
.gd-legal-links { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.gd-legal-links li { margin: 0; padding: 0; }
.gd-legal-links a, .gd-legal-links button {
	color: #fff; font-size: 14px; background: none; border: 0; padding: 10px 2px; cursor: pointer; text-decoration: underline; font-family: inherit;
	min-height: 44px; display: inline-flex; align-items: center;
}
.gd-company { font-size: 13px; color: #bdbdbd; margin: 0 0 8px; }

/* ---------- Formulario de suscripción --------------------------------- */
.gd-privacy-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; color: #fff; font-size: 14px; line-height: 1.45; }
.gd-privacy-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: #fff; }
.gd-privacy-check a, .gd-privacy-note a { color: #fff; }
.content-wrapper .gd-privacy-note, .gd-privacy-note { color: #fff !important; font-size: 13px; line-height: 1.5; margin: 8px 0 0; opacity: 1; }
.gd-form-status { min-height: 1.5em; margin: 10px 0 0; color: #fff; font-weight: 700; }
.gd-form-status[data-state="error"] { color: #fff; background: #8c1c13; padding: 6px 10px; border-radius: 6px; }
.gd-form-status[data-state="ok"] { color: #fff; background: #0e4f2d; padding: 6px 10px; border-radius: 6px; }
.gd-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mapa con consentimiento ----------------------------------- */
.gd-map-consent {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	min-height: 320px; padding: 32px 16px; text-align: center;
	background: #eef3f3 repeating-linear-gradient(45deg, #eef3f3 0 14px, #e6eded 14px 28px);
	color: var(--gd-dark);
}
.gd-map-consent p { max-width: 560px; margin: 0; color: var(--gd-dark) !important; font-size: 16px; line-height: 1.5; }
.gd-map-consent a { color: var(--gd-teal-text); text-decoration: underline; }

/* ---------- Botones genéricos del sistema gd ------------------------- */
.gd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; border-radius: 50px;
	font: 700 15px/1.2 "Varela Round", Arial, sans-serif; cursor: pointer;
	border: 2px solid var(--gd-dark); background: var(--gd-dark); color: #fff; text-decoration: none;
}
.gd-btn:hover { background: #000; border-color: #000; color: #fff; }
.gd-btn--ghost { background: #fff; color: var(--gd-dark); }
.gd-btn--ghost:hover { background: #f0f0f0; color: #000; }

/* ======================================================================
   BANNER DE COOKIES
   ====================================================================== */
.gd-cookie {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99990;
	max-width: 760px; margin: 0 auto;
	background: #fff; color: var(--gd-dark);
	border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
	padding: 22px 22px 18px; font: 15px/1.55 "Varela Round", Arial, sans-serif;
	max-height: calc(100vh - 32px); overflow: auto;
}
.gd-cookie[hidden] { display: none; }
.gd-cookie h2 { font-size: 20px; margin: 0 0 8px; color: var(--gd-dark); line-height: 1.3; }
.gd-cookie p { margin: 0 0 12px; color: #3d3d3d; }
.gd-cookie a { color: var(--gd-teal-text); text-decoration: underline; }
.gd-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gd-cookie-actions .gd-btn { flex: 1 1 160px; }
.gd-cookie-prefs { border-top: 1px solid #e2e2e2; margin-top: 10px; padding-top: 10px; }
.gd-cookie-prefs[hidden] { display: none; }
.gd-cookie-cat { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #eee; }
.gd-cookie-cat input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--gd-teal-text); }
.gd-cookie-cat label { font-weight: 700; color: var(--gd-dark); cursor: pointer; }
.gd-cookie-cat small { display: block; font-weight: 400; color: #4a4a4a; font-size: 13.5px; }

/* ======================================================================
   WIDGET DE ACCESIBILIDAD
   ====================================================================== */
.gd-a11y-btn {
	position: fixed; left: 16px; bottom: 16px; z-index: 99980;
	width: 56px; height: 56px; border-radius: 50%;
	background: #0b57d0; color: #fff; border: 3px solid #fff;
	box-shadow: 0 4px 16px rgba(0,0,0,.35);
	display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.gd-a11y-btn svg { width: 32px; height: 32px; fill: currentColor; }
.gd-a11y-btn:hover { background: #0842a0; }
.gd-cookie-open .gd-a11y-btn { bottom: auto; top: 12px; z-index: 99995; }
.gd-cookie-open .gd-a11y-panel { bottom: auto; top: 76px; z-index: 99996; }

.gd-a11y-panel {
	position: fixed; left: 16px; bottom: 84px; z-index: 99985;
	width: 360px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); overflow: auto;
	background: #fff; color: #1a1a1a; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.4);
	font: 15px/1.4 Arial, "Helvetica Neue", Helvetica, sans-serif;
	-webkit-overflow-scrolling: touch;
}
.gd-a11y-panel[hidden] { display: none; }
.gd-a11y-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #0b57d0; color: #fff; border-radius: 14px 14px 0 0; position: sticky; top: 0; z-index: 1; }
.gd-a11y-head h2 { margin: 0; font-size: 18px; color: #fff; line-height: 1.2; font-family: inherit; }
.gd-a11y-close { background: transparent; color: #fff; border: 2px solid #fff; border-radius: 8px; width: 40px; height: 40px; font-size: 22px; line-height: 1; cursor: pointer; }
.gd-a11y-body { padding: 14px 16px 16px; }
.gd-a11y-size { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding: 10px; border: 1px solid #d0d0d0; border-radius: 10px; }
.gd-a11y-size span { font-weight: 700; }
.gd-a11y-size output { min-width: 48px; text-align: center; font-weight: 700; }
.gd-a11y-size button { width: 44px; height: 44px; border-radius: 8px; border: 2px solid #1a1a1a; background: #fff; color: #1a1a1a; font-weight: 700; font-size: 18px; cursor: pointer; }
.gd-a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-a11y-opt {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 84px; padding: 10px 6px; border: 2px solid #c4c4c4; border-radius: 10px;
	background: #fafafa; color: #1a1a1a; font: 700 13.5px/1.25 Arial, sans-serif; text-align: center; cursor: pointer;
}
.gd-a11y-opt svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gd-a11y-opt[aria-pressed="true"] { border-color: #0b57d0; background: #e8f0fe; color: #0b3a8a; box-shadow: inset 0 0 0 1px #0b57d0; }
.gd-a11y-opt[aria-pressed="true"]::after { content: "✓"; font-size: 14px; }
.gd-a11y-reset { width: 100%; margin-top: 12px; }
.gd-a11y-note { font-size: 12.5px; color: #444; margin: 12px 0 0; }
.gd-a11y-note a { color: #0b57d0; text-decoration: underline; }

/* --- Preferencias aplicadas ---------------------------------------- */
/* Tamaño (zoom de contenido, sin afectar a los controles del widget) */
html.gd-zoomed .top-bar, html.gd-zoomed #site-header, html.gd-zoomed .content-wrapper,
html.gd-zoomed #site-footer, html.gd-zoomed .window-popup { zoom: var(--gd-zoom); }
html.gd-zoomed .footer.js-fixed-footer { position: relative !important; }
html.gd-zoomed .block-footer-height { display: none !important; }
@media (max-width: 1024px) { html.gd-zoomed .top-bar { zoom: 1; } }
html.gd-zoomed .content-wrapper img { max-width: 100%; height: auto; }

/* Alto contraste */
html.gd-contrast body, html.gd-contrast .content-wrapper, html.gd-contrast .content-wrapper *,
html.gd-contrast #site-header, html.gd-contrast #site-header *, html.gd-contrast .footer, html.gd-contrast .footer *,
html.gd-contrast .top-bar, html.gd-contrast .top-bar *, html.gd-contrast .window-popup, html.gd-contrast .window-popup * {
	background-color: #000 !important; background-image: none !important; color: #fff !important;
	border-color: #fff !important; text-shadow: none !important; box-shadow: none !important;
}
html.gd-contrast a, html.gd-contrast a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.gd-contrast .btn, html.gd-contrast .gd-btn { border: 2px solid #ffeb3b !important; }
html.gd-contrast img { filter: none; background: transparent !important; }
html.gd-contrast svg path, html.gd-contrast svg polyline, html.gd-contrast svg line, html.gd-contrast svg circle, html.gd-contrast svg polygon { stroke: #fff !important; }
html.gd-contrast .background-mountains .images, html.gd-contrast .testimonial-img, html.gd-contrast .testimonial__thumb-img, html.gd-contrast .images-block { display: none !important; }

/* Escala de grises / ayuda para daltonismo */
html.gd-gray .top-bar, html.gd-gray #site-header, html.gd-gray .content-wrapper, html.gd-gray #site-footer { filter: grayscale(100%); }
/* Saturación alta (baja visión) */
html.gd-saturate .top-bar, html.gd-saturate #site-header, html.gd-saturate .content-wrapper, html.gd-saturate #site-footer { filter: saturate(1.8) contrast(1.1); }

/* Resaltar enlaces */
html.gd-links a { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed #b00020; outline-offset: 2px; }
html.gd-links .gd-a11y-panel a, html.gd-links .gd-cookie a { outline: none; }

/* Fuente legible */
html.gd-font body, html.gd-font body *:not(.fa):not([class^="seoicon"]):not([class*=" seoicon"]):not(i) {
	font-family: 'Atkinson Hyperlegible', Verdana, Arial, sans-serif !important;
}

/* Espaciado de texto (WCAG 1.4.12) */
html.gd-spacing .content-wrapper *, html.gd-spacing .footer * {
	line-height: 1.5 !important; letter-spacing: .12em !important; word-spacing: .16em !important;
}
html.gd-spacing .content-wrapper p, html.gd-spacing .footer p { margin-bottom: 2em !important; }

/* Alinear texto a la izquierda */
html.gd-left .content-wrapper *, html.gd-left .footer * { text-align: left !important; }

/* Cursor grande */
html.gd-cursor, html.gd-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 L6 40 L16 31 L23 46 L30 43 L23 28 L37 28 Z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* Foco reforzado */
html.gd-focus *:focus { outline: 4px solid #ff6f00 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }

/* Detener animaciones (WCAG 2.2.2 / 2.3.3) */
html.gd-noanim *, html.gd-noanim *::before, html.gd-noanim *::after {
	animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important; scroll-behavior: auto !important;
}

/* Ocultar imágenes decorativas */
html.gd-noimg .content-wrapper img, html.gd-noimg .footer img { visibility: hidden !important; }

/* Guía de lectura */
.gd-ruler { position: fixed; left: 0; right: 0; height: 44px; pointer-events: none; z-index: 99970;
	border-top: 3px solid #0b57d0; border-bottom: 3px solid #0b57d0; background: rgba(255, 235, 59, .18); display: none; }
html.gd-ruler-on .gd-ruler { display: block; }

/* ======================================================================
   TRANSICIONES ENTRE PÁGINAS (muy rápidas)
   ====================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--gd-fast); animation-timing-function: ease-out; }
/* Navegadores sin View Transitions entre documentos: fundido de entrada */
html.gd-no-vt body { animation: gd-fade-in var(--gd-fast) ease-out both; }
html.gd-leaving body { opacity: 0; transition: opacity 90ms ease-in; }
@keyframes gd-fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	@view-transition { navigation: none; }
	html.gd-no-vt body { animation: none; }
	html.gd-leaving body { opacity: 1; transition: none; }
	*, *::before, *::after { scroll-behavior: auto !important; }
}
html.gd-noanim.gd-no-vt body { animation: none; }

/* ======================================================================
   AJUSTES MÓVIL
   ====================================================================== */
.table_component { -webkit-overflow-scrolling: touch; }
@media (max-width: 1024px) {
	.table_component { padding-left: 4%; padding-right: 4%; }
}
@media (max-width: 768px) {
	.table_component { padding: 16px 16px 48px; }
	.table_component table { min-width: 560px; font-size: 14px; }
	.table_component th, .table_component td { padding: 8px 6px; word-break: normal; overflow-wrap: anywhere; }
	.table_component::before { content: attr(data-scroll-hint); display: block; font-size: 13px; color: var(--gd-text); margin-bottom: 6px; }
	.gd-mobile-lang { display: flex; justify-content: center; padding: 8px 0 0; }
	.gd-mobile-lang .gd-lang a { color: var(--gd-dark); }
	.gd-mobile-lang .gd-lang a[aria-current="true"] { color: #fff !important; }
	.gd-cookie { left: 8px; right: 8px; bottom: 8px; padding: 18px 16px 14px; font-size: 14.5px; }
	.gd-cookie h2 { font-size: 18px; }
	.gd-a11y-btn { width: 52px; height: 52px; left: 10px; bottom: 10px; }
	.gd-a11y-panel { left: 8px; right: 8px; bottom: 72px; width: auto; max-width: none; max-height: calc(100vh - 90px); }
	.header .logo img { max-width: 64px !important; }
	.case-item__thumb img, .content-wrapper img { max-width: 100%; height: auto; }
	.subscribe .images-block { display: none; }
	.sub-footer span { display: block; margin: 4px 0; }
	.stunning-header .stunning-header-title, .header-elements .title { font-size: 30px; line-height: 1.25; }
	.header-elements { padding: 90px 16px !important; min-height: 0 !important; }
	.window-popup { max-width: calc(100vw - 24px); }
}
@media (max-width: 400px) {
	.gd-a11y-grid { grid-template-columns: 1fr 1fr; }
	.gd-a11y-opt { min-height: 76px; font-size: 13px; }
}

/* Impresión */
@media print {
	.gd-a11y-btn, .gd-a11y-panel, .gd-cookie, .gd-ruler, .top-bar { display: none !important; }
}

/* Reflujo con tamaño ampliado (WCAG 1.4.4 / 1.4.10) */
.gd-privacy-check label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
html.gd-zoomed .contacts-item, html.gd-zoomed .contacts-item .content { min-width: 0; max-width: 100%; }
html.gd-zoomed .contacts .title, html.gd-zoomed .contacts .sub-title { white-space: normal !important; overflow-wrap: anywhere; }
html.gd-zoomed .content-wrapper p, html.gd-zoomed .content-wrapper a, html.gd-zoomed .footer a { overflow-wrap: anywhere; }
html.gd-zoomed h1, html.gd-zoomed h2, html.gd-zoomed h3, html.gd-zoomed .h1, html.gd-zoomed .stunning-header-title { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.mob-menu--title { color: var(--gd-dark) !important; }
html.gd-contrast .mob-menu--title { color: #fff !important; }
html.gd-contrast .top-bar-link { background: #000 !important; color: #ffeb3b !important; border: 2px solid #ffeb3b !important; }
/* Espacio para que los controles flotantes no tapen contenido del pie (WCAG 2.4.11) */
.sub-footer { padding-bottom: 84px !important; }
.gd-lang a span { color: inherit !important; }
.footer .heading-text, .footer .heading .heading-text { color: #c4c4c4 !important; opacity: 1 !important; }
.testimonial-item .testimonial-content .company { color: #d6d6d6 !important; }
.top-bar.top-bar-dark .gd-lang a span { color: inherit !important; }
.subscribe .gd-privacy-check { clear: both; width: 100%; justify-content: flex-start; text-align: left; }
.subscribe .gd-privacy-check label { display: block; float: none; width: auto; margin: 0; padding: 0; flex: 1 1 0; text-align: left; color: #fff; font-size: 14px; }
.subscribe .gd-privacy-note, .subscribe .gd-form-status { clear: both; }
.subscribe .sub-title { float: none; }
.gd-privacy-check a { text-decoration: underline; color: #fff; }
