/* ==========================================================================
   Bridge between Elementor (free) markup and the Cokolex design system.
   Layout comes from Elementor container settings; look comes from our
   tokens and component classes. Loaded after Elementor's frontend CSS.
   ========================================================================== */

/* Headings used as labels keep the label look (the class sits on the widget,
   the heading element inside would otherwise pick up the h1/h2 base styles). */
.eyebrow .elementor-heading-title {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; line-height: inherit;
}

/* Buttons: Elementor's button widget with our .btn look via wrapper classes */
.cx-btn .elementor-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: var(--font-sans); font-weight: var(--weight-medium); font-size: var(--text-sm); line-height: 1;
  white-space: nowrap;
  transition: var(--transition-control), transform var(--duration-fast) var(--ease-standard);
}
.cx-btn .elementor-button:active { transform: translateY(1px); }
.cx-btn--lg .elementor-button { height: 48px; padding: 0 var(--space-6); font-size: var(--text-md); }
.cx-btn--sm .elementor-button { height: 36px; padding: 0 var(--space-4); }
.cx-btn--primary .elementor-button { background: var(--brand-primary); color: var(--white); }
.cx-btn--primary .elementor-button:hover { background: var(--brand-deep); color: var(--white); }
.cx-btn--secondary .elementor-button { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
.cx-btn--secondary .elementor-button:hover { background: var(--surface-sunken); color: var(--text-strong); }
.cx-btn--inverse .elementor-button { background: var(--white); color: var(--blue-600); }
.cx-btn--inverse .elementor-button:hover { background: rgba(255,255,255,0.86); color: var(--blue-600); }

/* Our layout classes own the spacing: Elementor's default container padding
   and widget gap (set on the kit) are zeroed for everything inside a page. */
.elementor {
  --container-default-padding-top: 0px; --container-default-padding-right: 0px;
  --container-default-padding-bottom: 0px; --container-default-padding-left: 0px;
  --widgets-spacing: 0px; --widgets-spacing-row: 0px; --widgets-spacing-column: 0px;
}

/* Labels sitting directly on the grey page ground (contrast, see pages.css) */
.elementor > .section .eyebrow:not(.card .eyebrow):not(.eyebrow--invert) { color: var(--text-body); }

/* Hero: the stage (brand motif) positions against .hero-home, not its widget */
.hero-home > .elementor-widget-html { position: static; }

/* Paragraphs that share one text widget keep the rhythm of separate blocks */
.about-grid__copy p + p { margin-top: var(--space-5); }

/* TecDoc panel: answer title sits closer to its text; button gets air */
.tecdoc-feature__copy .elementor-widget-heading:has(h3) + .elementor-widget-text-editor { margin-top: calc(var(--space-3) - var(--space-5)); }
.tecdoc-feature__copy .cx-btn { margin-top: var(--space-3); }

/* Mobile: hero buttons stack full width, as on the static site (our 860px
   breakpoint; body prefix outranks the row setting stored in post-N.css). */
@media (max-width: 860px) {
  body .elementor .hero-home__actions.e-con { --flex-direction: column; --align-items: stretch; flex-direction: column; align-items: stretch; }
  .hero-home__actions .cx-btn .elementor-button { width: 100%; }
}

/* The kit (post-6.css) sets a 20px widget/container gap on EVERY
   .elementor-element, so the reset has to sit on the elements themselves. */
.elementor .elementor-element {
  --widgets-spacing: 0px; --widgets-spacing-row: 0px; --widgets-spacing-column: 0px;
}

/* Elementor uses ::before on containers for its background overlay
   (opacity from --overlay-opacity, 100% width/height). Our hero light pool
   lives on that pseudo-element, so give it back its own box and opacity. */
.hero-home.e-con::before { opacity: 1; width: auto; height: auto; }
