/**
 * Header Global Refatorado - Campino
 * 
 * Especificações:
 * 1. Fundo 100% da tela (Hero 100vw x 100vh) com Slider/Vídeo do banco de dados
 * 2. Botão isolado "MENU" no canto superior direito: 75px do topo, Proxima Nova Extra Condensed, 54px, branco, uppercase
 * 3. Logotipo Campino no canto superior esquerdo: 75px do topo, 439px x 174px (referência telas 1600px), fluido/responsivo
 */

/* ==========================================================================
   Tipografia - Proxima Nova Extra Condensed (com fallbacks e declarações)
   ========================================================================== */
@font-face {
  font-family: "ProximaNovaExCn";
  src:
    url("../fonts/ProximaNovaExCn-Regular.woff2") format("woff2"),
    url("../fonts/ProximaNovaExCn-Regular.woff") format("woff"),
    url("../fonts/ProximaNovaExCn-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ProximaNovaExCn";
  src:
    url("../fonts/ProximaNovaExCn-Bold.woff2") format("woff2"),
    url("../fonts/ProximaNovaExCn-Bold.woff") format("woff"),
    url("../fonts/ProximaNovaExCn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova Extra Condensed";
  src:
    url("../fonts/ProximaNovaExCn-Regular.woff2") format("woff2"),
    url("../fonts/ProximaNovaExCn-Regular.woff") format("woff"),
    url("../fonts/ProximaNovaExCn-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova Extra Condensed";
  src:
    url("../fonts/ProximaNovaExCn-Bold.woff2") format("woff2"),
    url("../fonts/ProximaNovaExCn-Bold.woff") format("woff"),
    url("../fonts/ProximaNovaExCn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Variáveis de Layout e Proporções Fluidas
   ========================================================================== */
:root {
  --header-top-offset: 75px;
  --header-side-offset: 75px;
  --logo-width: 439px;
  --logo-height: 174px;
  --menu-font-size: 54px;
}

/* ==========================================================================
   Estrutura Geral do Header (Hero 100% largura e altura da primeira seção)
   ========================================================================== */
.header-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: #0c0d0e;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   Componente de Slider / Vídeo (Fundo Completo)
   ========================================================================== */
.header-hero .header-carousel,
.header-hero .header-carousel-inner,
.header-hero .header-carousel-item {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

/* Transição suave entre slides */
.header-hero .carousel-fade .carousel-item {
  opacity: 0;
  transition-duration: 0.9s;
  transition-property: opacity;
}

.header-hero .carousel-fade .carousel-item.active,
.header-hero .carousel-fade .carousel-item-next.carousel-item-left,
.header-hero .carousel-fade .carousel-item-prev.carousel-item-right {
  opacity: 1;
}

.header-hero .carousel-fade .active.carousel-item-left,
.header-hero .carousel-fade .active.carousel-item-right {
  opacity: 0;
}

/* Fundo com Imagem Dinâmica */
.header-hero .header-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: 1;
}

/* Fundo com Vídeo Dinâmico */
.header-hero .header-slide-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.header-hero .header-slide-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  background-color: #474747;
}

/* Camada de Overlay Sutil */
.header-hero .header-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 35%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   Logotipo Campino (Canto Superior Esquerdo)
   ========================================================================== */
.header-logo {
  position: absolute;
  top: var(--header-top-offset, 75px);
  left: var(--header-side-offset, 75px);
  z-index: 30;
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.header-logo-img {
  display: block;
  width: var(--logo-width, 439px);
  height: var(--logo-height, 174px);
  max-width: 100%;
  aspect-ratio: 439 / 174;
  object-fit: contain;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.header-logo:hover .header-logo-img {
  opacity: 0.92;
  transform: scale(1.01);
}

/* ==========================================================================
   Botão Isolado MENU (Canto Superior Direito)
   ========================================================================== */
.header-btn-menu {
  position: absolute;
  top: var(--header-top-offset, 75px);
  right: var(--header-side-offset, 75px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  border-left: none;
  border-right: none;
  padding: 10px 20px;
  margin: 0;
  background: transparent;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.header-btn-menu:hover,
.header-btn-menu:focus {
  opacity: 0.85;
  outline: none;
  text-decoration: none;
  transform: scale(1.02);
}

.header-btn-menu:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Variação do Botão MENU para Páginas Internas (.header-menu-internal-wrap)
   - Div pai com fundo vermelho #dc2218
   - Arredondada no lado esquerdo (border-radius: 50px 0 0 50px)
   - Estende-se até à lateral direita da página (right: 0)
   - Mantém a div/botão original intacta (bordas brancas retas, sem border-radius)
   ========================================================================== */
.header-menu-internal-wrap {
  position: absolute;
  top: var(--header-top-offset, 75px);
  right: 0;
  z-index: 30;
  background-color: #dc2218;
  border-radius: 75px 0 0 75px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 0 20px 42px;
  padding-right: var(--header-side-offset, 85px);
  box-sizing: border-box;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.header-menu-internal-wrap:hover {
  background-color: #b51c14;
  transform: scale(1.02);
  transform-origin: right center;
}

.header-menu-internal-wrap:active {
  transform: scale(0.98);
  transform-origin: right center;
}

/* O botão original dentro do wrapper pai não é modificado */
.header-menu-internal-wrap .header-btn-menu {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  background: transparent;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.header-menu-internal-wrap .header-btn-menu:hover,
.header-menu-internal-wrap .header-btn-menu:focus {
  transform: none;
  opacity: 0.95;
}

/* Elemento da Esquerda: Texto MENU */
.header-btn-menu-text {
  font-family: "ProximaNovaExCn", "Proxima Nova Extra Condensed", sans-serif;
  font-size: var(--menu-font-size, 54px);
  font-weight: 300;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.05em;
  display: inline-block;
}

/* Elemento da Direita: Ícone de Duas Linhas Horizontais */
.header-btn-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  flex-shrink: 0;
}

.header-btn-menu-line {
  width: 50px;
  height: 2px;
  background-color: #ffffff;
  display: block;
}

/* Ícone Inclinado (Páginas Internas / Menus)
   A linha superior mantém-se reta, e a linha inferior sofre rotação inclinada */
.btn-menu-internal .header-btn-menu-line:last-child,
.btn-menu-internal .header-btn-menu-line-bottom {
  transform: rotate(-15deg);
  transform-origin: left center;
}

/* ==========================================================================
   Textos / Captions Dinâmicos dos Slides (Vindos do Backoffice)
   ========================================================================== */
.header-caption-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.header-caption-box {
  pointer-events: auto;
  padding-top: max(180px, 20vh);
  padding-bottom: 50px;
  max-width: 880px;
}

.header-caption-tag {
  font-family: "Raleway Regular", "Raleway", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.header-caption-title {
  font-family: "Merriweather Black", "Merriweather", serif;
  font-size: clamp(2.2rem, 4.4vw, 4.5rem);
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.header-caption-desc p {
  font-family: "Merriweather Regular", "Merriweather", serif;
  font-size: clamp(1.1rem, 2vw, 2.1rem);
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
   Breakpoints Responsivos (Fluidos)
   ========================================================================== */

/* Telas Grandes (Referência: 1600px e superiores) */
@media (min-width: 1400px) {
  :root {
    --header-top-offset: 75px;
    --header-side-offset: 75px;
    --logo-width: 439px;
    --logo-height: 174px;
    --menu-font-size: 54px;
  }
}

/* Laptops / Telas Médias (1024px a 1399px) */
@media (min-width: 992px) and (max-width: 1399px) {
  :root {
    --header-top-offset: clamp(45px, 5vw, 75px);
    --header-side-offset: clamp(40px, 5vw, 75px);
    --logo-width: clamp(290px, 27.5vw, 439px);
    --logo-height: auto;
    --menu-font-size: clamp(38px, 3.6vw, 54px);
  }
}

/* Tablets (768px a 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  :root {
    --header-top-offset: clamp(32px, 4vw, 50px);
    --header-side-offset: clamp(25px, 4vw, 45px);
    --logo-width: clamp(220px, 32vw, 320px);
    --logo-height: auto;
    --menu-font-size: clamp(32px, 4.4vw, 42px);
  }
}

/* Dispositivos Móveis (até 767px) */
@media (max-width: 767px) {
  :root {
    --header-top-offset: 24px;
    --header-side-offset: 20px;
    --logo-width: clamp(140px, 44vw, 220px);
    --logo-height: auto;
    --menu-font-size: clamp(24px, 6vw, 34px);
  }

  .header-hero,
  .header-hero .header-carousel,
  .header-hero .header-carousel-inner,
  .header-hero .header-carousel-item {
    height: 500px !important;
    min-height: 500px !important;
    max-height: 500px !important;
  }

  .header-btn-menu {
    top: calc(
      var(--header-top-offset, 24px) + (var(--logo-width) * 174 / 439) / 2
    );
    transform: translateY(-50%);
    padding: 8px 15px 8px 25px;
    gap: 0;
    justify-content: center;
  }

  .header-btn-menu:hover,
  .header-btn-menu:focus {
    transform: translateY(-50%) scale(1.02);
  }

  .header-btn-menu:active {
    transform: translateY(-50%) scale(0.98);
  }

  .header-menu-internal-wrap {
    top: calc(
      var(--header-top-offset, 24px) + (var(--logo-width) * 174 / 439) / 2
    );
    transform: translateY(-50%);
    padding-left: 20px;
    padding-right: var(--header-side-offset, 20px);
  }

  .header-menu-internal-wrap .header-btn-menu {
    transform: none !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
  }

  .header-menu-internal-wrap:active {
    transform: translateY(-50%) scale(0.98);
  }

  .header-btn-menu-icon {
    gap: 12px;
  }

  .header-btn-menu-line {
    width: 36px;
  }

  .header-caption-box {
    padding-top: max(120px, 15vh);
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   Classes Utilitárias de Suporte (Compatibilidade Tailwind)
   ========================================================================== */
.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

.h-\[500px\] {
  height: 500px !important;
  max-height: 500px !important;
}

@media (min-width: 768px) {
  .md\:block {
    display: block !important;
  }

  .md\:h-screen {
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
  }
}

.text-white {
  color: #ffffff !important;
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }

  .lg\:block {
    display: block !important;
  }

  .lg\:text-\[\#dc2218\] {
    color: #dc2218 !important;
  }
}
