* {
  box-sizing: border-box;
}

:root {
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ease: 0.18s ease;
}

[data-theme="light"] {
  --bg: #f5f5f8;
  --sidebar-bg: #ffffff;
  --panel: #ffffff;
  --hero-bg: #f3eef9;
  --panel-soft: #ffffff;
  --panel-soft-2: #fafafa;
  --line: #ececf1;
  --purple: #6f4cf6;
  --purple-dark: #23293a;
  --muted: #6b7285;
  --text: #252c3c;
  --shadow: 0 12px 28px rgba(18, 24, 38, 0.04);
  --overlay: rgba(30, 16, 70, 0.18);
  --rating-bg: #eefaf7;
  --rating-text: #27c7b8;
  --avatar-bg: #f2f2f5;
  --hover-bg: #f7f3ff;
  --hover-line: #d7c8ff;
  --hover-shadow: 0 14px 30px rgba(122, 77, 255, 0.1);
  --teal: #27c7b8;
  --service-line: #d7c8ff;
  --active-blue: #1565d8;
}

[data-theme="dark"] {
  --bg: #131018;
  --sidebar-bg: #1b1722;
  --panel: #1f1a28;
  --hero-bg: #241d31;
  --panel-soft: #1f1a28;
  --panel-soft-2: #2b2635;
  --line: #3b3447;
  --purple: #9a7cff;
  --purple-dark: #f0e9ff;
  --muted: #b8afc9;
  --text: #efeaf8;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --overlay: rgba(0, 0, 0, 0.45);
  --rating-bg: #20312f;
  --rating-text: #46d8ca;
  --avatar-bg: #2b2635;
  --hover-bg: #2a2236;
  --hover-line: #5b4a83;
  --hover-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  --teal: #46d8ca;
  --service-line: #5b4a83;
  --active-blue: #3b82f6;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow: hidden;
}

body.modal-open,
body.sidebar-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

a,
button,
.nav-item,
.school-card,
.mentor-card,
.store-option,
.pathway-btn,
.pay-type-btn {
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}

.app-shell {
  display: flex;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.app-shell.sidebar-active .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  width: 294px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 18px 16px;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

.sidebar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.sidebar-top {
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 0 10px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7a4dff, #c26be3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.brand-subtitle {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  text-decoration: none;
  font-size: 13px;
  color: var(--purple-dark);
  font-weight: 700;
}

.back-link-arrow {
  font-size: 18px;
  line-height: 1;
}

.back-link:hover {
  color: var(--purple);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.nav-section-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
  box-shadow: var(--hover-shadow);
  transform: translateY(-1px);
}

.nav-item.active {
  background: var(--hover-bg);
  border-color: var(--active-blue);
  box-shadow: var(--hover-shadow);
  color: var(--active-blue);
  transform: translateY(-1px);
}

.nav-item.active .nav-icon {
  color: var(--active-blue);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.single-link {
  justify-content: flex-start;
}

.single-link .nav-left {
  width: 100%;
}

.nav-icon {
  width: 20px;
  height: 20px;
  color: #808998;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-item:hover .nav-icon {
  color: var(--purple);
}

.helper-note {
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px 0 14px;
  line-height: 1.4;
}

.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  min-width: 0;
}

.topbar {
  height: 72px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft-2);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
}

.search-wrap {
  max-width: 330px;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--panel-soft-2);
  color: var(--text);
  border-radius: 13px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: var(--hover-line);
  box-shadow: 0 0 0 3px rgba(122, 77, 255, 0.1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-toggle {
  height: 40px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-soft-2);
  color: var(--purple-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
  transform: translateY(-1px);
}

.credits-box {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--sidebar-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-dark);
}

.credits-box strong {
  color: var(--purple);
  font-size: 14px;
}

.store-btn,
.primary-btn,
.institutions-btn,
.view-all-institutions-btn,
.book-now-btn {
  height: 40px;
  padding: 0 15px;
  border-radius: 13px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #7a4dff, #9f55ff);
  color: white;
  box-shadow: 0 10px 22px rgba(122, 77, 255, 0.2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.store-btn:hover,
.primary-btn:hover,
.institutions-btn:hover,
.view-all-institutions-btn:hover,
.book-now-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(122, 77, 255, 0.28);
}

.mentor-hero {
  margin: 17px;
  padding: 10px 0px;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.mentor-hero-left h1 {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--purple-dark);
}

.mentor-hero-left p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.mentor-hero-links {
  display: flex;
  align-items: center;
  gap: 42px;
  flex-wrap: wrap;
}

.mentor-hero-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.mentor-hero-links a:first-child {
  color: #7a4dff;
}

.mentor-hero-links a:last-child {
  color: #3e67e4;
}

.mentor-hero-links a:first-child:hover,
.mentor-hero-links a:last-child:hover {
  text-decoration: underline;
}

.content-section {
  padding: 17px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  color: var(--text);
}

.mentor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mentor-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.mentor-card:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
}

.mentor-card:hover .mentor-name {
  color: var(--purple);
}

.mentor-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.mentor-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mentor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--avatar-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.mentor-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.mentor-role {
  font-size: 12.5px;
  color: var(--text);
  opacity: 0.9;
  font-weight: 500;
}

.mentor-rating {
  background: var(--rating-bg);
  color: var(--rating-text);
  font-weight: 600;
  font-size: 12px;
  border-radius: 8px;
  padding: 6px 10px;
  white-space: nowrap;
}

.mentor-office-hours {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.mentor-office-hours-title {
  color: var(--purple);
  font-weight: 600;
  margin-right: 6px;
}

.mentor-office-hours-time {
  color: var(--muted);
  font-weight: 700;
}

.read-more-block {
  margin-bottom: 14px;
}

.read-more-text {
  overflow: hidden;
  max-height: 2.9em;
  position: relative;
}

.read-more-block.expanded .read-more-text {
  max-height: none;
  overflow: visible;
}

.read-more-btn {
  margin-top: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}

.read-more-btn:hover {
  color: var(--purple-dark);
}

.read-more-chevron {
  font-size: 14px;
  line-height: 1;
  transition: transform var(--ease);
}

.read-more-block.expanded .read-more-chevron {
  transform: rotate(180deg);
}

.mentor-note-box {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  margin-bottom: 0;
}

.services-accordion {
  margin-bottom: 16px;
}

.services-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.services-toggle-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.services-toggle-icon {
  font-size: 14px;
  color: var(--purple);
  transition: transform var(--ease);
}

.services-accordion.open .services-toggle-icon {
  transform: rotate(180deg);
}

.services-dropdown {
  display: none;
  padding-top: 12px;
}

.services-accordion.open .services-dropdown {
  display: block;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-pill {
  min-height: 44px;
  border: 1.5px solid var(--service-line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  color: var(--purple);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
}

.student-note-box {
  margin-bottom: 16px;
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.student-note-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.see-more-feedback {
  border: none;
  background: transparent;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.see-more-feedback:hover {
  text-decoration: underline;
  color: var(--purple-dark);
}

.student-note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.feedback-read-more {
  margin-bottom: 0;
}

.book-now-btn {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  font-size: 18px;
  margin-top: auto;
}

.institutions-section {
  padding-bottom: 30px;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.school-card {
  height: 110px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.school-card:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
  color: var(--purple);
}

.store-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
}

.store-modal-overlay.show {
  display: flex;
}

.store-modal {
  width: min(1240px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(78, 36, 175, 0.14);
  position: relative;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--sidebar-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}

.modal-close:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
}

.store-modal-inner {
  padding: 34px;
  text-align: center;
}

.store-modal-inner h2 {
  margin: 0;
  font-size: 48px;
  color: var(--purple-dark);
}

.store-modal-inner > p {
  margin: 10px 0 0 0;
  color: var(--muted);
  font-size: 16px;
}

.store-option-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.store-option {
  height: 66px;
  border: 1px solid var(--line);
  background: var(--sidebar-bg);
  color: var(--purple);
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.store-option:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
  transform: translateY(-1px);
}

.active-store-option {
  background: var(--panel-soft-2);
}

.service-panel.hidden-panel {
  display: none;
}

.service-card {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-align: left;
}

.service-card h3 {
  margin: 0;
  font-size: 34px;
  color: var(--purple-dark);
  text-align: center;
}

.service-card > p {
  margin: 10px 0 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.pathway-row,
.payment-type-row {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.pathway-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-type-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pathway-btn,
.pay-type-btn {
  height: 56px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--sidebar-bg);
  color: var(--purple);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.pathway-btn:hover,
.pay-type-btn:hover {
  background: var(--hover-bg);
  border-color: var(--hover-line);
}

.active-pathway,
.active-pay-type {
  background: var(--panel-soft-2);
}

.credit-assignment-note {
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.rules-box {
  border: 1px solid var(--line);
  background: var(--sidebar-bg);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
}

.rules-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 10px;
}

.rules-box ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 14px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 21px;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 16px;
}

.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 110px;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-row input,
.meeting-form-grid input,
.meeting-form-grid select {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  font-size: 14px;
  background: var(--sidebar-bg);
  color: var(--text);
  outline: none;
}

.payment-row input:focus,
.meeting-form-grid input:focus,
.meeting-form-grid select:focus {
  border-color: var(--hover-line);
  box-shadow: 0 0 0 3px rgba(122, 77, 255, 0.1);
}

.meeting-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.meeting-form-grid .full {
  grid-column: 1 / -1;
}

.full-btn {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 1250px) {
  .mentor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--ease);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    width: 280px;
    border-right: 1px solid var(--line);
  }

  .app-shell.sidebar-active .sidebar {
    transform: translateX(0);
  }

  .topbar {
    padding: 0 16px;
    height: 64px;
  }

  .search-wrap {
    max-width: none;
  }

  .mentor-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0px;
    gap: 16px;
  }

  .mentor-hero-links {
    gap: 14px;
  }

  .mentor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .mentor-grid {
    grid-template-columns: 1fr;
  }

  .school-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar-right .credits-box {
    display: none;
  }
  .topbar-right .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 0 10px;
  }

  .mentor-hero-left h1 {
    font-size: 32px;
  }

  .store-modal {
    border-radius: 20px;
  }

  .store-modal-inner {
    padding: 20px;
  }

  .store-modal-inner h2 {
    font-size: 32px;
  }

  .store-option-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pathway-row,
  .payment-type-row,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .meeting-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Uniform sidebar + main content spacing and typography across pages */
.sidebar {
  width: 294px !important;
  min-width: 294px !important;
}
.main-content {
  flex: 1 !important;
  padding: 0px !important;
  min-width: 0;
}
.page-shell,
.demo14-page-wrap,
.page-wrap {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding-top: 12px !important;
  padding-bottom: 24px !important;
}
.page-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 24px !important;
  margin-bottom: 24px !important;
}
.title-wrap h1,
.page-heading h1 {
  font-size: 34px !important;
  line-height: 1.2 !important;
  margin-bottom: 12px !important;
}
.title-wrap p,
.page-heading p,
.info-copy p {
  font-size: 16px !important;
  color: #5f6585 !important;
  max-width: 870px !important;
}
