/* ============================================================
   Ursa Magna — Elementor compatibility layer
   ursa.css is the design; this file only bridges Elementor's markup
   (containers + widget wrappers) to it. Classes used in the editor
   (Advanced → CSS Classes) match the ones in ursa.css.
   ============================================================ */

/* ---------- Containers: no default padding / gaps / max width ---------- */
.elementor .e-con {
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --gap: 0px;
  --row-gap: 0px;
  --column-gap: 0px;
  --widgets-spacing: 0px;
  --widgets-spacing-row: 0px;
  --widgets-spacing-column: 0px;
  --container-max-width: none;
  --content-width: 100%;
}

/* Row containers (buttons + links side by side) */
.elementor .e-con:is(.actions, .hero-actions, .socials) { flex-direction: row !important; }
.elementor .e-con:is(.actions, .hero-actions, .socials) > .elementor-element {
  width: auto !important;
  flex: 0 0 auto !important;
}
.elementor .e-con.hero-actions { justify-content: center; }

/* ---------- Widgets ---------- */
.elementor { --kit-widget-spacing: 0px; }

/* Elementor zeroes widget bottom margins (.e-con .elementor-widget.elementor-widget);
   restore the ones ursa.css gives to classes used on widgets. */
.e-con .elementor-widget.eyebrow { margin-block-end: 1.3rem; }
.e-con .elementor-widget.lead { margin-block-end: 1.5rem; }
.e-con.gallery-cta .elementor-widget.lead { margin-block-end: 1.9rem; }
.e-con .elementor-widget.crow-dt { margin-block-end: .35rem; }

/* In the mockup the last child's bottom margin collapses into these blocks'
   own margin; flex containers don't collapse, so drop it. */
.e-con:is(.seasons-head, .gallery-head) > .elementor-widget:last-child { margin-block-end: 0; }
.e-con:is(.seasons-head, .gallery-head) > .elementor-widget:last-child .elementor-heading-title { margin-bottom: 0; }
.e-con > .elementor-widget.lead + .e-con.actions { margin-top: .9rem; } /* 2.4rem collapsed with the lead's 1.5rem */

/* Headings take the type of the class on the widget (eyebrow, lead…) */
.elementor .elementor-heading-title { line-height: inherit; }
.elementor :is(h1, h2).elementor-heading-title { line-height: 1.16; }
.elementor h2.elementor-heading-title { margin-bottom: 1.4rem; }

/* Buttons: Elementor defaults off, ursa.css .ubtn rules on */
.elementor .ubtn .elementor-button {
  border-radius: 0;
  line-height: inherit;
  text-align: center;
}
/* In row containers the mockup button is a flex item: no line-box gap under it */
.elementor .e-con:is(.actions, .hero-actions) .ubtn .elementor-button { vertical-align: top; }
.elementor .ubtn .elementor-button-content-wrapper { display: block; }

/* Images */
.elementor .elementor-widget-image img { display: block; }
.elementor .elementor-widget-image.frame { text-align: left; }
.elementor .frame figure { margin: 0; }

/* Hero background (Image widget with class hero-bg) */
.elementor .elementor-widget.hero-bg {
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: none;
}
.elementor .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
.hero-content > .hero-title { animation-delay: .32s; }

/* Scroll cue (HTML widget with class scroll-cue) */
.elementor .elementor-widget.scroll-cue {
  position: absolute;
  width: 1px !important;
}

/* Contact rows (two Heading widgets per row) */
.crow-dt {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(250, 248, 241, .5);
  margin-bottom: .35rem;
}
.crow-dd { font-weight: 300; font-size: 1.02rem; }

/* Seasons: a plain block like the mockup. As a flex column, the mobile grid of
   aspect-ratio tiles gets an intrinsic height of 0 and the strip disappears. */
.elementor .e-con.seasons,
.elementor .e-con:has(> .elementor-widget-ursa-gallery) { display: block; } /* same issue with the masonry columns */

/* Gallery (HTML widget): Elementor resets figure margins inside widgets */
.elementor .masonry figure { margin: 0 0 14px !important; }

@media (max-width: 960px) {
  .split--rev > .frame { order: 2; }
}
@media (max-width: 640px) {
  .elementor .masonry figure { margin-bottom: 10px !important; }
}

/* ---------- Editor: show everything (scroll reveals never fire there) ---------- */
.elementor-editor-active .reveal,
.elementor-editor-active .reveal *,
.elementor-editor-active .hero-content > * {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}
