/* === VIDEO STYLES === */
/* YouTube video container styles */
.video-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.video-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border-top: 3px solid #a51c30;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-thumbnail iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-details {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 1.2rem;
  color: #a51c30;
  margin-bottom: 10px;
  font-weight: 600;
}

.video-description {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1;
}

.video-link {
  margin-top: auto;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #eee;
  text-align: center;
  transition: all 0.3s ease;
}

.video-link:hover {
  background-color: #f1f1f1;
  border-color: #ddd;
}

.video-link a {
  color: #a51c30;
  text-decoration: none;
  font-weight: 500;
  display: block;
}

.video-link a i {
  margin-right: 5px;
}

/* Semestre toggles */
.semestre-switcher { 
  display: flex; 
  justify-content: center; 
  gap: 14px; 
  margin: 22px 0; 
}

.semestre-btn { 
  padding: 12px 18px; 
  border-radius: 999px; 
  border: 2px solid #a51c30; 
  background: white; 
  color: #a51c30; 
  font-weight: 700; 
  cursor: pointer; 
}

.semestre-btn.active { 
  background: #a51c30; 
  color: white; 
}

.semestre-section { 
  display: none; 
  margin-bottom: 30px; 
}

.semestre-section.active { 
  display: block; 
}

.category-title {
  color: #a51c30;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.category-section {
  margin-bottom: 50px;
}

.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #a51c30;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0.8;
  transform: translateY(100px);
}

.back-to-top.visible {
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #8a1829;
  opacity: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.channel-info {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
  text-align: center;
}

.subscribe-button {
  display: inline-block;
  background-color: #ff0000;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin: 20px 0;
  transition: background-color 0.3s;
}

.subscribe-button:hover {
  background-color: #cc0000;
  text-decoration: none;
  color: white;
}

.subscribe-button i {
  margin-right: 8px;
}

.subject-title {
  color: #a51c30;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.chapter-title {
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #333;
  border-left: 3px solid #a51c30;
  padding-left: 10px;
}