/* /assets/css/public_courses.css */

:root {
    --primary-blue: #1a237e;
    --accent-gold: #d8b704;
    --light-bg: #f8f9fa;
    --card-bg-light: #ffffff;
    --border-light: #e9ecef;
    --text-dark: #212529;
    --text-muted: #6c757d;

    --card-bg-dark: #343a40;
    --border-dark: #495057;
    --text-light: #f8f9fa;
    --text-muted-dark: #adb5bd;
}

/* 1. Page Hero Section ================================================= */
.courses-hero {
    background: linear-gradient(135deg, var(--primary-blue), #303f9f);
    color: var(--text-light);
    padding: 2.5rem;
    border-radius: 1rem;
    margin-bottom: 2.5rem;
    text-align: center;
}
.courses-hero h1 {
    font-weight: 700;
}

/* 2. Filter Bar ======================================================== */
.filter-bar {
    background-color: var(--card-bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 2.5rem;
}

.filter-bar .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-bar .form-select {
    border-radius: 8px;
    padding: 10px;
}

.filter-bar .btn-filter {
    background-color: var(--accent-gold);
    color: var(--text-dark);
    font-weight: 700;
    padding: 10px;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}
.filter-bar .btn-filter:hover {
    background-color: #c9a803;
    transform: scale(1.03);
}

/* 3. Course Card (Adapted from my_courses.css) ========================= */
.course-card {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.course-card-img-container {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.course-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}
.price-tag.free { background-color: #28a745; }
.price-tag.paid { background-color: var(--accent-gold); color: var(--text-dark);}

.course-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #343a40;
}

.thematic-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.course-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-grow: 1; /* Pushes the footer down */
}

.course-card-footer {
    margin-top: 1rem;
}

.btn-view-details {
    background-color: var(--primary-blue);
    color: white;
    font-weight: 500;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
}
.btn-view-details:hover {
    background-color: #151c6a;
    color: white;
}

/* 4. Pagination ======================================================== */
.pagination .page-item .page-link {
    color: var(--primary-blue);
    border-radius: 6px;
    margin: 0 3px;
    border: 1px solid var(--border-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    z-index: 2;
}

.pagination .page-item .page-link:hover {
    background-color: #e3f2fd;
}

/* 5. Dark Mode Overrides =============================================== */
body.dark-mode .courses-hero { background: var(--card-bg-dark); }
body.dark-mode .filter-bar { background-color: var(--card-bg-dark); border-color: var(--border-dark); }
body.dark-mode .filter-bar .form-label { color: var(--text-muted-dark); }
body.dark-mode .filter-bar .form-select { background-color: var(--dark-bg); color: var(--text-light); border-color: var(--border-dark); }
body.dark-mode .course-card { background-color: var(--card-bg-dark); border-color: var(--border-dark); }
body.dark-mode .course-card-title { color: var(--text-light); }
body.dark-mode .thematic-tag, body.dark-mode .course-description { color: var(--text-muted-dark); }
body.dark-mode .pagination .page-item .page-link { background-color: var(--card-bg-dark); color: var(--text-light); border-color: var(--border-dark); }
body.dark-mode .pagination .page-item.active .page-link { background-color: var(--primary-blue); }