/*
 * Combined CSS from all index.php <style> blocks (cis110, cis120, cps251, cps276)
 * Includes all unique, commented, and page-specific lines for easy rollback.
 */

/* --- Common code/pre/image/sidebar styles (cis120, cps251, cps276) --- */
pre {
    border-radius: 5px;
    overflow: hidden;
    /* This ensures that the content respects the border-radius */
    white-space: pre-wrap;       /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
    padding: 5px 10px;
    overflow: auto; /* Ensures the code block is scrollable if needed */
}
pre code {
    border-radius: 5px;
    /* Optionally ensure rounding on <code> if not fitting snugly inside <pre> */
}
code {
    white-space: pre-wrap;       /* CSS 3.0 */
}
img{
    max-width: 100%; /* Image can grow up to 100% of the container width but no more */
    height: auto;    /* Maintain the aspect ratio */
    width: auto;  
}
@media (max-width: 768px) {
    pre {
        padding: 2px 5px;
        font-size: smaller; /* Adjust font size for small devices */
    }
}
#sidebar {
    position: fixed;   /* Fixed position to stay in place on scroll */
    width: 250px;      /* Adjust width as necessary */
    max-height: 100vh; /* Maximum height to viewport height */
    overflow-y: auto;  /* Enables vertical scrolling when necessary */
    overflow-x: hidden;/* Prevents horizontal scroll */
}

/* --- wcc_website/index.php unique styles --- */
.wcc-header {
    background: linear-gradient(90deg, #176a3a 0%, #218c5a 100%);
    /*background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);*/
    /*background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);*/
    /*background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);*/
    /*background: linear-gradient(90deg, #232526 0%, #414345 100%);*/
    /*background: linear-gradient(90deg, #388e3c 0%, #81c784 100%);*/
    
    color: #fff;
    padding: 0;
    min-height: 180px;
    display: flex;
    align-items: center;
}
.wcc-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    position: relative;
}
.wcc-logo-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px; /* Reduced to accommodate 50px logo */
    position: absolute;
    left: 20px;
    top: 20px; /* Position in upper left corner */
}
.wcc-logo {
    height: 50px; /* Fixed 50px height for all screen sizes */
    width: auto;
    display: block;
}
.wcc-header-text {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.wcc-course-code {
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 2px;
}
.wcc-course-title {
    font-size: 2rem;
    font-weight: 400;
    margin-top: 0.2em;
}
.wcc-course-author {
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 0.3em;
    color: #e0f2f1;
    letter-spacing: 0.5px;
}
@media (max-width: 900px) {
    .wcc-course-code {
        font-size: 2.2rem !important;
    }
    .wcc-course-title {
        font-size: 1.1rem !important;
    }
    .wcc-logo {
        height: 50px !important; /* Fixed 50px height */
    }
    .wcc-logo-container {
        left: 15px !important;
        top: 15px !important; /* Adjust top position for medium screens */
    }
    .wcc-header-text {
        margin-left: 15px !important;
    }
}
@media (max-width: 600px) {
    .wcc-header {
        min-height: 100px !important;
    }
    .wcc-course-code {
        font-size: 1.3rem !important;
    }
    .wcc-course-title {
        font-size: 0.8rem !important;
    }
    .wcc-logo {
        height: 50px !important; /* Fixed 50px height */
    }
    .wcc-logo-container {
        left: 10px !important;
        top: 10px !important; /* Adjust top position for small screens */
        height: 60px !important; /* Keep container height consistent */
    }
    .wcc-header-text {
        margin-left: 7px !important;
    }
}

/* navigation styles (cis110) */
#sidebar {
    background: #222;
    color: #fff;
    border-radius: 0;
    box-shadow: none;
    padding-top: 20px;
}
#sidebar .sidebar-header {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    padding-left: 20px;
}
#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#sidebar li {
    margin-bottom: 0.5rem;
}
#sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

/*
#sidebar a:hover, #sidebar li.active > a {
    background: none;
    color: #fff;
    font-weight: 500;
}*/
#sidebar .divider {
    border-bottom: 1px solid #444;
    margin: 1rem 0;
}
@media (max-width: 900px) {
    #sidebar {
        width: 180px;
        font-size: 0.95rem;
    }
    #sidebar .sidebar-header {
        font-size: 1.3rem;
        padding-left: 10px;
    }
    #sidebar a {
        padding: 10px 12px;
    }
}
@media (max-width: 600px) {
    #sidebar {
        width: 100vw;
        border-radius: 0;
        box-shadow: none;
    }
} 