/* ============================================================
   TopRank Healthcare — Navbar Styles
   Shared across all pages via navbar.js
   ============================================================ */

/* ── Notification Bar ── */
.notif-bar {
  background: linear-gradient(90deg, #22C55E, #16A34A);
  color: #fff;
  text-align: center;
  padding: 9px 48px;
  font-size: 0.82rem;
  font-weight: 500;
  position: relative;
  line-height: 1.4;
}
.notif-bar a#notif-cta {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 8px;
  white-space: nowrap;
}
.notif-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.notif-close:hover { background: rgba(255,255,255,0.15); }

/* ── Top Bar ── */
.top-bar {
  background: linear-gradient(135deg, #0D47A1, #1565C0);
  padding: 7px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.top-bar-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.top-bar-item:hover { color: #fff; }
a.top-bar-item svg { flex-shrink: 0; }

/* ── Partner Banner ── */
.partner-banner {
  background: linear-gradient(90deg, #FFFDE7, #FFF8E1);
  border-bottom: 1px solid #FFE082;
  padding: 8px 0;
}
.partner-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}
.partner-badge {
  background: #FFD600;
  color: #5D4037;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.partner-banner-text {
  font-size: 0.8rem;
  color: #6D4C0F;
  line-height: 1.4;
}
.partner-banner-text strong { color: #1565C0; }

/* ── Main Navbar ── */
header {
  min-height: 64px;
}
.navbar {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #BBDEFB;
  position: relative;
  width: 100%;
  z-index: 1000;
  transition: box-shadow 0.25s ease;
}
.navbar.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 4px 20px rgba(21,101,192,0.12);
}
.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(21,101,192,0.10);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 64px; /* Fixed height for perfect alignment */
}

/* ── Logo ── */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 24px;
  text-decoration: none;
}
.navbar-logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.navbar-logo-divider {
  width: 1.5px;
  height: 28px;
  background: #CBD5E1;
  display: block;
  flex-shrink: 0;
}
.navbar-partner-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.navbar-partner-sub {
  font-size: 0.58rem;
  color: #64748B;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}
.navbar-agilus-img {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ── Nav Links (Desktop) ── */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
}

.nav-links li { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.855rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
.nav-link:hover {
  color: #1565C0;
  background: #E3F2FD;
}
.nav-link.active {
  color: #1565C0;
  background: #E3F2FD;
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -13px; /* sits on the navbar bottom border */
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2.5px;
  background: #1565C0;
  border-radius: 2px;
}
.chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.has-dropdown:hover .chevron,
.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #BBDEFB;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(21,101,192,0.14), 0 3px 8px rgba(0,0,0,0.06);
  min-width: 210px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.dropdown-item:hover { background: #E3F2FD; color: #1565C0; }
.d-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.dropdown-divider { height: 1px; background: #E3F2FD; margin: 6px 0; }
.dropdown-all { color: #1565C0; font-weight: 600; }

/* ── Navbar Actions ── */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}
.btn-report {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1565C0;
  border: 1.5px solid #BBDEFB;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-report:hover { border-color: #1565C0; background: #E3F2FD; }

.btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1565C0, #1976D2);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(21,101,192,0.30);
  transition: all 0.2s;
}
.btn-book:hover {
  background: linear-gradient(135deg, #0D47A1, #1565C0);
  box-shadow: 0 6px 20px rgba(21,101,192,0.40);
  transform: translateY(-1px);
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hamburger:hover { background: #E3F2FD; }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive: Tablet (hide some top-bar items) ── */
@media (max-width: 1024px) {
  .nav-link { padding: 8px 9px; font-size: 0.82rem; }
  .navbar-logo-img { height: 36px; }
  .navbar-agilus-img { height: 20px; }
  .navbar-logo-divider { height: 24px; }
  .navbar-logo { margin-right: 14px; gap: 8px; }
}

/* ── Responsive: Mobile ── */
@media (max-width: 820px) {
  .top-bar { display: none; }
  .hamburger { display: flex; }

  .navbar-logo-img { height: 34px; }
  .navbar-agilus-img { height: 19px; }
  .navbar-logo-divider { height: 22px; }
  .navbar-partner-sub { font-size: 0.52rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.99);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 32px;
    gap: 4px;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 0 0 0 100vmax rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-link {
    width: 100%;
    padding: 13px 16px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .nav-link.active::after { display: none; }

  .has-dropdown .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: #F0F6FF;
    border-radius: 10px;
    padding: 6px;
    margin: 4px 0 4px 16px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    min-width: unset;
  }
  .has-dropdown.open .dropdown-menu { display: block; }
  .has-dropdown .chevron { margin-left: auto; }

  .navbar-actions .btn-report { display: none; }
  .navbar-actions { gap: 6px; }
}

@media (max-width: 480px) {
  .partner-banner { display: none; }
  .notif-bar { font-size: 0.78rem; padding: 8px 40px; }
  .navbar-inner { height: 60px; }
  .navbar-logo { margin-right: 6px; gap: 6px; }
  .navbar-logo-img { height: 28px; }
  .navbar-agilus-img { height: 16px; }
  .navbar-logo-divider { height: 18px; margin: 0; }
  .navbar-partner-sub { display: none; }
  .btn-book { padding: 7px 12px; font-size: 0.78rem; }
}
