/* =============================================
   NAVBAR — shared across all pages
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100px;
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  width: 100px;
  height: 80px;
  background-image: url("../assets/images/logos/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.navbar__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 18px;
  position: static;
}

.navbar__item {
  position: relative;
}

/* link-row only used in mobile — desktop just shows the link */
.navbar__link-row {
  display: contents;
}

.navbar__link {
  font-size: 13px;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.navbar__link--active {
  opacity: 0.7;
}

.navbar__cta {
  height: auto;
  width: auto;
  color: #ffffff;
  font-size: 12px;
  border: none;
  background-color: #404742;
  padding: 8px 16px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.navbar__cta:hover {
  background-color: #ffffff;
  color: #404742;
}

/* Hamburger & close: hidden on desktop */
.navbar__hamburger {
  display: none;
}

/* Mobile header inside the panel — hidden on desktop */
.navbar__mobile-header {
  display: none;
}

/* Mobile CTA at bottom — hidden on desktop */
.navbar__mobile-cta {
  display: none;
}

/* + toggle button — hidden on desktop */
.navbar__toggle {
  display: none;
}

/* =============================================
   DROPDOWN — desktop
   ============================================= */

.navbar__dropdown {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: max-content;
  min-width: 240px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  z-index: 9999;
}

.navbar__dropdown--active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.navbar__dropdown-label {
  font-size: 13px;
  color: #111111;
  white-space: nowrap;
}

.navbar__dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.navbar__dropdown-row:hover {
  background: rgba(64, 71, 66, 0.08);
}

.navbar__dropdown-arrow {
  color: #404742;
  opacity: 0.5;
  font-size: 13px;
}

.navbar__dropdown-img {
  display: none !important;
}

/* =============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================= */

@media (max-width: 768px) {
  /* ── Navbar bar ── */
  .navbar {
    height: 70px;
    padding: 12px 20px;
    background-color: transparent;
    transition: background-color 0.3s ease;
  }

  .navbar--open {
    background-color: #404742;
  }

  .navbar__logo {
    width: 70px;
    height: 50px;
  }

  /* ── Full-screen panel — slides in from right ── */
  .navbar__links {
    position: fixed;

    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;

    background-color: #404742;

    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    padding: 0;
    gap: 0;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    z-index: 9998;

    display: flex;

    transform: translateX(100%);
    visibility: hidden;

    transition:
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0.4s;
  }

  .navbar__links--open {
    transform: translateX(0);
    visibility: visible;

    transition:
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0s;
  }

  /* ── Mobile header (logo + CLOSE) ── */
  .navbar__mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    padding: 20px 20px 16px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.15);

    margin-bottom: 8px;

    flex-shrink: 0;
  }

  .navbar__mobile-logo {
    width: 70px;
    height: 50px;

    background-image: url("../assets/images/logos/logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
  }

  .navbar__close-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);

    color: #ffffff;
    font-size: 11px;
    letter-spacing: 0.12em;

    padding: 6px 14px;

    cursor: pointer;

    border-radius: 2px;

    transition: background 0.2s ease;
  }

  .navbar__close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* ── Nav items ── */
  .navbar__item {
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  }

  /* link-row: flex row with link + toggle */
  .navbar__link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    padding: 0 20px;
  }

  /* Home — no link-row wrapper, match same left indent */
  .navbar__item--home {
    padding: 0 20px;
  }

  .navbar__link {
    display: block;

    width: 100%;
    height: auto;

    color: #ffffff;

    font-size: 22px;
    font-weight: 400;

    padding: 18px 0;

    text-decoration: none;

    letter-spacing: 0.01em;

    white-space: normal;
  }

  .navbar__link--active {
    color: #ffffff;
    opacity: 1;
  }

  /* ── + Toggle button ── */
  .navbar__toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);

    color: #ffffff;

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    border-radius: 2px;

    flex-shrink: 0;

    transition:
      background 0.2s ease,
      border-color 0.2s ease;
  }

  .navbar__toggle--open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
  }

  /* ── Desktop CTA hidden ── */
  .navbar__cta {
    display: none;
  }

  /* ── Dropdown: smooth accordion ── */
  .navbar__dropdown {
    position: static !important;

    transform: none !important;

    opacity: 0 !important;
    pointer-events: none !important;

    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;

    background: rgba(0, 0, 0, 0.15) !important;

    padding: 0 0 0 20px !important;

    width: 100% !important;
    min-width: unset !important;

    display: flex !important;
    flex-direction: column !important;

    max-height: 0 !important;

    overflow: hidden !important;

    transition:
      max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.28s ease,
      padding 0.32s ease !important;
  }

  .navbar__dropdown--active {
    max-height: 320px !important;

    opacity: 1 !important;

    pointer-events: all !important;

    padding: 4px 0 14px 20px !important;
  }

  .navbar__dropdown-row {
    padding: 10px 20px 10px 0;
    border-bottom: none;
  }

  .navbar__dropdown-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 15px;
  }

  .navbar__dropdown-arrow {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 13px;
  }

  /* ── Mobile CTA at bottom ── */
  .navbar__mobile-cta {
    display: block;

    width: 100%;

    padding: 24px 20px;

    margin-top: auto;

    border-top: 1px solid rgba(255, 255, 255, 0.15);

    flex-shrink: 0;
  }

  .navbar__mobile-cta a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-decoration: none;
    letter-spacing: 0.02em;
  }

  /* ── Hamburger button ── */
  .navbar__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 5px;

    cursor: pointer;

    padding: 4px;

    background: none;
    border: none;
  }

  .navbar__hamburger span {
    display: block;

    width: 24px;
    height: 2px;

    background-color: #ffffff;

    border-radius: 2px;

    transition: all 0.25s ease;
  }

  .navbar__hamburger--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .navbar__hamburger--open span:nth-child(2) {
    opacity: 0;
  }

  .navbar__hamburger--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
