/* Course Manager Frontend Styles */

#course-manager-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Search and Filter Container */
.course-search-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(3, 52, 89, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.course-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(3, 52, 89, 0.2);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.course-search-input:focus {
    outline: none;
    border-color: #033459;
    box-shadow: 0 0 0 3px rgba(3, 52, 89, 0.1);
}

.search-button {
    background: linear-gradient(135deg, #033459, rgba(3, 52, 89, 0.8));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 52, 89, 0.3);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: center;
}

.filter-select,
.filter-input {
    padding: 10px 14px;
    border: 2px solid rgba(3, 52, 89, 0.2);
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #033459;
    box-shadow: 0 0 0 3px rgba(3, 52, 89, 0.1);
}

.course-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(3, 52, 89, 0.2);
    font-size: 14px;
    color: rgba(3, 52, 89, 0.7);
}

.clear-filters-btn {
    background: transparent;
    border: 1px solid rgba(3, 52, 89, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    color: rgba(3, 52, 89, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: rgba(3, 52, 89, 0.05);
    border-color: rgba(3, 52, 89, 0.4);
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Responsive grid adjustments */
@media (min-width: 768px) {
    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (min-width: 1200px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Course Card */
.course-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(3, 52, 89, 0.1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(3, 52, 89, 0.15);
}

.course-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(3, 52, 89, 0.1);
}

.course-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    color: #033459;
}

.course-member {
    font-size: 14px;
    color: #FDB13E;
    font-weight: 600;
}

.course-meta {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.course-category,
.course-level,
.course-duration {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-category {
    background: rgba(253, 177, 62, 0.2);
    color: rgba(253, 177, 62, 0.8);
}

.course-level {
    background: rgba(3, 52, 89, 0.2);
    color: rgba(3, 52, 89, 0.8);
}

.course-duration {
    background: rgba(3, 52, 89, 0.1);
    color: rgba(3, 52, 89, 0.7);
}

.course-locations {
    padding: 0 20px 12px;
    font-size: 14px;
    color: rgba(3, 52, 89, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-description,
.course-objectives,
.course-prerequisites {
    padding: 0 20px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(3, 52, 89, 0.8);
    flex-grow: 1;
}

.course-description {
    color: rgba(3, 52, 89, 0.9);
}

.course-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(3, 52, 89, 0.1);
    background: rgba(3, 52, 89, 0.02);
    margin-top: auto;
}

.course-read-more {
    display: inline-block;
    background: linear-gradient(135deg, #FDB13E, rgba(253, 177, 62, 0.8));
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.course-read-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 177, 62, 0.3);
    text-decoration: none;
    color: white;
}

/* Course detail page */
.course-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(3, 52, 89, 0.1);
}

.course-detail-header {
    border-bottom: 2px solid rgba(3, 52, 89, 0.1);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.course-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #033459;
    margin: 0 0 10px;
}

.course-detail-member {
    font-size: 16px;
    color: #FDB13E;
    font-weight: 600;
    margin-bottom: 15px;
}

.course-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.course-detail-section {
    margin-bottom: 25px;
}

.course-detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #033459;
    margin: 0 0 10px;
    border-left: 4px solid #FDB13E;
    padding-left: 12px;
}

.course-detail-section p {
    line-height: 1.6;
    color: rgba(3, 52, 89, 0.8);
    margin: 0;
}

.course-external-link {
    display: inline-block;
    background: linear-gradient(135deg, #033459, rgba(3, 52, 89, 0.8));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.course-external-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 52, 89, 0.3);
    text-decoration: none;
    color: white;
}

.back-to-courses {
    display: inline-block;
    color: #033459;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
}

.back-to-courses:hover {
    color: #FDB13E;
    text-decoration: none;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: rgba(3, 52, 89, 0.7);
}

/* No courses found */
.no-courses-found {
    text-align: center;
    padding: 60px 20px;
    color: rgba(3, 52, 89, 0.7);
    grid-column: 1 / -1;
}

.no-courses-found h3 {
    margin: 0 0 12px;
    color: #033459;
    font-size: 20px;
}

.no-courses-found p {
    margin: 0;
    font-size: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    #course-manager-frontend {
        padding: 16px;
    }
    
    .course-search-container {
        padding: 20px;
    }
    
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .course-results-info {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .course-card {
        border-radius: 12px;
    }
    
    .course-header {
        padding: 16px 16px 12px;
    }
    
    .course-meta {
        padding: 12px 16px;
    }
    
    .course-locations,
    .course-description,
    .course-objectives,
    .course-prerequisites {
        padding: 0 16px 12px;
    }
    
    .course-footer {
        padding: 12px 16px;
    }
    
    .course-title {
        font-size: 16px;
    }
    
    .course-detail {
        margin: 10px;
        padding: 16px;
    }
    
    .course-detail-title {
        font-size: 24px;
    }
}

/* Animation for loading new content */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeIn 0.3s ease-out;
}
