/* Layout */
.courses-wrap {
  display: flex;
  gap: 40px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

/* SIDEBAR */
.courses-sidebar {
  position: sticky;
  top: 100px;
  width: 300px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  font-family: "Roboto", sans-serif;
  height: max-content;
  z-index: 20;
}

/* Sidebar blocks */
.sidebar-title { font-weight: 600; font-size: 18px; margin-bottom: 12px; }
.filter-block { margin-top: 18px; }
.filter-block label { display:block; margin-bottom:6px; font-weight:500; }
.filter-block select, .filter-block input { width: 100%; padding: 10px; border-radius: 6px; border:1px solid #e2e6eb; }

/* Search */
.search-wrap { display: flex; align-items: center; gap: 8px; }
.search-wrap input[type="search"] { flex: 1; padding: 10px 12px; border:1px solid #e2e6eb; border-radius:6px; }
.search-wrap button { width:40px; height:40px; background:#11184A; color:#fff; border:none; border-radius:6px; cursor:pointer; }
.search-clear { margin-top:8px; background:transparent; border:none; color:#666; cursor:pointer; }

/* Categories */
.categories-block {
  background: #14264a;
  color: #fff;
  padding: 24px 16px;
  border-radius: 8px;
  margin-top: 22px;
}

.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  color: #e6eefc;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 6px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.category-btn:hover {
  background: #0d2a57;
  color: #fff;
}

.category-btn.active {
  background: #FCE570;
  color: #11184A;
  font-weight: 600;
}

/* MAIN */
.courses-main { flex:1; padding-left:30px; border-left:6px solid #14264a; }

/* Header + Controls */
.courses-main-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.courses-main-header .courses-title { font-size:40px; margin:0; letter-spacing:-1px; }
.view-controls .view-btn { border:1px solid #e2e6eb; background:#fff; padding:8px 10px; margin-left:6px; border-radius:6px; cursor:pointer; }
.view-controls .view-btn.active { background:#14264a; color:#fff; }

/* Course items */
.courses-list { display:flex; flex-direction:column; gap:20px; }

.course-item {
  position: relative;         /* For hover pseudo-element */
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  overflow: hidden;           /* Clip hover */
  transition: all 0.3s ease;
}

.course-link {
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px;              /* Inner spacing */
  border-radius: 10px;        /* Match wrapper */
  text-decoration: none;
  color: #11184A;
  position: relative;         /* For pseudo-element */
  z-index: 0;                 /* Content on top */
  cursor: pointer;
  transition: transform 0.2s ease;
}

.course-link::before {
  content: "";
  position: absolute;
  top:0; left:0;
  width:100%; height:100%;
  background: #FCE570 ;/* Soft yellow */
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1; /* <- place behind the text */
  color:#fff;
}

.course-link:hover::before {
  opacity: 1;
}

.course-link:hover {
  transform: translateY(-2px); /* Slight lift */
}

.course-title-item { font-size:18px; font-weight:600; color:#002366; margin:0 0 8px; }
.course-dates { color:#8a8f97; font-style:italic; }

/* Responsive */
@media (max-width:980px) {
  .courses-wrap { flex-direction:column; }
  .courses-sidebar { position: relative; top:auto; width:100%; margin-bottom:20px; }
  .courses-main { padding-left:0; border-left:none; }
}
