/* Mobile Menu Styles for Public App (copied and adapted from student dashboard) */

.mobile-public-header {
  display: none;
}
@media (max-width: 768px) {
  .mobile-public-header {
      display: block;
      background: linear-gradient(135deg, #00a0d2 80%, #2980b9 100%);
      color: #fff;
      padding: 0.5rem 1rem 0.7rem 1rem;
      box-shadow: 0 4px 16px rgba(0,0,0,0.10);
      border-bottom: none;
      margin-bottom: 0.7rem;
      margin-top: 0;
      position: relative;
      z-index: 2000;
      border-radius: 0 0 18px 18px;
  }
  .mobile-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      margin-bottom: 0.5rem;
      width: 100%;
      border-bottom: 1.5px solid rgba(255,255,255,0.13);
      padding-bottom: 0.3rem;
  }
  .mobile-header-logo {
      height: 38px;
      width: auto;
      margin-right: 0.7rem;
      flex-shrink: 0;
      display: block;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.04));
      max-width: 48px;
  }
  .mobile-header-title {
      font-size: 1.35rem;
      font-weight: 900;
      letter-spacing: 0.01em;
      color: #fff;
      flex-grow: 1;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-right: 0.7rem;
      text-shadow: 0 1px 2px rgba(0,0,0,0.08);
  }
  .mobile-menu-btn {
      width: 44px;
      height: 44px;
      padding: 0;
      font-size: 2rem;
      background: #fff;
      border: none;
      border-radius: 50%;
      box-shadow: 0 2px 8px rgba(0,0,0,0.10);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #00a0d2;
      margin: 0;
      flex-shrink: 0;
      position: static;
      transition: background 0.18s, box-shadow 0.18s;
  }
  .mobile-menu-btn:active,
  .mobile-menu-btn:focus {
      background: #eaf6fb;
      box-shadow: 0 4px 12px rgba(0,160,210,0.13);
      outline: none;
  }
  .mobile-menu-btn i {
      font-size: 1.3em;
      color: #00a0d2;
  }
}

@media (max-width: 768px) {
  /* Hide the desktop header, logo, and navigation on mobile */
  .header, .logo, .navigation, .subnavigation, .app_menu {
      display: none !important;
  }
  /* Hide any HM logo outside the mobile header */
  img[src*="HM_logo2020_small.svg"]:not(.mobile-header-logo) {
      display: none !important;
  }
}

@media (max-width: 768px) {
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 3000;
  transition: opacity 0.35s cubic-bezier(.4,1.4,.6,1);
  opacity: 0;
  pointer-events: none;
  overflow: hidden !important;
  touch-action: none;
}
.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  animation: fadeIn 0.35s cubic-bezier(.4,1.4,.6,1);
}
.mobile-menu-header {
  background: linear-gradient(90deg, #00a0d2 85%, #2980b9 100%);
  color: #fff;
  padding: 1.1rem 1.2rem 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.22rem;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.13);
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: none;
}
.mobile-menu-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 4000;
  background: #fff;
  border: none;
  color: #00a0d2;
  font-size: 2.2rem;
  font-weight: 900;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,160,210,0.10);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #eaf6fb;
  color: #2980b9;
  box-shadow: 0 4px 14px rgba(0,160,210,0.15);
}
  .mobile-menu-nav {
  background: linear-gradient(120deg, #fff 80%, #eaf6fb 100%);
  width: 84vw;
  max-width: 350px;
  height: 100vh;
  max-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 0 1.2rem 2rem 1.2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideInLeft 0.38s cubic-bezier(.7,1.7,.5,1);
  border-radius: 0 22px 22px 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%) scale(0.98); opacity: 0.2; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
  .mobile-menu-nav ul {
  list-style: none;
  padding: 0;
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-nav li {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #eaf6fb;
  border-radius: 10px;
  transition: background 0.18s, box-shadow 0.18s;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.mobile-menu-nav li:last-child {
  border-bottom: none;
}
.mobile-menu-nav a {
  color: #00a0d2;
  font-size: 1.18rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.9em;
  padding: 0.85em 0.9em 0.85em 0.7em;
  border-radius: 10px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  font-weight: 600;
  letter-spacing: 0.01em;
  outline: none;
  width: 100%;
  min-height: 48px;
  position: relative;
}
.mobile-menu-nav a:before {
  content: '\2630'; /* hamburger icon placeholder, replace with real icons if desired */
  color: #b3e0f7;
  font-size: 1.1em;
  margin-right: 0.7em;
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
  opacity: 0.7;
}
.mobile-menu-nav a:focus {
  background: #eaf6fb;
  color: #2980b9;
  box-shadow: 0 0 0 2px #00a0d2;
}
.mobile-menu-nav a:hover {
  background: #eaf6fb;
  color: #2980b9;
  box-shadow: 0 2px 8px rgba(0,160,210,0.07);
}
.mobile-menu-nav a.active, .mobile-menu-nav li.active > a {
  background: #00a0d2;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,160,210,0.13);
}
.mobile-menu-section {
  margin-top: 1.5rem;
}
.mobile-menu-nav .newplan {
  color: #e67e22;
  font-size: 1.1em;
  margin-left: 0.5em;
  vertical-align: middle;
}
}

.mobile-menu-header {
  position: relative;
}

.mobile-menu-close {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  z-index: 10;
  margin-left: 0;
}

@media (max-width: 768px) {
.mobile-menu-header {
  position: relative;
  z-index: 2;
}
.mobile-menu-close {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  z-index: 20;
  margin-left: 0;
}
.mobile-menu-nav {
  z-index: 1;
}
}

@media (max-width: 768px) {
  .mobile-menu-nav {
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  .mobile-menu-list {
      list-style: none;
      padding: 0;
      margin-top: 2.5rem;
      margin-bottom: 2rem;
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      width: 100%;
  }
  .mobile-menu-list li {
      margin-bottom: 0.5rem;
      border-bottom: 1px solid #eaf6fb;
      border-radius: 10px;
      transition: background 0.18s, box-shadow 0.18s;
      overflow: hidden;
      display: flex;
      align-items: center;
      background: none;
      padding: 0;
  }
  .mobile-menu-list li:last-child {
      border-bottom: none;
  }
  .mobile-menu-list a {
      color: #00a0d2;
      font-size: 1.18rem;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 0.9em;
      padding: 0.85em 0.9em 0.85em 0.7em;
      border-radius: 10px;
      transition: background 0.18s, color 0.18s, box-shadow 0.18s;
      font-weight: 600;
      letter-spacing: 0.01em;
      outline: none;
      width: 100%;
      min-height: 48px;
      position: relative;
  }
  .mobile-menu-list a:before {
      content: '\2630';
      color: #b3e0f7;
      font-size: 1.1em;
      margin-right: 0.7em;
      display: inline-block;
      min-width: 1.2em;
      text-align: center;
      opacity: 0.7;
  }
  .mobile-menu-list a:focus {
      background: #eaf6fb;
      color: #2980b9;
      box-shadow: 0 0 0 2px #00a0d2;
  }
  .mobile-menu-list a:hover {
      background: #eaf6fb;
      color: #2980b9;
      box-shadow: 0 2px 8px rgba(0,160,210,0.07);
  }
  .mobile-menu-list a.active, .mobile-menu-list li.active > a {
      background: #00a0d2;
      color: #fff;
      font-weight: 700;
      box-shadow: 0 2px 8px rgba(0,160,210,0.13);
  }
  .mobile-menu-list .newplan {
      color: #e67e22;
      font-size: 1.1em;
      margin-left: 0.5em;
      vertical-align: middle;
  }
  
  /* Mobile Menu Logout Item Styles */
  .mobile-menu-logout-item {
      margin-top: 1.5em;
      padding-top: 1em;
      border-top: 1px solid rgba(255,255,255,0.1);
      position: sticky;
      bottom: 0;
      background: linear-gradient(120deg, #fff 80%, #eaf6fb 100%);
      padding-bottom: 1rem;
      margin-bottom: 0;
  }
  
  .mobile-menu-list .mobile-menu-logout {
      color: #ff6b6b !important;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.5em;
      padding: 0.8em 1em;
      border-radius: 8px;
      transition: background-color 0.2s ease;
      text-decoration: none;
      border: none;
      width: 100%;
  }
  
  .mobile-menu-list .mobile-menu-logout:hover, 
  .mobile-menu-list .mobile-menu-logout:focus {
      background-color: rgba(255,107,107,0.1);
      color: #ff5252 !important;
  }
  
  .mobile-menu-list .mobile-menu-logout i {
      font-size: 1.1em;
  }
  
  /* iPhone-specific improvements */
  @media (max-width: 768px) {
      .mobile-menu-nav {
          height: 100vh;
          height: -webkit-fill-available;
          max-height: 100vh;
          max-height: -webkit-fill-available;
      }
      
      .mobile-menu-logout-item {
          position: sticky;
          bottom: 0;
          background: linear-gradient(120deg, #fff 80%, #eaf6fb 100%);
          z-index: 10;
          padding-bottom: 1rem;
          margin-bottom: 0;
      }
  }
} 

@media (max-width: 768px) {
  .mobile-header-userinfo {
      display: block;
      background: rgba(255,255,255,0.10);
      color: #fff;
      border-radius: 10px;
      margin: 0.7rem 0 0.2rem 0;
      padding: 0.7em 1em 0.5em 1em;
      font-size: 0.9rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      text-align: left;
      font-weight: 500;
      line-height: 1.4;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      border-bottom: 1px solid rgba(255,255,255,0.10);
  }
  /* Logout button removed from header - now in mobile menu */
} 

@media (max-width: 768px) {
  .mobile-menu-nav ul {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
  }
  .mobile-menu-nav li {
    margin-bottom: 0.2rem;
    border-bottom: 1px solid #eaf6fb;
    border-radius: 10px;
    transition: background 0.18s, box-shadow 0.18s;
    overflow: hidden;
    display: flex;
    align-items: center;
    
  }
  .mobile-menu-nav a {
    font-size: 1.01rem;
    padding: 0.65em 0.7em 0.65em 0.5em;
    min-height: 30px;
  }
}

@media (max-width: 768px) {
.mobile-menu-list a[href="/student/"] {
  background: linear-gradient(90deg, #eaf6fb 70%, #fff 100%);
  color: #00a0d2;
  font-weight: 700;
  border: 2px solid #00a0d2;
  border-radius: 18px;
  margin-top: 1.3rem;
  margin-bottom: 0.3rem;
  box-shadow: 0 4px 18px rgba(0,160,210,0.10);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8em;
  padding: 1.1em 1.4em;
  font-size: 1.01rem;
  letter-spacing: 0.01em;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, border 0.18s;
  position: relative;
  outline: none;
  min-height: 26px;
}
.mobile-menu-list a[href="/student/"]::before {
  content: '\1F393'; /* graduation cap unicode */
  font-size: 1.35em;
  margin-right: 0.8em;
  color: #00a0d2;
  opacity: 0.92;
  display: inline-block;
  min-width: 1.3em;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0,160,210,0.08));
}
.mobile-menu-list a[href="/student/"]:hover, .mobile-menu-list a[href="/student/"]:focus {
  background: linear-gradient(90deg, #d4f1fa 70%, #eaf6fb 100%);
  color: #2980b9;
  border-color: #2980b9;
  box-shadow: 0 6px 24px rgba(0,160,210,0.16);
  text-decoration: underline;
}
}

.body-lock-scroll {
  overflow: hidden !important;
  position: fixed;
  width: 100vw;
}



