/**
 * Helper Home — Services mega menu + mobile navigation
 */

/* ---- Desktop Services mega menu ---- */
#servicesNavItem {
  position: relative;
}

#servicesDropdown.services-mega,
#servicesDropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(720px, calc(100vw - 48px));
  padding: 1.35rem 1.35rem 1.1rem;
  background: #0b0b0b;
  border: 1px solid rgba(209, 165, 92, 0.38);
  border-radius: 1.15rem;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 80;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

#servicesDropdown.is-open,
#servicesDropdown.opacity-100 {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

#servicesDropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #0b0b0b;
  border-left: 1px solid rgba(209, 165, 92, 0.38);
  border-top: 1px solid rgba(209, 165, 92, 0.38);
  transform: translateX(-50%) rotate(45deg);
}

.services-mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.services-mega__heading {
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0 !important;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #d1a55c !important;
  text-decoration: none !important;
}

.services-mega__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.services-mega__list a,
#servicesDropdown a:not(.btn-gold):not(.services-mega__all) {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.3;
  color: rgba(255, 253, 248, 0.86) !important;
  text-decoration: none !important;
  transition: background 0.18s ease, color 0.18s ease;
}

.services-mega__list a:hover,
#servicesDropdown a:not(.btn-gold):not(.services-mega__all):hover {
  background: rgba(209, 165, 92, 0.12);
  color: #e6b969 !important;
  text-decoration: none !important;
}

.services-mega__footer {
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(209, 165, 92, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.services-mega__all,
#servicesDropdown .services-mega__all {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e6b969 !important;
  text-decoration: none !important;
}

.services-mega__all:hover {
  color: #f0d399 !important;
  text-decoration: none !important;
}

.services-mega__cta {
  padding: 0.65rem 1.1rem !important;
  font-size: 0.68rem !important;
  white-space: nowrap;
}

#servicesMenuBtn[aria-expanded="true"] {
  color: #d1a55c !important;
}

#servicesMenuBtn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Nav link active — no underline */
#mainHeader nav a,
#mainHeader nav button {
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}

#mainHeader nav a.text-brand-gold,
#mainHeader nav a:hover {
  text-decoration: none !important;
}

/* ---- Mobile drawer ---- */
#mobileNavBackdrop {
  z-index: 90;
}

#mobileNavDrawer {
  z-index: 100;
  width: min(100%, 380px);
  padding: 1.15rem 1.15rem 1.4rem;
  background: #0a0a0a;
  border-left: 1px solid rgba(209, 165, 92, 0.32);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
}

#mobileNavDrawer .mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#mobileNavDrawer .mobile-nav__close {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgba(209, 165, 92, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #fffdf8;
}

#mobileNavDrawer .mobile-nav__links {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.75rem;
}

#mobileNavDrawer .mobile-nav__links > a {
  display: block;
  padding: 0.85rem 0.65rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 253, 248, 0.92) !important;
  text-decoration: none !important;
}

#mobileNavDrawer .mobile-nav__links > a.is-active,
#mobileNavDrawer .mobile-nav__links > a.text-brand-gold {
  color: #e6b969 !important;
}

#mobileNavDrawer .mobile-nav__links > a:hover {
  background: rgba(209, 165, 92, 0.1);
  color: #e6b969 !important;
}

#mobileServicesToggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.65rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 253, 248, 0.92);
  background: transparent;
  border: 0;
}

#mobileServicesToggle[aria-expanded="true"] {
  color: #e6b969;
  background: rgba(209, 165, 92, 0.08);
}

#mobileServicesSubmenu {
  margin: 0.25rem 0 0.5rem;
  padding: 0.65rem 0.55rem 0.75rem 0.75rem;
  border-left: 2px solid rgba(209, 165, 92, 0.35);
  display: none;
  gap: 0.85rem;
}

#mobileServicesSubmenu.is-open,
#mobileServicesSubmenu:not(.hidden) {
  display: grid !important;
}

.mobile-services-group__title {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #d1a55c;
  text-decoration: none !important;
  border: 0 !important;
}

.mobile-services-group a {
  display: block;
  padding: 0.45rem 0.4rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 253, 248, 0.78) !important;
  text-decoration: none !important;
}

.mobile-services-group a:hover {
  color: #e6b969 !important;
  background: rgba(209, 165, 92, 0.1);
}

.mobile-services-all {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #e6b969 !important;
  text-decoration: none !important;
}

#mobileNavDrawer .mobile-nav__footer {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#mobileNavDrawer .mobile-nav__contact {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
  font-size: 0.78rem;
  color: rgba(255, 253, 248, 0.62);
}

#mobileNavDrawer .mobile-nav__contact a {
  color: #e6b969 !important;
  text-decoration: none !important;
  word-break: break-word;
}

#mobileNavDrawer .mobile-nav__footer .btn-gold {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
}

#mobileNavDrawer .mobile-nav__tagline {
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 253, 248, 0.45);
}

/* Keep drawer below enquiry modal (2000) but above page */
@media (max-width: 1023px) {
  #servicesDropdown {
    display: none !important;
  }
}

@media (max-width: 420px) {
  #mobileNavDrawer {
    width: 100%;
    max-width: none;
  }
}
