/* Document structure, footer bar, containers, and global utility classes. */
/* Sticky footer: html/body fill viewport, main grows so footer stays at bottom. */
html {
  min-height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* main grows to fill space so footer is at bottom of viewport when content is short */
main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
  width: 100%;
  /* Prevent footer from overflowing or clipping */
  overflow: visible;
  min-height: 0;
}

/* Footer bar: versions left, credit center; inner wrapper so footer spans full viewport */
.footer-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.875rem;
  opacity: 0.92;
}
.footer-bar .footer-left {
  justify-self: start;
  text-align: left;
}
.footer-bar .footer-center {
  justify-self: center;
  text-align: center;
}
.footer-bar .footer-right {
  justify-self: end;
}

.logo-text {
  font-weight: 800;
  font-size: 2.5rem;
}

.primary-bg {
  background-color: var(--card-bg);
  color: #333333;
}
.primary-bg .text-white {
  color: #333333 !important;
}
.primary-text {
  color: var(--card-bg);
}
.primary-border {
  border-color: var(--card-bg);
}

.navbar {
  background-color: var(--navbar-bg);
  color: var(--navbar-text);
}

.section-padding {
  padding: 5rem 1.5rem;
}

/* Auth pages: center the card vertically in the viewport (same band as video) */
.auth-section {
  min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-section .container-tight {
  width: 100%;
}

/* Learn, Quiz select, Study, Profile: section height = content so footer sits right below */
.center-cards-section {
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-cards-section .container-tight {
  width: 100%;
}
.center-cards-section.section-padding {
  padding-bottom: 1.5rem;
}

.container-tight {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.card {
  background-color: var(--card-bg);
  color: var(--card-text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: var(--card-max-width);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.panel {
  width: 100%;
  max-width: var(--panel-max-width);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.aligned-list {
  list-style: none;
  padding-left: 0;
}
.aligned-list li {
  text-align: center;
}
