:root {
    --dark-blue: #003B5C;
    --blue: #4c758c;
    --light-blue: #b2c4ce;
    --viu-blue: #007DBA;
    --light-text: #D9D9D9;
    --dark-text: #222;
    --light-bg: #fff;
    --dark-bg: #404040;
    --second-text: #999;
    --blue-text: #5482A3;
    --r-script-bg: #d8e3eb;
    --r-script-txt: #5482a3;
    --shell-bg: #f3e2bb;
    --shell-txt: #c4962d;
    --yaml-bg: #d0bfec;
    --yaml-txt: #956ace;
    --rmd-bg: #d9f1d8;
    --rmd-txt: #43bb49;
    --css-bg: #ffe4e1;
    --css-txt: #d63384;
    --note-light: #dfebf5;
    --markdown-bg: #f0f8ff;
    --markdown-txt: #0066cc;
    --html-bg: #fff2e6;
    --html-txt: #e65100;
    --javascript-bg: #fff3cd;
    --javascript-txt: #856404;
    --json-bg: #e8f5e8;
    --json-txt: #198754;
    --sql-bg: #f8f9fa;
    --sql-txt: #6c757d;
    --python-bg: #e6f3ff;
    --python-txt: #0052cc;
    --bash-bg: #f5f5f5;
    --bash-txt: #333;
}

@font-face {
    font-family: 'clacon2';
    src: url('../fonts/clacon2.ttf') format('truetype');
}


/* -----Headers --------------------------------
 * */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    margin-bottom: .5625rem;
    font-weight: 500;
    line-height: 1.2;
}

h3 {
    margin-top: 2.25rem;
    font-weight: 700;
}

h4 {
    margin-top: 1.75rem;
    font-weight: 600;
}

h5 {
    font-size: 1em; /* Same as paragraph size */
    font-weight: 300; /* Make it bold */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-left: 12px; /* Indent */
    border-left: 3px solid var(--viu-blue); /* Small colored bar */
}

html {
    height: 100%;
}

div.footer {
    position: fixed;
    margin-top: 50px;
    bottom: 0;
    height: 25px;
    width: 100%;
    background-color: var(--dark-blue);
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    padding: 12px; /* Space for the border */
    background-color: var(--dark-blue);
}

p {
    line-height: 1.6; /* Adjust this value to your desired line spacing */
}

.main-container {
    position: relative;
    margin-top: 5px; /* Space for the fixed navbar */
    left: 0;
    right: 0;
    padding-top: 30px;
    padding-bottom: 50px; /* Ensure bottom padding for the border */
    overflow-y: auto; /* Enable scrolling for content */
    background-color: white;
    box-shadow: 0 0 0 25px var(--dark-blue); /* Create the border effect */
    width: calc(100% - 25px);
    min-height: calc(100vh - 50px);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
}

.float-logo img {
    position: fixed;
    right: calc(100vw - 14%);
}

.text-muted {
    color: #999;
}

a {
    text-decoration: none;
    color: var(--viu-blue);
}

a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
    cursor: pointer;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 25px;
    width: 100%; /* Account for the 25px border on each side */
    background-color: var(--dark-blue);
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin-bottom: 5px; /* Ensure it does not extend beyond borders */
}

.navbar.expanded {
    background-color: var(--dark-blue); /* Change to your desired color */
}

.nav-content {
    display: flex;
    justify-content: center;
    width: 100%; /* Ensure it takes full width */
}

.nav-item {
    position: relative;
}

.nav-item a {
    text-decoration: none;
    color: var(--light-text);
    padding-top: 5px;
    padding-right: 12px;
    padding-left: 12px;
    display: block;
}

.nav-item:hover a {
    background-color: var(--blue);
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dark-blue);
    width: 100%; /* Ensure it takes full width */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    width: auto; /* Make it auto width */
    white-space: nowrap;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: var(--light-blue);
    color: white;
}

.nav-item:hover .dropdown-content {
    display: block;
}

.burger {
    display: none;
    color: var(--light-text);
    font-size: 30px;
    cursor: pointer;
    margin-right: 25px; /* Offset for the right border */
}

.item {
    background-color: #ccc;
    padding: 20px;
    margin: 10px 0;
    box-sizing: border-box;
}

.card-img-top > img{
    border-radius: 5px;
    max-width: 690px;
    width: 90%;
    height: 100%;
    margin-right: auto;
}

img.pane {
    width: 100%;
}

/* Code Block Styling */
pre {
    position: relative; /* Needed for absolute positioning inside */
    background-color: #f4f4f4; /* Light grey background for the code block */
    padding-top: 35px; /* Space for the colored band */
    padding-left: 15px;
    padding-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: auto;
}

pre::before {
    content: "Code";
    color: #333;
    font-size: 12px;
    font-weight: bold;
    padding-left: 16px;
    padding-top: 6px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25px; /* Height of the colored band */
    background-color: #eaeaea;
    border-radius: 4px 4px 0px 0px; /* Rounded corners */
}

/* Language-specific styling */
pre.r::before {
    content: "R";
    color: var(--r-script-txt);
    background-color: var(--r-script-bg);
}

pre.rmd::before {
    content: "RMD";
    color: var(--rmd-txt);
    background-color: var(--rmd-bg); 
}

pre.qmd::before {
    content: "QMD";
    color: var(--rmd-txt);
    background-color: var(--rmd-bg); 
}

pre.shell::before {
    content: "Shell";
    color: var(--shell-txt);
    background-color: var(--shell-bg); 
}

pre.yaml::before {
    content: "YAML";
    color: var(--yaml-txt);
    background-color: var(--yaml-bg); 
}

pre.css::before {
    content: "CSS";
    color: var(--css-txt);
    background-color: var(--css-bg);
}

pre.markdown::before {
    content: "Markdown";
    color: var(--markdown-txt);
    background-color: var(--markdown-bg);
}

pre.html::before {
    content: "HTML";
    color: var(--html-txt);
    background-color: var(--html-bg);
}

pre.javascript::before {
    content: "JavaScript";
    color: var(--javascript-txt);
    background-color: var(--javascript-bg);
}

pre.json::before {
    content: "JSON";
    color: var(--json-txt);
    background-color: var(--json-bg);
}

pre.sql::before {
    content: "SQL";
    color: var(--sql-txt);
    background-color: var(--sql-bg);
}

pre.python::before {
    content: "Python";
    color: var(--python-txt);
    background-color: var(--python-bg);
}

pre.bash::before {
    content: "Bash";
    color: var(--bash-txt);
    background-color: var(--bash-bg);
}

pre.output::before {
    content: "Output";
    color: #333;
    background-color: #f8f9fa;
}

.copy-button {
    position: absolute;
    top: 1px;
    right: 8px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.copy-button:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.copy-button svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    transition: stroke 0.2s ease;
}

.copy-button:hover svg {
    stroke: #374151;
}

.copy-button.copied svg {
    stroke: #059669;
}

/* Button Styling */
button, input[type="submit"] {
    padding: 10px 20px;
    background-color: #F2F2F2;
    color: #333;
    border: 1px solid #E6E6E6;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    transition: background-color 0.2s ease;
}

button:hover, input[type="submit"]:hover {
    background-color: #D9D9D9;
    text-decoration: none;
    color: black;
}

button:active, input[type="submit"]:active {
    background-color: #CCCCCC;
}

.week-button {
    padding: 10px 20px;
    background-color: #F2F2F2;
    color: #333;
    border: 1px solid #E6E6E6;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    transition: background-color 0.2s ease;
}

.week-button:hover {
    background-color: #D9D9D9;
    text-decoration: none;
    color: black;
}

.week-button:active {
    background-color: #CCCCCC;
}

.tablinks.week-button {
    margin: 3px;
}

div.week-tab {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

li {
    line-height: 1.8;
}

.tabcontent {
    list-style-type: none;
}

.sunk-box {
    background-color: var(--light-bg);
    border: 1px solid #d1d1d1;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 20px;
    font-size: 1.2em;
    color: #333;
    border-radius: 4px;
    margin-left: auto;
    margin-right: auto;
}

/* Terminal Styling */
.terminal {
    background-image: url('../images/terminal.avif');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #00ff00;
    font-family: 'clacon2', Courier, monospace;
    max-width: 500px;
    height: 250px;
    width: 100%;
    margin: 10px auto 25px;
    padding: 10px;
    padding-left: 45px;
    padding-top: 45px;
    box-sizing: border-box;
    border: 2px solid #00ff00;
}

.terminal-text {
    white-space: pre-wrap;
    font-size: 1em;
    line-height: 1.5;
}

/* Alert Messages */
.tag-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 3px 4px;
    margin-bottom: 4px;
    border-radius: 1px;
    font-family: inherit;
}

.tag-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 3px 4px;
    margin-bottom: 4px;
    border-radius: 1px;
    font-family: inherit;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-family: inherit;
}


.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-family: inherit;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-family: inherit;
}



/* -----------------------------------Note Section 
 * */
.note-section {
    background-color: var(--note-light);
    border: 1px solid var(--blue);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: var(--dark-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note-section h4 {
    margin-top: 0;
    color: var(--dark-blue);
    font-weight: 600;
}

.note-section p {
    margin-bottom: 0;
}

.note-section::before {
    content: "📝 ";
    font-size: 1.2em;
    margin-right: 8px;
}

/* --------------------------Quiz and Data Table Styling 
 * */
.answer {
    list-style-type: lower-alpha;
}

.block-questions {
    padding-top: 20px;
}

.data-table {
    border-collapse: collapse;
    margin: 15px auto;
}

.data-table th {
    font-weight: bold;
    border-bottom: 2px solid #333;
    border-top: none;
}

.data-table td {
    border-bottom: 1px solid #ccc;
}

.data-table th, .data-table td {
    padding: 8px;
    text-align: left;
    border-left: none; 
    border-right: none;
}

#hideshow {
    display: none;
}

.instruction-paragraphs p {
    background-color: #f9f9f9;
    border-left: 4px solid var(--blue);
    padding: 10px 15px;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .terminal {
        padding-left: 18px;
        padding-top: 18px;
        height: 150px;
    }
    .terminal-text {
        white-space: pre-wrap;
        font-size: .8em;
        line-height: 1;
    }
}

@media (max-width: 1036px) {
    .float-logo img {
        right: calc(100vw - 14%);
        max-width: 75px;
        width: 80%;
    }
    .content {
        max-width: 600px;
    }
}

@media (max-width: 900px) {
    .footer {
        height: 0px;
    }
    
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        width: 100%;
        background-color: transparent;
        height: unset;
    }

    .nav-content {
        display: none;
        flex-direction: column;
        margin-top: -80px;
    }

    .nav-content.show {
        display: flex;
    }

    .burger {
        display: block;
        align-self: flex-end;
        background-color: var(--dark-blue);
        padding: 20px;
        padding-left: 25px;
        padding-right: 25px;
        margin-right: 15px;
        margin-top: 15px;
        z-index: 100;
    }

    .main-container {
        position: relative;
        margin-top: 15px;
        width: calc(100% - 25px);
        max-height: calc(100% - 15px);
        padding: 15px;
    }
    
    .dropdown-content {
        position: relative;
        width: 30%;
        margin-left: 35%;
    }
    
    .nav-item {
        margin: 5px 0;
        width: 100%;
    }
    
    .nav-item a {
        width: 100%;
    }
    
    .nav-item:visited a, 
    .nav-item:focus a, 
    .nav-item:hover a, 
    .nav-item:active a {
        background-color: var(--dark-blue);
    }

    .dropdown-content a:hover {
        background-color: var(--dark-blue);
        color: white;
    }

    body {
        padding-bottom: 12px;
        padding-right: 15px;
        padding-left: 15px;
        padding-top: 0px;
    }
}

@media (max-width: 800px) {
    .float-logo img {
        top: 18px;
        right: calc(100vw - 14%);
        width: 10%;
    }
    .content {
        width: 95%;
        max-width: 400px;
    }
}

/* Images-----------------------------------------
* */

.smaller-image {
    width: 400px; 
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 486px) {
    .smaller-image {
        width: 300px;
    }
}

.image-caption {
    text-align: center;
    font-style: italic;
    margin-top: 8px;
    color: #666;
}
