/* Combined critical stylesheet — modules: fonts, tokens, base, layout, components, home. Page styles: css/pages.css (deferred). */

/* ===== css/fonts.css ===== */
/* Self-hosted Hedvig Letters Serif + Inter (latin + latin-ext). No Google Fonts. */

@font-face {
  font-family: "Hedvig Letters Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/hedvig-letters-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Hedvig Letters Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/hedvig-letters-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== css/tokens.css ===== */
:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --color-text: #636363;
  /* Brand green matches live econsultants.es (#259b38 / rgb(37,155,56)). */
  --color-accent: #259b38;
  --color-accent-hover: color-mix(in srgb, #259b38 82%, #000); /* darker hover of brand */
  /* Text accent: darker brand green for WCAG AA ≥4.5:1 on white (~5.0:1). */
  --color-accent-text: #1e802f;
  --color-brand: #259b38;
  --color-surface: #efefed;
  --color-border: #d9d9d9;
  --color-muted: #595959; /* solid ~7:1 on white (was #636363c2 → ~3.5:1) */
  --color-num: #5c5c5c; /* WCAG AA ≥4.5:1 on white (~6.7:1); was #d9d9d9 live-parity */

  --font-display: "Hedvig Letters Serif", Georgia, serif;
  --font-body: Inter, "Segoe UI", sans-serif;
  /* Section labels match live econsultants.es (28px / 1.3 → 36.4px line-height). */
  --font-size-eyebrow: 28px;
  --line-height-eyebrow: 1.3;
  --space-eyebrow-bottom: 20px;

  --container: 1280px;
  /* Tighter vertical rhythm toward live (~6082 scrollHeight at 1440) */
  --space-section: clamp(3rem, 6vw, 5rem);
  --radius-lg: 30px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --radius-pill: 30px;
  --header-h: 94px;
  --ease: 0.2s ease;
}

/* ===== css/base.css ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-text);
}

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.4em;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-black);
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.4;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.2vw, 2.8125rem); /* ~45px */
  line-height: 1.25;
}

h3 {
  font-size: 1.35rem;
  font-weight: 500;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.eyebrow,
.section-eyebrow,
p.section-eyebrow,
h3.section-eyebrow,
h3.eyebrow {
  color: var(--color-accent-text);
  font-size: var(--font-size-eyebrow);
  line-height: var(--line-height-eyebrow);
  font-weight: 500;
  margin-bottom: var(--space-eyebrow-bottom);
  letter-spacing: normal;
  text-transform: none;
  font-family: var(--font-body);
}

.underline-word {
  color: var(--color-accent-text);
  background: url("../assets/brand/underline.svg") no-repeat bottom center;
  background-size: 100% auto;
  padding-bottom: 6px;
  display: inline-block;
}

.section {
  padding: var(--space-section) 20px;
}

.section--surface {
  background: var(--color-surface);
}

.container {
  width: min(100%, var(--container));
  margin-inline: auto;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head--center {
  text-align: center;
  margin-inline: auto;
}

/* ===== css/layout.css ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  /* Match live primary bar height (94px); use shadow on scroll instead of 1px border. */
  box-shadow: none;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-inner {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding: 0 20px;
  height: var(--header-h);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo img {
  height: auto;
  width: 190px;
  max-width: 190px;
}

.nav-desktop {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  height: var(--header-h);
}

/* Live Astra menu-link: Inter 500 / 16px, pad 0 16px, full bar height */
.nav-desktop > a,
.nav-desktop .has-sub > a,
.nav-desktop .has-sub > button,
.nav-desktop .lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-black);
  padding: 0 16px;
  min-height: var(--header-h);
  box-sizing: border-box;
}

.nav-desktop a[aria-current="page"],
.nav-desktop .has-sub > a[aria-current="page"] {
  color: var(--color-accent-text);
}

/* Live #menu-item-1069: extra space before language switcher */
.nav-desktop > a[href="contacto.html"] {
  padding-right: 32px;
}

.nav-desktop .has-sub {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-chevron {
  display: inline-flex;
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
}

.nav-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-desktop .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: var(--color-white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  z-index: 20;
}

.nav-desktop .has-sub:hover .submenu,
.nav-desktop .has-sub:focus-within .submenu,
.nav-desktop .has-sub.is-open .submenu {
  display: block;
}

.nav-desktop .submenu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 16px;
  font-weight: 400;
  min-height: 0;
  line-height: 1.5;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  font-size: 16px;
  font-weight: 500;
}

.lang-switch .lang-toggle {
  position: relative;
  gap: 0.25rem;
}

/* Live green lang divider: 2px pill, inset 30% of bar height (#259b38) */
.lang-switch .lang-toggle::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 30%;
  bottom: 30%;
  width: 2px;
  border-radius: 30px;
  background-color: var(--color-accent);
}

.lang-switch .submenu {
  left: auto;
  right: 0;
  min-width: 5rem;
}

.lang-switch .submenu a.is-active {
  color: var(--color-accent-text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--color-accent);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: var(--ease);
}

.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0s linear 0.3s;
}

.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.3s ease,
    visibility 0s linear 0s;
}

.nav-mobile-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(80%, 320px);
  height: 100%;
  background: var(--color-white);
  padding: 1.25rem 1.5rem 2rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-mobile.is-open .nav-mobile-panel {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile,
  .nav-mobile.is-open,
  .nav-mobile-panel {
    transition-duration: 0.01ms;
    transition-delay: 0s;
  }
}

.nav-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.nav-mobile-head img {
  height: 32px;
}

.nav-close {
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.25rem;
  color: var(--color-accent);
}

.nav-mobile nav a {
  display: block;
  padding: 0.6rem 0;
  font-weight: 500;
}

.nav-mobile nav a[aria-current="page"] {
  color: var(--color-accent-text);
}

.nav-mobile .submenu-mobile {
  padding-left: 0.75rem;
}

.nav-mobile .submenu-mobile a {
  font-weight: 400;
  font-size: 0.95rem;
}

/* Clean list (no per-item rules) with a single clear divider before the
   language switcher, mirroring the live WP mobile menu. */
.nav-mobile .lang-switch {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border: none;
  border-top: 1px solid var(--color-black);
  display: block;
}

.nav-mobile .lang-switch .lang-toggle::before,
.nav-mobile .lang-switch::before {
  display: none;
}

.nav-mobile .lang-switch a {
  font-size: 1rem;
}

.nav-mobile .lang-switch a.is-active {
  color: var(--color-accent-text);
}

@media (max-width: 921px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* Footer — parity vs live Astra above/below footer (desktop) */
.site-footer {
  background: var(--color-surface);
  padding: 40px 20px;
}

.footer-grid {
  width: min(100%, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 410px 70px 156px 76px 236px 76px 236px;
  align-items: start;
  padding: 48px 0 40px;
}

.footer-col {
  min-width: 0;
}

.footer-col:nth-child(1) {
  grid-column: 1;
}

.footer-col:nth-child(2) {
  grid-column: 3;
  margin-top: 2.5rem; /* live: Menú/Sede/Sucursal sit ~logo+LinkedIn band */
}

.footer-col:nth-child(3) {
  grid-column: 5;
  margin-top: 2.5rem;
}

.footer-col:nth-child(4) {
  grid-column: 7;
  margin-top: 2.5rem;
}

.footer-logo img,
.logo-footer {
  max-width: 236px;
  width: 236px;
  height: auto;
}

.footer-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-black);
}

.footer-linkedin img {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
}

.footer-linkedin:hover {
  color: var(--color-accent-text);
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  margin: 0 0 10px;
  color: var(--color-black);
}

.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu li {
  margin: 0 0 6px;
}

.footer-menu a,
.footer-desc {
  display: inline;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-black);
  margin-bottom: 0;
  transition: color var(--ease);
}

.footer-menu a:hover {
  color: var(--color-accent-text);
}

.footer-address {
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-black);
}

.footer-address span {
  display: block;
}

.footer-hr {
  border: none;
  border-top: 1px solid rgba(99, 99, 99, 0.76);
  max-width: var(--container);
  margin: 0 auto;
}

.footer-bottom {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 26px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  line-height: 1.65;
}

.footer-bottom > p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-black);
}

.footer-copy-muted {
  color: #636363;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.footer-legal a {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.65;
  color: #636363;
  padding: 0 6px;
}

.footer-legal a:first-child {
  padding-left: 0;
}

.footer-legal a:last-child {
  padding-right: 0;
}

.footer-legal a:hover {
  color: var(--color-accent-text);
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
    row-gap: 2rem;
  }

  .footer-col:nth-child(1),
  .footer-col:nth-child(2),
  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    grid-column: auto;
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 2rem;
    padding: 32px 0 28px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .footer-legal a:first-child {
    padding-left: 6px;
  }

  .footer-legal a:last-child {
    padding-right: 6px;
  }
}

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), background var(--ease);
  z-index: 900;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--color-accent-hover);
}

/* ===== css/components.css ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 500;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

.btn--pill {
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  padding: 14px 24px;
  font-weight: 400;
}

.btn--pill:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent-text);
  color: var(--color-accent-text);
}

.btn--light {
  background: var(--color-white);
  color: var(--color-black);
  padding: 0.5rem 0.5rem 0.5rem 1.15rem;
  border-radius: 30px; /* live secondary CTA radius */
  justify-content: space-between;
  width: 100%;
  max-width: 220px;
}

.btn--light:hover {
  color: var(--color-black);
}

.btn--light .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: grid;
  place-items: center;
  transition: background var(--ease);
}

.btn--light:hover .btn-icon {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

/* Partner marquee */
.partners {
  text-align: center;
  padding: 2.5rem 0 0;
}

.partners-label {
  margin-bottom: 1.25rem;
  color: var(--color-black);
  font-weight: 500;
}

.marquee {
  overflow: hidden;
  position: relative;
  height: 100px;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 90s linear infinite; /* longer track (44×2 logos) */
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-slide {
  width: 180px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marquee-slide img {
  width: 65%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.9);
  transition: filter 0.3s ease;
}

/* Color on hover only for real pointer devices on desktop — touch stays grayscale */
@media (hover: hover) and (min-width: 1025px) {
  .marquee-slide img:hover {
    filter: none;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1024px) {
  .marquee-track:hover {
    animation-play-state: running;
  }
}

/* Accordion — match live «Cómo trabajamos» (Elementor nested accordion) */
.accordion details {
  border-bottom: 1px solid #d5d8dc; /* live ~rgb(213, 216, 220) */
}

.accordion details[open] {
  border-bottom-color: transparent; /* live: open title has no bottom border */
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.625rem; /* live --n-accordion-icon-gap */
  padding: 1.3125rem 0; /* ~21px vertical like live desktop */
  cursor: pointer;
  font-size: 24px;
  font-weight: 500;
  color: #1f2124; /* live rgb(31, 33, 36) */
  line-height: 1.25;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion .acc-num {
  color: var(--color-num);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 2rem;
}

/* Height clip wrapper — JS animates height ~300ms (live n_accordion_animation_duration) */
.accordion .acc-panel {
  overflow: hidden;
}

.accordion .acc-body {
  margin: 0 0 1.25rem;
  padding: 16px;
  background: #efefed; /* live .elementor-element-50d24c5 classic bg */
  border-radius: 16px; /* live boxed container */
  color: #636363; /* live body text rgb(99, 99, 99) */
  font-size: 18px;
  line-height: 1.65;
}

.accordion .acc-chevron {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #1f2124;
}

.accordion .acc-chevron svg {
  width: 20px;
  height: 20px;
}

/* Live: .e-closed visible when collapsed; .e-opened when [open] */
.accordion .acc-chevron .acc-icon-open {
  display: none;
}

.accordion details[open] .acc-chevron .acc-icon-closed {
  display: none;
}

.accordion details[open] .acc-chevron .acc-icon-open {
  display: block;
}

/* Service cards carousel — live #slide-services / Swiper centered-slides parity */
.services-carousel {
  --slide-size: 28%;
  position: relative;
  width: 100%;
}

.services-viewport {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.services-viewport.is-dragging {
  cursor: grabbing;
}

.services-track {
  position: relative; /* offsetParent for slides — stable first-paint offsetLeft */
  display: flex;
  gap: 30px;
  will-change: transform;
  transition: transform 0.35s ease;
}

.service-card {
  flex: 0 0 var(--slide-size);
  width: var(--slide-size);
  min-width: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.service-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 568 / 404;
  object-fit: cover;
}

.service-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 60px 20px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: var(--color-white);
  text-align: left;
  box-sizing: border-box;
}

.service-card h3 {
  color: var(--color-white);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 8px;
}

.service-card p {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.carousel-btn svg {
  display: block;
  width: 40px;
  height: 40px;
}

.carousel-btn svg circle {
  transition: fill 0.2s ease;
}

.carousel-btn:hover:not(:disabled) svg circle {
  fill: #1e802f;
}

/* No loop: hide the arrow entirely on the first/last slide (per designer). */
.carousel-btn:disabled {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 1280px) {
  .services-carousel {
    --slide-size: 35%;
  }
}

@media (max-width: 1080px) {
  .services-carousel {
    --slide-size: 42%;
  }
}

@media (max-width: 1024px) {
  .services-carousel {
    --slide-size: 50%;
  }

  .service-card h3 {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .services-carousel {
    --slide-size: 90%;
  }

  .service-card h3 {
    font-size: 20px;
  }
}

/* Industry panels (Home Especialidades — live Elementor parity) */
.industry-grid {
  display: grid;
  gap: 1.125rem; /* ~18px live */
  grid-template-columns: 1fr;
  align-self: stretch;
}

@media (min-width: 900px) {
  .industry-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.industry-panel {
  position: relative;
  border-radius: 24px;
  min-height: 40vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Live Elementor: title top + CTA bottom over full-bleed photo */
  justify-content: space-between;
  align-items: stretch;
  gap: 1.125rem; /* ~18px live */
  padding: 36px;
  color: var(--color-white);
  /* Transparent — photo covers panel; avoid #1a1a1a black void */
  background: transparent;
}

.industry-panel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.industry-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Live: background-color #000 + --overlay-opacity 0.2 */
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
  pointer-events: none;
}

/* Keep img absolute; only stack title + CTA above the photo */
.industry-panel__title,
.industry-panel .btn-industries {
  position: relative;
  z-index: 2;
}

.industry-panel__title {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.btn-industries {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  align-self: stretch;
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--ease);
}

.btn-industries:hover {
  color: var(--color-black);
}

.btn-industries__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.btn-industries__icon svg {
  width: 40px;
  height: auto;
  display: block;
}

.btn-industries:hover .btn-industries__icon svg circle {
  fill: #1e802f;
  transition: fill 0.2s ease;
}

/* Strengths */
.strengths-grid {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  margin-top: 2.5rem;
}

@media (max-width: 900px) {
  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .strengths-grid {
    grid-template-columns: 1fr;
  }
}

/* Icons are full 88×88 SVGs (green rx=25 + white glyph); no CSS plate/filter. */
.strength-item .strength-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: transparent;
}

.strength-item .strength-icon img {
  width: 88px;
  height: 88px;
  margin: 0;
  object-fit: contain;
}

.strength-item img {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  object-fit: contain;
}

.strength-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.strength-item p {
  font-size: 0.95rem;
  margin: 0 auto;
  max-width: 16rem;
}

/* Project highlights — WP #carrusel-projects (one full slide at a time) */
.projects-carousel {
  position: relative;
  width: 100%;
}

.projects-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.projects-viewport.is-dragging {
  cursor: grabbing;
}

.projects-track {
  position: relative; /* offsetParent for slides — stable first-paint offsetLeft */
  display: flex;
  gap: 0;
  will-change: transform;
  transition: transform 0.35s ease;
}

.projects-carousel .project {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

.project {
  display: grid;
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 0;
}

.project + .project {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.projects-carousel .project + .project {
  margin-top: 0;
}

@media (min-width: 900px) {
  .project {
    grid-template-columns: 1fr 1fr;
  }

  /* Image left, copy right (alternating with default) */
  .project--reverse .project-media {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-track {
    transition: none;
  }
}

.project-media {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 280px;
  overflow: hidden;
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
}

.project-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-meta {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.project-meta-label {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--color-black);
  line-height: 1.2;
}

.project-meta p,
.project-meta ul {
  margin: 0;
  color: var(--color-black);
}

.project-meta li {
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.project-meta li::before {
  content: "· ";
  color: var(--color-accent);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 20px;
}

.cta-band h2,
.cta-band h3,
.cta-band .cta-band__title {
  max-width: 22ch;
  margin-inline: auto;
  font-family: var(--font-display);
  /* Live Elementor CTA heading: 40 / 48 / 56px */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-black);
}

/* Page hero (inner pages) — parity with live Elementor photo banners */
.page-hero {
  position: relative;
  box-sizing: border-box;
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
  min-height: 474px;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 80px;
  border-radius: 30px;
  overflow: hidden;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
}

.page-hero--photo {
  min-height: 474px;
}

/* Live uses flat black overlay @ 0.2 — not a gradient fade */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #000;
  opacity: 0.2;
  pointer-events: none;
}

.page-hero .container,
.page-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-inline: 0;
  padding-inline: 64px;
  box-sizing: border-box;
}

.page-hero h1,
.page-hero__title {
  color: var(--color-white);
  margin: 0;
}

@media (max-width: 1024px) {
  .page-hero {
    border-radius: 24px;
    padding: 0 0 60px;
  }

  .page-hero .container,
  .page-hero__inner {
    padding-inline: 32px;
  }
}

@media (max-width: 767px) {
  .page-hero,
  .page-hero--photo {
    min-height: 250px;
    border-radius: 20px;
    padding: 0 0 40px;
  }

  .page-hero .container,
  .page-hero__inner {
    padding-inline: 24px;
  }
}

@media (max-width: 410px) {
  .page-hero {
    width: min(calc(100% - 20px), var(--container));
  }
}

/* Services banner: live Elementor crop (desktop) */
.page-hero--services {
  background-position: 0 -256px;
}

@media (max-width: 767px) {
  .page-hero--services {
    background-position: center top;
  }
}

/* Especializaciones banner: live bottom crop */
.page-hero--especializaciones {
  background-position: bottom center;
}

/* Legal/plain titles — keep in critical CSS (above-fold; pages.css is deferred) */
.page-hero--plain {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 7.5rem 20px 1.25rem;
  border-radius: 0;
  overflow: visible;
  color: var(--color-black);
  background: var(--color-white);
}

.page-hero--plain::before {
  content: none;
  display: none;
}

.page-hero--plain h1,
.page-hero--plain .page-hero__title {
  color: var(--color-black);
  margin: 0;
}

.page-hero--plain + .section {
  padding-top: 3rem;
}

/* Critical path: about-split (pages.css is deferred — reserve layout to limit CLS) */
.about-split {
  display: grid;
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .about-split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
}

.about-split__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--color-black);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

.about-split__media {
  min-height: 320px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

@media (min-width: 900px) {
  .about-split__media {
    min-height: 100%;
  }
}

/* Critical: feature grid skeleton (icons/cards polish stays deferred) */
.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.feature-grid article {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.4rem;
}

.feature-grid h3,
.feature-grid h5,
.feature-grid h6 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-black);
}

.feature-grid--icons h3,
.feature-grid h5,
.feature-grid h6 {
  font-size: 1rem;
  font-weight: 500;
}

.feature-grid p {
  margin: 0;
  font-size: 0.95rem;
}

.feature-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-grid--icons article {
  background: var(--color-white);
  box-shadow: 0 6px 20px rgba(110, 110, 110, 0.28);
}

/* Stub notice */
.stub-note {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 2rem auto;
  max-width: 40rem;
  color: #5c4a12;
  font-size: 0.95rem;
}

/* Data table (generic, e.g. services teaser) */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 720px;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: var(--color-surface);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.data-table tbody tr:hover {
  background: #f3faf4;
}

.data-table code {
  color: var(--color-accent-text);
  font-family: inherit;
  font-weight: 500;
}

.data-table strong {
  color: var(--color-black);
}

/* TablePress parity (live astra-child/tablepress.css + default) */
.table-wrap--costes {
  margin: 0 0 1.5rem;
  border: none;
  border-radius: 0;
}

.tablepress {
  --tp-head-bg: #259b3830;
  --tp-border: #ddd;
  --tp-odd-bg: #fff;
  --tp-even-bg: #f9f9f9;
  --tp-hover-bg: #f3f3f3;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0 auto 1rem;
  font-size: 12px;
  font-family: var(--font-body);
  color: #111;
  min-width: 1280px;
}

.tablepress th,
.tablepress td {
  padding: 2px 8px;
  border: none;
  text-align: left;
  vertical-align: top;
  min-width: 160px;
  font-size: 12px;
  font-family: var(--font-body);
}

.tablepress thead th {
  background-color: var(--tp-head-bg);
  color: #111;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  word-break: normal;
}

.tablepress thead th.column-1,
.tablepress thead th.column-2 {
  text-align: left;
  white-space: normal;
}

.tablepress tbody td {
  border: 1px solid var(--tp-border);
  color: #111;
}

.tablepress tbody.row-striping tr:nth-child(odd) td,
.tablepress tbody.row-striping tr:nth-child(odd) th {
  background-color: var(--tp-odd-bg);
}

.tablepress tbody.row-striping tr:nth-child(even) td,
.tablepress tbody.row-striping tr:nth-child(even) th {
  background-color: var(--tp-even-bg);
}

.tablepress tbody.row-hover tr:hover td,
.tablepress tbody.row-hover tr:hover th {
  background-color: var(--tp-hover-bg);
}

.tablepress tfoot th,
.tablepress tfoot td {
  background-color: var(--tp-head-bg);
  text-align: right;
  border: 1px solid var(--tp-border);
  font-weight: 400;
  vertical-align: top;
}

.tablepress tfoot th.column-1,
.tablepress tfoot td.column-1 {
  text-align: left;
  font-weight: 700;
}

.tablepress-id-1 td.column-1,
.tablepress-id-1 th.column-1,
.tablepress-id-1 td.column-2 {
  white-space: nowrap;
}

.tablepress-id-1 td.column-2,
.tablepress-id-1 td.column-3,
.tablepress-id-1 td.column-4,
.tablepress-id-1 td.column-5,
.tablepress-id-1 td.column-6,
.tablepress-id-1 td.column-7,
.tablepress-id-1 td.column-8,
.tablepress-id-1 tfoot th.column-2,
.tablepress-id-1 tfoot th.column-3,
.tablepress-id-1 tfoot th.column-4,
.tablepress-id-1 tfoot th.column-5,
.tablepress-id-1 tfoot th.column-6,
.tablepress-id-1 tfoot th.column-7,
.tablepress-id-1 tfoot th.column-8 {
  text-align: right;
}

.tablepress-id-1 tfoot th.column-2 {
  text-align: left;
  white-space: normal;
  font-weight: 400;
}

/* SALARIO/AÑO year cells — inverted (live .row-4 .column-4…8) */
.tablepress .row-salario .column-year,
.tablepress tbody.row-striping .row-salario .column-year,
.tablepress tbody.row-hover .row-salario:hover .column-year {
  color: #fff;
  background-color: #000;
}

.tablepress code {
  color: #259b38;
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
}

.section--costes {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  /* Live Elementor container uses ~250px bottom padding under Volver */
  padding-bottom: clamp(8rem, 18vw, 15.5rem);
}

.section--costes .btn {
  margin-top: 0.25rem;
}

/* ===== css/home.css ===== */
/* Match live Elementor boxed hero: padre pad 20px → e-con-inner max 1280 → panel */
.hero {
  padding: 0 20px;
}

.hero-panel {
  position: relative;
  width: min(100%, var(--container));
  margin-inline: auto;
  min-height: 60vh;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: clamp(2.5rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem);
  background: #111;
  color: var(--color-white);
}

.hero-panel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  z-index: 0;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 44rem;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.how-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .how-grid .how-visual {
    order: -1;
  }
}

.how-visual {
  background: var(--color-surface);
  border-radius: 38px;
  overflow: hidden;
}

.how-visual img {
  display: block;
  width: 100%;
  border-radius: 0;
  object-fit: cover;
}

.services-home {
  background: var(--color-surface);
  /* Full-bleed carousel like live e-con-full; keep head inset */
  padding-inline: 0;
}

.services-home > .container {
  padding-inline: 20px;
  box-sizing: border-box;
}

/* Home specialties: copy left (~40%) + two industry panels right (~60%) */
.home-specialties {
  display: grid;
  gap: 2.5rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .home-specialties {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 2.5rem; /* live ~40px */
  }

  /* Live Elementor body in #especialidades: 24px / 39.6px (1.65) */
  .home-specialties__copy > p:not(.section-eyebrow) {
    font-size: 1.5rem;
    line-height: 1.65;
  }

  /*
   * Live panels 7696ab4 / 93de075 are tall portrait tiles (~362×665 @1440).
   * Aspect locks height to width; grid stretch keeps both columns equal.
   */
  .home-specialties .industry-grid {
    align-items: stretch;
  }

  .home-specialties .industry-panel {
    aspect-ratio: 362 / 665;
    min-height: 0; /* override components 40vh — too squat on desktop */
    height: auto;
  }
}

.home-specialties__copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 36rem;
}

.home-specialties__copy .section-eyebrow {
  margin-bottom: var(--space-eyebrow-bottom);
}

.home-specialties__copy h2 {
  margin-bottom: 1.125rem; /* ~18px live */
}

.home-specialties__copy > p {
  margin-bottom: 1.125rem;
}

.home-specialties__copy > p:last-of-type {
  margin-bottom: 1.125rem;
}

.map-link {
  display: inline-block;
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-black);
  text-decoration: none;
}

.map-link:hover {
  color: var(--color-accent-text);
}

@media (max-width: 767px) {
  .home-specialties .industry-grid {
    grid-template-columns: 1fr;
  }

  .home-specialties .industry-panel {
    min-height: 280px;
  }
}

/* Live Elementor: radius 24px tablet, 20px ≤767; padre pad 10px ≤410 */
@media (max-width: 1024px) {
  .hero-panel {
    border-radius: 24px;
  }
}

@media (max-width: 767px) {
  .hero-panel {
    border-radius: 20px;
    min-height: 52vh;
    padding: 2.5rem 1.5rem 2rem;
  }
}

@media (max-width: 410px) {
  .hero {
    padding: 0 10px;
  }

  .hero-panel {
    padding: 2.5rem 1rem 2rem;
  }
}


.project-bullets {
  margin: 1rem 0;
  padding-left: 0;
  list-style: none;
  color: var(--color-text);
}

.project-bullets li {
  margin-bottom: 0.35rem;
}

/* Home CTA — live Elementor: heading-only on white, ~120–250px vertical space */
#cta.cta-band {
  background: transparent;
  padding-top: clamp(7.5rem, 16vw, 15.625rem);
  padding-bottom: clamp(7.5rem, 16vw, 15.625rem);
}

#cta .cta-band__title {
  max-width: min(22ch, 100%);
}

