* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}


/* Main Content Laout */
main {
  display: flex;
  flex-direction: row;
  max-width: 1200px;
  margin: 2rem auto;
  gap: 2rem;
  padding: 60 1rem;
}

.viewer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#content-viewer {
  background-color: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  min-height: 400px;
  transition: opacity 0.3s ease;
}

.next-button {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #106750;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  align-self: center;
  transition: background-color 0.2s ease;
}

.next-button:hover {
  background-color: #0b503c;
}

.next-button:focus {
  outline: 2px solid #0b503c;
  outline-offset: 2px;
}

/* Sidebar Styles */
.sidebar {
  width: 350px;
    background-color: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.sidebar h2 {
  color: #106750;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-item {
  display: flex;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.sidebar-item:hover {
  background-color: #f0f9f6;
  transform: translateY(-2px);
}

.sidebar-item.active {
  background-color: #e0f2ed;
  border-left: 4px solid #106750;
}

.sidebar-item .thumbnail {
  width: 80px;
  height: 60px;
  margin-right: 1rem;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-item .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-item .item-text h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #106750;
}

.sidebar-item .item-text p {
  font-size: 0.875rem;
  color: #666;
}


/* Ctent Styling */
.content-video {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.content-image {
  max-width: 100%;
  border-radius: 4px;
}

.content-image-caption {
  margin-top: 1rem;
  font-style: italic;
  color: #666;
}

.content-article {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 1rem;
}

.content-article h2 {
  color: #106750;
  margin-bottom: 1rem;
}

.content-article p {
  margin-bottom: 1rem;
}

/* Anim for ctent transition */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Responsive Styles */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    max-height: none;
    margin-top: 2rem;
  }
  
  header {
    flex-wrap: wrap;
  }
  
  .search-container {
    order: 3;
    max-width: 100%;
    margin-top: 1rem;
    width: 100%;
  }
  
  .logo, .profile {
    order: 1;
  }
}

/* Acesility Focus Styles */
a:focus, button:focus, input:focus, .sidebar-item:focus-visible {
  outline: 2px solid #106750;
  outline-offset: 2px;
}
