:root {
  /* ===== BRAND COLORS ===== */

  --bg-main: #f5f7fb;         /*Main background color (#f5f7fb)*/

  --banner-bg: #ffffff;       /*Banner background color (#0b3d91)*/
  --banner-text: #1313F9;     /*Banner text color (#ffffff)*/

  --primary-color: #1313F9;   /*Primary Button background color (#0b3d91)*/
  --primary-text: #ffffff;    /*Primary Button text color (#ffffff)*/

  --secondary-color: #C01B00; /*Secondary Button background color (#ffbe0b)*/
  --secondary-text: #ffffff;  /*Secondary Button text color (#000000)*/


}

/* ===== GLOBAL ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--bg-main);
}

.header {
  text-align: center;
  padding: 1.5rem 2rem;
  background: var(--banner-bg);
  color: var(--banner-text);
}

.header-content {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start; /* keeps it centered overall */
  gap: 20px;
  padding-left: 2rem;

  /*Original
  justify-content: center;
  no padding-left
  */
}

.logo {
  height: 150px;
  margin-top: -10px;
  width: auto;
  object-fit: contain;
}

.header-text {
  text-align: left;
}

.catalog-title {
  margin: 0;
  line-height: 1.2;
}

/* ===== FILTER BUTTON ===== */
.filter-toggle {
  margin: 0;
  padding: 10px 16px;
  background: var(--primary-color);
  color: var(--primary-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== FILTER DRAWER ===== */
.filter-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
}

.filter-panel {
  width: 300px;
  height: 100%;
  background: white;
  padding: 20px;
  overflow-y: auto;

  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.filter-drawer:not(.hidden) .filter-panel {
  transform: translateX(0);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-actions {
  display: flex;
  gap: 6px;
}

.filter-actions button {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #eee;
}

#filter-close {
  cursor: pointer;
  font-size: 20px;
}

.filter-footer {
  margin-top: 20px;
}

/* ===== ACCORDION ===== */
.accordion-title {
  font-weight: bold;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
}

.accordion-content {
  display: none;
  padding-left: 10px;
}

.accordion.open .accordion-content {
  display: block;
}

.chevron {
  transition: transform 0.2s;
}

.accordion.open .chevron {
  transform: rotate(90deg);
}

.filter-option {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}

.filter-count {
  color: #888;
  font-size: 0.8rem;
}

/* ===== GRID ===== */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 280px));
  gap: 20px;
  padding: 2rem;
}

/* ===== CARD ===== */
.course-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.image-wrapper {
  position: relative;
  aspect-ratio: 4/3;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-id {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.course-id .label {
  font-weight: bold;
  color: black;
}

.course-id .value {
  color: black;
}

.course-title {
  font-weight: bold;
  margin: 6px 0;
  color: #0b3d91;

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-description {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 8px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-duration,
.course-deadline {
  font-size: 0.8rem;
  margin-top: 4px;
}

.course-duration .label,
.course-deadline .label {
  font-weight: bold;
}

/* ===== BUTTONS ===== */
.button-group {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding-top: 10px;
}

.btn {
  flex: 1;
  height: 40px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--primary-text);
}

.btn-accent {
  background: var(--secondary-color);
  color: var(--secondary-text);
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 900px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.modal-body {
  display: flex;
}

/* LEFT */
.modal-left {
  width: 40%;
  padding: 20px;
}

.modal-image-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

/* RIGHT */
.modal-right {
  width: 60%;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.modal-header h2 {
  margin-bottom: 8px;
}

.modal-id .label {
  font-weight: bold;
}

.modal-description {
  margin: 10px 0;
  max-height: 140px;
  overflow-y: auto;
}

/* DETAILS */
.modal-details {
  display: grid;
  gap: 6px;
}

/* TAGS */
.modal-tags {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: #e63946;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ACTIONS */
.modal-actions {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 10px;
}

/* CLOSE */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
  }

  .modal-left,
  .modal-right {
    width: 100%;
  }
}

.modal-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CARD BADGES ===== */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;

  font-size: 0.75rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 6px;

  white-space: nowrap;
  display: inline-block;

  /* 🔥 Key Improvements */
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);  /* depth */
  backdrop-filter: blur(2px);              /* subtle separation */
}

/* DLC (Red) */
.card-badge {
  background: #e63946;
  color: white;
}

/* Learning Series (Blue) */
.card-badge.learning-series {
  background: #0b3d91;
  color: white;
}

/* Microlearning (Yellow like button) */
.card-badge.microlearning {
  background: #ffbe0b;  /* same as your button */
  color: black;
}

/* ===== MODAL BADGE POSITIONING ===== */
.modal-image-wrapper {
  position: relative;
}

#modal-badge-container {
  position: absolute;
  top: 10px;
  left: 10px;
}

/* ===== BADGE HOVER EFFECT ===== */
.card-badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover .card-badge {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.filter-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 5px;
}

.filter-group select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.top-controls {
  display: flex;
  gap: 6px;              /* smaller space between buttons */
  margin: 1rem 0 1rem 2rem;  /* remove right margin push */
  align-items: center;
}

.btn-secondary {
  background: #eee;
  color: #333;
}

#show-all.hidden {
  display: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 5px;
}

.filter-group select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#show-all {
  background: #eee;
  color: #333;
}

/* TOPIC TAGS (Gray) */
.tag-pill.topic {
  background: #e0e0e0;
  color: #333;
}
