/* Topbar Styles for Monarca Financial Services */

.topbar {
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(231, 237, 246, 0.85);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 2px 20px rgba(11, 31, 74, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Brand Styles */
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  text-decoration: none;
  color: inherit;
}

.topbar .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(231, 237, 246, 0.9);
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 31, 74, 0.10);
  display: grid;
  place-items: center;
}

.topbar .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar .brand-name {
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-900);
  font-size: 14px;
  text-transform: uppercase;
}

.topbar .brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Navigation Styles */
.topbar .nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: rgba(11, 31, 74, 0.82);
  flex: 1;
  justify-content: center;
}

.topbar .nav a {
  padding: 10px 10px;
  border-radius: 12px;
  transition: background 0.12s ease;
  text-decoration: none;
  color: inherit;
}

.topbar .nav a:hover {
  background: rgba(233, 241, 255, 0.85);
}

.topbar .nav a.active {
  background: rgba(233, 241, 255, 0.95);
  color: var(--brand-700);
  font-weight: 700;
}

/* Dropdown Styles */
.topbar .nav-item {
  position: relative;
  display: inline-block;
}

.topbar .nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(231, 237, 246, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(11, 31, 74, 0.14);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1001;
  padding: 12px 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.topbar .nav-item:hover .nav-dropdown,
.topbar .nav-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.topbar .nav-dropdown a {
  display: block;
  padding: 10px 18px;
  color: rgba(8, 18, 38, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-radius: 0;
}

.topbar .nav-dropdown a:hover {
  background: rgba(233, 241, 255, 0.75);
  color: var(--brand-700);
}

.topbar .nav-dropdown-divider {
  margin: 8px 0;
  border: none;
  border-top: 1px solid rgba(231, 237, 246, 0.75);
}

/* Topbar CTA Buttons */
.topbar-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-topbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  font-size: 14px;
}

.btn-topbar:active {
  transform: translateY(1px);
}

.btn-topbar:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.btn-topbar--ghost {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(231, 237, 246, 0.95);
  color: var(--brand-900);
}

.btn-topbar--ghost:hover {
  background: rgba(233, 241, 255, 0.75);
  border-color: rgba(233, 241, 255, 0.95);
}

.btn-topbar--primary {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #fff;
  box-shadow: 0 18px 45px rgba(47, 103, 199, 0.18);
}

.btn-topbar--primary:hover {
  box-shadow: 0 22px 58px rgba(47, 103, 199, 0.26);
  transform: translateY(-1px);
}

/* Mobile Styles */
@media (max-width: 960px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 10px;
  }

  .topbar .brand {
    min-width: auto;
    flex: 0 1 auto;
    width: 100%;
    justify-content: center;
  }

  .topbar .nav {
    display: none;
  }

  .topbar-cta {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-topbar {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 200px;
    padding: 10px 12px;
    font-size: 13px;
  }
}
