/* =================================================== */
/* === GLOBAL & FOUNDATIONAL STYLES === */
/* =================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Arial', sans-serif; /* Roboto is primary, Arial is fallback */
}

/* The NEW, CRITICAL rule for all images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  background-color: #f5f5f5;
  font-size: 12px;
  color: #333;
}

/* A general wrapper for all pages */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =================================================== */
/* === SIDEBAR STYLES (One set of rules) === */
/* =================================================== */

/* Base style for ALL sidebars */
.sidebar {
  background-color: #8bb3c9;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0; /* Prevents shrinking */
}

.sidebar img {
  margin-bottom: 12px;
}

.sidebar nav a {
  display: block;
  color: #000;
  text-decoration: none;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  margin: 4px 0;
}

/* Modifier for the WIDE sidebar on course pages */
.sidebar--wide {
  width: 120px;
}
.sidebar--wide img {
  width: 50px;
}
.sidebar--wide nav a {
  font-size: 10px;
}

/* Modifier for the NARROW sidebar on the dashboard */
.sidebar--narrow {
  width: 80px;
}
.sidebar--narrow img {
  width: 40px;
}
.sidebar--narrow nav a {
  font-size: 9px;
}

/* Active link style for ANY sidebar */
.sidebar nav a.active {
  background-color: rgba(255, 255, 255, 0.3);
  font-weight: bold;
}


/* =================================================== */
/* === MAIN CONTENT & HEADER === */
/* =================================================== */

/* This container holds the header and the main content */
.content-container {
  flex-grow: 1; /* Allows this to fill remaining space */
  display: flex;
  flex-direction: column;
}

/* The main header for the top of the page */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
}

.main-header .logo-text {
  font-weight: bold;
  color: #8bb3c9;
  font-size: 16px;
}

.main-header .search-bar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.main-header input[type="search"] {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 250px;
}

.main-header .user-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-header .user-actions .profile-pic {
  width: 32px;
  height: 32px;
  background-color: #ccc;
  border-radius: 50%;
}

/* The main content area for ANY page */
.main-content {
  flex-grow: 1;
  padding: 20px;
}

/* =================================================== */
/* === PAGE-SPECIFIC COMPONENTS === */
/* =================================================== */

/* --- Dashboard Components --- */

.welcome h2 {
  font-size: 14px;
  margin-bottom: 4px;
}
.welcome p {
  font-size: 12px;
  color: #666;
}

.info-cards {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}
.info-card {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #e0e0e0;
}
.info-card:hover {
  border-color: #8bb3c9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.info-card strong {
  font-size: 20px;
  display: block;
  margin-top: 5px;
}

.recent-list {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}
.recent-list h3 {
  font-size: 14px;
  margin-bottom: 10px;
}
.recent-list-item {
  border-top: 1px solid #eee;
  padding: 10px 0;
  font-size: 12px;
}
.recent-list-item:first-of-type {
  border-top: none;
  padding-top: 0;
}


/* --- Course Detail Page Components --- */

.breadcrumbs {
  font-size: 11px;
  color: #555;
  margin-bottom: 25px;
}
.breadcrumbs a {
  color: #8bb3c9;
  text-decoration: none;
}
.course-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}
.course-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  font-size: 12px;
}
.course-meta .instructor-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.course-meta img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.course-section {
  margin-top: 30px;
}
.course-section h2 {
  font-size: 16px;
  margin-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 5px;
}
.course-section p {
  font-size: 13px;
  line-height: 1.6;
}
.pengajar-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}
.pengajar-section img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.materi-list {
  list-style: none;
  margin-top: 15px;
}
.materi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  margin-bottom: 10px;
}
.materi-item-title::before {
  content: '✓';
  color: #8bb3c9;
  font-weight: bold;
  font-size: 16px;
  margin-right: 10px;
}
.materi-item-details {
  color: #777;
}

/* =================================================== */
/* === PENGUMUMAN (ANNOUNCEMENT) PAGE COMPONENTS === */
/* =================================================== */

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.content-header .search-bar input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 300px;
}

.content-header .logout-button {
  padding: 8px 20px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.announcement-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.announcement-controls h1 {
  font-size: 24px;
}

.announcement-controls .filter-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.announcement-controls .filter-actions span,
.announcement-controls .filter-actions .icon-button {
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.announcement-controls .icon-button {
    font-size: 20px;
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}

.announcement-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.announcement-item .item-icon {
  font-size: 24px;
  color: #8bb3c9;
  flex-shrink: 0;
}

.announcement-item .item-details p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.announcement-item .item-details span {
  font-size: 12px;
  color: #777;
}

/* =================================================== */
/* === SITE FOOTER === */
/* =================================================== */

.site-footer {
  margin-top: auto; /* Pushes footer to the bottom */
  padding: 30px;
  background-color: #8bb3c9; /* Simple blue background */
  /* For the striped look, you can use a gradient: */
  /* background-image: repeating-linear-gradient(45deg, #82a9be, #82a9be 20px, #8bb3c9 20px, #8bb3c9 40px); */
  color: #fff;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo img {
  width: 80px;
}

.footer-contact p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.footer-socials a {
  color: white;
  text-decoration: none;
  font-size: 24px;
}

/* =================================================== */
/* === PENGUMUMAN (ANNOUNCEMENT) PAGE COMPONENTS === */
/* =================================================== */

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.content-header .search-bar input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 300px;
}

.content-header .logout-button {
  padding: 8px 20px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.announcement-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.announcement-controls h1 {
  font-size: 24px;
}

.announcement-controls .filter-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.announcement-controls .filter-actions span,
.announcement-controls .filter-actions .icon-button {
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.announcement-controls .icon-button {
    font-size: 20px;
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}

.announcement-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.announcement-item .item-icon {
  font-size: 24px;
  color: #8bb3c9;
  flex-shrink: 0;
}

.announcement-item .item-details p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.announcement-item .item-details span {
  font-size: 12px;
  color: #777;
}

/* =================================================== */
/* === LESSON PAGE & CLICKABLE MATERI LIST === */
/* =================================================== */

/* This makes the whole list item a clickable block without ugly underlines */
.materi-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px; /* Match the item's radius for a better hover effect */
}

/* We use a specific class for the clickable list to avoid affecting other lists */
.materi-list--clickable {
  list-style: none;
  margin-top: 15px;
  padding: 0; /* Resets default list padding */
}

/* Lesson Page Specific Styles */
.lesson-header {
  margin-bottom: 30px;
}

.lesson-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.lesson-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.lesson-content .video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #e0e0e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #777;
  margin: 30px 0;
}

.lesson-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.lesson-nav-button {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s, border-color 0.2s;
}

.lesson-nav-button:hover {
  background-color: #f5f5f5;
  border-color: #8bb3c9;
}