/* Navbar styling */
.navbar {
  background-color: #ffffff;
  padding: 0.5rem 1rem;
}

/* Desktop: do not clip Bootstrap dropdown menus / Popper (fixes Chrome where menu was invisible or unclickable). */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse {
    overflow: visible;
  }
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: black;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 500;
}

.navbar-brand img {
  height: 40px;
}

.nav-link {
  color: #476DB0;
  background-color: transparent;
  transition: color 0.3s;
  text-decoration: none; /* Remove default underline */
}

.nav-link:hover,
.nav-link:focus {
  color: black;
}

.nav-link.active {
  font-weight: bold;
  color: black;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-decoration-color: #4CB047; /* Green underline */
}

/* Custom button styling for Log In and Sign Up */
.btn-log-in {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #476DB0;
  background-color: white;
  border: 2px solid #476DB0;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}

.btn-log-in:hover {
  background-color: #e6f0ff;
  color: #365A96;
}

.btn-sign-up {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: white;
  background-color: #476DB0;
  border: 2px solid #476DB0;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}

.btn-sign-up:hover {
  background-color: #365A96;
  color: #ffffff;
}

/* Dropdown toggle button styling (PROFILE button only) */
.navbar .profile-dropdown-toggle {
  background-color: #476DB0;
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 20px;
}

.navbar .profile-dropdown-toggle:focus,
.navbar .profile-dropdown-toggle:hover {
  background-color: #365A96;
  color: #ffffff;
}

/* Dropdown menu styling (PROFILE menu only) */
.navbar .profile-dropdown-menu {
  top: 100%;
  right: 0;
  background: #476DB0;
  border-radius: 5px;
  color: #ffffff;
  padding: 8px;
  min-width: 160px;
  z-index: 1000;
}

.navbar .profile-dropdown-menu .dropdown-item {
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 10px;
}

.navbar .profile-dropdown-menu .dropdown-item:hover {
  background-color: #365A96;
}

/* Icon styling within dropdown items */
.navbar .profile-dropdown-menu .dropdown-item .icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

/* Navbar service balance cards */
.nav-balances {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  margin-right: 0.85rem;
}

.balance-card {
  min-width: 8.75rem;
  padding: 0.5rem 0.65rem 0.55rem;
  border-radius: 10px;
  border: 1px solid #dce6f5;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 45, 86, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.balance-card--vat {
  border-top: 3px solid #476db0;
}

.balance-card--ch {
  border-top: 3px solid #2a7f62;
}

.balance-card__top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.balance-card__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.balance-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5a6478;
  line-height: 1.2;
}

.balance-card__amount {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  min-height: 1.55rem;
}

.balance-card__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f2a52;
  line-height: 1;
}

.balance-card__value--text {
  font-size: 0.95rem;
}

.balance-card__unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7c96;
}

.balance-card__buy {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.balance-card--vat .balance-card__buy {
  color: #476db0;
}

.balance-card--ch .balance-card__buy {
  color: #2a7f62;
}

.balance-card__buy:hover {
  text-decoration: underline;
}

/* Long link tweak */
.nav-link-long {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .nav-link-long {
    white-space: normal;
    line-height: 1.2;
  }
}

/* Pricing dropdown overrides */
.navbar .nav-pricing-dropdown > .dropdown-toggle {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0.5rem 0.75rem !important;
  margin: 0 !important;
  color: black !important;
  font-size: 20px;
}

.navbar .nav-pricing-dropdown > .dropdown-toggle:hover,
.navbar .nav-pricing-dropdown > .dropdown-toggle:focus {
  background: transparent !important;
  color: black !important;
}

.navbar .nav-pricing-dropdown > .dropdown-menu {
  background: #ffffff !important;
  color: #1f2b4d !important;
  border: 1px solid #dfe6f6 !important;
  border-radius: 8px !important;
  padding: 8px !important;
  min-width: 220px !important;
  right: auto !important;
  left: 0 !important;
}

.navbar .nav-pricing-dropdown > .dropdown-menu .dropdown-item {
  color: #1f2b4d !important;
  display: block !important;
  padding: 10px 12px !important;
  border-radius: 6px !important;
}

.navbar .nav-pricing-dropdown > .dropdown-menu .dropdown-item:hover {
  background: #f1f5ff !important;
  color: #1f2b4d !important;
}

@media (max-width: 991.98px) {
  .nav-balances {
    flex-direction: column;
    width: 100%;
    margin: 0.75rem 0 0.5rem;
  }

  .balance-card {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 575.98px) {
  .nav-balances {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .balance-card {
    flex: 0 0 auto;
    min-width: 7.5rem;
  }
}



/* Footer */
.footer {
  background-color: #476DB0;
  color: white;
  padding: 1rem 0;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  margin-top: 3rem;
}

.footer .footer-bar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.5rem;
}

.footer .footer-icon {
  width: min(190px, 34vw);
  height: auto;
  margin-right: 1rem;
  display: block;
}

.footer-links-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer .footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer .footer-link {
  color: white;
  text-decoration: none;
}

.footer .dot-separator {
  color: #4CB047;
}

.footer .company-info {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.footer .footer-email {
  color: white;
  text-decoration: none;
}

.footer .footer-contact {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}

.footer .footer-email:hover,
.footer .footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .footer .footer-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer .footer-contact {
    position: static;
    transform: none;
    text-align: center;
  }
}


.navbar .navbar-nav .nav-link {
  white-space: nowrap;
}

/* Keep the long Companies House link from wrapping too */
.navbar .nav-link-long {
  white-space: nowrap;
}

@media (min-width: 992px){
  .navbar .navbar-nav .nav-link {
    white-space: nowrap;
  }
}


/* ===== Visible borders + spacing for main nav buttons ===== */
.nav-pills-separated{
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.nav-main-links .nav-link-box,
.nav-main-links .nav-item.nav-link-box > .dropdown-toggle{
  min-height: 42px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(71, 109, 176, 0.22);
  background: rgba(255, 255, 255, 0.72);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-main-links .nav-link-box:hover,
.nav-main-links .nav-item.nav-link-box > .dropdown-toggle:hover{
  background: #f4f7fd;
  border-color: rgba(71, 109, 176, 0.38);
  color: #17315d;
}

.nav-main-links .nav-link-box.active,
.nav-main-links .nav-item.nav-link-box > .dropdown-toggle.active{
  background: #eef4ff;
  border-color: #476db0;
  color: #0f2a52;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 #4cb047;
}

.nav-link-box{
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.15;
}

/* Make Pricing dropdown wrapper look like the same boxed item */
.nav-pills-separated .nav-item.nav-link-box{
  padding: 0; /* box padding handled by the toggle */
}

.nav-pills-separated .nav-item.nav-link-box > .dropdown-toggle{
  padding: 10px 14px !important;
  border-radius: 10px !important;
}

/* Mobile: stack the boxed items nicely */
@media (max-width: 992px){
  .nav-pills-separated{
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-link-box{
    justify-content: flex-start;
  }
}
