/* ============================================================
   HEMAC — NAV ONLY
   assets/css/nav.css
   Load AFTER style.css and AFTER Bootstrap.
   Touches ONLY nav elements. Nothing else.
============================================================ */

/* ── NAV VARIABLES ──────────────────────────────────────── */
:root {
  --nav-gold:       #D4AF37;
  --nav-navy:       #0A192F;
  --nav-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-shadow:     0 2px 24px rgba(0, 0, 0, 0.09);
}

/* ── HEADER ─────────────────────────────────────────────── */
.hemac-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  box-shadow: none;
  transition: box-shadow var(--nav-transition);
}

.hemac-header.is-scrolled {
  box-shadow: var(--nav-shadow);
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.hemac-navbar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 80px;
  background: #fff;
  padding: 10px 0;
  transition: min-height var(--nav-transition);
}

.hemac-header.is-scrolled .hemac-navbar {
  min-height: 68px;
}

.hemac-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ── LOGO ───────────────────────────────────────────────── */
.navbar-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
  text-decoration: none;
}

.navbar-brand img {
  height: 52px;
  width: auto;
  display: block;
  max-height: 60px;
  transition: height var(--nav-transition);
}

.hemac-header.is-scrolled .navbar-brand img {
  height: 44px;
}

/* ── DESKTOP NAV CONTAINER ──────────────────────────────── */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

/* ── NAV LINKS — scoped to .hemac-navbar so page links are untouched ── */
.hemac-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0A192F;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  transition: color var(--nav-transition);
  white-space: nowrap;
}

.hemac-navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--nav-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--nav-transition);
  border-radius: 1px;
  width: auto;
}

.hemac-navbar .nav-link:hover {
  color: var(--nav-gold);
}

.hemac-navbar .nav-link:hover::after,
.hemac-navbar .nav-link.active::after {
  transform: scaleX(1);
}

.hemac-navbar .nav-link.active {
  color: var(--nav-gold);
}

.nav-link-dropdown {
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  line-height: inherit;
}

.nav-link-dropdown:focus-visible {
  outline: 2px solid var(--nav-gold);
  outline-offset: 2px;
}

.nav-link-dropdown .bi-chevron-down {
  transition: transform var(--nav-transition);
  display: inline-block;
}

.nav-item-dropdown.is-open .nav-link-dropdown .bi-chevron-down {
  transform: rotate(180deg);
}

/* ── SERVICES DROPDOWN ──────────────────────────────────── */
.nav-item-dropdown {
  position: relative;
}

.services-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 460px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--nav-transition), transform var(--nav-transition);
  z-index: 99999;
}

.nav-item-dropdown.is-open .services-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* All dropdown items scoped inside .services-menu — cannot bleed to page */
.services-menu .service-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background var(--nav-transition);
}

.services-menu .service-item:hover {
  background: #f8f9fa;
}

.services-menu .service-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 6px;
  color: var(--nav-gold);
  font-size: 1rem;
  margin-top: 1px;
}

.services-menu .service-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.services-menu .service-text strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0A192F;
  line-height: 1.3;
}

.services-menu .service-text span {
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.4;
}

.services-menu .service-item--all .service-text strong {
  color: var(--nav-gold);
}

.services-menu .service-item--all .service-icon {
  background: rgba(212, 175, 55, 0.18);
}

/* ── BOOK CONSULTATION BUTTON ───────────────────────────── */
.hemac-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  background: #D4AF37;
  color: #0A192F;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid #D4AF37;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--nav-transition),
              color var(--nav-transition),
              border-color var(--nav-transition);
  flex-shrink: 0;
}

.hemac-cta-btn:hover {
  background: transparent;
  color: #0A192F;
  border-color: #0A192F;
  text-decoration: none;
}

.hemac-cta-btn--block {
  display: flex;
  width: 100%;
}

/* ── MOBILE TOGGLER ─────────────────────────────────────── */
.navbar-toggler {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.toggler-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #0A192F;
  border-radius: 2px;
  transition: var(--nav-transition);
}

.navbar-toggler:hover .toggler-bar {
  background: var(--nav-gold);
}

/* ── OFFCANVAS MOBILE MENU ──────────────────────────────── */
.hemac-offcanvas {
  width: min(340px, 90vw) !important;
  background: #fff;
}

.hemac-offcanvas .offcanvas-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.hemac-offcanvas .offcanvas-body {
  padding: 16px 24px 32px;
  overflow-y: auto;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid #f4f4f4;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0A192F;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--nav-transition);
}

.mobile-nav-link:hover {
  color: var(--nav-gold);
  text-decoration: none;
}

.mobile-nav-accordion {
  text-align: left;
}

.accordion-icon {
  font-size: 0.75rem;
  transition: transform var(--nav-transition);
}

.mobile-nav-accordion[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.mobile-sub-list {
  list-style: none;
  margin: 0 0 8px 8px;
  padding: 0;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.mobile-sub-link {
  display: block;
  padding: 10px 0 10px 16px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  transition: color var(--nav-transition);
}

.mobile-sub-link:hover {
  color: var(--nav-gold);
  text-decoration: none;
}

.mobile-sub-link--all {
  font-weight: 700;
  color: var(--nav-gold);
}

/* ── PREVENT FOUC ───────────────────────────────────────── */
.offcanvas:not(.show):not(.showing):not(.hiding) {
  visibility: hidden;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .hemac-navbar .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}