/* ============================================
   NAVBAR BASE. Shared across all roles
   Material Design elevation & layout
============================================ */

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700;
}

.heading,
.title-text,
.calendar-body h6,
.navbar,
.nav-link,
.dropdown-item,
button,
p,
span {
  font-family: 'Montserrat', sans-serif !important;
}

/* -----------------------------------------------
   PUBLIC NAVBAR (unauthenticated)
----------------------------------------------- */

.public-navbar {
  background: #ffffff;
  padding: 0 !important;
  height: 64px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  position: sticky;
  top: 0;
  z-index: 200;
}

.public-navbar .navbar-brand img {
  height: 38px;
  margin-right: 10px;
}

.public-navbar strong {
  font-size: 20px;
  color: #1f2d16;
  font-weight: 700;
}

.public-navbar .btn {
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
}

.public-navbar .nav-link {
  color: #49454f;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
  color: #2e7d32;
}

/* -----------------------------------------------
   SECONDARY NAV (shared base)
----------------------------------------------- */

.secondary-nav {
  height: 48px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.secondary-nav::-webkit-scrollbar {
  display: none;
}

.instructor-secondary-nav .navbar-nav {
  justify-content: space-evenly;
  align-items: center;
}

.instructor-secondary-nav .nav-item {
  display: flex;
  align-items: center;
}

.instructor-secondary-nav .nav-link,
.instructor-secondary-nav .btn.btn-link {
  display: flex !important;
  align-items: center;
  padding: 0 14px !important;
  font-size: 14px !important;
  white-space: nowrap;
  line-height: 1 !important;
  margin: 0 !important;
  height: 48px;
  border: none;
  background: none;
  box-shadow: none;
  color: #49454f;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.instructor-secondary-nav .nav-link:hover,
.instructor-secondary-nav .btn.btn-link:hover {
  color: #2e7d32;
  background: #e8f5e9;
}

.instructor-secondary-nav .nav-link.active {
  color: #2e7d32;
  border-bottom: 3px solid #2e7d32;
  font-weight: 700;
}

@media (max-width: 768px) {
  .secondary-nav {
    height: auto !important;
    min-height: 48px;
    padding: 0;
  }

  .instructor-secondary-nav .nav-link,
  .instructor-secondary-nav .btn.btn-link {
    font-size: 12px !important;
    padding: 0 8px !important;
  }
}

/* -----------------------------------------------
   DROPDOWN (shared)
----------------------------------------------- */

.nav-item.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08) !important;
  margin: 4px 0 0 0 !important;
  z-index: 5000;
}

.dropdown-toggle::after {
  display: none !important;
}

.secondary-nav .nav-link {
  font-size: 14px;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: #49454f;
  transition: color 0.2s, background 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

.secondary-nav .nav-link:hover {
  color: #2e7d32;
  background: #e8f5e9;
}

.secondary-nav .nav-link.active {
  color: #2e7d32;
  border-bottom: 3px solid #2e7d32;
  font-weight: 700;
  background: transparent;
}

/* -----------------------------------------------
   PAGE WRAPPER
----------------------------------------------- */

.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: 'Montserrat', sans-serif !important;
}

/* -----------------------------------------------
   CALENDAR PANEL (Material elevation)
----------------------------------------------- */

.calendar-panel {
  position: fixed;
  top: 128px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  background: #ffffff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.25rem 1.5rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
  font-family: 'Montserrat', sans-serif !important;
}

.calendar-panel::-webkit-scrollbar {
  display: none;
}

.calendar-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.calendar-header {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.calendar-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1c1b1f;
  margin-bottom: 0;
}

.calendar-body h6 {
  font-weight: 700;
  font-size: 13px;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.calendar-body li {
  font-size: 13px;
  color: #49454f;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}
