/* =================== BASE =================== */
body {
  font-family: 'Georgia', serif;
  margin: 0;
  padding: 0;
  background: #f2e8e84d;
  color: #2a1a1a;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #822433, #a32f46);
  padding: 2rem;
  text-align: center;
  border-bottom: 3px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
}

header p {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  color: #ffffffcc;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

h2 {
  color: #822433;
  border-bottom: 2px solid #a32f46;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.highlight {
  color: #a32f46;
  font-weight: bold;
}

/* =================== SEARCH & FILTERS =================== */
.search-box {
  width: -webkit-fill-available;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border: 1px solid #822433;
  background: #f5dede;
  color: #822433;
  font-size: 1rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-box:focus {
  outline: none;
  border-color: #a32f46;
  box-shadow: 0 0 10px #a32f46aa inset;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.filters select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #822433;
  background: #f5dede;
  color: #822433;
  font-size: 0.95rem;
  transition: all 0.3s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 5'%3E%3Cpath fill='%23822433' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.6rem auto;
  padding-right: 2rem;
}

.filters select:focus,
.filters select:hover {
  outline: none;
  border-color: #a32f46;
  box-shadow: 0 0 6px #a32f46aa inset;
}

/* =================== PDF LIST =================== */
#pdf-list {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 65vh;
  overflow-y: auto;
}

#pdf-list li {
  margin: 0.7rem 0;
  border-left: 4px solid #822433;
  background: #f8e6e6;
  border-radius: 4px;
  transition: background 0.3s, transform 0.2s;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
}

#pdf-list li:hover {
  background: #f0c0c0;
  transform: translateY(-3px);
}

#pdf-list a {
  color: #822433;
  text-decoration: none;
  font-weight: bold;
}

#pdf-list a:hover {
  color: #a32f46;
  text-decoration: underline;
}

#pdf-list .course-title {
  color: #822433;
  text-decoration: none;
  font-weight: bold;
}

#pdf-list .course-title:hover {
  color: #a32f46;
  text-decoration: underline;
}

/* =================== COURSE BADGE =================== */
.course-badge {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-info {
  /* display: flex;
  flex-direction: column; */
}

.course-filters {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.pdf-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
}

.pdf-badge.faculty { background-color: #822433; }
.pdf-badge.level { background-color: #a32f46; }

/* =================== EXPANDABLE DETAILS =================== */
.course-details {
  width: 100%;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, padding 0.4s ease;
  /* padding: 0 0.5rem; */
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.3rem;
  /* border-top: 1px solid #a32f46; */
}

.course-details.expanded {
  max-height: 500px;
  /* padding: 0.5rem; */
}

.course-details div {
  margin-bottom: 0.3rem;
}

.download-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #fcf8f8;
  color: #fff;
  /* border: 1px solid #a32f46; */
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.3s;
}

/* =================== FOOTER =================== */
footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #a32f46;
  font-size: 0.9rem;
  background: white;
  color: #822433;
  margin-top: 3rem;
}

/* =================== BUTTONS =================== */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn-primary {
  background-color: #822433;
  color: #fff;
  font-weight: bold;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-primary:hover { background-color: #a23745; }

.btn-secondary {
  background-color: #f4f0f1;
  color: #822433;
  font-weight: bold;
  padding: 0.7rem 1.3rem;
  border: 2px solid #822433;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover {
  background-color: #822433;
  color: #fff;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 600px) {
  header h1 { font-size: 2rem; }
  header p { font-size: 1rem; }
  .search-box { font-size: 0.95rem; }
  .filters { flex-direction: column; }


  .course-summary {
  flex-direction: column;
  align-items: baseline;
  gap: 10px;
  }
}



.notes-link {
  display: inline-block;
  background-color: #f4f0f1;
  color: #822433;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #822433;
  transition: background 0.3s, color 0.3s;
}

.notes-link:hover {
  background-color: #822433;
  color: #fff;
}
