/* ---------- imagen que se expande con el scroll (see nbg-scroll-expand.js) ----------
   Classes go on native Elementor containers and widgets (Advanced → CSS Classes):
   nbg-se-track > nbg-se-stage > (nbg-se-frame > nbg-se-media + nbg-se-overlay) + nbg-se-title */

[data-nbg-se="track"] {
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
}

[data-nbg-se="stage"] {
  position: sticky !important;
  top: 0;
  width: 100% !important;
  height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

[data-nbg-se="frame"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(21% 29% 21% 29% round 24px);
  will-change: clip-path;
}

/* dark scrim over the image, its strength follows the scroll through --nbg-se-scrim */
[data-nbg-se="frame"]::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.35));
  opacity: var(--nbg-se-scrim, 0);
}

.nbg-se-media {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}
.nbg-se-media .elementor-widget-container,
.nbg-se-media img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.nbg-se-media img {
  object-fit: cover;
  transform-origin: center;
  will-change: transform;
}

.nbg-se-title {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 6% !important;
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  will-change: opacity, transform;
}
/* the heading keeps its natural height, so the flex centring of the title layer places it in the middle */
.nbg-se-title .elementor-widget-container {
  width: 100%;
  height: auto !important;
  margin: 0;
}
.nbg-se-title .elementor-heading-title.elementor-heading-title {
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  height: auto !important;
  margin: 0;
  text-align: center;
}

/* the black card: it fades in centred on the screen, so the text and buttons read on any image */
[data-nbg-se="overlay"] {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: min(640px, 88%) !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px 36px !important;
  box-sizing: border-box;
  background: #0b0d12 !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65);
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  will-change: opacity, transform;
}
/* text inside the black card stays white; the buttons keep the site's outline style and its primary curtain on hover */
[data-nbg-se="overlay"] .elementor-widget-text-editor,
[data-nbg-se="overlay"] .elementor-widget-text-editor p,
[data-nbg-se="overlay"] .elementor-widget-text-editor span {
  color: #fff !important;
}
[data-nbg-se="overlay"] .elementor-button {
  color: #f2f2ee !important;
  border-color: #f2f2ee !important;
}
[data-nbg-se="overlay"] .elementor-button:hover {
  color: #001215 !important;
  border-color: #14b5c1 !important;
}
[data-nbg-se="overlay"] .elementor-widget-text-editor {
  width: 100%;
}
[data-nbg-se="buttons"] {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px !important;
  width: 100% !important;
}
[data-nbg-se="buttons"] .elementor-button {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  [data-nbg-se="frame"],
  .nbg-se-media img,
  .nbg-se-title,
  [data-nbg-se="overlay"] { will-change: auto; }
}
