/* ============================================================
   创客智诚官网 - 在线课程页面样式
   Brand: Red #C8102E | Navy #1B3A5C
   ============================================================ */

/* ========== Filter Bar ========== */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid var(--navy);
    background: transparent;
    color: var(--navy);
    font-size: 0.95em;
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--navy);
    color: #fff;
}

/* ========== Course Cards Grid ========== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Free Badge */
.course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
}
.free-badge {
    background: var(--red);
    color: #fff;
}

/* Thumbnail */
.course-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vision-bg { background: linear-gradient(135deg, #1B3A5C 0%, #2a5f8f 100%); }
.audio-bg  { background: linear-gradient(135deg, #C8102E 0%, #e8475f 100%); }
.data-bg   { background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%); }
.iot-bg    { background: linear-gradient(135deg, #059669 0%, #34d399 100%); }

.thumb-icon {
    font-size: 3.5em;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

/* Card Body */
.course-body {
    padding: 24px;
}
.course-body h3 {
    font-size: 1.15em;
    color: var(--dark);
    margin-bottom: 8px;
}
.course-body h3 a {
    color: var(--dark);
    transition: var(--transition);
}
.course-body h3 a:hover {
    color: var(--red);
}
.course-desc {
    font-size: 0.92em;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Meta Info */
.course-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.85em;
    color: var(--gray);
}
.meta-item strong {
    color: var(--dark);
}
.tag-vision { background: var(--navy-light); color: var(--navy); padding: 3px 12px; border-radius: 20px; font-size: 0.9em; }
.tag-audio  { background: var(--red-light); color: var(--red); padding: 3px 12px; border-radius: 20px; font-size: 0.9em; }
.tag-data   { background: rgba(107,114,128,0.1); color: #6b7280; padding: 3px 12px; border-radius: 20px; font-size: 0.9em; }
.tag-iot    { background: rgba(5,150,105,0.1); color: #059669; padding: 3px 12px; border-radius: 20px; font-size: 0.9em; }

/* Progress Bar */
.course-progress-demo {
    margin-top: 8px;
}
.progress-label {
    font-size: 0.8em;
    color: var(--gray);
    margin-bottom: 4px;
}
.progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 3px;
    transition: width 0.6s ease;
}
.progress-fill.full {
    background: #ccc;
}
.progress-fill.soon {
    background: #059669;
}
.progress-text {
    font-size: 0.78em;
    color: #999;
}

/* ========== Try Steps ========== */
.try-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}
.step-card {
    text-align: center;
    padding: 32px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 1.3em;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.step-card  h3 {
    color: var(--dark);
    margin-bottom: 8px;
}
.step-card p {
    color: var(--gray);
    font-size: 0.9em;
    line-height: 1.5;
}

/* ========== Outline Download Cards ========== */
.outline-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 800px;
    margin: 40px auto 0;
}
.outline-card {
    text-align: center;
    padding: 40px 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--red);
    transition: var(--transition);
}
.outline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.outline-icon {
    font-size: 3em;
    margin-bottom: 16px;
}
.outline-card  h3 {
    color: var(--dark);
    margin-bottom: 10px;
}
.outline-card p {
    color: var(--gray);
    font-size: 0.92em;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ========== Hide filtered cards ========== */
.course-card.hidden {
    display: none;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .try-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .courses-grid { grid-template-columns: 1fr; }
    .try-steps { grid-template-columns: 1fr; max-width: 360px; margin: 40px auto 0; }
    .outline-cards { grid-template-columns: 1fr; }
}
