/* =========================================================
   Audytax · base de las secciones (mismo sistema que la versión Astro)
   Las variables toman los colores del tema (theme.json) si existen y,
   si no, usan sus valores de reserva: el plugin no depende del tema.
   ========================================================= */
:root {
  /* Paleta del diseño (Figma «Murcia», nov. 2026). Sobre el azul, el texto va en marino. */
  --ax-blue: var(--wp--preset--color--blue, #00a1df);
  --ax-blue-600: var(--wp--preset--color--blue-600, #008fc6);
  --ax-blue-bright: var(--wp--preset--color--blue-bright, #00a1df);
  --ax-blue-50: var(--wp--preset--color--blue-50, #e6f6fc);
  --ax-navy: var(--wp--preset--color--navy, #283441);
  --ax-navy-900: var(--wp--preset--color--navy-900, #1f2933);
  --ax-soft: var(--wp--preset--color--soft, #f2f6f9);
  --ax-text: var(--wp--preset--color--text, #283441);
  --ax-muted: var(--wp--preset--color--muted, #495462);
  --ax-line: var(--wp--preset--color--line, #e1e8ee);
  --ax-font: var(--wp--preset--font-family--poppins, 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif);
  --ax-radius: 10px;
  --ax-radius-lg: 14px;
  --ax-shadow: 0 10px 30px -12px rgba(31, 41, 51, .25);
  --ax-container: 1208px;
  --ax-container-narrow: 1160px;
  --ax-gutter: 24px;
  --ax-section-y: clamp(56px, 6vw, 84px);
  /* Escala tipográfica del diseño (1920 px) con mínimos para móvil */
  --ax-fs-h1: clamp(34px, 4.4vw, 56px);
  --ax-fs-h2: clamp(28px, 3.2vw, 40px);
  --ax-fs-h3: clamp(18px, 1.5vw, 22px);
  --ax-fs-h4: clamp(17px, 1.3vw, 19px);
  --ax-fs-lead: clamp(16px, 1.25vw, 18px);
  --ax-fs-body: 16px;
  --ax-fs-btn: clamp(15px, 1.2vw, 19px);
}

.ax-block { font-family: var(--ax-font); font-size: var(--ax-fs-body); line-height: 1.6; color: var(--ax-text); box-sizing: border-box; -webkit-font-smoothing: antialiased; }
.ax-block :where(*, *::before, *::after) { box-sizing: border-box; }
.ax-block :where(img, svg) { display: block; max-width: 100%; }
.ax-block :where(a) { color: inherit; }
/* Reinicios con :where() para que las reglas de cada sección siempre ganen */
.ax-block :where(h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote, figure) { margin: 0; }
.ax-block :where(ul, ol) { padding: 0; list-style: none; }
.ax-block :where(h1, h2, h3, h4) { font-family: var(--ax-font); line-height: 1.2; letter-spacing: -.01em; color: inherit; text-transform: none; }
.ax-block :where(h1) { font-size: var(--ax-fs-h1); font-weight: 700; line-height: 1.12; }
.ax-block :where(h2) { font-size: var(--ax-fs-h2); font-weight: 700; }
.ax-block :where(h3) { font-size: var(--ax-fs-h3); font-weight: 600; line-height: 1.45; letter-spacing: 0; }

.ax-container { width: 100%; max-width: calc(var(--ax-container) + var(--ax-gutter) * 2); margin-inline: auto; padding-inline: var(--ax-gutter); }

.ax-section { padding-block: var(--ax-section-y); }
.ax-section--plain { background: #fff; }
.ax-section--soft { background: var(--ax-soft); }
.ax-section--navy { background: var(--ax-navy); color: #fff; }
.ax-section--blue { background: var(--ax-blue); color: var(--ax-text); }
.ax-section--blue h2 { color: #fff; }
/* Títulos de sección: mismo corte de línea que el diseño (≈ 740 px a 40 px) */
.ax-section:not(.ax-faq, .ax-logos, .ax-testi, .ax-cases) h2 { max-width: 740px; }
/* Dos secciones seguidas con el mismo fondo: no duplicar el espacio */
.ax-section--soft + .ax-section--soft,
.ax-section--plain + .ax-section--plain { padding-top: 0; }

.ax-eyebrow { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: .2em; text-transform: uppercase; color: var(--ax-text); }
.ax-section--navy .ax-eyebrow { color: #fff; }
@media (max-width: 600px) { .ax-eyebrow, .ax-hero__eyebrow { font-size: 12px !important; letter-spacing: .14em !important; } }

.ax-title-blue { color: var(--ax-blue) !important; }
.ax-section--blue .ax-title-blue { color: #fff !important; }

.ax-lead { margin-top: 18px; max-width: 780px; font-size: var(--ax-fs-lead); line-height: 1.7; color: var(--ax-text); }
.ax-section--navy .ax-lead { color: #fff; }
.ax-lead + .ax-lead { margin-top: 1.1em; }
.ax-lead strong { font-weight: 700; }

/* Botones (diseño: azul con texto marino; marino con texto blanco) */
.ax-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 36px; border: 2px solid transparent; border-radius: 6px; font: 600 var(--ax-fs-btn)/1.2 var(--ax-font); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.ax-btn:hover { transform: translateY(-1px); }
.ax-btn--primary { background: var(--ax-blue); color: var(--ax-navy) !important; }
.ax-btn--primary:hover { background: var(--ax-blue-600); }
.ax-btn--blue-white { background: var(--ax-blue); color: #fff !important; }
.ax-btn--blue-white:hover { background: var(--ax-blue-600); }
.ax-btn--ghost { border-color: #fff; color: #fff !important; }
.ax-btn--ghost:hover { background: #fff; color: var(--ax-navy) !important; }
.ax-btn--dark { background: var(--ax-navy); color: #fff !important; }
.ax-btn--dark:hover { background: var(--ax-navy-900); }
.ax-btn--outline { border-color: var(--ax-navy); border-width: 1.5px; color: var(--ax-navy) !important; background: transparent; }
.ax-btn--outline:hover { background: var(--ax-navy); color: #fff !important; }

/* Lista con check */
.ax-checks { display: grid; gap: 22px; font-size: var(--ax-fs-lead); line-height: 1.5; }
.ax-checks > li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.ax-checks svg { width: 24px; height: 24px; margin-top: 1px; color: var(--ax-blue); }
.ax-checks strong { font-weight: 700; }

/* Rejillas */
.ax-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .ax-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .ax-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .ax-grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .ax-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Slider (logos y testimonios): scroll-snap + puntos (assets/slider.js) */
.ax-slider { --per: 1; --gap: 32px; position: relative; }
.ax-slider__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); gap: var(--gap); margin: 0; padding: 0; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ax-slider__track::-webkit-scrollbar { display: none; }
.ax-slider__track > * { scroll-snap-align: start; min-width: 0; }
.ax-slider__dots { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.ax-slider__dots[hidden] { display: none; }
/* Bucle (logos): el movimiento lo hace slider.js, sin desplazamiento manual. */
.ax-slider[data-loop] .ax-slider__track { overflow: hidden; scroll-snap-type: none; }
.ax-slider__dots button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.ax-slider__dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c9d2da; transition: background-color .2s, transform .2s; }
.ax-slider__dots button[aria-current="true"]::before { background: var(--ax-blue); transform: scale(1.2); }

/* Accesibilidad */
.ax-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ax-block :focus-visible { outline: 3px solid var(--ax-blue-bright); outline-offset: 2px; }
.ax-block[id], .ax-block [id] { scroll-margin-top: 90px; }

/* ---------- Dentro de Elementor ----------
   Las secciones van cada una en un widget: sin márgenes ni huecos añadidos y
   manteniendo la regla de «dos secciones seguidas con el mismo fondo». */
.elementor .e-con:has(> .elementor-widget[class*="elementor-widget-auditax-"]) { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px; --container-max-width: none; }
.elementor .elementor-widget[class*="elementor-widget-auditax-"] { margin: 0 !important; width: 100%; }
.elementor-widget:has(> .ax-section--soft, > .elementor-widget-container > .ax-section--soft) + .elementor-widget > .ax-section--soft,
.elementor-widget:has(> .ax-section--soft, > .elementor-widget-container > .ax-section--soft) + .elementor-widget > .elementor-widget-container > .ax-section--soft,
.elementor-widget:has(> .ax-section--plain, > .elementor-widget-container > .ax-section--plain) + .elementor-widget > .ax-section--plain,
.elementor-widget:has(> .ax-section--plain, > .elementor-widget-container > .ax-section--plain) + .elementor-widget > .elementor-widget-container > .ax-section--plain { padding-top: 0; }
