/* =========================================================
   Coopextraiss - Heritage Core
   CSS escrito a mano, mobile-first, con variables.
   ========================================================= */
:root {
  --cx-primary: #00458d;
  --cx-primary-container: #005cb9;
  --cx-on-primary-container: #c6d8ff;
  --cx-secondary: #006e26;
  --cx-secondary-container: #7efd8c;
  --cx-tertiary: #633f00;
  --cx-tertiary-container: #835400;
  --cx-surface: #f9f9ff;
  --cx-surface-low: #f0f3ff;
  --cx-surface-mid: #e7eeff;
  --cx-surface-high: #dee8ff;
  --cx-white: #ffffff;
  --cx-text: #111c2c;
  --cx-text-soft: #424752;
  --cx-outline: #727784;
  --cx-outline-variant: #c2c6d4;
  --cx-inverse: #263142;
  --cx-inverse-text: #ebf1ff;
  --cx-error: #ba1a1a;

  --cx-r-sm: 8px;
  --cx-r-md: 12px;
  --cx-r-lg: 16px;
  --cx-r-xl: 24px;

  --cx-shadow-sm: 0 1px 3px rgba(17, 28, 44, .08);
  --cx-shadow: 0 4px 20px rgba(17, 28, 44, .06);
  --cx-shadow-lg: 0 12px 32px rgba(17, 28, 44, .12);

  --cx-container: 1280px;
  --cx-gutter: 1rem;
  --cx-header-h: 72px;
  --cx-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cx-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.cx-body {
  margin: 0;
  font-family: var(--cx-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--cx-text);
  background: var(--cx-surface);
  -webkit-font-smoothing: antialiased;
}
.cx-body h1, .cx-body h2, .cx-body h3, .cx-body h4 {
  font-family: var(--cx-font);
  color: var(--cx-text);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
.cx-body img { max-width: 100%; height: auto; display: block; }
.cx-body a { color: var(--cx-primary); }
.cx-body main:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--cx-primary-container);
  outline-offset: 3px;
  border-radius: 4px;
}
.cx-footer :focus-visible, .cx-hero :focus-visible, .cx-cta :focus-visible, .cx-pagehead--brand :focus-visible {
  outline-color: var(--cx-secondary-container);
}

.cx-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--cx-primary); color: #fff !important;
  padding: .75rem 1.25rem; border-radius: var(--cx-r-sm); font-weight: 600;
  transition: top .2s var(--cx-ease);
}
.cx-skip:focus { top: 1rem; }

.cx-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.cx-container { width: 100%; max-width: var(--cx-container); margin-inline: auto; padding-inline: var(--cx-gutter); }
.cx-container--narrow { max-width: 820px; }
.cx-icon { flex: none; vertical-align: middle; }

.cx-section { padding-block: 3rem; }
.cx-section--tight { padding-block: 2rem; }
.cx-section--soft { background: var(--cx-surface-low); padding-block: 4rem; }
.cx-h2 { font-size: 1.75rem; font-weight: 700; }
.cx-empty { color: var(--cx-text-soft); text-align: center; padding: 2rem 0; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Botones ---------- */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.4rem;
  font: 600 .9375rem/1.2 var(--cx-font);
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--cx-r-md);
  transition: transform .2s var(--cx-ease), box-shadow .2s var(--cx-ease), background-color .2s, color .2s, border-color .2s;
}
.cx-body a.cx-btn { text-decoration: none; }
.cx-btn:hover { transform: translateY(-2px); box-shadow: var(--cx-shadow-lg); }
.cx-btn:active { transform: translateY(0); }
.cx-btn--lg { min-height: 52px; padding: .85rem 1.9rem; font-size: 1rem; border-radius: var(--cx-r-lg); }
.cx-body a.cx-btn--primary, .cx-btn--primary { background: var(--cx-primary); color: #fff; }
.cx-btn--primary:hover { background: var(--cx-primary-container); }
.cx-body a.cx-btn--secondary, .cx-btn--secondary { background: var(--cx-secondary); color: #fff; }
.cx-btn--secondary:hover { background: #005a1f; }
.cx-body a.cx-btn--light { background: #fff; color: var(--cx-primary); }
.cx-btn--light:hover { background: var(--cx-surface-mid); }
.cx-body a.cx-btn--glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.cx-btn--glass:hover { background: rgba(255, 255, 255, .24); }
.cx-body a.cx-btn--ghost, .cx-btn--ghost { background: transparent; color: var(--cx-primary); border-color: var(--cx-outline-variant); }
.cx-btn--ghost:hover { border-color: var(--cx-primary); background: var(--cx-surface-mid); }

.cx-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.cx-link:hover { text-decoration: underline; }
.cx-link .cx-icon { transition: transform .2s var(--cx-ease); }
.cx-link:hover .cx-icon { transform: translateX(4px); }

/* ---------- Header ---------- */
.cx-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(194, 198, 212, .55);
  transition: box-shadow .25s var(--cx-ease), background-color .25s;
}
.cx-header.is-scrolled { box-shadow: 0 6px 24px rgba(17, 28, 44, .1); background: rgba(255, 255, 255, .94); }
.cx-header__bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--cx-header-h); gap: 1rem; }
.cx-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.cx-brand__logo { height: 44px; width: auto; }
.cx-brand__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; color: var(--cx-primary); text-transform: uppercase; }

.cx-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; border-radius: var(--cx-r-md);
  color: var(--cx-primary); cursor: pointer;
  transition: background-color .2s;
}
.cx-burger:hover { background: var(--cx-surface-mid); }
.cx-burger__close { display: none; }
.cx-burger[aria-expanded="true"] .cx-burger__open { display: none; }
.cx-burger[aria-expanded="true"] .cx-burger__close { display: inline-flex; }

/* Panel móvil */
.cx-header__panel {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--cx-outline-variant);
  box-shadow: var(--cx-shadow-lg);
  padding: 1rem var(--cx-gutter) 1.5rem;
  max-height: calc(100vh - var(--cx-header-h)); overflow-y: auto;
}
.cx-header__panel.is-open { display: block; animation: cx-drop .25s var(--cx-ease); }
@keyframes cx-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.cx-nav__list, .cx-nav ul { list-style: none; margin: 0; padding: 0; }
.cx-nav__item { position: relative; }
.cx-nav__link, .cx-body .cx-nav a {
  display: block; padding: .8rem .5rem;
  font-size: .9375rem; font-weight: 500; color: var(--cx-text-soft);
  text-decoration: none; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.cx-nav__link:hover, .cx-body .cx-nav a:hover { color: var(--cx-primary); }
.cx-nav .current-menu-item > a, .cx-nav .active > a, .cx-nav [aria-current="page"] { color: var(--cx-primary); font-weight: 700; }
.cx-nav__sub, .cx-nav .sub-menu { padding-left: 1rem !important; }
.cx-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }

/* ---------- Hero ---------- */
.cx-hero {
  position: relative; isolation: isolate;
  display: flex; align-items: center; min-height: 480px;
  background: linear-gradient(135deg, var(--cx-primary) 0%, var(--cx-primary-container) 100%);
  color: #fff; overflow: hidden;
}
.cx-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cx-hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 85% 20%, rgba(126, 253, 140, .16), transparent 45%),
    linear-gradient(90deg, rgba(0, 69, 141, .92), rgba(0, 69, 141, .6));
}
.cx-hero__inner { padding-block: 4rem; }
.cx-hero__content { max-width: 680px; }
.cx-hero h1 { color: #fff; font-size: 2.25rem; font-weight: 800; margin-bottom: 1.25rem; }
.cx-hero__lead { font-size: 1.125rem; line-height: 1.7; margin: 0 0 2rem; color: #eaf1ff; }

/* ---------- Bento ---------- */
.cx-bento { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.cx-tile {
  display: flex; flex-direction: column;
  padding: 2rem; border-radius: var(--cx-r-xl);
  background: #fff; box-shadow: var(--cx-shadow);
  text-decoration: none; color: var(--cx-text);
  transition: transform .25s var(--cx-ease), box-shadow .25s var(--cx-ease);
}
.cx-body a.cx-tile { color: var(--cx-text); }
.cx-tile:hover { transform: translateY(-6px); box-shadow: var(--cx-shadow-lg); }
.cx-tile__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 1.25rem;
  transition: transform .25s var(--cx-ease);
}
.cx-tile:hover .cx-tile__icon { transform: scale(1.1); }
.cx-tile__title { font-size: 1.375rem; font-weight: 600; margin-bottom: .6rem; }
.cx-tile__text { color: var(--cx-text-soft); margin: 0 0 1.25rem; flex: 1; }
.cx-tile__link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.cx-tile--primary .cx-tile__icon { background: rgba(0, 69, 141, .1); color: var(--cx-primary); }
.cx-tile--primary .cx-tile__link { color: var(--cx-primary); }
.cx-tile--secondary .cx-tile__icon { background: rgba(0, 110, 38, .1); color: var(--cx-secondary); }
.cx-tile--secondary .cx-tile__link { color: var(--cx-secondary); }
.cx-tile--tertiary .cx-tile__icon { background: rgba(131, 84, 0, .12); color: var(--cx-tertiary); }
.cx-tile--tertiary .cx-tile__link { color: var(--cx-tertiary); }
.cx-body a.cx-tile--brand { background: var(--cx-primary); color: #fff; }
.cx-tile--brand .cx-tile__title { color: #fff; }
.cx-tile--brand .cx-tile__text { color: #dbe6ff; }
.cx-tile--brand .cx-tile__icon { background: rgba(255, 255, 255, .2); color: #fff; }
.cx-tile--brand .cx-tile__link { color: #fff; }

/* ---------- Valores ---------- */
.cx-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; margin-bottom: 1.25rem;
  background: rgba(0, 69, 141, .1); color: var(--cx-primary);
  border-radius: 999px; font-size: .875rem; font-weight: 600;
}
.cx-values { display: grid; gap: 3rem; align-items: center; }
.cx-values__list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.cx-value { display: flex; gap: 1rem; }
.cx-value__icon { color: var(--cx-secondary); margin-top: .15rem; }
.cx-value h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: .25rem; }
.cx-value p { margin: 0; color: var(--cx-text-soft); }
.cx-values__media { position: relative; }
.cx-values__media > img, .cx-values__placeholder {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--cx-r-xl); box-shadow: var(--cx-shadow-lg);
}
.cx-values__placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cx-primary-container), var(--cx-primary)); color: rgba(255, 255, 255, .85);
}
.cx-seal {
  position: absolute; right: .75rem; bottom: -1.5rem;
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.4rem;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-radius: var(--cx-r-lg); box-shadow: var(--cx-shadow-lg);
  color: var(--cx-secondary); text-decoration: none;
}
.cx-seal span { display: flex; flex-direction: column; line-height: 1.25; }
.cx-seal small { color: var(--cx-text-soft); font-size: .8125rem; font-weight: 500; }
.cx-seal strong { color: var(--cx-text); }

/* ---------- Encabezado de sección ---------- */
.cx-sectionhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2rem; }
.cx-sectionhead__lead { margin: .25rem 0 0; color: var(--cx-text-soft); }

/* ---------- Grid y tarjetas ---------- */
.cx-grid { display: grid; gap: 1.75rem; grid-template-columns: 1fr; }
.cx-card { display: flex; flex-direction: column; background: transparent; }
.cx-card__media {
  display: block; overflow: hidden; border-radius: var(--cx-r-xl);
  aspect-ratio: 16 / 10; background: var(--cx-surface-mid); margin-bottom: 1.1rem;
}
.cx-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--cx-ease); }
.cx-card:hover .cx-card__media img { transform: scale(1.05); }
.cx-card__placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--cx-primary-container); }
.cx-card__cat { display: block; color: var(--cx-secondary); font-size: .875rem; font-weight: 600; margin-bottom: .35rem; }
.cx-card__title { font-size: 1.25rem; font-weight: 600; margin-bottom: .6rem; }
.cx-card__title a { color: var(--cx-text); text-decoration: none; transition: color .2s; }
.cx-card:hover .cx-card__title a, .cx-card__title a:hover { color: var(--cx-primary); }
.cx-card__excerpt {
  margin: 0 0 .75rem; color: var(--cx-text-soft);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cx-card__date { color: var(--cx-outline); font-size: .875rem; }

/* ---------- Confianza ---------- */
.cx-trust { background: var(--cx-surface-mid); border-block: 1px solid rgba(194, 198, 212, .5); padding-block: 2.5rem; }
.cx-trust__list { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 3rem; }
.cx-trust__list a, .cx-trust__static {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  max-width: 11rem; text-align: center; text-decoration: none;
  color: var(--cx-primary); font-size: .8125rem; font-weight: 700;
  transition: transform .2s var(--cx-ease);
}
.cx-trust__list a:hover { transform: translateY(-3px); }
.cx-trust__list span { color: var(--cx-text-soft); }

/* ---------- CTA ---------- */
.cx-cta { background: linear-gradient(120deg, var(--cx-primary), var(--cx-primary-container)); color: #fff; padding-block: 3.5rem; }
.cx-cta__inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.cx-cta h2 { color: #fff; font-size: 1.75rem; font-weight: 700; margin-bottom: .4rem; }
.cx-cta p { margin: 0; color: #dbe6ff; max-width: 40rem; }

/* ---------- Cabecera de página interior ---------- */
.cx-pagehead { background: var(--cx-surface-low); padding-block: 3rem 2.5rem; border-bottom: 1px solid rgba(194, 198, 212, .5); }
.cx-pagehead h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.cx-pagehead__lead { font-size: 1.125rem; color: var(--cx-text-soft); margin: 0; max-width: 46rem; }
.cx-pagehead--brand { background: linear-gradient(120deg, var(--cx-primary), var(--cx-primary-container)); border: 0; }
.cx-pagehead--brand h1 { color: #fff; }
.cx-pagehead--brand .cx-pagehead__lead, .cx-pagehead--brand .cx-single__meta, .cx-pagehead--brand .cx-single__cat { color: #dbe6ff; }

.cx-search { display: flex; gap: .5rem; max-width: 30rem; margin-top: 1.5rem; }
.cx-search input {
  flex: 1; min-width: 0; min-height: 44px; padding: .6rem 1rem;
  font: inherit; color: var(--cx-text);
  background: #fff; border: 1px solid var(--cx-outline); border-radius: var(--cx-r-md);
}
.cx-featured { width: 100%; border-radius: var(--cx-r-xl); margin-bottom: 2rem; box-shadow: var(--cx-shadow); }

/* ---------- Prosa (contenido administrable) ---------- */
.cx-prose { font-size: 1.0625rem; line-height: 1.8; color: var(--cx-text); overflow-wrap: break-word; }
.cx-prose > :first-child { margin-top: 0; }
.cx-prose h2 { font-size: 1.75rem; font-weight: 700; margin: 2.25em 0 .6em; color: var(--cx-primary); }
.cx-prose h3 { font-size: 1.35rem; font-weight: 600; margin: 1.8em 0 .5em; }
.cx-prose h4 { font-size: 1.125rem; font-weight: 600; margin: 1.5em 0 .4em; }
.cx-prose p { margin: 0 0 1.2em; }
.cx-prose ul, .cx-prose ol { margin: 0 0 1.4em; padding-left: 1.5rem; }
.cx-prose li { margin-bottom: .45em; }
.cx-prose li::marker { color: var(--cx-secondary); font-weight: 700; }
.cx-prose a { color: var(--cx-primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.cx-prose a:hover { color: var(--cx-primary-container); }
.cx-prose strong { font-weight: 700; }
.cx-prose img { border-radius: var(--cx-r-lg); margin: 1.75rem 0; box-shadow: var(--cx-shadow); }
.cx-prose figure { margin: 1.75rem 0; }
.cx-prose figcaption { font-size: .875rem; color: var(--cx-text-soft); margin-top: .5rem; text-align: center; }
.cx-prose hr { border: 0; border-top: 1px solid var(--cx-outline-variant); margin: 2.5rem 0; }
.cx-prose blockquote {
  margin: 1.75rem 0; padding: 1.1rem 1.5rem;
  background: var(--cx-surface-low); border-left: 4px solid var(--cx-secondary);
  border-radius: 0 var(--cx-r-md) var(--cx-r-md) 0; font-style: italic; color: var(--cx-text-soft);
}
.cx-prose blockquote p:last-child { margin-bottom: 0; }
.cx-prose table {
  display: block; width: 100%; overflow-x: auto; margin: 1.75rem 0;
  border-collapse: collapse; font-size: .9375rem;
  border: 1px solid var(--cx-outline-variant); border-radius: var(--cx-r-md);
}
.cx-prose th, .cx-prose td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--cx-outline-variant); min-width: 8rem; vertical-align: top; }
.cx-prose thead th, .cx-prose th { background: var(--cx-primary); color: #fff; font-weight: 600; }
.cx-prose tbody tr:nth-child(even) { background: var(--cx-surface-low); }
.cx-prose--intro { max-width: 46rem; margin-bottom: 2.5rem; }

/* ---------- Servicios ---------- */
.cx-svc-group + .cx-svc-group { margin-top: 3.5rem; }
.cx-svc-group__title { padding-bottom: .6rem; border-bottom: 3px solid var(--cx-secondary); display: inline-block; margin-bottom: 1.75rem; }
.cx-svc {
  display: flex; flex-direction: column; background: #fff; overflow: hidden;
  border-radius: var(--cx-r-xl); box-shadow: var(--cx-shadow);
  transition: transform .25s var(--cx-ease), box-shadow .25s var(--cx-ease);
}
.cx-svc:hover { transform: translateY(-4px); box-shadow: var(--cx-shadow-lg); }
.cx-svc__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cx-svc__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; gap: .9rem; }
.cx-svc__title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.cx-svc__title a { color: var(--cx-text); text-decoration: none; }
.cx-svc__title a:hover { color: var(--cx-primary); }
.cx-svc__excerpt { margin: 0; color: var(--cx-text-soft); }
.cx-svc__meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0; padding: .9rem 1rem; background: var(--cx-surface-low); border-radius: var(--cx-r-md); }
.cx-svc__meta div { display: flex; flex-direction: column; }
.cx-svc__meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cx-text-soft); font-weight: 600; }
.cx-svc__meta dd { margin: 0; font-weight: 600; }
.cx-svc__price { color: var(--cx-secondary); font-size: 1.125rem; }
.cx-svc__features { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cx-svc__features li { display: flex; gap: .6rem; align-items: flex-start; }
.cx-svc__features .cx-icon { color: var(--cx-secondary); margin-top: .2rem; }
.cx-svc__cta { margin-top: auto; align-self: flex-start; }
.cx-svc__meta--single { margin-bottom: 2rem; }
.cx-svc__features--single { margin: 1.5rem 0; }

/* ---------- Contacto ---------- */
.cx-contact { display: grid; gap: 2rem; }
.cx-contact__info { background: var(--cx-primary); color: #fff; padding: 2rem; border-radius: var(--cx-r-xl); align-self: start; }
.cx-contact__info h2 { color: #fff; font-size: 1.375rem; }
.cx-contact__form { background: #fff; padding: 1.5rem; border-radius: var(--cx-r-xl); box-shadow: var(--cx-shadow); }
.cx-contact__form h2 { font-size: 1.375rem; margin-bottom: 1rem; }
.cx-form-shell { width: 100%; }

.cx-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.cx-contact-list li { display: flex; align-items: flex-start; gap: .75rem; }
.cx-contact-list .cx-icon { margin-top: .2rem; }
.cx-contact-list a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cx-body .cx-contact-list--light a { color: #fff; }

/* ---------- Single ---------- */
.cx-single__cat { color: var(--cx-secondary-container); font-weight: 700; margin: 0 0 .5rem; text-transform: uppercase; letter-spacing: .06em; font-size: .8125rem; }
.cx-single__meta { display: flex; gap: .6rem; flex-wrap: wrap; margin: .5rem 0 0; }
.cx-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2rem 0; }
.cx-tags li { background: var(--cx-surface-mid); color: var(--cx-primary); padding: .25rem .8rem; border-radius: 999px; font-size: .875rem; font-weight: 600; }
.cx-adjacent { display: grid; gap: 1rem; margin: 3rem 0; }
.cx-adjacent__item {
  display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.25rem;
  border: 1px solid var(--cx-outline-variant); border-radius: var(--cx-r-lg);
  text-decoration: none; color: var(--cx-text);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--cx-ease);
}
.cx-adjacent__item:hover { border-color: var(--cx-primary); box-shadow: var(--cx-shadow); transform: translateY(-2px); }
.cx-adjacent__item small { color: var(--cx-text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.cx-adjacent__item span { font-weight: 600; color: var(--cx-primary); }
.cx-adjacent__item--next { text-align: right; }

/* ---------- Comentarios ---------- */
.cx-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--cx-outline-variant); }
.cx-comments__list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.cx-comments__list--replies { margin: 1rem 0 0 1.25rem; }
.cx-comment { background: #fff; padding: 1.1rem 1.25rem; border-radius: var(--cx-r-lg); box-shadow: var(--cx-shadow-sm); }
.cx-comment__author { margin: 0; font-weight: 700; }
.cx-comment__date { font-size: .8125rem; color: var(--cx-text-soft); }
.cx-comment__body { margin-top: .5rem; white-space: pre-line; }
.cx-comment-form { background: var(--cx-surface-low); padding: 1.5rem; border-radius: var(--cx-r-xl); display: grid; gap: 1rem; }
.cx-comment-form h3 { margin: 0; font-size: 1.25rem; }
.cx-field { display: grid; gap: .35rem; }
.cx-field label { font-weight: 600; font-size: .9375rem; }
.cx-field input, .cx-field textarea {
  width: 100%; padding: .7rem 1rem; font: inherit; color: var(--cx-text);
  background: #fff; border: 1px solid var(--cx-outline); border-radius: var(--cx-r-md);
}
.cx-comment-form__status { margin: 0; font-weight: 600; min-height: 1.5em; }
.cx-comment-form__status.is-ok { color: var(--cx-secondary); }
.cx-comment-form__status.is-error { color: var(--cx-error); }
.cx-comment-form button { justify-self: start; }

/* ---------- Paginación ---------- */
.cx-pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3rem; }
.cx-pagination__info { color: var(--cx-text-soft); font-weight: 500; }

/* ---------- 404 ---------- */
.cx-404__inner { text-align: center; }
.cx-404__code { font-size: 6rem; font-weight: 800; line-height: 1; margin: 0; color: var(--cx-primary-container); }
.cx-404 .cx-pagehead__lead { margin-inline: auto; }
.cx-404 .cx-actions { justify-content: center; margin-top: 2rem; }

/* ---------- Footer ---------- */
.cx-footer { background: var(--cx-inverse); color: var(--cx-inverse-text); }
.cx-footer__grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; grid-template-columns: 1fr; }
.cx-footer__title { font-size: 1.0625rem; font-weight: 700; color: #d7e3ff; margin-bottom: 1rem; }
.cx-footer p { margin: 0 0 1rem; color: #d3dbee; }
.cx-footer .cx-brand__name { color: #d7e3ff; }
.cx-footer .cx-brand__logo { height: 48px; background: #fff; padding: 4px 8px; border-radius: var(--cx-r-sm); }
.cx-footer a { color: #d7e3ff; }
.cx-footer-nav__list, .cx-footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.cx-footer-nav__link, .cx-footer-nav a { color: #d7e3ff; text-decoration: underline; text-underline-offset: 3px; font-size: .9375rem; }
.cx-footer-nav a:hover { color: #fff; }
.cx-footer .cx-contact-list a { text-decoration: underline; }
.cx-social { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: .75rem; }
.cx-social a {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(170, 199, 255, .18); color: #d7e3ff;
  transition: background-color .2s, transform .2s var(--cx-ease);
}
.cx-social a:hover { background: var(--cx-primary-container); color: #fff; transform: translateY(-2px); }
/* El formulario CRM se aloja en un contenedor claro: su diseño interior no se toca */
.cx-newsletter__form { background: #fff; color: var(--cx-text); border-radius: var(--cx-r-lg); padding: 1rem; }
.cx-footer__bottom { border-top: 1px solid rgba(114, 119, 132, .5); padding-block: 1.5rem; text-align: center; }
.cx-footer__bottom p { margin: 0; font-size: .875rem; color: #bcc6dc; }

/* ---------- Revelado suave (solo con JS) ---------- */
.js .cx-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--cx-ease), transform .6s var(--cx-ease); }
.js .cx-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .cx-bento { grid-template-columns: repeat(2, 1fr); }
  .cx-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cx-adjacent { grid-template-columns: 1fr 1fr; }
  .cx-cta__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cx-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  :root { --cx-gutter: 2rem; --cx-header-h: 80px; }
  .cx-section { padding-block: 4.5rem; }
  .cx-hero { min-height: 560px; }
  .cx-hero h1 { font-size: 3rem; letter-spacing: -.02em; }
  .cx-h2 { font-size: 2rem; }
  .cx-pagehead h1 { font-size: 2.5rem; }

  .cx-burger { display: none; }
  .cx-header__panel {
    display: flex !important; position: static; align-items: center; flex: 1; justify-content: space-between;
    background: transparent; border: 0; box-shadow: none; padding: 0; max-height: none; overflow: visible; animation: none;
  }
  .cx-nav { margin-inline: auto; }
  .cx-nav__list, .cx-nav ul { display: flex; align-items: center; gap: 1.5rem; }
  .cx-nav__link, .cx-body .cx-nav a { padding: .5rem .15rem; }
  .cx-nav__link:hover, .cx-body .cx-nav a:hover { border-bottom-color: var(--cx-primary); }
  .cx-header__actions { margin-top: 0; flex-wrap: nowrap; }

  /* Submenús */
  .cx-nav__sub, .cx-nav .sub-menu {
    position: absolute; left: 0; top: 100%; min-width: 14rem; display: none !important;
    padding: .5rem !important; background: #fff; border-radius: var(--cx-r-md); box-shadow: var(--cx-shadow-lg); border: 1px solid var(--cx-outline-variant);
  }
  .cx-nav__sub a, .cx-nav .sub-menu a { padding: .6rem .75rem; border-radius: var(--cx-r-sm); }
  .cx-nav__sub a:hover, .cx-nav .sub-menu a:hover { background: var(--cx-surface-mid); }
  .has-children:hover > .cx-nav__sub, .has-children:focus-within > .cx-nav__sub,
  .has-children:hover > .sub-menu, .has-children:focus-within > .sub-menu,
  .menu-item-has-children:hover > .sub-menu, .menu-item-has-children:focus-within > .sub-menu { display: block !important; }
  .cx-nav .cx-nav__item { display: block; }
  .cx-nav ul ul { flex-direction: column; align-items: stretch; gap: 0; }

  .cx-bento { grid-template-columns: repeat(4, 1fr); }
  .cx-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cx-values { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .cx-contact { grid-template-columns: 1fr 1.6fr; gap: 2.5rem; }
  .cx-contact__form { padding: 2.25rem; }
  .cx-footer__grid { grid-template-columns: 1.4fr 1fr 1.3fr 1.3fr; gap: 3rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .cx-reveal { opacity: 1; transform: none; }
  .cx-btn:hover, .cx-tile:hover, .cx-svc:hover, .cx-card:hover .cx-card__media img { transform: none; }
}
