/* =============================================================
   alter.html — landing page layout, spacing and media
   Loaded after custom.css + custom-card.css.
   ============================================================= */

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--primary-color);
  color: var(--primary-light-color);
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
body.themeFont {
  font-family:
    "Montserrat",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.themeFont h1,
body.themeFont h2,
body.themeFont h3,
body.themeFont h4,
body.themeFont h5 {
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.section-intro {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Top Info Bar ---------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
}

/* ---------- Full screen hero ---------- */
.hero {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.45));
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Real spacing instead of the old negative-margin percentages */
.hero-content-wrap {
  padding-top: 1.2%;
  padding-bottom: 64px;
}

.brand-logo {
  height: 84px;
  width: auto;
}

/* ---------- Sections ---------- */
.section-nav {
  width: 100%;
}

.web-section {
  padding-bottom: 0.75rem;
}

/* ---------- Media ---------- */
.media {
  display: block;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  background-color: rgba(0, 0, 0, 0.06);
}

.course-media {
  height: 168px;
}

.campus-media {
  height: 190px;
}

.entry-media {
  height: 270px;
  margin-bottom: 1rem;
}

/* Pushes the "Enquire Course" button to the bottom of equal-height cards */
.course-body {
  flex: 1 1 auto;
}

/* Home banner image bleeds to the card edges */
.home-media-card {
  padding: 0;
  overflow: hidden;
}

.home-media {
  height: 100%;
  min-height: 248px;
  border-radius: inherit;
}

.contact-media {
  height: 190px;
}

/* ---------- Home stats ---------- */
.home-stats {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.home-stat {
  flex: 1 1 0;
  min-width: 6rem;
  padding: 0 1rem;
  text-align: left;
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
}

.home-stat:first-child {
  padding-left: 0;
}

.home-stat + .home-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.home-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-color);
}

.home-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- Nav cards & CTA ---------- */
.nav-card-icon {
  font-size: 1.35rem;
  color: var(--accent-color);
  margin-bottom: 0.6rem;
  transition: color 0.35s ease;
}

.nav-card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
  opacity: 0.85;
  transition:
    gap 0.3s ease,
    opacity 0.3s ease,
    color 0.3s ease;
}

.nav-card-more i {
  font-size: 0.78rem;
  transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-more {
  gap: 0.6rem;
  opacity: 1;
}

.nav-card:hover .nav-card-more i {
  transform: translateX(3px);
}

.btn-cta {
  min-width: 260px;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  background-color: var(--primary-color) !important;
  color: var(--primary-light-color) !important;
  border: 1px solid var(--primary-color) !important;
  box-shadow: 0 10px 24px rgba(91, 20, 37, 0.35);
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.btn-cta:hover,
.btn-cta:focus {
  background-color: var(--primary-light-color) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-light-color) !important;
  box-shadow: 0 6px 18px rgba(91, 20, 37, 0.28);
  transform: translateY(-2px);
}

.btn-cta:active {
  transform: translateY(0);
}

/* Non-interactive glass cards look the same in every state */
.glass-static,
.glass-static:hover {
  cursor: default;
}

/* ---------- Entry requirement lists ---------- */
.entry-list {
  list-style: none;
  padding-left: 0;
  line-height: 1.6;
}

.entry-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.entry-list li i {
  flex: 0 0 auto;
  margin-top: 0.32rem;
  font-size: 0.85rem;
}

/* ---------- Entry requirements table ---------- */
.entry-table-wrap {
  overflow-x: auto;
}

.entry-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: #ececec;
  font-size: 0.95rem;
}

.entry-table thead th {
  text-align: center;
  vertical-align: bottom;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

.entry-table thead th:first-child {
  text-align: left;
}

.entry-table thead .th-main {
  display: block;
  font-size: 0.95rem;
}

.entry-table thead small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.8;
}

.entry-table tbody th,
.entry-table tbody td {
  vertical-align: middle;
  padding: 0.9rem 0.75rem;
  font-weight: 400;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.entry-table tbody tr:last-child th,
.entry-table tbody tr:last-child td {
  border-bottom: none;
}

.entry-table tbody th {
  text-align: left;
}

.entry-table tbody td {
  text-align: center;
}

.entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 0.6rem;
  vertical-align: middle;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-color);
}

.entry-name {
  display: inline-block;
  vertical-align: middle;
  font-weight: 700;
}

.entry-name small {
  display: block;
  max-width: 34ch;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.75;
}

.entry-score {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-color);
}

/* Stacked cards on small screens so no horizontal scroll is needed */
@media (max-width: 767.98px) {
  .entry-table {
    min-width: 0;
  }

  .entry-table thead {
    display: none;
  }

  .entry-table,
  .entry-table tbody,
  .entry-table tr,
  .entry-table th,
  .entry-table td {
    display: block;
    width: 100%;
  }

  .entry-table tbody tr {
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
  }

  .entry-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .entry-table tbody th {
    padding: 0 0 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .entry-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    text-align: right;
    border: none;
  }

  .entry-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
    opacity: 0.85;
  }
}

/* Glass table (kept for the legacy static pages) */
.table-glass {
  --bs-table-bg: transparent;
  --bs-table-color: #ececec;
  --bs-table-border-color: rgba(255, 255, 255, 0.12);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
  --bs-table-hover-color: #ffffff;
  color: #ececec;
}

.table-glass thead th {
  color: var(--accent-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Hide the warning overlay by default */
#rotate-warning {
  display: none;
}

/* Trigger only on mobile screens when rotated horizontally */
@media screen and (orientation: landscape) and (max-height: 500px) {
  #rotate-warning {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    color: #ffffff;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Hide main page content when rotated */
  body > *:not(#rotate-warning) {
    display: none;
  }
}

/* ---------- Theme switch ---------- */
/* Neumorphic-only assets are hidden while the classic theme is active.
   neumorphic.css flips these rules when it is enabled. */
.theme-neu-only {
  display: none !important;
}

.theme-dark-only {
  display: block !important;
}

.theme-toggle {
  position: fixed;
  top: 46px;
  right: 18px;
  z-index: 1040;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  color: var(--accent-color);
  background: var(--primary-glass-color);
  border: 1px solid var(--primary-color);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--primary-dark-color);
  color: #fff;
  outline: none;
}

/* ---------- Loading Spinner -------- */
.spinner {
  display: none;
}
.spinholder {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100dvh;
  z-index: 9999;
  background-color: rgb(255, 255, 255);
  opacity: 0.9;
}
.spinvideo {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* htmx automatically adds the `htmx-request` class to the indicator element */
#globalSpinner.htmx-request {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  /* background: #ffffff00; */
  width: 100%;
  height: 100vh;
  z-index: 999;
  text-align: center;
  /* vertical-align: middle; */
  padding: 20%;
  /* backdrop-filter: blur(4px); */
  /* opacity: 0.7; */
}
