
/* === Base visibility: Desktop-first === */
.mobile-topbar,
.mobile-nav-collapse {
  display: none; /* hidden by default on desktop */
}

/* Ensure hero nav shows on desktop */
.hero-nav-wrap {
  display: block;
}

/* === Mobile styles (≤768px) === */
@media (max-width: 767.98px) {
  /* Show the compact topbar on mobile */
  .mobile-topbar {
    display: flex;
    height: 75px;
    background: var(--brand-aqua);
    border-bottom: 1px solid var(--brand-dark-aqua);
    position: sticky;
    top: 0px;
    padding:10px;
    z-index: 1030; /* above content, below modal */
  }
  .mobile-topbar .navbar-brand img{width:165px; object-fit:contain}
  .mobile-topbar .mobile-toggle{width:42px; height:42px; display:flex; align-items:center; justify-content:center}
  /* Align brand to right and overhang bottom using absolute positioning */
  .mobile-topbar{
    position: sticky; /* ensure positioned ancestor for absolute child */
  }
  .mobile-topbar .navbar-brand{
    position: absolute;
    right: 0.5rem;
    bottom: -20px; /* overhang below the topbar */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-end;
    z-index: 1040;
  }
  .mobile-topbar .navbar-brand img{
    width:195px;
    object-fit:contain;
    display: block;
    transform: none;
    max-height: 110px; /* keep it visually constrained as it overhangs */
  }
  /* Hide the hero nav on mobile */
  .hero-nav-wrap,
  .hero-logo {
    display: none !important;
  }
  .hero{
    height:375px !important;
    background-position: center calc(100% + 0px) !important;
  }
  /* Collapsible mobile nav (beneath topbar) */
  .mobile-nav-collapse {
    display: block; /* Bootstrap controls actual collapse via .show */
    width: 100%;
    background: #fff;
    box-shadow: none;
    border-top: 1px solid rgba(0,0,0,0.06);
    position: fixed; /* keep the collapsible content visible on-screen */
    left: 0;
    right: 0;
    /* Place the collapse under the sticky topbar. Increase if your brand overhangs */
    top: 75px;
    padding-top:15px;
    z-index: 1025;
  }

  .mobile-nav-collapse .mobile-nav-content {
    /* Limit height to viewport minus the top offset so content is scrollable */
    max-height: calc(100vh - 95px);
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
  }

  /* Touch-friendly main nav items */
  .mobile-main-nav > li > a {
    display: block;
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    color: #212529;
    text-decoration: none;
    font-weight: 500;
  }
  .mobile-main-nav > li > a:hover {
    background: rgba(0,0,0,0.03);
  }

  /* Chevron alignment */
  .mobile-chevron {
    color: #6c757d;
  }

  /* Prevent body scroll when overlay is open */
  body.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
  }
}
