/* --- VARIABLES & THEME --- */
:root {
  --primary: #3DBE7B;
  --bg-body: #F4F2EB;
  --white: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
}

/* --- BASE STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'DM Sans', sans-serif; 
    background: var(--bg-body); 
    color: var(--text-dark); 
    min-height: 100vh; 
    overflow-x: hidden; 
}
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .app-container {
        display: block;
    }
}

/* --- HEADER OVERRIDE --- */
.top-header { 
    padding-bottom: 15px !important; 
}

.explore-controls {
    margin-top: 0;
    padding: 0 40px 20px;
    background: transparent;
}

.page-title { 
    font-size: 28px; 
    font-weight: 800; 
    font-family: 'Playfair Display', serif; 
}

.search-bar { 
    flex: 1;
    max-width: 450px;
    display: flex; 
    align-items: center; 
    background: var(--white); 
    border-radius: 50px; 
    padding: 12px 25px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin: 0; /* Remove auto-margin to stop centering */
}

.search-bar input { 
    border: none; 
    outline: none; 
    background: none; 
    font-size: 14px; 
    color: var(--text-muted); 
    width: 100%; 
}

.search-bar i { color: #8F8CFA; font-size: 18px; }

.topbar-right { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.notif-btn { 
    width: 44px; 
    height: 44px; 
    background: var(--white); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
    border: none; 
    color: #FBBF24;
}

.user-info { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #DBC3C3; }
.user-name { font-weight: 700; font-size: 14px; }

/* --- SECTION HEADERS --- */
.section-header {
    margin-bottom: 25px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* --- PREMIUM CARD (Ported from modal) --- */
.modal-course-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.modal-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-dots {
    color: var(--text-muted);
    cursor: pointer;
}

.course-cat {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.course-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-dark);
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.instr-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.instr-name-small {
    font-size: 13px;
    color: var(--text-muted);
}

.card-actions {
    margin-top: auto;
}

.btn-action {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.btn-view {
    background: #e8f8f0;
    color: var(--primary);
}

.btn-enroll {
    background: var(--primary);
    color: white;
}

.btn-enroll:hover {
    background: #34a86c;
}

/* --- COURSES GRID --- */
.content { 
    padding: 0 40px 40px; 
    min-height: calc(100vh - 180px);
}

@media (max-width: 1024px) {
    .content {
        padding: 20px;
    }
}

.courses-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 25px; 
    width: 100%;
}

/* Redundant styles removed */