/* -------------------------------------------- */
/* General Reset & Typography */
/* -------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f5f6fa;
  color: #222;
  line-height: 1.6;
  font-size: 16px;
}
/* sublinks */
.sublink {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
  background-color: #cc23b0;
}
/* -------------------------------------------- */
/* Container & Layout */
/* -------------------------------------------- */
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #1c5db0;
}

/* Heading */
h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  text-align: center;
  color: #333;
}

/* Paragraphs */
p {
  margin-bottom: 16px;
  color: #444;
}

/* -------------------------------------------- */
/* Details / Expandable Sections */
/* -------------------------------------------- */
details {
  background: #fff;
  padding: 15px 18px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

details:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

details summary {
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  outline: none;
}

details[open] summary {
  color: #4a90e2;
}

details p {
  margin-top: 10px;
  line-height: 1.7;
  color: #555;
}

/* -------------------------------------------- */
/* Links inside content */
a {
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1c5db0;
  text-decoration: underline;
}

/* Tip paragraph */
p.tip {
  margin-top: 20px;
  font-size: 0.95rem;
  color: #555;
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 15px;
  }

  details summary {
    font-size: 1rem;
  }
}

/* Container for links */
.link-container {
  display: flex;
  flex-wrap: wrap;
  /* Wrap buttons on smaller screens */
  gap: 12px;
  /* Space between buttons */
  margin: 20px 0;
  justify-content: center;
  /* Center align */
}

/* Button style for links */
.link-container a {
  display: inline-block;
  padding: 12px 20px;
  background-color: #4a90e2;
  /* Blue color */
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
  text-align: center;
}

/* Hover effect */
.link-container a:hover {
  background-color: #1c5db0;
  transform: translateY(-2px);
}

/* Responsive for mobile */
@media (max-width: 600px) {
  .link-container {
    flex-direction: column;
    /* Stack buttons vertically */
    align-items: center;
  }

  .link-container a {
    width: 90%;
    /* Take most of the screen width */
    padding: 14px 0;
  }
}
.core-heading {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #8d89d8;
  letter-spacing: 0.5px;
  text-align: center;
}
/* Footer and resource link (kept after consolidation) */
#footer-text {
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  color: var(--text);
}

.resource-link {
  display: inline-block;
  padding: 5px 20px;
  background: #4f46e5;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: 0.3s ease;
  text-align: center;

}

.resource-link:hover {
  background: #9df3e0;
  transform: translateY(-2px);
}

.resource-link:active {
  transform: scale(0.97);
}


/* -------------------------------------------- */
/* Semester Navigation */
/* -------------------------------------------- */
.semester-nav {
  background: linear-gradient(135deg, #4a90e2, #357bd4);
  padding: 0;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 950;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.semester-toggle {
  display: none;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #4a90e2, #357bd4);
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: 0.3s ease;
  align-items: center;
  justify-content: space-between;
  padding-right: 30px;
}

.semester-toggle:hover {
  background: linear-gradient(135deg, #41ebeb, #2a5aa0);
}

.toggle-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.semester-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.semester-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: linear-gradient(135deg, #4a90e2, #357bd4);
}

.semester-link {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: 0.3s ease;
}

.semester-link:last-child {
  border-right: none;
}

.semester-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

.semester-link.active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 700;
  border-bottom: 3px solid white;
}

.semester-menu.hidden {
  display: none !important;
}

/* Responsive: Small screens (600px and below) */
@media (max-width: 600px) {
  .semester-toggle {
    display: flex;
  }

  .semester-menu {
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .semester-menu.show {
    max-height: 400px;
  }

  .semester-link {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
  }

  .semester-link:last-child {
    border-bottom: none;
  }

  .semester-link.active {
    border-bottom: 3px solid white;
    background: rgba(255, 255, 255, 0.25);
  }
}

/* Dark mode support for semester nav */
body.dark-mode .semester-nav {
  background: linear-gradient(135deg, #a0b8d4, #1e3f5c);
}

body.dark-mode .semester-toggle {
  background: linear-gradient(135deg, #2d5a8c, #1e3f5c);
}

body.dark-mode .semester-toggle:hover {
  background: linear-gradient(135deg, #1e3f5c, #0d2438);
}

body.dark-mode .semester-menu {
  background: linear-gradient(135deg, #2d5a8c, #1e3f5c);
}