/* =========================
   HEADER
========================= */

.dynamic-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 1200px);
  z-index: 1100;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding: 20px 50px;
  border-radius: 50px;

  background-color: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);

  animation: slideDown 0.7s ease-in-out;
  transition:
    padding 0.35s ease,
    border-radius 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    top 0.35s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}



/* LOGO */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.header-logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  border-radius: 999px;
  transition: transform 0.35s ease;
}

.header-logo a:hover img {
  transform: rotate(8deg) scale(1.06);
}

.header-logo span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── BOTÃO CTA DESKTOP — sutil, só borda ── */
.header-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;

  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);

  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.header-cta-btn:hover {
  color: #19f0ff;
  border-color: rgba(0, 247, 255, 0.4);
  background: rgba(0, 247, 255, 0.06);
  box-shadow: 0 0 16px rgba(0, 247, 255, 0.15);
}

.header-cta-btn i {
  font-size: 11px;
  opacity: 0.7;
}

/* ── RESPONSIVO MOBILE ── */
@media (max-width: 900px) {
  .dynamic-header {
    width: calc(100% - 16px);
    top: 20px;
    padding: 80px 20px;
    border-radius: 50px;
    gap: 14px;
  }

  .dynamic-header.shrink {
    top: 20px;
    padding: 12px 18px;
    border-radius: 50px;
  }

  .header-logo img {
    width: 42px;
    height: 42px;
  }

  .header-logo span {
    font-size: 18px;
  }

  /* Esconde botão CTA no mobile — substituído pelo FAB */
  .header-cta-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .dynamic-header {
    width: calc(100% - 22px); /* mesma margem de 24px por lado */
    padding: 14px 18px;
  }

  .header-logo img {
    width: 40px;
    height: 40px;
  }

  .header-logo span {
    font-size: 17px;
  }
}

/* ══════════════════════════════════════════════
   FAB — BOTÃO FLUTUANTE (mobile)
   Aparece apenas em telas ≤ 900px
══════════════════════════════════════════════ */
.fab-menu-btn {
  display: none;
}

@media (max-width: 900px) {
  .fab-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    bottom: 36px;
    right: 24px;
    z-index: 1200;

    width: 68px;
    height: 68px;
    border-radius: 999px;
    border: 1px solid rgba(0, 180, 255, 0.22);
    cursor: pointer;
    outline: none;

    background: rgba(10, 22, 50, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
      0 0 0 1px rgba(0, 180, 255, 0.08),
      0 4px 24px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);

    transition:
      transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
      box-shadow 0.3s ease,
      background 0.3s ease;
  }

  .fab-menu-btn:hover {
    transform: scale(1.06);
    box-shadow:
      0 0 0 1px rgba(0, 180, 255, 0.18),
      0 6px 28px rgba(0, 0, 0, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  /* Ícone das 3 linhas */
  .fab-menu-btn .fab-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .fab-menu-btn .fab-lines span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* FAB aberto */
  .fab-menu-btn.is-open {
    background: rgba(10, 22, 50, 0.15);
    border-color: rgba(0, 180, 255, 0.35);
  }

  .fab-menu-btn.is-open .fab-lines span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
  }
  .fab-menu-btn.is-open .fab-lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .fab-menu-btn.is-open .fab-lines span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
  }
}

/* ══════════════════════════════════════════════
   MENU MOBILE — SURGE DO BOTÃO (liquid glass)
══════════════════════════════════════════════ */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1150;
  pointer-events: none;

  /* Overlay que vai se revelando */
  background: transparent;
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 32px;

  /* Clip circle começa onde fica o FAB (bottom: 36px, right: 24px, largura 56px) */
  /* Centro do FAB: calc(100% - 24px - 28px) x calc(100% - 36px - 28px) */
  clip-path: circle(0px at calc(100% - 52px) calc(100% - 64px));

  transition:
    clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.5s ease 0.05s,
    background 0.5s ease 0.05s;
}

.mobile-nav.is-open {
  pointer-events: all;
  clip-path: circle(170% at calc(100% - 52px) calc(100% - 64px));

  /* Liquid glass no overlay */
  background:
    radial-gradient(
      ellipse at 80% 88%,
      rgba(0, 247, 255, 0.13) 0%,
      transparent 38%
    ),
    radial-gradient(
      ellipse at 18% 18%,
      rgba(0, 200, 255, 0.07) 0%,
      transparent 32%
    ),
    rgba(5, 9, 20, 0.9);

  backdrop-filter: blur(32px) saturate(180%) brightness(0.95);
  -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(0.95);
}

/* Brilho sutil de borda liquid glass */
.mobile-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 247, 255, 0.05) 0%,
    transparent 40%,
    rgba(0, 247, 255, 0.02) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

.mobile-nav.is-open::before {
  opacity: 1;
}

/* Links de navegação */
.mobile-nav-link {
  font-size: 22px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  letter-spacing: -0.02em;
  padding: 10px 0;
  transition: color 0.2s ease, transform 0.2s ease;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}

.mobile-nav.is-open .mobile-nav-link {
  animation: navItemIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mobile-nav-link:hover {
  color: #fff;
  transform: scale(1.03) translateY(0) !important;
}

/* Separador */
.mobile-nav-sep {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 0;
  opacity: 0;
}

.mobile-nav.is-open .mobile-nav-sep {
  animation: navItemIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Botão CTA */
.mobile-nav-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);

  /* Liquid glass no botão */
  background:
    radial-gradient(ellipse at 40% 30%, rgba(255,255,255,0.18) 0%, transparent 60%),
    rgba(0, 247, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(0, 247, 255, 0.15);
  border-bottom: 1px solid rgba(0, 247, 255, 0.1);

  backdrop-filter: blur(12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 247, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);

  opacity: 0;
  transition: all 0.25s ease;
}

.mobile-nav.is-open .mobile-nav-cta {
  animation: navItemIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mobile-nav-cta:hover {
  background:
    radial-gradient(ellipse at 40% 30%, rgba(255,255,255,0.22) 0%, transparent 60%),
    rgba(0, 247, 255, 0.16);
  border-color: rgba(0, 247, 255, 0.5);
  color: #19f0ff;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 0 32px rgba(0, 247, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Botão WhatsApp */
.mobile-nav-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: all 0.25s ease;
}

.mobile-nav.is-open .mobile-nav-whatsapp {
  animation: navItemIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mobile-nav-whatsapp:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Delays em cascata */
.mobile-nav.is-open .mobile-nav-link:nth-child(1) { animation-delay: 0.12s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(2) { animation-delay: 0.18s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(3) { animation-delay: 0.24s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(4) { animation-delay: 0.30s; }
.mobile-nav.is-open .mobile-nav-sep              { animation-delay: 0.34s; }
.mobile-nav.is-open .mobile-nav-cta              { animation-delay: 0.38s; }
.mobile-nav.is-open .mobile-nav-whatsapp         { animation-delay: 0.44s; }

@keyframes navItemIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@media (min-width: 901px) {
  .fab-menu-btn { display: none !important; }
  .mobile-nav   { display: none !important; }
}