/* ==========================================================================
   NOORD THEME: HERO SLIDER
   ========================================================================== */

.noord-hero-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  margin-bottom: 0;
}

.noord-hero-container {
  position: relative;
  width: 100%;
  /* TELA INTEIRA em qualquer monitor.
     Era `clamp(420px, 80vh, 900px)`: além de ocupar só 80% da altura, o teto de
     900px fazia o banner encolher proporcionalmente quanto MAIOR o monitor —
     num 1440p sobrava faixa de conteúdo abaixo e o corte da foto aumentava.
     `svh` (small viewport height) em vez de `vh`: no celular a barra do
     navegador que some no scroll não faz o hero "pular" de altura. `vh` fica
     como fallback para navegadores antigos — a ordem das duas linhas importa. */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* Com o header OPACO ele fica no fluxo e empurra o hero para baixo — sem
   descontar a altura dele, a primeira dobra viraria "1 tela + 80px" e sempre
   sobraria um naco do hero abaixo. Com `header-transparent` o header é
   `position: absolute` e flutua sobre a foto: não há o que descontar. */
body:not(.header-transparent) .noord-hero-container {
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
}

@media (max-width: 768px) {
  body:not(.header-transparent) .noord-hero-container {
    height: calc(100vh - var(--header-height-mobile));
    height: calc(100svh - var(--header-height-mobile));
  }
}

.noord-hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.noord-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.noord-hero-slide.noord-slide-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.noord-hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* preserva rosto/topo — nunca corta a cabeça */
  display: block;
}

/* Overlay for better text readability */
.noord-hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* Soft dark overlay */
  z-index: 1;
}

/* Content wrapper: absolute overlay over the image */
.noord-hero-slide .col-full {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 0 40px;
  margin: 0;
  max-width: none;
}

.noord-hero-slide-content {
  max-width: 600px;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s;
}

.noord-hero-slide.noord-slide-active .noord-hero-slide-content {
  opacity: 1;
  transform: translateY(0);
}

.noord-hero-title {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .noord-hero-title {
    font-size: 36px;
  }
}

.noord-hero-subtitle {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.noord-hero-button {
  display: inline-block;
  background-color: #ffffff;
  color: #000000;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 0;
  border: none;
}

.noord-hero-button:hover {
  background-color: #000000;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   CONTROLS (Arrows & Dots)
   -------------------------------------------------------------------------- */

.noord-hero-controls {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 10;
  pointer-events: none; /* Let clicks pass through except on buttons */
}

.noord-hero-controls > * {
  pointer-events: auto;
}

.noord-hero-prev,
.noord-hero-next {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 10px;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.noord-hero-prev:hover,
.noord-hero-next:hover {
  opacity: 1;
  transform: scale(1.1);
  background: transparent;
  color: #ffffff;
}

.noord-hero-dots {
  display: flex;
  gap: 12px;
}

.noord-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.noord-hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.noord-hero-dot.active {
  background-color: #ffffff;
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   VARIANTES DESKTOP / MOBILE
   - Desktop: comportamento original (horizontal).
   - Mobile: slides verticais, quase a tela toda, exibidos só no celular.
   -------------------------------------------------------------------------- */

/* Alinhamento do conteúdo (título, subtítulo, botão) — esquerda (padrão),
   centro ou direita. Vale por variante (desktop/mobile). */
.noord-hero--align-center .noord-hero-slide .col-full { justify-content: center; }
.noord-hero--align-center .noord-hero-slide-content   { text-align: center; }
.noord-hero--align-right  .noord-hero-slide .col-full { justify-content: flex-end; }
.noord-hero--align-right  .noord-hero-slide-content   { text-align: right; }

/* A versão mobile fica oculta no desktop */
.noord-hero--mobile {
  display: none;
}

/* No preview do Page Builder, força a versão conforme o modo selecionado
   (classe injetada no <body> pelo device toggle), independente da largura. */
body.noordpb-view-desktop .noord-hero--mobile  { display: none !important; }
body.noordpb-view-desktop .noord-hero--desktop { display: block !important; }
body.noordpb-view-mobile  .noord-hero--desktop { display: none !important; }
body.noordpb-view-mobile  .noord-hero--mobile  { display: block !important; }

@media (max-width: 768px) {
  /* Mostra a versão mobile (vertical) no celular */
  .noord-hero--mobile {
    display: block;
  }

  /* Esconde a desktop no celular SOMENTE quando há versão mobile configurada */
  .noord-hero--desktop.noord-hero--has-mobile {
    display: none;
  }

  /* Slides mobile: verticais, ocupando quase toda a altura da tela */
  .noord-hero--mobile .noord-hero-container {
    height: calc(100vh - var(--header-height-mobile, 60px));
    height: calc(100svh - var(--header-height-mobile, 60px));
    min-height: 480px;
    max-height: none;
  }

  /* Imagem vertical centralizada (preenche o quadro alto sem distorcer) */
  .noord-hero--mobile .noord-hero-slide-img {
    object-position: center center;
  }
}
