@charset "UTF-8";

/* ============================
   CSS RESET / BASE STYLES
=============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    background-color: #fefefe;
    color: #333;
}

/* ============================
   COURSE OVERVIEW + CARDS
=============================== */
.course-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.course-card {
    display: block;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 16px;
    margin: 12px;
    text-align: center;
    width: 200px;
    background-color: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.course-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.course-card h3 {
    margin-top: 12px;
    font-size: 1.2em;
}

.course-card p {
    margin-top: 8px;
    color: #555;
}

.course-card .badge {
    display: inline-block;
    margin-top: 6px;
    margin-right: 5px;
    padding: 3px 8px;
    font-size: 0.75em;
    background-color: #e0f0ff;
    color: #0366d6;
    border-radius: 4px;
}

/* ============================
   FILTER FORM STYLING
=============================== */
.filter-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form select,
.filter-form input[type="text"] {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.apply-button,
.clear-button {
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
}

.apply-button:hover,
.clear-button:hover {
    background-color: #eaeaea;
}

/* ============================
   CATEGORY SELECTOR (Sidebar/Block)
=============================== */
#categorySelector {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#categorySelector label {
    font-weight: normal;
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
}

#categoryList {
    margin-top: 10px;
}

#categoryList div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

#categoryList input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

#categoryList input[type="radio"]:checked + label {
    font-weight: bold;
    color: #4CAF50;
    background-color: #eaffea;
    padding: 2px 5px;
    border-radius: 4px;
}

/* ============================
   RESPONSIVE DESIGN
=============================== */
@media (max-width: 768px) {
    .course-grid {
        flex-direction: column;
        align-items: center;
    }

    .course-card {
        width: 90%;
    }

    .filter-form {
        flex-direction: column;
        gap: 10px;
    }

    .filter-form select,
    .filter-form input[type="text"],
    .apply-button,
    .clear-button {
        width: 100%;
    }
}

.access-denied-box {
    margin: 100px auto;
    width: 400px;
    text-align: center;
    background: #ffecec;
    border: 1px solid #ff0000;
    padding: 30px;
    border-radius: 8px;
}