body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8fafc;
  color: #111;
  background-color: #f1f5f9;
  overflow-x: hidden;
}

/* HEADER & NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  width: 100%;
  background-color: #97bbc4;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
  height: 60px;
}

nav .nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  padding-right: 1rem;
  margin: 0;
  align-self: end;
}

.nav-menu li {
  margin-left: 1.5rem;
  position: relative;
}

.nav-menu li a,
.nav-menu li span {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  z-index: 10;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #1f2937;
  font-weight: 400;
}

.nav-dropdown-content a:hover {
  background-color: #f3f4f6;
}

/* MAIN CONTENT */
.main-content {
  padding: 2rem;
  max-width: 93.5%;
  margin: auto;
}

.footer {
  width: 100%;
  justify-self: center;
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* CARDS */
.white-card {
  width: 60%;
  justify-self: center;
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* HERO */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem;
}


.hero-text {
  flex: 3;
  min-width: 280px;
}

.hero-text h1 {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.hero-text h4 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.key-strengths {
  list-style: none;
  padding-left: 0;
  line-height: 1.8;
}

.key-strengths li {
  background: #f1f5f9;
  border-left: 5px solid #2563eb;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.key-strengths li strong {
  display: block;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.hero-text ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  line-height: 1.7;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  min-width: 30%;
  height: 100%;
}

.logo-large {
  max-width: 500px;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.logo-large:hover {
  transform: scale(1.03);
}

/* BUTTON */
.btn {
  background-color: #2563eb;
  color: white;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #1d4ed8;
}

/* RESOURCE LINKS */
.resource-links {
  list-style: disc;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.resource-links a {
  color: #2563eb;
  text-decoration: none;
}

.resource-links a:hover {
  text-decoration: underline;
}

/* AUTH CARD FORM */
.auth-card {
  max-width: 500px;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-card form .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.auth-card form label {
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.auth-card form input,
.auth-card form select,
.auth-card form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-card form textarea {
  resize: vertical;
}

.auth-card form input:focus,
.auth-card form select:focus,
.auth-card form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* SELECT2 STYLING */
.select2-container--default .select2-selection--single {
  height: 45px;
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 1rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 10px;
}

/* ERROR MESSAGE */
.error-message {
  background-color: #ffe8e8;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  font-weight: 500;
}

/* SPLIT NAV */
.split-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding-left: 1rem;
}

.nav-left,
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-left li {
  margin-right: 1.5rem;
}

.nav-left li a,
.nav-left li span {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ADMIN LINKS */
.admin-links {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
}

.admin-links li {
  margin-bottom: 0.75rem;
}

.admin-links a {
  display: inline-block;
  background-color: #2563eb;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.admin-links a:hover {
  background-color: #1d4ed8;
}

/* WARNING STYLE */
#warning {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: red;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

table th, table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

table thead {
  background-color: #f3f4f6;
}

table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.form-card {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.form-card h2 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-card form .form-group {
  display: flex;
  flex-direction: column;
}

.form-card form input,
.form-card form select {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.form-card form input:focus,
.form-card form select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-card form button {
  margin-top: 1rem;
}

.highlight-link {
  background-color: #167304; /* green */
  color: #fff !important;
  padding: 0.4rem 0.9rem;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.highlight-link:hover {
  background-color: #b91c1c;
}

.highlight-link-alt {
  background-color: #2563eb;
  color: #fff !important;
  padding: 0.4rem 0.9rem;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.highlight-link-alt:hover {
  background-color: #b91c1c;
}

#free-content-callout {
  text-align: left;
  padding: 2rem;
}

.subject-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.subject-btn {
  background-color: #2563eb;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}

.subject-btn:hover {
  background-color: #1e3a8a;
}

.badge-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.heading-badge {
  background-color: #eef2ff;
  color: #4f46e5;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.highlight-exam {
  background-color: #facc15;
  color: #1e293b;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: bold;
}
.highlight-exam:hover {
  background-color: #fbbf24;
}

.key-strengths {
  list-style: none;
  padding-left: 0;
  line-height: 1.8;
}

.key-strengths li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltiptext {
  visibility: hidden;
  color: #000;
  background-color: #f5f5f5;
  text-align: center;
  padding: 0.3rem 0.6rem;      /* 🔽 smaller padding */
  border-radius: 0.5rem;       /* 🔽 tighter corners */
  position: absolute;
  z-index: 1001;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.5rem;          /* 🔽 smaller text */
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); /* Optional: subtle shadow */
}


.tooltip:hover .tooltiptext,
.tooltiptext.show {
  visibility: visible;
  opacity: 1;
}

.tooltiptext-top {
  visibility: hidden;
  color: black;
  background-color: whitesmoke;
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  position: absolute;
  z-index: 1001;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.5rem;
  pointer-events: none;
}

.tooltip:hover .tooltiptext-top,
.tooltiptext-top.show {
  visibility: visible;
  opacity: 1;
}


.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
  text-align: center;
}

.welcome-message {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
  margin-top: 0.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group.half-width {
  flex: 1;
  min-width: 200px;
}

.form-group.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.checkbox-label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.content-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.content-meta p {
  margin: 0;
  font-size: 0.95rem;
  flex-grow: 1;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 0.75rem;
}

/* Support nested submenu inside dropdown */
.nav-dropdown-content .nav-dropdown-item {
  position: relative;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.nav-dropdown-content .submenu-title {
  display: block;
  font-weight: 500;
  cursor: pointer;
  color: #1f2937;
}

.nav-sub-dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 150px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  z-index: 1002;
}

.nav-dropdown-item:hover .nav-sub-dropdown {
  display: block;
}

.nav-sub-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: #1f2937;
  text-decoration: none;
}

.nav-sub-dropdown a:hover {
  background-color: #f3f4f6;
}

.exam-info-content header,
.exam-info-content footer {
  display: none;
}

.exam-info-content main,
.exam-info-content section {
  padding: 0;
  margin: 0;
}

.exam-info-content h2,
.exam-info-content h3,
.exam-info-content p,
.exam-info-content ul {
  font-family: inherit;
  color: #1f2937;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.exam-info-content ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.exam-info-content .important,
.exam-info-content .highlight {
  background-color: #eef6ff;
  border-left: 4px solid #2563eb;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
}

.exam-info-content a {
  color: #2563eb;
  text-decoration: none;
}

.exam-info-content a:hover {
  text-decoration: underline;
}

.footer-content {
  text-align: center;
  padding: 1rem;
  background-color: #003366;
  color: white;
  font-size: 0.95rem;
}
.footer-content .social-links {
  margin-top: 0.5rem;
}
.footer-content .social-links a {
  color: #fff;
  margin: 0 0.5rem;
  text-decoration: none;
  font-size: 1rem;
}
.footer-content .social-links a:hover {
  text-decoration: underline;
}

@media (max-width: 1200px) {

  .logo-container {
    align-items: flex-start;
  }

  .welcome-message {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    padding-left: 0.25rem;
  }

  .menu-text {
    display: none;
  }

  .white-card {
    width: 90%;
  }

  .hero-text {
    padding: 0;
  }

  .logo-large {
    max-width: 260px;
  }

  .auth-card {
    padding: 1.5rem;
    margin: 2rem 1rem;
  }

  .auth-card form {
    gap: 0.75rem;
  }

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    align-items: flex-start;
    padding: 0.5rem;
  }

  .split-nav {
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .nav-left,
  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .nav-left li,
  .nav-menu li {
    margin: 0;
  }

  .navbar .logo {
    height: 2.5rem;
  }

  .hero-image {
    display: none;
  }

  table {
    display: block;
    width: 100%;
    border: none;
  }

  thead {
    display: none;
  }

  tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  tbody tr {
    display: block;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 1rem;
    border: 1px solid #e5e7eb;
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border: none;
    font-size: 0.95rem;
  }

  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    padding-right: 1rem;
  }

  .nav-sub-dropdown {
    position: static;
    display: none;
    width: 100%;
    padding-left: 1rem;
    box-shadow: none;
  }

  .nav-dropdown-item:hover .nav-sub-dropdown,
  .nav-sub-dropdown.show {
    display: block;
  }

  .submenu-title {
    cursor: pointer;
    padding: 0.75rem 1rem;
    background-color: #f3f4f6;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
  }

  .nav-sub-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
  }
}
