/* ==========================================================================
   Comunidad 5.0 — finishing layer (v2). Scoped to body.xprof-comunidad.
   Structural values (colour, size, spacing, layout) live in the Elementor
   widget settings and stay editable; this file adds only what Elementor
   cannot express, plus the laptop breakpoint Elementor does not provide.
   ========================================================================== */

body.xprof-comunidad {
  --c50-ink: #0B0718;
  --c50-paper: #F4F3F7;
  --c50-white: #FFFFFF;
  --c50-acc: #7A5BB5;
  --c50-lilac: #B9A7F0;
  --c50-line: #DEDCE6;
  --c50-strong: #C9C6D6;
  --c50-sec: #4A4658;
  --c50-ter: #5C5870;
  --c50-purple: #581B9D;
  --c50-head-h: 76px;
  background: var(--c50-paper);
  overflow-x: hidden;
}

/* --- never let a flex child force a horizontal scrollbar ----------------- */
body.xprof-comunidad .e-con > .e-con-inner > .e-con,
body.xprof-comunidad .e-con-inner > .elementor-widget { min-width: 0; }
body.xprof-comunidad .elementor-heading-title,
body.xprof-comunidad .elementor-widget-text-editor { overflow-wrap: break-word; }

/* --- anchors must clear the sticky header ------------------------------- */
body.xprof-comunidad section[id] { scroll-margin-top: calc(var(--c50-head-h) + 16px); }

/* --- accent emphasis inside headings (non-italic, brand violet) ---------- */
body.xprof-comunidad .elementor-heading-title em,
body.xprof-comunidad .xpro-heading-title em {
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--c50-acc);
}
body.xprof-comunidad .c50-dark .elementor-heading-title em { color: var(--c50-lilac); }

body.xprof-comunidad .c50-display .elementor-heading-title { text-wrap: balance; }
body.xprof-comunidad .c50-measure { max-width: 62ch; }
body.xprof-comunidad .c50-h2wide .elementor-heading-title { max-width: 22ch; }

/* --- hero + closing ambient gradients ------------------------------------ */
body.xprof-comunidad .c50-hero {
  background-image:
    radial-gradient(680px 420px at 88% -8%, rgba(110,128,232,.18), transparent 70%),
    radial-gradient(520px 380px at -6% 18%, rgba(185,167,240,.26), transparent 70%);
}
body.xprof-comunidad .c50-closing {
  background-image: radial-gradient(620px 400px at 94% 4%, rgba(110,128,232,.16), transparent 70%);
}

/* --- hero meta rail ------------------------------------------------------ */
body.xprof-comunidad .c50-herometa .elementor-icon-list-items {
  border-top: 1px solid var(--c50-strong);
  padding-top: 18px;
  row-gap: 8px;
}
body.xprof-comunidad .c50-herometa .elementor-icon-list-item:not(:last-child)::after {
  content: "·";
  margin-left: 20px;
  color: var(--c50-strong);
}

/* --- imagery ------------------------------------------------------------- */
body.xprof-comunidad .c50-card .elementor-widget-image,
body.xprof-comunidad .c50-shot .elementor-widget-container {
  overflow: hidden;
  border-radius: 4px;
}
body.xprof-comunidad .c50-card img,
body.xprof-comunidad .c50-shot img {
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  display: block;
}
body.xprof-comunidad .c50-card:hover img { transform: scale(1.045); }

/* --- tick lists ---------------------------------------------------------- */
body.xprof-comunidad .c50-ticks { margin-top: 26px; }
body.xprof-comunidad .c50-ticks .elementor-icon-list-icon { padding-top: 4px; }

/* --- quote cards --------------------------------------------------------- */
body.xprof-comunidad .c50-quote { transition: box-shadow .25s ease, transform .25s ease; }
body.xprof-comunidad .c50-quote:hover {
  box-shadow: 0 22px 54px -32px rgba(11,7,24,.34);
  transform: translateY(-3px);
}

/* --- alt CTA line -------------------------------------------------------- */
body.xprof-comunidad .c50-altcta a {
  color: var(--c50-acc);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
body.xprof-comunidad .c50-altcta a:hover { color: var(--c50-purple); }

/* --- buttons ------------------------------------------------------------- */
body.xprof-comunidad .elementor-button { transition: all .25s cubic-bezier(.2,.8,.2,1); }
body.xprof-comunidad .elementor-button:hover { transform: translateY(-2px); }

/* --- visible focus for keyboard users ------------------------------------ */
body.xprof-comunidad a:focus-visible,
body.xprof-comunidad button:focus-visible,
body.xprof-comunidad input:focus-visible,
body.xprof-comunidad select:focus-visible,
body.xprof-comunidad textarea:focus-visible {
  outline: 2px solid var(--c50-acc);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Header
   ========================================================================== */
body.xprof-comunidad .c50-header {
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
body.xprof-comunidad .c50-wordmark a,
body.xprof-comunidad .c50-wordmark .xpro-heading-title { text-decoration: none; white-space: nowrap; }
body.xprof-comunidad .c50-headcta a { white-space: nowrap; }
body.xprof-comunidad .c50-nav .xpro-horizontal-menu > li > a { white-space: nowrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
body.xprof-comunidad .c50-footer a { text-decoration: none; }
body.xprof-comunidad .c50-foot-legal p { margin: 0; }
body.xprof-comunidad .c50-foot-about { max-width: 42ch; }

/* Xpro renders the social icons as a fixed-width N-column grid, which spills
   out of a narrow footer column. Let them flow and wrap instead. */
body.xprof-comunidad .c50-socials .xpro-social-icon-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.xprof-comunidad .c50-socials .xpro-social-icon-wrapper > li {
  width: auto;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Link colour
   The site's global link colour (#CC3366) cascades into every Xpro widget that
   wraps its label in an anchor, beating the widget's own colour setting. Restore
   the palette locally — ink on light surfaces, white on the dark footer — so the
   text keeps full contrast against its background.
   ========================================================================== */

/* header wordmark — ink on paper, brand accent on the "5.0" */
body.xprof-comunidad .c50-header .c50-wordmark a,
body.xprof-comunidad .c50-header .c50-wordmark a .xpro-heading-title {
  color: var(--c50-ink);
}
body.xprof-comunidad .c50-header .c50-wordmark a .xpro-title-focus { color: var(--c50-acc); }
body.xprof-comunidad .c50-header .c50-wordmark a:hover,
body.xprof-comunidad .c50-header .c50-wordmark a:hover .xpro-heading-title {
  color: var(--c50-purple);
}

/* footer wordmark — white on ink */
body.xprof-comunidad .c50-footer .c50-wordmark a,
body.xprof-comunidad .c50-footer .c50-wordmark a .xpro-heading-title {
  color: var(--c50-white);
}
body.xprof-comunidad .c50-footer .c50-wordmark a .xpro-title-focus { color: var(--c50-lilac); }

/* footer link lists — white on ink, lilac on hover */
body.xprof-comunidad .c50-foot-list a,
body.xprof-comunidad .c50-foot-list a .xpro-infolist-content,
body.xprof-comunidad .c50-foot-list a .xpro-infolist-title {
  color: var(--c50-white);
  transition: color .2s ease;
}
body.xprof-comunidad .c50-foot-list a:hover,
body.xprof-comunidad .c50-foot-list a:hover .xpro-infolist-content,
body.xprof-comunidad .c50-foot-list a:hover .xpro-infolist-title {
  color: var(--c50-lilac);
}

/* required-field marker: WPForms ships its own red */
body.xprof-comunidad .c50-wpf .wpforms-required-label { color: var(--c50-ink); }

/* ==========================================================================
   Skip link
   ========================================================================== */
body.xprof-comunidad .c50-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--c50-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 3px 0;
  font: 600 14px/1.2 Manrope, system-ui, sans-serif;
}
body.xprof-comunidad .c50-skip:focus { left: 0; }

/* ==========================================================================
   WPForms — match the XPROF form card
   ========================================================================== */
body.xprof-comunidad .c50-wpf .wpforms-container { margin: 0; }
body.xprof-comunidad .c50-wpf .wpforms-form .wpforms-field { padding: 0 0 18px; }
body.xprof-comunidad .c50-wpf .wpforms-form .wpforms-field-label {
  font: 600 13px/1.3 Manrope, system-ui, sans-serif;
  color: var(--c50-sec);
  margin-bottom: 8px;
  letter-spacing: .01em;
}
body.xprof-comunidad .c50-wpf .wpforms-form input[type=text],
body.xprof-comunidad .c50-wpf .wpforms-form input[type=email],
body.xprof-comunidad .c50-wpf .wpforms-form select,
body.xprof-comunidad .c50-wpf .wpforms-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--c50-strong);
  border-radius: 3px;
  background: var(--c50-white);
  color: var(--c50-ink);
  font: 400 16px/1.5 Manrope, system-ui, sans-serif;
  padding: 12px 14px;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
body.xprof-comunidad .c50-wpf .wpforms-form textarea { min-height: 92px; }
body.xprof-comunidad .c50-wpf .wpforms-form input:focus,
body.xprof-comunidad .c50-wpf .wpforms-form select:focus,
body.xprof-comunidad .c50-wpf .wpforms-form textarea:focus {
  outline: none;
  border-color: var(--c50-acc);
  box-shadow: 0 0 0 3px rgba(122,91,181,.16);
}
body.xprof-comunidad .c50-wpf .wpforms-form .wpforms-field-description,
body.xprof-comunidad .c50-wpf .wpforms-form .wpforms-field-checkbox label {
  font: 400 13px/1.6 Manrope, system-ui, sans-serif;
  color: var(--c50-ter);
}
body.xprof-comunidad .c50-wpf .wpforms-form .wpforms-field-checkbox ul { margin: 0; padding: 0; list-style: none; }
body.xprof-comunidad .c50-wpf .wpforms-form button[type=submit] {
  background: var(--c50-ink);
  color: #fff;
  border: 0;
  border-radius: 100px;
  min-height: 50px;
  padding: 0 32px;
  font: 600 15px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
  width: 100%;
}
body.xprof-comunidad .c50-wpf .wpforms-form button[type=submit]:hover {
  background: var(--c50-purple);
  transform: translateY(-2px);
}
body.xprof-comunidad .c50-wpf .wpforms-confirmation-container-full {
  background: #EFEAF8;
  border: 1px solid var(--c50-lilac);
  border-radius: 4px;
  color: var(--c50-ink);
}

/* ==========================================================================
   Laptop tier (1025–1240px) — Elementor jumps straight from tablet to
   desktop, which lets the display headline overflow its column. Damp the
   large type down across that band.
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1240px) {
  body.xprof-comunidad .c50-display .elementor-heading-title { font-size: 58px !important; }
  body.xprof-comunidad h2.elementor-heading-title { font-size: 40px !important; }
  body.xprof-comunidad .c50-header { --c50-head-h: 72px; }
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1024px) {
  body.xprof-comunidad { --c50-head-h: 70px; }
  body.xprof-comunidad .c50-measure { max-width: none; }
  body.xprof-comunidad .c50-h2wide .elementor-heading-title { max-width: none; }
  /* the 5 ecosystem cards fall to 2-up; keep the orphan full width */
  body.xprof-comunidad .c50-foot-about { max-width: none; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 767px) {
  body.xprof-comunidad { --c50-head-h: 62px; }

  /* header must survive 320px: shrink the CTA, never wrap the row */
  body.xprof-comunidad .c50-headcta a {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  body.xprof-comunidad .c50-wordmark .xpro-heading-title { font-size: 17px !important; }

  /* hero rail reads as a stacked list rather than a dotted line */
  body.xprof-comunidad .c50-herometa .elementor-icon-list-item:not(:last-child)::after {
    margin-left: 12px;
  }

  /* full-bleed CTAs are easier to hit. The widget wrapper is a flex item that
     shrinks to its content, so it has to stretch as well as the button. */
  body.xprof-comunidad .c50-hero .elementor-widget-button,
  body.xprof-comunidad .c50-band .elementor-widget-button { width: 100%; }
  body.xprof-comunidad .c50-hero .elementor-widget-button .elementor-button,
  body.xprof-comunidad .c50-band .elementor-widget-button .elementor-button { width: 100%; }

  /* tighten oversized display type a touch further on very small screens */
  body.xprof-comunidad .c50-quote { padding: 24px 20px !important; }
}

@media (max-width: 380px) {
  body.xprof-comunidad .c50-headcta { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  body.xprof-comunidad *,
  body.xprof-comunidad *::before,
  body.xprof-comunidad *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  body.xprof-comunidad .c50-card:hover img,
  body.xprof-comunidad .c50-quote:hover,
  body.xprof-comunidad .elementor-button:hover { transform: none; }
}
