/* ============================================
   navbar.css — Componente <nav-bar>
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --nb-bg: #ffffff;
  --nb-border: #e8e8ed;
  --nb-text: #1a1a2e;
  --nb-muted: #6b7280;
  --nb-active: #111827;
  --nb-accent: #2563eb;
  --nb-accent-hover: #1d4ed8;
  --nb-cta-text: #ffffff;
  --nb-dd-bg: #ffffff;
  --nb-dd-hover: #f5f7ff;
  --nb-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --nb-radius: 10px;
  --nb-height: 72px;
  --nb-font: Arial, sans-serif;
}

/* ---------- Base ---------- */
nav-bar {
  display: block;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nb-height);
  padding: 0 2rem;
  background: var(--nb-bg);
  border-bottom: 1px solid var(--nb-border);
  font-family: var(--nb-font);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ---------- Logo slot ---------- */
.nb-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nb-logo-slot {
  width: 120px;
  height: 38px;
  border: 1.5px dashed #c5c9d6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

/* Quando tiver uma imagem de logo, o dashed some */
.nb-logo-slot img {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  border: none;
}

.nb-logo-slot:has(img) {
  border: none;
}

.nb-logo-text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #b0b7c3;
  text-transform: uppercase;
}

/* ---------- Menu container ---------- */
.nb-menu {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

/* ---------- Nav links ---------- */
.nb-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nb-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: var(--nb-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition:
    color 0.18s,
    background 0.18s;
  white-space: nowrap;
}

.nb-links a:hover {
  color: var(--nb-active);
  background: #f3f4f6;
}

.nb-links a.nb-active {
  color: var(--nb-active);
  font-weight: 600;
}

/* ---------- CTA Button + Dropdown ---------- */
.nb-cta-wrap {
  position: relative;
}

.nb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 1.2rem;
  background: var(--nb-accent);
  color: var(--nb-cta-text);
  border: none;
  border-radius: var(--nb-radius);
  font-family: var(--nb-font);
  font-size: 0.93rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
  box-shadow: none;
  align-self: center;
}

.nb-cta:hover {
  background: var(--nb-accent-hover);
  transform: none;
  box-shadow: none;
}

.nb-chevron {
  width: 10px;
  height: 6px;
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.nb-cta-open .nb-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.nb-dropdown {
  list-style: none;
  margin: 0;
  padding: 0.65rem;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  background: var(--nb-dd-bg);
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

.nb-dropdown.nb-dd-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nb-dd-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.16s;
}

.nb-dd-item:hover {
  background: var(--nb-dd-hover);
}

.nb-dd-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #eef2ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nb-accent);
}

.nb-dd-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.nb-dd-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nb-dd-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nb-text);
}

.nb-dd-text small {
  font-size: 0.8rem;
  color: var(--nb-muted);
}

/* ---------- Hamburger ---------- */
.nb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
  box-shadow: none;
}

.nb-hamburger:hover {
  background: #f3f4f6;
  box-shadow: none;
}

.nb-hamburger span {
  display: block;
  height: 2px;
  background: var(--nb-text);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.nb-ham-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nb-ham-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nb-ham-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nb-hamburger {
    display: flex;
  }

  .nb-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--nb-height);
    left: 0;
    right: 0;
    background: var(--nb-bg);
    border-bottom: 1px solid var(--nb-border);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: none;
  }

  .nb-menu.nb-menu-open {
    display: flex;
  }

  .nb-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 1rem;
  }

  .nb-links a {
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
    border-radius: 0;
    border-bottom: 1px solid var(--nb-border);
  }

  .nb-links li:last-child a {
    border-bottom: none;
  }

  .nb-cta-wrap {
    width: 100%;
  }

  .nb-cta {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.93rem;
  }

  .nb-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--nb-border);
    margin-top: 0.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nb-dropdown.nb-dd-open {
    display: block;
  }
}
