/* =========================================================
   Orbitron
   ========================================================= */

@font-face {
    font-family: "Orbitron";
    src: url("/static/fonts/Orbitron-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Orbitron";
    src: url("/static/fonts/Orbitron-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Orbitron";
    src: url("/static/fonts/Orbitron-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   Roboteers Farben
   ========================================================= */

:root {
    --color-body-bg:        #ECEFF1;
    --color-header-bg:      #3A6D9C;
    --color-header-border:  white;
    --color-header-text:    #ffffff;
    --color-header-text-hover:    grey;
    --color-menu-bg:        #2B4F71;
    --color-menu-text:      white;
    --color-main-bg:        #FAFAFA;
    --color-main-text:      black;
    --color-main-border:    var(--color-header-border);
    --color-footer-bg:      var(--color-header-bg);
    --color-footer-text:    var(--color-header-text);
    --color-footer-border:  var(--color-header-border);
    
}


/* =========================================================
   Grundlayout
   ========================================================= */
html {
    scrollbar-gutter: stable;
}

html,
body {
    /* min-height: 100%; */
    height: 100%;
}

body {
    background-color: var(--color-body-bg);    
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: 0.875rem;

    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}




/* ========================================================================================== */
/*                                           Header                                           */
/* ========================================================================================== */

.header-grid
{
    display: grid;
    height: 100%;
    grid-template-columns: minmax(0, 20fr) minmax(0, 60fr) minmax(0, 20fr);
    grid-template-rows: minmax(0, 15fr) minmax(0, 45fr) minmax(0, 20fr) minmax(0, 20fr);
    container-type: size;       /* Enable container queries */
}
.header-title
{ 
    grid-area: 2 / 2;   /* row / column */
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertikal */

    font-family: "Orbitron";
    -webkit-text-stroke: 0.7px black;
    font-weight: 700;
    font-size: min(50cqh, 8cqw);
    /* border: 1px solid green; */
}
.header-subtitle
{
    grid-area: 3 / 2;   /* row / column */
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertikal */

    font-family: "Orbitron";
    -webkit-text-stroke: 0.5px black;
    font-weight: 700;
    font-size: min(15cqh, 3cqw);
    /* border: 1px solid blue; */
}
.header-logo-left
{
    grid-area: 1 / 1 / 4 / 2;   /* row-start / column-start / row-end / column-end */
    justify-content: flex-start;
}
.header-logo-right
{
    grid-area: 1 / 3 / 4 / 4;
    justify-content: flex-end;
}
.header-logo-left,
.header-logo-right
{
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.header-logo-left a,
.header-logo-right a
{
    display: contents;  /* sorgt dafür, dass das <a> für das Layout keine eigene Box erzeugt. Damit wird das img wieder so behandelt, als wäre es direkt im .header-logo-left bzw. .header-logo-right */
}

.header-menu
{
    grid-area: 4 / 1 / 5 / 4;
    /* grid-template-columns: auto auto 1fr;
    align-items: center;            */

    background-color: var(--color-menu-bg);

    font-family: "Orbitron";
    /* -webkit-text-stroke: 0.5px black; */
    font-weight: 400;
    font-size: 10cqh;
}
.header-menu-label
{
    margin-right: 1rem;
    font-weight: bold;
    white-space: nowrap;
}
.header-menu .nav-link {
    color: var(--color-menu-text);
}
.header-menu .nav-link:hover {
    color: var(--color-header-text-hover);
}
.header-menu .nav-link.active {
    color: var(--color-menu-text);
    text-decoration: underline overline;
    text-underline-offset: 0.3em;
    text-decoration-color: var(--color-menu-text);;
}

.header
{
    height: 18vh;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-header-bg);
    color: var(--color-header-text);
    border-left:  1px solid var(--color-header-border);
    border-right: 1px solid var(--color-header-border);
}


.header-logo-left img,
.header-logo-right img
{
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    padding: 1rem;
    object-fit: contain;
}

.header-title,
.header-subtitle {
    overflow: hidden;
    white-space: nowrap;
}


/* ========================================================================================== */
/*                                           Main Content                                     */
/* ========================================================================================== */

main {
    flex: 1;
    background-color: var(--color-main-bg);
    color: var(--color-main-text);
    border-left:  1px solid var(--color-main-border);
    border-right: 1px solid var(--color-main-border);
}

.page {
    display: none;
}
.page.active {
    display: block;
}

.page button {
    font-family: "Orbitron";
    font-weight: 500;
    color: var(--color-menu-text);
    background-color: var(--color-header-bg);
    border: 1px solid var(--color-header-border);
    padding: 0.5rem 1rem;
    cursor: pointer;
    /* display: block; */
    /* margin: 0 auto; */
    /* margin: 0; */
    margin-top: 1rem;
}
.page button:hover {
    background-color: var(--color-menu-bg);
}

.button-group {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-left: 1rem;
}

.form-group {
    display: grid;
    grid-template-columns: 180px 300px 1fr;
    align-items: center;
    margin-bottom: 0.3rem;
    margin-left: 1rem;
    /* border: 1px solid red; */
}

.form-group input,
.form-group select {
    width: min(300px, 80%);
    font-size: 0.9rem;
}

.page-description {
    text-align: center;
}




/* ========================================================================================== */
/*                                           Footer                                           */
/* ========================================================================================== */

.footer
{
    height: 5vh;
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    border-left: 1px solid var(--color-footer-border);
    border-right: 1px solid var(--color-footer-border);
}


/* =========================================================
   Überschriften
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Orbitron", sans-serif;
}

h1,
h2
{
    font-size: 1.4rem;
    text-decoration: underline;
    text-align: center;
    /* border: 1px solid red; */
    margin: 0;
}

h1
{
    display: none;  /* Hide h1 elements on Desktop screens */
}

h5
{
    margin-top: 1.2rem;
    /* border: 1px solid red; */
}

h6
{
    font-size: 0.875rem;
    margin-left: 1rem;
}

p
{
    margin-left: 1rem;
}


/* =========================================================
   Dark Mode
   ========================================================= */

@media (prefers-color-scheme: dark) {
    :root {
        --color-body-bg:        #1A1D21;
        --color-header-bg:      #242E3D;
        --color-header-border:  #36373B;
        --color-header-text:    #B7BABF;
        --color-main-bg:        #222529;
        --color-main-text:      #BFD2D3;
        --color-main-border:    var(--color-header-border);
        --color-footer-bg:      var(--color-header-bg);
        --color-footer-text:    var(--color-header-text);
        --color-footer-border:  var(--color-header-border);
    }

    a {
    color: #1E9BD1;
    }

    a:hover {
        color: #cccccc;
    }

}


/* =========================================================
   Responsive adjustments for small screens (Mobile)
   ========================================================= */
@media (max-width: 767.98px)
{
    /* ===========================================
       Header-Anpassung für kleine Bildschirme
       =========================================== */
    .header
    {
        height: 12vh;
    }
    .header-grid
    {
        grid-template-columns: minmax(0, 15fr) minmax(0, 85fr);
        grid-template-rows: minmax(0, 15fr) minmax(0, 35fr) minmax(0, 20fr) minmax(0, 30fr);
    }
    .header-menu
    {
        grid-area: 4 / 1 / 5 / 3;   /* start at row 4, column 1, end at row 5, column 3 */
    }
    .header-logo-right
    {
        display: none;
    }
    .header-logo-left img
    {
        padding: 0.5rem;
    }
    


    /* ===========================================
       Menu-Anpassung für kleine Bildschirme
       =========================================== */
    .header-menu .nav-item.ms-auto {
        margin-left: 0 !important;
    }
    .header-menu > .container-fluid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 25cqh 1fr;

        width: 100%;
        height: 100%;
        margin: 0;
        padding-top: 2px;
    }
    .header-menu .navbar-toggler {
        grid-row: 1;

        min-height: 0;
        height: 100%;
        width: 100%;

        justify-self: center;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0;
        border: 0;
        /* border: 1px solid var(--color-menu-text); */

        color: var(--color-menu-text);
        background-color: transparent;
        background-image: none;
        box-shadow: none;
    }
    .header-menu .navbar-toggler-icon {
        width: 5%;
        height: 95%;
        background-image: none;
    }
    .header-menu .navbar-toggler-text
    {
        font-size: 17cqh;
        margin-left: 0.5rem;
        font-family: "Orbitron";
        font-weight: 500;
    }
    .header-menu .navbar-collapse {
        grid-row: 2;
        width: 80%;
        justify-self: center;
        background-color: var(--color-menu-bg);
    }
    .header-menu .navbar-nav {
        text-align: center;
    }
    .header-menu .nav-item {
        border-bottom: 1px solid grey;
    }
    .header-menu .nav-link {
        font-size: 18cqh;   /* Schriftgröße der Navigationslinks */
    }
    .header-menu-label      /* Verstecke das Label "Menu:" auf kleinen Bildschirmen */
    {
        display: none;
    }
    .header-menu
    {
        padding-top: 0;
        padding-bottom: 0;
    }


    /* ===========================================
       Main-Anpassung für kleine Bildschirme
       =========================================== */
    .form-group {                       /* Für kleine Bildschirme: Formulare einspaltig */
        grid-template-columns: 1fr;
    }

    .page h1 {
        display: revert;
    }
        
}