/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007bff; /* JNVU Blue suggestion */
    --secondary-color: #28a745; /* Green for success/upload */
    --accent-color: #ffc107; /* Yellow/Gold for highlights */
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--card-bg);
    border-bottom: 3px solid var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.donate-btn {
    background-color: var(--accent-color);
    color: var(--text-color) !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s;
}

.donate-btn:hover {
    background-color: #ffda6a;
    text-decoration: none;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

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

.primary-btn:hover {
    background-color: #0056b3;
    text-decoration: none;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: #fff;
}

.secondary-btn:hover {
    background-color: #1e7e34;
    text-decoration: none;
    transform: translateY(-2px);
}

.large-btn {
    width: 100%;
    font-size: 1.1em;
    padding: 12px 20px;
}

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.slider-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    text-align: center;
    padding: 0 20px;
}

.slide h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.slide p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Add an overlay to make text readable */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.slide > * {
    z-index: 2; /* Bring content above the overlay */
}

/* --- Content Sections --- */
.content-section {
    padding: 40px 0;
    margin-bottom: 40px;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: var(--primary-color);
}

/* --- Upload Form --- */
.upload-form-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.upload-form-card p {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.file-upload input[type="file"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: var(--bg-color);
}


/* --- Download Course Grid --- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.course-card {
    background: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.course-card i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.course-card h3 {
    margin-bottom: 5px;
    color: var(--text-color);
}

.course-card p {
    font-size: 0.9em;
    color: #666;
}

/* --- Footer --- */
footer {
    background: var(--primary-color);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer a {
    color: var(--accent-color);
}

/* --- Responsiveness (Basic) --- */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        margin-top: 15px;
    }

    .main-nav ul li {
        margin: 5px 0;
    }
    
    .hero-slider {
        height: 300px;
    }

    .slide h2 {
        font-size: 1.8em;
    }
}
/* --- Backend Feedback Messages --- */
.feedback-msg {
    padding: 10px;
    margin-top: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.success-msg {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-msg {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Download Section Styles (Notes Table) --- */
.course-details-view {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

.semester-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.semester-btn {
    background-color: #f0f0f0;
    color: var(--text-color);
    border: 1px solid #ddd;
    padding: 8px 15px;
}

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

.notes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.notes-table th, .notes-table td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: left;
}

.notes-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #555;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.9em;
}