/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Karla:wght@300;400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Courier:wght@300;400;700&display=swap");

/* Generics */
body { overflow-x: hidden; }

.slidesframe {
    width: 70vw;
    height: 41.65vw;
    border: none;
}

p, span, li {
    color: #434662;
    font-family: 'Karla', sans-serif;
    font-size: 1em !important;
    text-align: left;
    line-height: 1.6em !important;
}

a {
    color: #ab8b9b !important;
    text-decoration: underline !important;
    background-color: transparent;
}

a:hover {
    color: #f1c3bb !important;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif !important;
    font-weight: bold !important;
    color: #434662;
    line-height: 140%;
    margin-bottom: 0.6em !important;
    margin-top: 1em !important;
}

h1 { font-size: 240% !important; }

h2 { font-size: 200% !important; }

h3 { font-size: 160% !important; }

h4 { font-size: 120% !important; }

h5 { font-size: 100% !important; }

/* Sidebar and toc */

.sidebar {
    background-color: #7a3884;
    color: #fbfbfb;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: 20%;
    overflow-y: visible;
}

.sidebar-wrapper {
    padding: 5% 10%;
    width: 100%;
    height: 100%;
    overflow: scroll;
}

.sidebar-wrapper::-webkit-scrollbar {
    width: 0 !important;
    background: transparent !important;
}

.sidebar-title-wrapper {
    margin: 10% 5% 20% 5%;
}

.sidebar-title {
    text-align: left !important;
}

.sidebar-title h1 {
    color: #fbfbfb !important;
}

.sidebar-title:after {
    content: "";
    background: #fbfbfb;
    height: 0.01em;
    width: auto;
    display: block;
    margin-top: 2em;
    margin-bottom: 2em;
}

.sidebar-logo {
    display: block;
    margin-bottom: 1.8em;
}

.abstract-sidebar p {
    color: #fbfbfb;
    font-size: 90%;
}

.sidebar-nav {
    margin: 0;
}

.sidebar .navbar-toggle {
    display: none;
}

#TOC ul {
    position: relative;
    padding-inline-start: 6%;
}

#TOC li {
    list-style: none;
    padding-bottom: 0.6em;
}

#TOC > ul > li > a {
    height: auto;
    font-family: 'Inter', sans-serif;
    font-size: 120%;
    font-weight: bold;
    padding-bottom: 0.6em;
    text-decoration: none !important;
}

#TOC li > a {
    color: #fbfbfb !important;
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    justify-content: flex-start;
    font-family: 'Inter', sans-serif;
    text-decoration: none !important;
}

#TOC li > a:hover { text-decoration: underline !important; }

.toc-section-number {
    color: inherit;
    padding-right: 0.4em;
    margin-bottom: 0.2em !important;
    display: none;
}

/* Main content */

.main-content {
    background-color: #fff;
    display: flex;
    position: relative;
    min-height: 100vh;
    height: auto;
    width: auto;
    justify-content: space-between;
    flex-direction: column;
    align-items: stretch;
}

.header-section-number {
    display: none;
}

.main-content-wrapper { padding-bottom: 15%; }

.level1 { /* wraps around main content */
    flex: 1 0 auto;
    justify-content: space-between;
    margin-left: 20%;
    padding: 2em 3em;
    max-width: 60%;
    height: auto;
}
.level1 img {
    max-width: 100%;
    padding: 1em 0;
}

.level1 .figure { padding: 1em 0; }

.level1 p, .level1 span { margin-bottom: 1rem !important; }

/* Title */

#title-container {
    text-align: left;
    margin-left: 20%;
    padding: 2em 3em;
}

#title-container:after {
    content: "";
    background: #434662;
    display: block;
    position: relative;
    height: 0.01em;
    width: auto;
    margin-top: 2em;
}

/* Tables */
table {
    border-collapse: collapse;
}
th, td {
    border: 1px solid #434662;
    padding: 0.4em
  }

/* Buttons */

.btn {
    font-weight: bold !important;
    font-family: 'Inter', sans-serif;
    color: #fbfbfb !important;
    background-color: #7a3884 !important;
    border: none !important;
    margin: 0.8em 0.8em !important;
    padding: 0.4em 0.8em !important;
    border-radius: 0 !important;
    display:block
}

.btn:hover {
    color: #fbfbfb !important;
    text-decoration: none;
    background-color: #ab8b9b !important;
}

/* Footer */

.footer {
    display: flex;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
    padding-top: 4em;
    padding-bottom: 2em;
    flex-shrink: 0;
    margin: 0;
    flex-direction: column;
    align-items: flex-end;
}

.footer:before {
    content: "";
    background-image: url(img/Gispo_tausta.png);
    background-repeat: no-repeat;
    background-size: cover;
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    z-index: 1;
    clip-path: polygon(0 10%, 20% 15%, 40% 35%, 54% 20%, 66% 40%, 78% 10%, 85% 15%, 90% 0%, 100% 0, 100% 100%, 0 100%);
}

.footer-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    z-index: 2;
}

.footer-info {
    padding: 0 1.6em;
    text-align: right;
}

.footer-version { position: relative; }

.license { padding-top: 10%; }

.footer-contact {
    margin: 0 20px;
}
.footer-contact-info {
    display: block;
    text-align: right;
}

.footer-copyright-year { font-size: 0.5rem; }

/* Content boxes */

.hint-box {
    background: #7a3884;
    padding: 10px;
    border: none;
    margin-bottom: 1rem;
}

.hint-box p {
    color: #fbfbfb;
    margin: 0 !important;
}

.note-box {
    background: #edc949;
    padding: 10px;
    border: none;
    margin-bottom: 1rem;
}

.note-box p {
    color: #444444;
    margin: 0 !important;
}

.code-box {
    background: #B6D7A8;
    padding: 10px;
    border: none;
    margin-bottom: 1rem;
}

.code-box p {
    color: #444444;
    font-family: 'Courier', sans-serif !important;
    margin: 0 !important;
}

.file-content-box {
    background: #eeeeee;
    padding: 10px;
    border: none;
    margin-bottom: 1rem;
}

.file-content-box p {
    color: #444444;
    margin: 0 !important;
}

.commandline-box {
    background: #ab8b9b;
    padding: 10px;
    border: none;
    margin-bottom: 1rem;
}

.commandline-box p {
    color: #fbfbfb;
    margin: 0 !important;
}

/* Media queries */
@media (max-width: 1540px) {
    .sidebar { width: 320px; }
    .main-content-wrapper { padding-bottom: 200px; }
    #title-container { margin-left: 320px; }
    .level1 {
        margin-left: 320px;
        width: calc(100% - 320px);
    }
}

@media (max-width: 1199px) and (min-width: 992px) { .level1 { padding: 80px 40px 25px; } }

/* Hide sidebar */
@media (max-width: 991px) {
    .sidebar {
        width: 320px;
        left: -320px;
        transition: all 0.3s ease;
    }

    .sidebar.show { left: 0; }
    .sidebar-wrapper { padding: 15px; }

    .sidebar .navbar-toggle {
        display: inline-block;
        position: fixed;
        left: 20px;
        padding: 10px 15px;
        transition: all 0.3s ease;
        border-radius: 0;
        outline: none;
    }


    #title-container { margin-left: 0; }
    .level1 {
        margin-left: 0;
        padding: 50px 40px;
        width: 100%;
        max-width: none;
    }
    .footer { margin-left: 0; }
}

@media (max-width: 767px) {
    .level1 { padding: 60px 10px; }
}
