/* Error message */
.error-message {
    padding: 20px;
    background: #fdd;
    color: #900;
    border: 2px solid #900;
    text-align: center;
}

/* Columns */
.columns {
    column-gap: 25px;
    column-rule: 2px dotted;
    column-width: 340px;
    -moz-column-width: 340px;
    -webkit-column-width: 340px;
}

/* Main container layout */
.main-container {
    display: flex;
    align-items: flex-start;
}

/* Content and navigation column shared styles */
.content, .navcolumn {
    background-color: #eaeced;
    border-radius: 20px 0 20px 0;
    box-shadow: 4px 4px #27272a;
    margin: 10px 0;
    opacity: 0.9;
    padding: 20px;
    text-align: justify;
}

/* Lists inside content and navcolumn align left */
.content ul, .content ol, .navcolumn ul, .navcolumn ol {
    text-align: left;
}

/* Navigation column specifics */
.navcolumn {
    width: 250px;
    flex-shrink: 0;
    background-color: #27272a;
    box-shadow: 4px 4px #023c7f;
    color: #fff;
    margin-right: 15px;
    opacity: 1;
    text-align: left;
}

.navcolumn h3 {
    margin: 0;
}

.navcolumn p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Navigation links */
.navcolumn a {
    color: #2467ab;
    text-decoration: none;
}

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

/* Content takes remaining space */
.content {
    flex-grow: 1;
}

/* Index page */
.index {
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-image: url('../img/bg.webp');
    background-size: 100% 100%;
    background-color: #000000;
    display: block;
    font-family: "Liberation Serif", "Times New Roman", Garamond, serif, Verdana, sans-serif;
    font-size: 14pt;
    margin: 0 17%;
}

/* Abstract links */
.abstract a {
    color: #2467ab;
    text-decoration: none;
}

.abstract a:active {
    color: red;
}

.abstract a:hover {
    background-color: purple;
    color: white;
    border-radius: 10px;
    text-decoration: none;
}

/* Navbar header and footer */
.navbar-header, .navbar-footer {
    background-color: #27272a;
    border-top: 3px solid #023c7f;
    color: #fff;
    display: block;
    font-family: sans-serif, Tahoma, Verdana;
    font-size: 11pt;
    padding: 10px;
    text-align: center;
}

.navbar-header a {
    color: #fff;
    text-decoration: none;
}

.navbar-footer a {
    color: #2467ab;
    text-decoration: none;
    line-height: 1.4;
}

.navbar-header a:hover,
.navbar-footer a:hover {
    text-decoration: underline;
}

/* Silver background code blocks */
.silver, code {
    font-size: 85%;
}

.silver {
    background-color: silver;
    padding: 5px;
    white-space: pre-wrap;
}

/* Left and right floated boxes */
.left, .right {
    width: 120px;
}

.left {
    float: left;
    margin-right: 15px;
}

.right {
    float: right;
    margin-left: 15px;
}

/* Figures */
figure {
    margin: 0;
}

/* Headings alignment */
h1, h2, h3, h4, h5, h6 {
    text-align: left;
}

/* List items spacing */
li:not(:last-child) {
    margin-bottom: 7px;
}

/* Preformatted text with horizontal scroll */
pre {
    overflow-x: auto;
}

kbd {
    padding: 1px 2px 0;
    border-radius: 3px;
    border: 1px solid #666;
    border-color: grey;
    background-color: #f0efdd;
    font-family: monospace;
    font-size: 85%;
    box-shadow: 2px 2px grey;
}

.alert {
    padding: 10px;
    margin: 10px 0;
    color: #000000;
    border-left: 5px solid var(--border-color);
    border-radius: 0 4px 4px 0;
    background: var(--bg-color);
    text-align: left;
}

.alert-tip { --border-color: #ffd700; --bg-color: #ffffce; }
.alert-note { --border-color: #2196F3; --bg-color: #f0f8ff; }
.alert-warning { --border-color: #FF9800; --bg-color: #fff3e0; }

.responsive-img {
    max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1440px) {
    .index {
        margin: 0 14%;
    }
    .navcolumn {
        width: 200px;
    }
}

@media (max-width: 1280px) {
    .index {
        margin: 0 10%;
    }
}

@media (max-width: 768px) {
    .index {
        margin: 0 5%;
    }
}

@media (max-width: 480px) {
    .index {
        margin: 0;
    }
}

/* Dropdown menu (hamburger) below 1050px */
@media screen and (max-width: 1050px) {
    /* Hide sidebar */
    #navcolumn {
        display: none;
    }

    /* Hamburger button */
    #dropdown-menu {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #27272a;
        border: 1px solid #023c7f;
        padding: 10px;
        border-radius: 5px;
        color: white;
        cursor: pointer;
        font-size: 18pt;
    }

    /* Dropdown content hidden by default */
    #dropdown-menu-content {
        display: none;
        position: absolute;
        top: 65px;
        right: 10px;
        padding: 10px;
        background-color: #27272a;
        border: 1px solid #023c7f;
        box-shadow: 0 0 10px rgba(0,0,0,0.5);
        border-radius: 5px;
        z-index: 1000;
    }
    
    #dropdown-menu-content h3 {
        margin: 0;
    }
    
    #dropdown-menu-content p {
        text-align: left;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

    /* Dropdown links */
    #dropdown-menu-content a {
        color: #2467ab;
        text-decoration: none;
    }

    #dropdown-menu-content a:hover {
        background-color: #023c7f;
    }

    /* Show dropdown content when active */
    #dropdown-menu.active {
        display: block;
    }
    #dropdown-menu-content.active {
        display: block;
    }
}

/* Hide hamburger menu above 1050px */
@media screen and (min-width: 1051px) {
    #dropdown-menu,
    #dropdown-menu-content {
        display: none;
    }
}
