/* ==========================================================================
   STUDONEXT COURSES HUB COMPREHENSIVE DESIGN STYLESHEET
   ========================================================================== */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --background: #f8fafc;
    --border: #cbd5e1;
    --text-main: #334155;
    --text-muted: #64748b;
    --free-color: #10b981;
    --offline-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* HEADER NAVBAR */
.course-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
}
.logo span { color: var(--primary-light); }
.logo small { font-size: 11px; background: #10b981; color: white; padding: 2px 6px; border-radius: 3px; margin-left: 5px; font-weight: 500; }

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.2s;
}
.nav-link:hover { color: var(--primary); }

/* HERO BANNER */
.course-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 3.5rem 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

.course-hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; font-weight: 700; }
.course-hero p { font-size: 1rem; opacity: 0.85; max-width: 780px; margin: 0 auto; line-height: 1.5; }

/* SECTIONS */
.course-section { margin-top: 2.5rem; }
.section-title { font-size: 1.4rem; font-weight: 700; color: var(--secondary); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
.section-title small { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.section-divider { border: 0; height: 1px; background: var(--border); margin: 3rem 0; }

.section-header-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }

/* LOCATION DROPDOWN BOX */
.location-select-box {
    background: white; border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 6px; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.location-select-box i { color: var(--primary-light); font-size: 1.1rem; }
.location-select-box select { border: none; outline: none; font-size: 0.9rem; font-weight: 600; color: var(--secondary); cursor: pointer; }

/* ICON COLORS */
.text-free { color: var(--free-color); }
.text-offline { color: var(--offline-color); }

/* COURSE RESPONSIVE 3-COLUMN GRID */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* COURSE CARD BASE */
.course-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}
.course-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.07); }

.course-thumb {
    height: 150px; display: flex; align-items: center; justify-content: center; font-size: 4.5rem; border-bottom: 1px solid var(--border);
}

.course-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }

/* BADGES */
.badge { display: inline-block; align-self: flex-start; font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem; }
.badge-free { background: #d1fae5; color: #065f46; }
.badge-offline { background: #fef3c7; color: #92400e; }

.course-body h3 { font-size: 1.15rem; color: var(--secondary); margin-bottom: 0.4rem; font-weight: 700; line-height: 1.4; }
.course-body .instructor, .course-body .institute { font-size: 0.85rem; font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; }
.course-body .location { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.course-body .desc {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.5rem;
    /* Clean text trim */
    display: block; height: 2.7rem; overflow: hidden; text-overflow: ellipsis;
}

.course-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.meta-info { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }

/* BUTTONS */
.btn { padding: 0.5rem 1.25rem; font-weight: 600; border-radius: 6px; cursor: pointer; text-decoration: none; border: none; transition: 0.2s; font-size: 0.85rem; }
.btn-enroll { background: var(--free-color); color: white; }
.btn-enroll:hover { background: #059669; }
.btn-view-center { background: var(--primary); color: white; }
.btn-view-center:hover { background: var(--primary-light); }

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .courses-grid { grid-template-columns: 1fr; }
    .course-hero h1 { font-size: 1.75rem; }
}