/* ==========================================================================
   WARP UNIFIED HEADER & ZERO-OVERFLOW RESPONSIVE DRAWER SYSTEM
   Compatível com: Motorola, Xiaomi, iPhone (todos), Samsung, Tablets e Desktop
   ========================================================================== */

/* 0. ANTI-OVERFLOW GLOBAL (Elimina espaço em branco lateral no celular) */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 1. BARRA CROMÁTICA GOOGLE NO TOPO (4px) */
.warp-chromatic-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: 4px;
  background: linear-gradient(90deg, #1A73E8 0%, #4285F4 25%, #EA4335 25%, #EA4335 50%, #FBBC04 50%, #FBBC04 75%, #34A853 75%, #34A853 100%);
  z-index: 100002 !important;
}

/* 2. HEADER CONTAINER */
.warp-header.is-menu-open {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.warp-header {
  position: sticky;
  top: 4px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.06), 0 4px 12px rgba(60, 64, 67, 0.04);
  z-index: 100000 !important;
  transition: all 0.25s ease;
  overflow: visible;
}

.warp-header-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  overflow: visible;
}

/* 3. BRAND & LOGO */
.warp-brand {
  position: relative !important;
  z-index: 2 !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  min-width: max-content;
  user-select: none;
}

.warp-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.14);
  background: #FFFFFF;
  flex-shrink: 0;
  overflow: hidden;
}

.warp-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.warp-brand-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.15rem;
  line-height: 1;
  white-space: nowrap;
}

.warp-brand-bold {
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.warp-brand-sub {
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.01em;
}

.warp-brand-ai {
  background: #1A73E8;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.6rem;
  line-height: 1;
  padding: 2.5px 5px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.35);
}

/* 4. BADGE MULTICOLORIDA DE PRODUTO */
.warp-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  background: #FFFFFF;
  border: 1.5px solid #D2E3FC;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.08);
  margin-left: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.warp-badge-pill .w-blue { color: #1A73E8; }
.warp-badge-pill .a-red { color: #EA4335; }
.warp-badge-pill .r-yellow { color: #FBBC04; }
.warp-badge-pill .p-green { color: #34A853; }

.warp-badge-tag {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  margin-left: 4px;
  letter-spacing: 0.04em;
  font-family: 'Inter', sans-serif;
  display: inline-block;
  line-height: 1.2;
}

.warp-badge-tag.tag-portal { background: #E8F0FE; color: #1A73E8; border: 1px solid #D2E3FC; }
.warp-badge-tag.tag-os17 { background: #E8F0FE; color: #1A73E8; border: 1px solid #D2E3FC; }
.warp-badge-tag.tag-os20 { background: #E8F0FE; color: #1A73E8; border: 1px solid #D2E3FC; }
.warp-badge-tag.tag-funil { background: #FEF7E0; color: #B06000; border: 1px solid #FEEFC3; }

/* 5. DESKTOP NAVIGATION */
.warp-desktop-nav {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 auto;
}

.warp-desktop-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.warp-desktop-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  padding: 6px 4px;
}

.warp-desktop-link:hover {
  color: #1A73E8;
}

/* 6. NAV ACTIONS & BUTTONS */
.warp-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto; /* Garante que o menu hambúrguer fica sempre no canto direito */
}

.warp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.warp-btn-primary {
  background: #1A73E8;
  color: #FFFFFF;
  border-color: #1557B0;
  padding: 8px 18px;
  font-size: 0.88rem;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.warp-btn-primary:hover {
  background: #1557B0;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
  transform: translateY(-1px);
}

.warp-btn-ghost {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #CBD5E1;
  padding: 8px 14px;
  font-size: 0.86rem;
}

.warp-btn-ghost:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #1A73E8;
}

/* 7. HAMBURGER TOGGLE BUTTON */
.warp-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4.5px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 100001 !important;
}

.warp-mobile-toggle:hover,
.warp-mobile-toggle:active {
  background: #EFF6FF;
  border-color: #1A73E8;
}

.warp-mobile-toggle .toggle-bar {
  display: block;
  width: 20px;
  height: 2.2px;
  background: #0F172A;
  border-radius: 2px;
  transition: all 0.25s ease;
  pointer-events: none;
}

.warp-mobile-toggle.is-active .toggle-bar:nth-child(1) {
  transform: translateY(6.7px) rotate(45deg);
  background: #1A73E8;
}

.warp-mobile-toggle.is-active .toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.warp-mobile-toggle.is-active .toggle-bar:nth-child(3) {
  transform: translateY(-6.7px) rotate(-45deg);
  background: #1A73E8;
}

/* 8. MOBILE DRAWER & BACKDROP */
.warp-mobile-backdrop {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: calc(100dvh - 60px);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.warp-mobile-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.warp-mobile-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  max-height: calc(100dvh - 60px);
  background: #FFFFFF;
  border-bottom: 2px solid #E2E8F0;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 1001;
  pointer-events: none;
}

.warp-mobile-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.warp-drawer-inner {
  padding: 16px 16px 24px;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warp-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #E2E8F0;
}

.warp-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1A73E8;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1A73E8;
  box-shadow: 0 0 0 rgba(26, 115, 232, 0.4);
  animation: warpPulse 2s infinite;
}

@keyframes warpPulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(26, 115, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

.warp-drawer-close {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.warp-drawer-close:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
}

.warp-drawer-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748B;
  text-transform: uppercase;
  margin-top: 4px;
}

.warp-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.warp-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #0F172A;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.warp-drawer-link:hover,
.warp-drawer-link:active {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1A73E8;
  transform: translateX(3px);
}

.warp-drawer-link .nav-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.warp-drawer-ecosystem {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.warp-ecosystem-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #0F172A;
  text-decoration: none;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.warp-ecosystem-link:hover,
.warp-ecosystem-link.active-page {
  background: #F8FAFF;
  border-color: #1A73E8;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

.warp-ecosystem-link .eco-icon {
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.warp-ecosystem-link .eco-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.warp-ecosystem-link .eco-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0F172A;
}

.warp-ecosystem-link .eco-desc {
  font-size: 0.74rem;
  color: #64748B;
}

.warp-ecosystem-link .eco-arrow {
  color: #94A3B8;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.warp-ecosystem-link:hover .eco-arrow {
  color: #1A73E8;
  transform: translateX(3px);
}

.warp-drawer-footer {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warp-drawer-cta {
  width: 100%;
  padding: 13px 18px;
  font-size: 0.94rem;
  justify-content: center;
}

.warp-drawer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #64748B;
  font-family: 'Inter', sans-serif;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}

/* ==========================================================================
   BREAKPOINTS RESPONSIVOS — MOTOROLA, XIAOMI, IPHONE (TODOS OS MODELOS)
   ========================================================================== */


/* Telas Desktop Compactas / Laptops Menores (992px a 1240px) */
@media (min-width: 992px) and (max-width: 1240px) {
  .warp-header-container {
    padding: 0 14px;
    gap: 8px;
  }
  .warp-brand-text {
    font-size: 1.05rem;
  }
  .warp-badge-pill {
    font-size: 0.85rem;
    padding: 2.5px 7px;
  }
  .warp-desktop-nav {
    margin: 0 8px;
  }
  .warp-desktop-links {
    gap: 10px;
  }
  .warp-desktop-link {
    font-size: 0.80rem;
    padding: 4px 6px;
  }
  .warp-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* Telas Médias / Tablets / Mobile (< 992px) */
@media (max-width: 991px) {
  .warp-header-container {
    height: 56px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .warp-desktop-nav {
    display: none !important;
  }
  .warp-btn-desktop-only {
    display: none !important;
  }
  /* NUNCA MOSTRAR BOTÃO EXTRA NA LINHA DO HEADER NO MOBILE PARA EVITAR OVERFLOW */
  .warp-quick-cta {
    display: none !important;
  }
  .warp-mobile-toggle {
    display: flex !important;
  }
  .warp-mobile-backdrop {
    display: block;
  }
  .warp-mobile-drawer {
    display: block;
  }
}

/* Telas de Celular (Motorola, Xiaomi, iPhone 12/13/14/15/16) (<= 600px) */
@media (max-width: 600px) {
  .warp-header-container {
    height: 56px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    gap: 6px;
  }
  .warp-brand {
    gap: 6px;
    max-width: calc(100% - 50px); /* Garante que o brand NUNCA empurre o toggle */
    overflow: hidden;
  }
  .warp-brand-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .warp-brand-text {
    font-size: 1.05rem;
    gap: 3px;
  }
  /* Em telas móveis, oculta a palavra secundária METHOD para caber suavemente */
  .warp-brand-sub {
    display: none !important;
  }
  .warp-brand-ai {
    font-size: 0.58rem;
    padding: 2px 4px;
  }
  .warp-badge-pill {
    padding: 2px 6px;
    font-size: 0.85rem;
    margin-left: 2px;
    border-width: 1px;
  }
  .warp-badge-tag {
    font-size: 0.70rem;
    padding: 1.5px 5px;
    margin-left: 3px;
  }
  .warp-mobile-toggle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    margin-left: auto; /* Fixa rigorosamente na borda direita */
  }
}

/* Telas Ultra-Estreitas (Motorola antigos, iPhone SE, telas de 320px a 360px) */
@media (max-width: 360px) {
  .warp-header-container {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .warp-brand-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  .warp-brand-text {
    font-size: 0.95rem;
  }
  .warp-badge-pill {
    padding: 1.5px 5px;
    font-size: 0.78rem;
  }
  .warp-badge-tag {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
  .warp-mobile-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}
