/* FCC Spring 2026 - Shared Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Navigation */
nav {
    background: #34495e;
    padding: 10px 20px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Course Cards (Landing Page) */
.course-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.course-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.course-card h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.course-card p {
    color: #666;
    margin-bottom: 15px;
}

.course-card .schedule {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

.course-card a.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.2s;
}

.course-card a.btn:hover {
    background: #2980b9;
}

/* Calendar Table */
.calendar-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.calendar-table th {
    background: #2c3e50;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
}

.calendar-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.calendar-table tr:last-child td {
    border-bottom: none;
}

.calendar-table tr:hover {
    background: #f8f9fa;
}

/* Week grouping - alternating backgrounds */
.calendar-table tr.week-even {
    background: #f0f1f3;
}

.calendar-table tr.week-even:hover {
    background: #f1f3f5;
}

/* Holiday styling takes precedence */
.calendar-table tr.holiday {
    background: #fff3cd;
}

.calendar-table tr.holiday:hover {
    background: #ffe69c;
}

.calendar-table tr.holiday td {
    color: #856404;
}

/* Quiz Indicator */
.quiz {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 5px;
}

/* Assignment Tags */
.assignment {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin: 2px 0;
}

.assignment.released {
    background: #d4edda;
    color: #155724;
}

.assignment.due {
    background: #f8d7da;
    color: #721c24;
}

/* Links */
.calendar-table a {
    color: #3498db;
    text-decoration: none;
}

.calendar-table a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .calendar-table {
        font-size: 0.9rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 8px 5px;
    }

    /* Make table scrollable on mobile */
    .table-wrapper {
        overflow-x: auto;
    }

    /* Hide Assignments column on mobile */
    .calendar-table th:nth-child(4),
    .calendar-table td:nth-child(4) {
        display: none;
    }

    /* Week header adjustments for mobile */
    .week-header td {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Week header (collapsible toggle) */
.week-header {
    cursor: pointer;
    background: #2c3e50;
    color: white;
    font-weight: 600;
}

.week-header:hover {
    background: #34495e;
}

.week-header td {
    padding: 12px 15px;
    border-bottom: 1px solid #1a252f;
}

.week-toggle {
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 8px;
}

.week-group.expanded .week-toggle {
    transform: rotate(90deg);
}

.week-group:not(.expanded) tr:not(.week-header) {
    display: none;
}

/* Override hover for week header */
.calendar-table .week-header:hover {
    background: #34495e;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #888;
    font-size: 0.9rem;
}
