/* Topics Styles */
.notes-container {
  display: grid;
  grid-auto-rows: auto;
  gap: 10px;
  height: auto;
}

.topic-header {
  margin-top: 18px;
  height: 10%;
  background-color: rgb(40, 40, 40);
  font-size: 40px;
  font-weight: 550;
  border-radius: 10px;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.pdf-containers {
  height: 100%;
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  width: 100%;
  background-color: rgb(40, 40, 40);
  border-radius: 7px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: 0.3s;
}

.pdf-containers > div {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 10px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.pdf-containers iframe {
  border-radius: 7px;
  margin: 0 20px 10px;
  aspect-ratio: 16/9;
}

.notes-container a,
.notes-container a .pdf-containers,
.notes-container a .pdf-containers > div {
  text-decoration: none;
  color: white;
  font-size: 40px;
  font-weight: 500;
  margin: 0;
  padding: 10px 0;
}

.pdf-containers:hover {
  background-color: rgb(50, 50, 50);
  border: 1px solid white;
  cursor: pointer;
  transition: 0.3s;
}
.pdf-containers:active {
  background-color: rgb(60, 60, 60);
  border: 2px solid white;
  cursor: pointer;
  transition: 0.3s;
}

.choose-video-btn {
  border: 0;
  border-radius: 5px;
  color: white;
  background-color: rgb(60, 60, 60);
  font-size: 17px;
  margin: 15px 0 6px;
  width: 50%;
  padding: 3px 0;
}

.choose-video-btn:hover {
  background-color: rgb(70, 70, 70);
  cursor: pointer;
  transition: 0.1s;
}
.choose-video-btn:active {
  background-color: rgb(60, 60, 60);
  border: 1px solid white;
  cursor: pointer;
  transition: 0.1s;
}

@media (max-width: 450px) {
  .notes-container { grid-template-columns: 1fr; height: 70%; }
}
@media (min-width: 451px) and (max-width: 750px) {
  .notes-container { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 751px) and (max-width: 999px) {
  .notes-container { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1000px) {
  .notes-container { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

@media (max-width: 1000px) {
  .pdf-containers { font-size: 16px; }
  .choose-video-btn { font-size: 10px; }
}
@media (min-width: 1500px) {
  .pdf-containers { font-size: 26px; }
  .choose-video-btn { font-size: 17px; }
}

/* Video Player Styles */
.video-popup {
  display: none;
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(60, 60, 60);
  border: 1px solid rgb(40, 40, 40);
  border-radius: 10px;
  z-index: 1000;
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
  width: 80%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.video-list { list-style: none; padding: 0; }
.video-list li { cursor: pointer; padding: 8px; border-bottom: 1px solid #000; }
.video-list li:hover { background: #615b5b; }
.popup-close { float: right; cursor: pointer; font-size: 25px; color: #fff; }

#video-btn,
#note-btn,
#pastpaper-btn {
  box-sizing: border-box;
  /*height: 7%;*/
  padding: 5px;
  background-color: rgb(40, 40, 40);
  font-size: 30px;
  /*font-weight: 550;*/
  border-radius: 10px;
  border: 2px solid rgb(30, 30, 30);
  margin: 10px 0 10px 0;
  color: white;
  transition: 0.15s;
}

#video-btn a,
#note-btn a,
#pastpaper-btn a {
  box-sizing: border-box;
  text-decoration: none;
  color: white;
  height: 100%;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#video-btn:active, #note-btn:active, #pastpaper-btn:active {
  background-color: rgb(60, 60, 60);
  border: 2px solid white;
}

#btn-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 7px; 
  position: sticky;
  top: 80px; 
  z-index: 100;
  justify-self: center;
}

h2 {
  border-left: 1px solid white;
  padding-left: 10px;
  margin-top: 50px;
}

#videos,
#notes,
#pastpapers {
  scroll-margin-top: 150px;
}