/* ============================================
   SHARED STYLES FOR WEB DESIGN CLASS
   Serves: timeline.html, modules.html
   ============================================ */

/* ========================================
   1. RESET & VARIABLES
   ======================================== */

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

:root {
    --black: #000000;
    --orange: #F69723;
    --turquoise: #23F6D3;
    --white: #FFFFFF;
    --gray-dark: #1a1a1a;
    --gray-mid: #333333;
    --gray-light: #c7c6c6;
}

/* ========================================
   2. BASE STYLES
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px;
}

/* Narrower container for modules page */
.container.modules {
    max-width: 900px;
}

/* ========================================
   3. HEADER (SHARED)
   ======================================== */

header {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 30px;
}

header .logo img {
    float: left;
    height: 40px;
    width: auto;
    margin-left: 40px;
}

.clearFloat {
    clear: both;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.1rem;
    color: var(--gray-light);
}

.divider {
    border-bottom: 2px solid var(--orange);
    margin-bottom: 18px;
}

/* ========================================
   4. FOOTER (SHARED)
   ======================================== */

footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-mid);
    color: var(--gray-light);
    font-size: 0.85rem;
}

footer p {
    margin-bottom: 10px;
}

/* ========================================
   5. TIMELINE PAGE STYLES
   ======================================== */

/* Legend */
.legend {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Timeline Grid */
.timeline-wrapper {
    overflow-x: auto;
    margin-bottom: 60px;
}

.timeline-grid {
    display: grid;
    min-width: 900px;
}

/* Week Header Row */
.week-header {
    display: grid;
    grid-template-columns: 180px repeat(var(--week-count), minmax(70px, 1fr));
    background-color: var(--gray-dark);
    position: sticky;
    top: 0;
}

.week-header .topic-label {
    padding: 15px;
    font-weight: 600;
    color: var(--gray-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-cell {
    padding: 15px 10px;
    text-align: center;
    border-left: 1px solid var(--gray-mid);
}

.week-cell .week-num {
    font-weight: 700;
    color: var(--orange);
    font-size: 0.9rem;
}

.week-cell .week-date {
    font-size: 0.75rem;
    color: var(--gray-light);
    margin-top: 4px;
}

/* Topic Row */
.topics-row {
    display: grid;
    grid-template-columns: 180px repeat(var(--week-count), minmax(70px, 1fr));
    background-color: var(--gray-mid);
}

.topics-row .label {
    padding: 15px;
    font-weight: 600;
    color: var(--gray-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-cell {
    padding: 12px 8px;
    border-left: 1px solid var(--gray-dark);
    font-size: 0.8rem;
    color: #ccc;
    text-align: center;
}

/* Projects Section */
.projects-section {
    margin-top: 2px;
}

.project-lane {
    display: grid;
    grid-template-columns: 180px repeat(var(--week-count), minmax(70px, 1fr));
    min-height: 55px;
    position: relative;
}

.project-lane:nth-child(odd) {
    background-color: rgba(26, 26, 26, 0.5);
}

.project-label-placeholder {
    /* Empty placeholder for alignment */
}

.project-bar-wrapper {
    position: relative;
    height: 100%;
}

.project-bar {
    position: absolute;
    top: 8px;
    height: calc(100% - 16px);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--black);
    padding: 0 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 80px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.project-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Project Types */
.project-bar.web-project {
    background: linear-gradient(135deg, var(--orange) 0%, #e88a1a 100%);
}

.project-bar.small-assignment {
    background: linear-gradient(135deg, var(--turquoise) 0%, #1bd4b5 100%);
}

.project-bar.final-project {
    background: linear-gradient(135deg, var(--white) 0%, #e0e0e0 100%);
    color: var(--black);
}

/* ========================================
   6. MODULES PAGE STYLES
   ======================================== */

/* Week Container */
.week {
    margin-bottom: 20px;
    border: 1px solid var(--gray-mid);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--gray-dark);
}

.week-header {
    padding: 20px 25px;
    background-color: var(--gray-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.week-header:hover {
    background-color: #3a3a3a;
}

.week-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
}

.week-header .week-date {
    font-size: 0.9rem;
    color: var(--gray-light);
    margin-left: 15px;
}

.week-header .toggle-icon {
    font-size: 1.5rem;
    color: var(--orange);
    transition: transform 0.3s ease;
}

.week.open .toggle-icon {
    transform: rotate(45deg);
}

.week-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.week.open .week-content {
    max-height: 2000px;
}

.modules-list {
    padding: 20px 25px;
}

/* Module Types */
.module {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--gray-dark);
    border-left: 4px solid var(--gray-mid);
}

.module:last-child {
    margin-bottom: 0;
}

.module.assignment {
    border-left-color: var(--orange);
}

.module.informational {
    border-left-color: var(--turquoise);
}

.module-header {
    padding: 15px 18px;
    background-color: rgba(51, 51, 51, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.module-header:hover {
    background-color: rgba(51, 51, 51, 0.7);
}

.module-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.module-header .type-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--black);
}

.module.assignment .type-badge {
    background-color: var(--orange);
}

.module.informational .type-badge {
    background-color: var(--turquoise);
}

.module-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.module.open .module-content {
    max-height: 1000px;
}

.module-body {
    padding: 18px;
    background-color: rgba(26, 26, 26, 0.6);
}

.module-body p {
    color: var(--gray-light);
    line-height: 1.7;
    margin-bottom: 12px;
}

.module-body p:last-child {
    margin-bottom: 0;
}

.module-body a {
    color: var(--turquoise);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.module-body a:hover {
    border-bottom-color: var(--turquoise);
}

.module-body ul,
.module-body ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.module-body li {
    color: var(--gray-light);
    margin-bottom: 6px;
}

/* ========================================
   7. RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 20px 15px;
    }

    /* Timeline responsive */
    .legend {
        gap: 15px;
    }

    /* Modules responsive */
    .week-header h2 {
        font-size: 1rem;
    }

    .week-header .week-date {
        display: none;
    }
}