/* Reset + base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    width: max-content;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 25px;
}

/* Header */
header {
  --background-color: #19077b;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #2e80e4;
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 10px 50px;
  transition: all 0.5s;
  z-index: 999;
  padding-bottom: 20px;
  position: relative;
 
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Layout */
.main-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Filters (left box) */
.filters {
    order: -1;
    flex: 0 0 280px; /* fixed width */
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-header h2 {
    font-size: 1.4rem;
    color: #1a6fc4;
}

.reset-btn {
    background: #f0f5ff;
    color: #1a6fc4;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.reset-btn:hover {
    background: #e0ebff;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #444;
    display: flex;
    align-items: center;
}
.filter-group h3 i {
    margin-right: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom checkboxes */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f5f7fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: #eef4ff;
    border-color: #1a6fc4;
}
.checkbox-container input:checked ~ .checkmark {
    background-color: #1a6fc4;
    border-color: #1a6fc4;
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 15px;
}
.search-box input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

/* Courses (right side) */
.course-results {
    flex: 1;
    min-width: 0;
}

/* Results header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.results-header h2 {
    font-size: 1.6rem;
    color: #333;
}
.results-count {
    color: #666;
    font-size: 0.95rem;
}

/* Applied filters */
.applied-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.filter-tag {
    background: #eef4ff;
    color: #1a6fc4;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-tag i {
    cursor: pointer;
    font-size: 0.8rem;
}
.filter-tag i:hover {
    color: #0c4a8f;
}

/* Courses grid */
.courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px;
}

/* Ensure min 2 cards per row on medium screens */
@media (min-width: 620px) {
    .courses-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Course card */
.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.course-header {
    padding: 20px;
    background: linear-gradient(135deg, #1a6fc4, #0c4a8f);
    color: white;
}
.course-type {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 5px;
}
.course-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.course-stream {
    font-size: 0.9rem;
    opacity: 0.9;
}
.course-details {
    padding: 20px;
}
.course-duration {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}
.course-duration i {
    margin-right: 8px;
    color: #1a6fc4;
}
.course-spec {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* No results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #888;
}
.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}
.no-results h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #666;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    .filters {
        width: 100%;
        max-height: none;
    }
    .courses-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    header h1 {
        font-size: 2rem;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .courses-container {
        grid-template-columns: 1fr;
    }
}
