/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(files/montserrat-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(files/montserrat-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(files/montserrat-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(files/montserrat-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(files/montserrat-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(files/montserrat-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(files/roboto-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(files/roboto-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(files/roboto-latin-ext-700.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(files/roboto-latin-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    box-sizing: border-box;
}

body * {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    line-height: 1.6;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    --bs-body-bg: rgb(238, 242, 251);
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
}

h1 {
    font-size: 46px;
    color: #333333;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-size: 36px;
    color: #444444;
    font-weight: 700;
    border-bottom: 2px solid #858053;
    padding-bottom: 10px; /* Making a bit of space for the underline */
}

h3 {
    font-size: 26px;
    color: #555555;
    font-weight: 600;
    margin-bottom: 20px;
}

html {
    scroll-padding-top: 100px;
}

header {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    background-color: #333;
    color: white;
    text-align: center;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header .uct-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px;
    padding-bottom: 2px;
}

html {
    --size-of-header: calc(2em + 1.5em + 20px + 20px);
    scroll-padding-top: var(--size-of-header);
}

header .uct-logo img {
    max-height: var(--size-of-header);
    width: 100%;
}

nav {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: row;
}

#site-title {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 20px 40px 20px 20px;
}

#site-title > strong {
    font-size: 2em;
}

.divider {
    margin-top: 20px;
    margin-bottom: 20px;
    border-right: 4px solid white;
    margin-right: 40px;
}

#site-subtitle {
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    flex: 1;
    flex-direction: row;
    list-style-type: none;
    gap: 20px;
    padding: 0;
    overflow: hidden;
    margin: 0 40px 0 0;
}

nav ul li {
    margin: auto;
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding-left: 5px;
    padding-right: 5px;
}

nav ul li:hover {
    background-color: #4c8baf;
    border-radius: 5px;
}

nav ul li.active {
    background-color: #4c8baf;
    border-radius: 5px;
    box-shadow: 0 0 10px #4c8baf;
}

#hamburger {
    padding: 12px;
    border: none;
    display: none;
    min-width: 0;
    background: #333;
    align-self: center;
    margin-left: auto;
    border-radius: 6px;
}

#hamburger:hover {
    background: #484848;
}

#hamburger > span {
    color: white;
}

h1 {
    margin-top: 0;
}

h1, h2, h3, h4 {
    margin-bottom: 0;
}

:is(#from-scratch, #plms) h1:first-child {
    margin-bottom: 8px;
}

.author {
    margin-top: 0;
    font-size: 1.5rem;
    font-style: italic;
}

.author strong {
    font-size: 1.5rem;
}

figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 1px 1px 1px 1px black;
    border-radius: 16px;
    padding: 16px;
    gap: 16px;
}

figure img {
    width: 60%;
}

.wide-figure img {
    width: 100%;
}

video {
    width: 100%;
}

#main-wrap {
  margin: 0 auto 8px;
  max-width: 100%;
  box-sizing: border-box;
}

@media screen and (min-width: 800px) {
  #main-wrap {
    width: 1000px;
  }
}

section {
    margin: 20px 20px 20px 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

section#demo-video {
    padding: 0;
    box-shadow: none;
    background: none;
}

.exploration-content {
    display: flex; /* Use Flexbox to arrange items side by side */
    justify-content: space-between; /* Space between the two items */
    margin-top: 20px; /* Adds space above the pdf items */
}

.pdf-item {
    flex: 1; /* Allow each item to take equal width */
    margin: 0 10px; /* Add space between the two items */
}

.pdf-embed {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #ddd;
}

#anal-of-dataset[data-bs-toggle="modal"]:hover {
    box-shadow: 0 0 5px #007bff;
    border-radius: 5px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 10px;
    background-color: #333;
    color: white;
}

/* Results tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: center;
    background-color: #f9f9f9;
}

table thead th {
    background-color: #333;
    color: white;
    padding: 12px;
    font-weight: bold;
}


table, th, td {
    /* for boarders */
    border: 1px solid #ddd;
    padding: 8px;
}

/* just for the alternate colors */
table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Hover effect on table rows */
table tr:hover {
    background-color: #ddd;
}

/* Styling the best scores on the table */
td strong {
    font-weight: bold;
    color: #d9534f;
}

u {
    text-decoration: underline;
    font-weight: bold;
    color: #5bc0de;
}

tr:hover td.best {
    background-color: #FFF59D;
    box-shadow: 0 0 15px #FFF59D;
}

#extended-results {
    margin: 20px auto;
    width: 50%;
    display: grid;
    grid-template: auto auto / auto auto;
    grid-gap: 16px;
}

.graph {
    display: block;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.graph img {
    width: unset;
}

.move-graph-up {
    margin-top: -20px;
}

figcaption {
    font-style: italic;
}

.research-q {
    font-style: italic;
    margin-bottom: 0;
}

.discussion {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-bottom: 30px
}

.horizontal-graph {
    display: none;
}

@media (max-width: 1000px) {
    .horizontal-graph {
        display: block;
    }

    .horizontal-graph img {
        width: 100%;
    }

    .vertical-graph {
        display: none;
    }

    .discussion {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* Responsive table element to it with smaller fonts and less padding */
@media (max-width: 768px) {
    table {
        font-size: 14px;
    }

    table thead th, table td {
        padding: 6px;
    }
}

.credit:nth-child(2) {
    margin-bottom: 0;
}

.credit:nth-child(3) {
    margin-top: 0;
}

#extended-results > * {
    min-width: 0;
}

@media screen and (max-width:1300px) {
    #extended-results {
        width: 100%;
    }

    section {
        margin-left: 5px;
        margin-right: 5px;
    }

    .carousel-item .card {
        height: 100% !important;
    }

    .divider {
        display: none;
        grid-column: 1 / 3;
        grid-row: 2;
        margin: 5px 0 0 20px;
        border-right: none;
        border-bottom: 4px solid white;
    }

    header {
        grid-template-columns: minmax(0, auto) 1fr minmax(50px, auto);
    }

    #hamburger, #hamburger > .material-icons {
        aspect-ratio: 1 / 1;
    }

    #site-title {
        padding-right: 10px;
    }

    #main-wrap {
        margin-left: 8px;
        margin-right: 8px;
    }

    header > nav {
        grid-column: 1 / 4;
        grid-row: 3;
        flex-direction: column;
    }

    nav {
        display:none !important;
        padding-left: 20px;
    }

    nav ul {
        flex-direction: column;
    }

    header.open > nav {
        display: flex !important;
    }

    header.open .divider {
        display: block;
    }

    #hamburger {
        display:inline;
    }

    figure img {
        width: 100%;
    }
}
