/**
 * Communiversity Core - Frontend Styles
 */

/* Project Cards */
.communiversity-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.project-card h3 a {
    color: #1a365d;
    text-decoration: none;
}

.project-card h3 a:hover {
    color: #2c5aa0;
}

.project-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.status-submitted {
    background: #fef3c7;
    color: #92400e;
}

.status-under-review {
    background: #dbeafe;
    color: #1e40af;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-active {
    background: #c7d2fe;
    color: #3730a3;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-archived {
    background: #e5e7eb;
    color: #374151;
}

.project-excerpt {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Resource Cards */
.communiversity-resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.resource-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.resource-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.resource-card h3 a {
    color: #1a365d;
    text-decoration: none;
}

.resource-excerpt {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.resource-download {
    display: inline-block;
    background: #2c5aa0;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.resource-download:hover {
    background: #1a365d;
    color: #fff;
}

.resource-license {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Single Project Page */
.single-cmvs_project .project-meta {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.single-cmvs_project .project-meta h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #374151;
}

.single-cmvs_project .project-meta dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.single-cmvs_project .project-meta dt {
    font-weight: 600;
    color: #4b5563;
}

.single-cmvs_project .project-meta dd {
    margin: 0;
    color: #1f2937;
}

/* Dashboard Widget */
.communiversity-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.communiversity-dashboard h2 {
    margin-bottom: 1.5rem;
    color: #1a365d;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h3 {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Moodle Course Link Button */
.moodle-course-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.moodle-course-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    color: #fff;
}

.moodle-course-link::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('../images/moodle-icon.svg') no-repeat center center;
    background-size: contain;
}

/* Responsive */
@media (max-width: 768px) {
    .communiversity-projects,
    .communiversity-resources {
        grid-template-columns: 1fr;
    }

    .single-cmvs_project .project-meta dl {
        grid-template-columns: 1fr;
    }

    .single-cmvs_project .project-meta dt {
        margin-top: 0.5rem;
    }
}
