@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Outfit:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@300;400;500;600;700&display=swap");

:root {
  --blue: #286da8;
  --gold: #d97a45;
  --gold-dk: #b96538;
  --gold-ink: #99572f;
  --gold-soft: #f1c7ad;
  --red: #d97a45;
  --red-dk: #b96538;
  --blue-mid: #3f8ccc;
  --blue-lt: #75acd8;
  --blue-dk: #235c90;
  --white: #ffffff;
  --off: #f4f8fc;
  --cream: #fcf5ee;
  --text: #223548;
  --muted: #62778b;
  --border: #d4e0ea;
  --shadow-soft: 0 18px 38px rgba(34, 53, 72, 0.1);
  --shadow-strong: 0 22px 50px rgba(35, 92, 144, 0.16);
  --header-offset: 74px;
  --sidebar-w: 290px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(117, 172, 216, 0.18), transparent 30%),
    linear-gradient(180deg, #f8fbfe 0%, var(--cream) 100%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", serif;
}

a {
  color: var(--blue);
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--blue-dk);
  text-decoration: none;
}

.fixed-header-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  background: var(--white);
  box-shadow: none;
}

.topbar {
  background: var(--blue-dk);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.4rem 0;
  font-size: 0.78rem;
}

.topbar a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.topbar a:hover {
  color: var(--white);
}

.sep {
  margin: 0 0.6rem;
  opacity: 0.35;
}

.navbar {
  background: var(--white);
  border-bottom: 0;
  padding: 0.55rem 0;
  margin-bottom: 0;
  box-shadow: none;
}

.navbar-default {
  border: 0;
}

.navbar-brand {
  height: auto;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-collapse {
  justify-content: flex-end;
}

.navbar-nav {
  gap: 0.2rem;
}

/* Normalize header nav layout across Bootstrap 3 and 5 */
@media (min-width: 992px) {
  .fixed-header-container .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
  }

  .fixed-header-container .navbar-nav {
    display: flex !important;
    align-items: center;
    float: none !important;
    margin: 0 !important;
  }

  .fixed-header-container .navbar-nav > li {
    float: none !important;
  }
}

.navbar-toggle,
.navbar-toggler {
  border: 1px solid rgba(35, 92, 144, 0.16);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: rgba(40, 109, 168, 0.06);
  margin-top: 8px;
  margin-right: 0;
}

.navbar-toggle .icon-bar,
.navbar-toggler .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue-dk);
}

.navbar-toggle .icon-bar + .icon-bar,
.navbar-toggler .icon-bar + .icon-bar {
  margin-top: 4px;
}

.acts-topbar-right {
  text-align: right;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-icon-wrap {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(46, 120, 184, 0.3));
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.08;
  color: var(--text);
}

.brand-sub {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.navbar-nav > li > a.nav-link,
.navbar-nav > li > a {
  color: var(--text) !important;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1rem !important;
  position: relative;
}

.navbar-nav > li > a.nav-link::after,
.navbar-nav > li > a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.35rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  border-radius: 999px;
}

.navbar-nav > li > a.nav-link:hover::after,
.navbar-nav > li > a:hover::after {
  transform: scaleX(1);
}

.btn-enroll {
  background: var(--red) !important;
  color: var(--white) !important;
  border-radius: 999px;
  padding: 0.7rem 1.45rem !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 24px rgba(185, 101, 56, 0.22);
}

.btn-enroll::after {
  display: none !important;
}

.btn-enroll:hover,
.btn-enroll:focus {
  background: var(--red-dk) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

.acts-hide-mobile {
  display: block;
}

.acts-show-mobile {
  display: none !important;
}

.student-logout-wrap {
  float: right;
  margin-top: 8px;
}

.student-logged-header .navbar {
  padding: 0.68rem 0;
}

.student-logged-header .container {
  width: 94% !important;
  max-width: 1420px;
}

.student-logged-header .brand-icon-wrap,
.student-logged-header .nav-logo {
  width: 58px;
  height: 58px;
}

.student-logged-header .brand-title {
  font-size: 1.5rem;
  line-height: 1.05;
}

.student-logged-header .brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  font-weight: 600;
  margin-top: 0.12rem;
}

.student-logged-header .navbar-nav > li > a.nav-link,
.student-logged-header .navbar-nav > li > a {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.86rem 1rem !important;
}

.student-logged-header .btn-enroll {
  padding: 0.72rem 1.45rem !important;
  font-size: 0.94rem;
}

/* Extra emphasis only for dashboard page */
.student-dashboard-page .student-logged-header .brand-icon-wrap,
.student-dashboard-page .student-logged-header .nav-logo {
  width: 66px;
  height: 66px;
}

.student-dashboard-page .student-logged-header .brand-title {
  font-size: 1.82rem;
}

.student-dashboard-page .student-logged-header .brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.student-dashboard-page .student-logged-header .navbar-nav > li > a.nav-link,
.student-dashboard-page .student-logged-header .navbar-nav > li > a {
  font-size: 1.18rem;
  padding: 0.98rem 1.15rem !important;
}

.student-dashboard-page .student-logged-header .btn-enroll {
  font-size: 1rem;
  padding: 0.84rem 1.65rem !important;
}

/* Account dropdown polish for student logged header */
.student-logged-header .dropdown-menu {
  min-width: 200px;
  margin-top: 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 224, 234, 0.95);
  box-shadow: 0 14px 28px rgba(34, 53, 72, 0.14);
  padding: 0.4rem;
}

.student-logged-header .dropdown-menu > li > a {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text) !important;
  border-radius: 8px;
  padding: 0.62rem 0.8rem;
  text-decoration: none;
}

.student-logged-header .dropdown-menu > li > a:hover,
.student-logged-header .dropdown-menu > li > a:focus {
  background: rgba(40, 109, 168, 0.1) !important;
  color: var(--blue-dk) !important;
}

.acts-page-shell {
  min-height: 100vh;
  padding-top: calc(var(--header-offset) + 1.5rem);
}

.sec-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 0.45rem;
}

.sec-title {
  position: relative;
  color: var(--blue);
  font-weight: 900;
  margin: 0 0 1.1rem;
  padding-bottom: 0.85rem;
}

.sec-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 58px;
  height: 4px;
  border-radius: 999px;
  background: var(--red);
}

.sec-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.acts-panel,
.book-card,
.auth-card,
.public-footer {
  border: 1px solid rgba(212, 224, 234, 0.8);
  box-shadow: var(--shadow-soft);
}

.acts-search-group {
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(212, 224, 234, 0.9);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(63, 140, 204, 0.08);
}

.acts-search-group .input-group-text,
.acts-search-group .form-control {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.acts-search-group .input-group-text {
  color: var(--blue);
  padding-left: 1rem;
}

.acts-search-group .form-control {
  padding: 0.95rem 1rem 0.95rem 0;
}

.acts-search-group .form-control:focus {
  box-shadow: none;
}

.acts-nav-strip {
  margin-top: calc(var(--header-offset) - 2px);
  background: linear-gradient(90deg, var(--blue-dk), var(--blue));
  box-shadow: 0 12px 24px rgba(35, 92, 144, 0.12);
  position: sticky;
  top: calc(var(--header-offset) - 2px);
  z-index: 1020;
}

.acts-nav-strip .container {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.acts-nav-strip .container::-webkit-scrollbar {
  display: none;
}

.acts-nav-strip a {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.95rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.acts-nav-strip a.active,
.acts-nav-strip a:hover {
  color: var(--white);
  border-bottom-color: var(--gold-soft);
}

.library-page {
  padding-top: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(63, 140, 204, 0.2), transparent 28%),
    linear-gradient(180deg, #f6fbff 0%, var(--cream) 100%);
}

.library-page .sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: calc(var(--header-offset) + 56px);
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(212, 224, 234, 0.9);
  overflow-y: auto;
  padding: 1rem 0 1.25rem;
  z-index: 1010;
}

.library-page .main-content {
  margin-left: var(--sidebar-w);
  padding: 1.25rem 2.5rem 3rem;
  min-width: 0;
}

.sidebar-label {
  padding: 0.5rem 1.75rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.sidebar a {
  display: block;
  margin: 0.12rem 1rem;
  padding: 0.85rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-left: 4px solid transparent;
  border-radius: 0 14px 14px 0;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(217, 122, 69, 0.12);
  color: var(--blue-dk);
  border-left-color: var(--gold);
}

.topic-link {
  padding-left: 2.4rem !important;
  font-size: 0.88rem !important;
}

.book-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 245, 238, 0.9));
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.img-container {
  height: 320px;
  background: linear-gradient(180deg, rgba(40, 109, 168, 0.12), rgba(217, 122, 69, 0.16));
  overflow: hidden;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info {
  padding: 1.45rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: calc(100% - 320px);
}

.book-title {
  color: var(--blue);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.book-info .small {
  min-height: 1.5em;
}

.book-info .btn-acts {
  margin-top: auto;
}

.btn-acts,
.acts-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  color: var(--white) !important;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(35, 92, 144, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-acts:hover,
.acts-btn-primary:hover,
.btn-acts:focus,
.acts-btn-primary:focus {
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(185, 101, 56, 0.24);
}

.acts-modal-header {
  background: linear-gradient(135deg, var(--blue-dk), var(--blue));
  color: var(--white);
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-full {
  max-width: 95%;
  width: 95%;
  height: 92vh;
}

.auth-page {
  background:
    radial-gradient(circle at top left, rgba(63, 140, 204, 0.22), transparent 30%),
    linear-gradient(180deg, #f8fbfe 0%, var(--cream) 100%);
}

.auth-wrapper {
  padding: calc(var(--header-offset) + 2rem) 0 4rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  overflow: hidden;
}

.auth-card-header {
  background:
    radial-gradient(circle at top right, rgba(241, 199, 173, 0.32), transparent 28%),
    linear-gradient(135deg, var(--blue-dk), var(--blue));
  color: var(--white);
  padding: 2rem;
}

.auth-card-header p {
  margin: 0.55rem 0 0;
  opacity: 0.82;
  font-size: 0.95rem;
}

.auth-card-header .sec-label {
  color: rgba(255, 255, 255, 0.82);
}

.auth-card-body {
  padding: 2rem;
}

.auth-recovery-grid {
  align-items: stretch;
}

.auth-caption {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.auth-info-panel {
  height: 100%;
  padding: 1.5rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(241, 199, 173, 0.26), transparent 32%),
    linear-gradient(180deg, rgba(40, 109, 168, 0.08), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(212, 224, 234, 0.9);
}

.auth-info-panel h5 {
  color: var(--blue);
  margin: 0 0 0.75rem;
  font-size: 1.08rem;
}

.auth-note-card {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(212, 224, 234, 0.92);
  box-shadow: 0 12px 24px rgba(34, 53, 72, 0.08);
}

.auth-note-card + .auth-note-card {
  margin-top: 0.9rem;
}

.auth-note-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(40, 109, 168, 0.12);
  color: var(--blue);
  font-size: 1.05rem;
}

.auth-note-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.auth-note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.form-label,
.auth-form-label {
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.45rem;
}

.form-control,
.form-select,
.input-group-text {
  border-radius: 14px;
  border-color: rgba(212, 224, 234, 0.95);
  min-height: 48px;
}

.form-control,
.form-select {
  padding: 0.8rem 0.95rem;
  box-shadow: none;
}

.input-group .form-control {
  min-height: 48px;
}

.input-group-text {
  background: rgba(40, 109, 168, 0.08);
  color: var(--blue);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(40, 109, 168, 0.45);
  box-shadow: 0 0 0 0.22rem rgba(63, 140, 204, 0.12);
}

.acts-link,
.help-link {
  color: var(--gold-dk);
  font-weight: 700;
  text-decoration: none;
}

.acts-link:hover,
.help-link:hover {
  color: var(--blue-dk);
}

.privacy-box {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(217, 122, 69, 0.1);
  color: var(--text);
  border: 1px solid rgba(217, 122, 69, 0.18);
}

.auth-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.public-footer {
  margin: 3rem 0 0;
  background:
    radial-gradient(circle at top right, rgba(241, 199, 173, 0.34), transparent 30%),
    radial-gradient(circle at bottom left, rgba(117, 172, 216, 0.2), transparent 34%),
    linear-gradient(135deg, #173f63 0%, var(--blue-dk) 48%, var(--blue) 100%);
  color: rgba(255, 255, 255, 0.9);
  border-top: 4px solid rgba(241, 199, 173, 0.72);
  border-radius: 28px 28px 0 0;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
}

.public-footer .container {
  padding-top: 2.5rem;
  padding-bottom: 1.4rem;
}

.public-footer h4 {
  color: var(--gold-soft);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.public-footer p,
.public-footer li,
.public-footer a {
  color: rgba(244, 248, 252, 0.92);
}

.public-footer a {
  font-weight: 600;
}

.public-footer a:hover {
  color: var(--white);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-copy {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(241, 199, 173, 0.28);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer-copy strong {
  color: var(--gold-soft);
}

@media (max-width: 991px) {
  :root {
    --header-offset: 70px;
  }

  .brand-title {
    font-size: 1.18rem;
  }

  .brand-sub {
    font-size: 0.54rem;
    letter-spacing: 0.09em;
  }

  .library-page .sidebar {
    display: none;
  }

  .library-page .main-content {
    margin-left: 0;
    padding: 1.1rem 1.25rem 2.5rem;
  }

  .navbar-collapse {
    background: var(--white);
    border-radius: 14px;
    margin-top: 0.75rem;
    padding: 0.4rem;
    box-shadow: 0 14px 28px rgba(34, 53, 72, 0.16);
  }

  .navbar-nav > li > a.nav-link,
  .navbar-nav > li > a {
    padding: 0.72rem 0.9rem !important;
  }

  .auth-card-header,
  .auth-card-body {
    padding: 1.5rem;
  }

  .auth-info-panel {
    padding: 1.25rem;
  }

  .student-logged-header .brand-icon-wrap,
  .student-logged-header .nav-logo {
    width: 54px;
    height: 54px;
  }

  .student-logged-header .container {
    width: 96% !important;
    max-width: none;
  }

  .student-logged-header .brand-title {
    font-size: 1.25rem;
  }

  .student-logged-header .brand-sub {
    font-size: 0.54rem;
    letter-spacing: 0.11em;
  }

  .student-logged-header .navbar-nav > li > a.nav-link,
  .student-logged-header .navbar-nav > li > a {
    font-size: 0.95rem;
    padding: 0.75rem 0.85rem !important;
  }

  .student-dashboard-page .student-logged-header .brand-title {
    font-size: 1.36rem;
  }

  .student-dashboard-page .student-logged-header .navbar-nav > li > a.nav-link,
  .student-dashboard-page .student-logged-header .navbar-nav > li > a {
    font-size: 1.02rem;
    padding: 0.82rem 0.92rem !important;
  }
}

@media (max-width: 576px) {
  .brand-lockup {
    gap: 0.65rem;
  }

  .brand-icon-wrap,
  .nav-logo {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 1.06rem;
  }

  .acts-page-shell,
  .auth-wrapper {
    padding-top: calc(var(--header-offset) + 1rem);
  }

  .img-container {
    height: 280px;
  }

  .acts-topbar-right {
    text-align: left;
    margin-top: 0.3rem;
  }

  .acts-hide-mobile {
    display: none !important;
  }

  .acts-show-mobile {
    display: block !important;
  }
}
