/* ===== BRANCHES DROPDOWN ===== */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  padding: 5px 12px;
  background: var(--hm-primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  height: 45px;
  box-sizing: border-box;
  text-decoration: none;
}
.dropdown-trigger:hover {
  background: var(--hm-primary-dark);
}
.dropdown-trigger i {
  transition: transform 0.3s;
}

.dropdown-container:hover .dropdown-trigger i:last-child {
  transform: rotate(180deg);
}

.dropdown-list {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 10px;
  background: var(--hm-secondary);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: min(350px, 90vw);  /* prevents horizontal overflow */
  width: max-content;           /* shrinks to content but respects max-width */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 2000;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;           /* no horizontal scroll */
}

.dropdown-container:hover .dropdown-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-list-header {
  padding: 15px 20px;
  border-bottom: 2px solid #f0f0f0;
  font-weight: 600;
  color: var(--hm-primary-dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.branches-list {
  padding: 10px 0;
}

.dropdown-item, .contact-item {
  padding: 12px 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  color: #333 !important;
  transition: all 0.2s !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  width: 100%;                  /* prevents item from pushing width */
  box-sizing: border-box;
}
.dropdown-item:hover {
  background: var(--hm-secondary-dark) !important;
  padding-left: 25px !important;
  border-left: 4px solid var(--hm-primary) !important;
  color: var(--hm-primary-dark) !important;
}
.item-icon {
  width: 35px;
  height: 35px;
  min-width: 35px;              /* prevents icon from shrinking */
  background: linear-gradient(135deg, var(--hm-primary), var(--hm-primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 16px;
  flex-shrink: 0;
}
.item-info {
  flex: 1;
  min-width: 0;                 /* critical — allows flex child to shrink and wrap */
}
.item-title {
  font-weight: 600;
  color: var(--hm-primary-dark);
  font-size: 14px;
  margin-bottom: 2px;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.item-arrow {
  color: var(--hm-primary);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: auto;
  flex-shrink: 0;               /* prevents arrow from shrinking */
}
.dropdown-item:hover .item-arrow {
  opacity: 1;
}

/* ===== SCROLLBAR STYLING ===== */
.dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.dropdown-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.dropdown-list::-webkit-scrollbar-thumb {
  background: var(--hm-primary);
  border-radius: 10px;
}
.dropdown-list::-webkit-scrollbar-thumb:hover {
  background: var(--hm-primary-dark);
}

/* ===== AUTH BUTTONS ===== */
.auth-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}
.register-btn {
  background: var(--hm-secondary-dark);
  color: var(--hm-primary);
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.register-btn:hover {
  background: var(--hm-primary-dark);
  border: 2px solid var(--hm-secondary);
  color: white;
}
a.register-btn {
  text-decoration: none !important;
}

/* Responsive design */
/* ── Hamburger button (hidden on desktop) ── */
.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* ── Mobile drawer overlay ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-overlay.open {
  opacity: 1;
}

/* ── Mobile drawer panel ── */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--hm-secondary, #f0faf9);
  z-index: 3100;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}
.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  background: var(--hm-primary-dark);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-heading, inherit);
}
.mobile-drawer-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.mobile-drawer-close:hover {
  background: rgba(255,255,255,0.15);
}

/* Mobile nav items */
.mobile-nav-items {
  padding: 12px 0;
  flex: 1;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--hm-primary-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s;
  border-bottom: 1px solid #e8f4f3;
}
.mobile-nav-link:hover {
  background: var(--hm-secondary-dark);
  color: var(--hm-primary-dark);
}
.mobile-nav-link i {
  font-size: 16px;
  color: var(--hm-primary);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Mobile accordion group */
.mobile-nav-group-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--hm-primary-dark);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid #e8f4f3;
  transition: background 0.15s;
}
.mobile-nav-group-trigger:hover {
  color: var(--hm-primary-dark);
}
.mobile-nav-group-trigger i.group-icon {
  font-size: 16px;
  color: var(--hm-primary);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.mobile-nav-group-trigger .chevron {
  margin-left: auto;
  font-size: 13px;
  transition: transform 0.3s;
  color: var(--hm-primary);
}
.mobile-nav-group.open .mobile-nav-group-trigger .chevron {
  transform: rotate(180deg);
}

.mobile-nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--hm-secondary-dark
  );
}
.mobile-nav-group.open .mobile-nav-group-items {
  max-height: 600px;
}
.mobile-nav-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 32px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f0f7f6;
  transition: background 0.15s;
}
.mobile-nav-sub-link i {
  color: var(--hm-primary);
  font-size: 12px;
}
.mobile-nav-sub-link:hover {
  background-color: var(--hm-primary);
  color: white;
}
.mobile-nav-sub-link:hover i{
  color: white;
}

/* Contact items inside mobile */
.mobile-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 32px;
  color: #555;
  font-size: 14px;
  border-bottom: 1px solid #f0f7f6;
}
.mobile-contact-item i {
  color: var(--hm-primary);
  font-size: 14px;
  width: 16px;
}

/* ── Responsive breakpoint ── */
@media (max-width: 769px) {
  .header-buttons {
    display: none !important;
  }
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-nav-overlay {
    display: block;
  }
  .navbar-buttons{
    display: none !important;
  }
  .mobile-nav-group{
    display: block !important;
  }
  .header-section{
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
  }
  .header-navbar{
    width: 100%;
  }
  .navbar-logo span{
    font-size: 1.2rem;
  }
  .logo{
    height: 40px !important;
    width: 40px !important;
  }
}

/* ── Responsive breakpoint ── */
@media (max-width: 610px) {
  .navbar-logo span{
    font-size: 1rem;
  }
  .logo{
    height: 30px !important;
    width: 30px !important;
  }
  .register-btn {
    font-weight: 600;
    font-size: 13px;
  }
}