/* DevOps Curriculum - Global Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    transition: margin-left 0.3s ease;
}

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

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 30px 0;
    padding-left: 70px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.breadcrumb {
    background: var(--white);
    padding: 15px 0;
    padding-left: 70px;
    border-bottom: 1px solid var(--border);
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--gray);
    margin: 0 10px;
}

/* Navigation */
nav {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    color: var(--dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: var(--primary);
    color: var(--white);
}

/* Main Content */
main {
    padding: 40px 0;
}

.content-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.content-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.content-card h3 {
    color: var(--dark);
    margin: 20px 0 10px;
}

/* Week Grid - Main Page */
.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.week-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.week-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.week-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px;
}

.week-card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    border: none;
    padding: 0;
    color: var(--white);
}

.week-card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.week-card-body {
    padding: 20px;
}

.day-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.day-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.day-link:hover {
    background: var(--primary);
    color: var(--white);
}

/* Topic List */
.topic-list {
    list-style: none;
    padding: 0;
}

.topic-list li {
    padding: 12px 15px;
    margin: 8px 0;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.topic-list li:hover {
    background: #e0e7ff;
}

/* Hands-on Section */
.hands-on {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border-left: 4px solid var(--secondary);
}

.hands-on h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.hands-on ul {
    list-style: none;
    padding: 0;
}

.hands-on li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.hands-on li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* Learning Objectives */
.objectives {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border-left: 4px solid var(--accent);
}

.objectives h3 {
    color: #b45309;
    margin-bottom: 15px;
}

/* Code Block */
.code-block {
    background: var(--dark);
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin: 15px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block code {
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    display: block;
}

/* Alternative pre-formatted code */
pre {
    background: var(--dark);
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin: 15px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Inline code */
code:not(.code-block code) {
    background: #e5e7eb;
    color: var(--dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Code highlighting colors */
.code-block .comment { color: #6b7280; font-style: italic; }
.code-block .keyword { color: #c084fc; }
.code-block .string { color: #34d399; }
.code-block .function { color: #60a5fa; }
.code-block .number { color: #fbbf24; }
.code-block .variable { color: #f472b6; }

/* Time Allocation */
.time-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    margin: 10px 0;
}

.time-box svg {
    width: 20px;
    height: 20px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    background: var(--border);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Day Navigation */
.day-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.day-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.day-nav a:hover {
    background: var(--primary-dark);
}

.day-nav a.disabled {
    background: var(--gray);
    pointer-events: none;
}

/* Resource Links */
.resources {
    background: #f0f9ff;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border-left: 4px solid #0ea5e9;
}

.resources h3 {
    color: #0369a1;
    margin-bottom: 15px;
}

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

.resources a:hover {
    text-decoration: underline;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== */
/* GLOBAL NAVIGATION SIDEBAR */
/* ==================== */

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 336px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding-bottom: 30px;
}

.global-nav.active {
    transform: translateX(0);
}

/* Desktop: sidebar always visible, content shifts */
@media (min-width: 769px) {
    .global-nav {
        transform: translateX(0);
    }
    
    .global-nav.closed {
        transform: translateX(-100%);
    }
    
    body.nav-open {
        margin-left: 336px;
    }
    
    body.nav-open header,
    body.nav-open .breadcrumb {
        padding-left: 20px;
    }
    
    body.nav-open .menu-toggle {
        left: 350px;
    }
    
    .nav-overlay {
        display: none !important;
    }
}

.global-nav-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.global-nav-header h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.global-nav-header a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    font-size: 0.9rem;
}

.global-nav-header a:hover {
    opacity: 1;
    text-decoration: underline;
}

.nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-close:hover {
    background: rgba(255,255,255,0.3);
}

.nav-week {
    border-bottom: 1px solid var(--border);
}

.nav-week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 600;
    color: var(--dark);
}

.nav-week-header:hover {
    background: var(--light);
}

.nav-week-header .week-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-week-header .week-num {
    background: var(--primary);
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.nav-week-header .chevron {
    transition: transform 0.3s ease;
    color: var(--gray);
}

.nav-week.expanded .nav-week-header .chevron {
    transform: rotate(180deg);
}

.nav-days {
    display: none;
    padding: 0 20px 15px 20px;
}

.nav-week.expanded .nav-days {
    display: block;
}

.nav-days a {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    margin: 5px 0;
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: var(--light);
}

.nav-days a .day-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-days a .day-title {
    font-size: 0.9rem;
    color: var(--dark);
    margin-top: 2px;
}

.nav-days a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateX(5px);
}

.nav-days a:hover .day-num,
.nav-days a:hover .day-title {
    color: var(--white);
}

.nav-days a.current {
    background: var(--primary);
    color: var(--white);
    font-weight: 500;
}

.nav-days a.current .day-num,
.nav-days a.current .day-title {
    color: var(--white);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Quick Jump Dropdown */
.quick-jump {
    position: relative;
    display: inline-block;
}

.quick-jump-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-jump-btn:hover {
    background: var(--primary-dark);
}

.quick-jump-btn svg {
    width: 18px;
    height: 18px;
}

.quick-jump-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.quick-jump:hover .quick-jump-dropdown,
.quick-jump-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.quick-jump-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.quick-jump-dropdown a:last-child {
    border-bottom: none;
}

.quick-jump-dropdown a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==================== */
/* IMPROVED RESPONSIVE */
/* ==================== */

/* Tablet */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .week-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .content-card {
        padding: 25px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
        padding-left: 60px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    .breadcrumb {
        padding: 10px 0;
        padding-left: 60px;
        font-size: 0.9rem;
    }
    
    .week-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    nav {
        padding: 10px 0;
    }
    
    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    main {
        padding: 20px 0;
    }
    
    .content-card {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .content-card h2 {
        font-size: 1.3rem;
    }
    
    .content-card h3 {
        font-size: 1.1rem;
    }
    
    .code-block {
        padding: 15px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .day-nav {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .day-nav a {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.8rem;
        justify-content: center;
    }
    
    .day-nav a svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    .day-nav a span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .time-box {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .objectives ul {
        padding-left: 20px;
    }
    
    .topic-list {
        padding-left: 20px;
    }
    
    .quick-jump-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    footer {
        padding: 20px 0;
    }
    
    footer p {
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    header {
        padding: 15px 0;
        padding-left: 55px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .breadcrumb span {
        margin: 0 5px;
    }
    
    .content-card {
        padding: 15px;
    }
    
    .content-card h2 {
        font-size: 1.2rem;
    }
    
    nav ul {
        gap: 5px;
    }
    
    nav a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    
    .code-block {
        padding: 12px;
        font-size: 0.75rem;
    }
    
    .week-card-header {
        padding: 15px;
    }
    
    .week-card-body {
        padding: 15px;
    }
    
    .day-links {
        gap: 8px;
    }
    
    .global-nav {
        width: 260px;
    }
}

/* Print Styles */
@media print {
    nav, .day-nav, footer, .menu-toggle, .global-nav, .nav-overlay, .quick-jump {
        display: none;
    }
    
    header {
        padding-left: 0;
    }
    
    .breadcrumb {
        padding-left: 0;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid var(--border);
    }
}
