/* Global Reset */
:root {
    --primary-color: #24292e;
    --accent-color: #0366d6;
    --bg-color: #f6f8fa;
    --text-color: #24292e;
    --border-color: #e1e4e8;
    --nav-hover: rgba(255,255,255,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* Navbar container */
.navbar {
    background-color: var(--primary-color);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Logo */
.nav-logo {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
}

/* Menu items */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
    margin-left: 1.5rem;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: block;
}

.nav-link:hover {
    color: white;
}

/* Dropdown */
.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0.5rem 0;
    z-index: 1001;
    list-style: none;
    border: 1px solid var(--border-color);
}

/* Show dropdown on hover (Desktop) */
.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-link:hover {
    background-color: #f1f8ff;
    color: var(--accent-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger */
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        height: calc(100vh - 60px); /* Full height minus header */
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        align-items: flex-start; /* Align left */
        overflow-y: auto; /* Scrollable if long */
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-link {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Mobile Dropdown Interaction */
    .dropdown-menu {
        position: static; /* Stack in flow */
        display: none; /* Still hidden until toggled */
        background-color: #1b1f23; /* Darker bg for contrast */
        box-shadow: none;
        width: 100%;
        border: none;
        padding-left: 0;
    }

    .nav-item:hover .dropdown-menu {
        display: none; /* Disable hover on mobile, rely on JS or focus */
    }

    .nav-item.active .dropdown-menu {
        display: block; /* Class to toggle via JS */
    }

    .dropdown-link {
        color: rgba(255,255,255,0.7);
        padding-left: 3rem; /* Indent */
    }

    .dropdown-link:hover {
        background-color: rgba(255,255,255,0.05);
        color: white;
    }
    
    /* Creating a toggle indicator */
    .dropdown-toggle::after {
        content: ' ▼';
        font-size: 0.7em;
        margin-left: 5px;
    }
}

/* Page Header (Jumbotron style) */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0; /* Reduced padding since we have navbar */
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
}

.page-header p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Utility Containers */
.container {
    max-width: 960px; /* Standard width */
    margin: 0 auto;
    padding: 2rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border-radius: 6px;
    margin-bottom: 2rem;
}

/* Common Text Styles */
h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
    margin-top: 1.5em;
    color: var(--text-color);
}

a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Keep existing badge styles */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.badge-info { background-color: #17a2b8; color: white; }
.badge-success { background-color: #28a745; color: white; }
.badge-warning { background-color: #ffc107; color: #212529; }
.badge-danger { background-color: #dc3545; color: white; }

/* Code Blocks */
pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
}

code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* Index Page Specifics */
.course-intro {
    background-color: #f1f8ff;
    border: 1px solid #c8e1ff;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.course-intro h3 {
    margin-top: 0;
    color: #0366d6;
}

.meta-info {
    font-size: 0.85rem;
    color: #586069;
    margin-top: 0.5rem;
}

.meta-item {
    margin-right: 1rem;
}

.link-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

.link-desc {
    font-size: 0.9rem;
    color: #586069;
}

/* Content Lists (Index Page) */
.content-list {
    list-style-type: none;
    padding-left: 0;
}

.content-list li {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.content-list li:hover {
    background-color: #f1f8ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Lab Step & URL Helper */
.step {
    margin-bottom: 2rem;
}

.url {
    word-break: break-all;
}

.note {
    background-color: #e1f5fe;
    border-left: 5px solid #03a9f4;
    padding: 10px;
    margin: 10px 0;
}

pre code {
    background-color: transparent;
    padding: 0;
}

.filename {
    font-weight: bold;
    color: #d73a49;
    font-family: monospace;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #586069;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

