/* style.css - Updated for Lab 5&6 Responsive Layouts */

/* --- ORIGINAL STYLES (DO NOT REMOVE) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Page Heading */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* --- NEW LAB 5&6: FLEXBOX NAVIGATION (Task 4) --- */
.navbar {
    background-color: #2c3e50;
    border-radius: 30px;
    padding: 10px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-container {
    display: flex; /* Task 4: Flexbox Container */
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    display: flex; /* Task 4: Flexbox for Horizontal Menu */
}

.nav-menu li {
    margin-left: 15px;
}

.nav-menu a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background-color: #3498db;
    transform: translateY(-2px);
}

.nav-menu a.active {
    background-color: #e67e22;
}

/* Hamburger Menu Logic (Task 4) */
.nav-toggle { display: none; }
.nav-toggle-label {
    display: none; /* Hidden on desktop */
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- NEW LAB 5&6: RESPONSIVE GRID CARDS (Task 5 & 8) --- */
.card-container {
    display: grid; /* Task 10: Grid Layout System */
    /* Automatically creates 3 columns on desktop, 2 on tablet, 1 on mobile */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid #3498db;
}

.card:hover {
    transform: translateY(-5px);
}

.card-link {
    display: inline-block;
    margin-top: 15px;
    color: #e67e22;
    text-decoration: none;
    font-weight: bold;
}

/* --- NEW LAB 5&6: MEDIA QUERIES (Task 13 & 16) --- */

/* Tablet and Mobile (under 768px) */
@media screen and (max-width: 768px) {
    .nav-toggle-label {
        display: block; /* Show hamburger icon */
    }

    .nav-menu {
        display: none; /* Hide menu items by default */
        flex-direction: column; /* Stack links vertically */
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: #2c3e50;
        border-radius: 0 0 20px 20px;
        padding: 20px;
        z-index: 1000;
    }

    .nav-menu li {
        margin: 10px 0;
        text-align: center;
    }

    /* Show menu when checkbox is checked */
    .nav-toggle:checked ~ .nav-menu {
        display: flex;
    }

    /* Responsive Table (Lab 3&4 carry-over) */
    .table-responsive {
        border: 0;
    }
}

/* --- PREVIOUS TABLE STYLES (DO NOT REMOVE) --- */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.course-schedule {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    text-align: left;
    background-color: white;
}

.course-schedule th, .course-schedule td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.course-schedule th {
    background-color: #34495e;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
}

.course-schedule tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}