/* ========================================
   COURSES PAGE - Clean Minimal Style
   ======================================== */

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
}

main {
    overflow-x: hidden;
}

/* HERO SECTION */
.courses-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 15px 15px;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

/* Stats - Horizontal row */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    max-width: 100px;
    min-width: 80px;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: #7c97ff;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    margin-top: 3px;
    white-space: nowrap;
}

/* FILTER SECTION */
.courses-filter {
    padding: 12px 10px;
    position: sticky;
    top: 65px;
    z-index: 50;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 5px;
    margin: 0 auto;
}

.filter-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
    color: #fff;
    background: #7c97ff;
    border-color: #7c97ff;
}

/* COURSES SECTION */
.courses-section {
    padding: 25px 15px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 40px;
}

/* NO COURSES MESSAGE */
.no-courses {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-courses p {
    font-size: 1rem;
}

/* COURSE CARD */
.course-card {
    background: rgba(20, 20, 28, 0.9);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Course Image - 4:5 Instagram format */
.course-image-container {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 Aspect Ratio (5/4 = 1.25 = 125%) */
    overflow: hidden;
}

.course-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status Badge */
.course-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-status.status-active {
    background: #00ff88;
    color: #000;
}

.course-status.status-upcoming {
    background: #ffbd2e;
    color: #000;
}

.course-status.status-past {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* Category Badge */
.course-category {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    color: var(--category-color, #7c97ff);
}

/* Course Content */
.course-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.course-description {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Course Details */
.course-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.course-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #aaa;
}

.detail-label {
    color: #666;
    min-width: 55px;
}

/* Syllabus */
.course-syllabus {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.course-syllabus h4 {
    font-size: 0.9rem;
    color: #7c97ff;
    margin-bottom: 10px;
}

.course-syllabus ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-syllabus li {
    font-size: 0.8rem;
    color: #888;
    padding: 5px 0;
    padding-left: 15px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.course-syllabus li:last-child {
    border-bottom: none;
}

.course-syllabus li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #7c97ff;
    font-weight: bold;
}

/* Register Button */
.course-register-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: #00ff88;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    transition: all 0.3s ease;
}

.course-register-btn:hover {
    background: #00cc6a;
}

/* CTA SECTION */
.courses-cta {
    padding: 50px 20px;
    text-align: center;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 10px;
}

.cta-content p {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 12px 25px;
    background: #E1306C;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    opacity: 0.9;
}

.cta-btn.secondary {
    background: #1DA1F2;
}

/* CERTIFICATE SECTION */
.certificate-section {
    padding: 30px 15px;
    margin-bottom: 30px;
}

.certificate-content {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.certificate-text h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

.certificate-text p {
    font-size: 0.9rem;
    color: #888;
}

.certificate-btn {
    padding: 12px 25px;
    background: #7c97ff;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.certificate-btn:hover {
    opacity: 0.9;
}

/* ========== TABLET & DESKTOP ========== */
@media (min-width: 500px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-item {
        padding: 12px 20px;
        max-width: 120px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .courses-grid {
        max-width: 400px;
    }
}

@media (min-width: 700px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stat-item {
        padding: 15px 25px;
        max-width: 140px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 750px;
        gap: 25px;
    }
    
    .courses-section {
        padding: 40px 20px;
        max-width: 1400px;
    }
    
    .certificate-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        max-width: 700px;
    }
}

@media (min-width: 1000px) {
    .courses-hero {
        padding: 40px 20px 30px;
    }
    
    .hero-stats {
        gap: 25px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        gap: 30px;
    }
    
    .courses-section {
        padding: 50px 30px;
    }
    
    .filter-container {
        gap: 15px;
    }
    
    .filter-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}
