.courses-page {
    max-width: 1100px;
    margin: auto;
    padding: 1rem;
}

.page-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* FILTER */
/* ================= FILTER WRAPPER ================= */

.filter-wrapper {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}

/* Row layout */
.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

/* Fields */
.filter-field {
    display: flex;
    flex-direction: column;
}

.filter-field label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #555;
}

.filter-field input,
.filter-field select {
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #007bff;
}

/* Search field bigger */
.search-field input {
    height: 42px;
}

/* Actions */
.filter-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 1rem;
}

.btn-search {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
}

.btn-search:hover {
    background: #0056b3;
}

.btn-clear {
    background: #f1f1f1;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
}

.btn-clear:hover {
    background: #ddd;
}


/* COURSES GRID */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}


.no-results {
    text-align: center;
    grid-column: 1 / -1;
    color: #777;
}


.pagination {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.pagination .steps {
    display: flex;
    gap: 8px;
}

.pagination a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: whitesmoke;
    color: #333;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination .current {
    font-weight: bold;
    color: #555;
}

.pagination .current {
    background-color: #e9ecef;
    padding: 6px 12px;
    border-radius: 8px;
}

.request-course {
    background: #f9f9f9;
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.enroll-btn {
    display: inline-block;
    margin-top: 1rem;
    background: #28a745;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.enroll-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 95%;
    max-width: 450px;
    position: relative;
    animation: fadeIn 0.2s ease;
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.submit-btn {
    flex: 1;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.cancel-btn {
    flex: 1;
    background: #ddd;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.modal-box form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 15px;
}

/* Label styling */
.modal-box label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: #333;
}

/* Input + textarea base styling */
.modal-box input,
.modal-box textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: 0.2s ease;
    font-family: inherit;
}

/* Focus effect */
.modal-box input:focus,
.modal-box textarea:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Textarea sizing */
.modal-box textarea {
    resize: vertical;
    min-height: 90px;
}

/* Placeholder styling */
.modal-box input::placeholder,
.modal-box textarea::placeholder {
    color: #999;
    font-size: 13px;
}

/* Error styling */
.modal-box .errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
    color: #d32f2f;
    font-size: 13px;
}

.modal-box input.error,
.modal-box textarea.error {
    border-color: #d32f2f;
}

.submit-btn {
    flex: 1;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 11px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.submit-btn:hover {
    background: #256628;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .filter-actions {
        flex-direction: column;
    }

    .btn-search,
    .btn-clear {
        width: 100%;
        text-align: center;
    }
}