/* ========================
   Farbvariablen
   ======================== */
:root {
    --color-background: #f8f9fa;
    --color-text: #191A23;
    --color-accent: #BBE04C;
    --color-primary-button-dark: #191A23;
    --color-primary-button-light: #FFFFFF;
    --color-link: #405C00;
    --color-error: #d9534f;
    --color-offwhite: #F3F3F3;
    --color-offblack: #1D1F29
}

.dark {
    --color-background: #191A23;
    --color-text: #F2F2F2;
    --color-text-dark: #191A23;
    --color-link: #BBE04C;
}

/* ========================
   Allgemein
   ======================== */
html, body {
    height: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    text-align: left;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.container {
    background-color: var(--color-background);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================
   Navbar
   ======================== */
.navbar {
    padding: 1rem 0;
    top: 0;
    left: 0;
    width: 100%;
}

.navbar .container {
    padding: 10px 15px;
    border-radius: 5px;
}

.navbar-brand {
    color: var(--color-text);
    font-family: 'Exo 2', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand:hover {
    color: var(--color-accent);
}

.navbar-nav .nav-link {
    color: var(--color-text);
    font-size: 1.1rem;
    margin-right: 10px;
    transition: color 0.3s ease-in-out;
    margin-left: 1rem;
}

.navbar-nav .nav-link:hover {
    text-decoration: underline;
}

li .dropdown-item-mobile {
    display: block;
    padding-left: 2.5rem;
}

.nav-item.dropdown {
    position: relative;
}

.show-on-hover:hover > .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
}

.dark .show-on-hover:hover > .dropdown-menu {
    background-color: var(--color-offblack);
}

.dropdown-menu .dropdown-item:active {
    background-color: #e0e0e0;
    color: var(--color-text);
}

.dropdown-menu .dropdown-item {
    padding: 0.3rem 0 0.3rem 1rem;
}

.dark .dropdown-menu .dropdown-item {
    color: var(--color-text);
}

.dark .dropdown-menu .dropdown-item:active {
    background-color: var(--color-offblack);
    color: var(--color-text);
}

.dark .dropdown-menu .dropdown-item:hover {
    background-color: var(--color-accent);
    color: var(--color-text-dark);
}

#theme-switch {
    height: 2.3rem;
    width: 2.3rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    appearance: none;
}

#theme-switch img#light-icon {
    display: none;
}
#theme-switch img#dark-icon {
    display: inline;
}

.dark #theme-switch img#light-icon {
    display: inline;
}
.dark #theme-switch img#dark-icon {
    display: none;
}

/* ========================
   Hero
   ======================== */
.hero-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    max-width: 45rem;
    margin: 5rem auto;
    text-align: center;
}

.hero-section h1 {
    padding: 0 1rem 0 1rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-size: 3.2rem;
}

.hero-section p {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--color-text);
    max-width: 35rem;
    margin-left: auto;
    margin-right: auto;
}

/* ========================
   Button
   ======================== */
.btn-primary {
    border: 1px solid var(--color-primary-button-dark);
    background-color: var(--color-primary-button-dark);
    color: var(--color-primary-button-light);
}

.btn-primary:hover {
    color: var(--color-primary-button-dark);
    background-color: transparent;
    border: 1px solid var(--color-primary-button-dark);
    box-shadow: 0 4px 0 0 var(--color-primary-button-dark);
}

.dark .btn-primary {
    border: 1px solid var(--color-accent);
    background-color: var(--color-accent);
    color: var(--color-text-dark);
}

.dark .btn-primary:hover {
    color: var(--color-text);
    background-color: transparent;
    border: 1px solid var(--color-accent);
    box-shadow: 0 4px 0 0 var(--color-accent);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary-button-dark);
    border: 1px solid var(--color-primary-button-dark);
}

.btn-secondary:hover {
    color: var(--color-primary-button-dark);
    background-color: transparent;
    border-color: var(--color-primary-button-dark);
    box-shadow: 0 4px 0 0 var(--color-primary-button-dark);
}

.dark .btn-secondary {
    color: var(--color-primary-button-light);
    border: 1px solid var(--color-primary-button-light);
}

.dark .btn-secondary:hover {
    color: var(--color-primary-button-light);
    border-color: var(--color-primary-button-light);
    box-shadow: 0 4px 0 0 var(--color-primary-button-light);
}

/* ========================
   Markdown Content
   ======================== */
#markdown {
    max-width: 80%;
    margin: 0 auto;
    padding: 3rem 0 0 0;
    hyphens: auto;
    text-align: left;
    line-height: 1.8;
    color: var(--color-text);
}

#markdown h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: left;
    color: var(--color-text);
    background-color: var(--color-accent);
    border-radius: 8px;
    padding: 5px 10px;
    display: inline-block;
    box-shadow: 0 4px 0 0 var(--color-text);
}

.dark #markdown h1 {
    color: var(--color-text-dark);
    box-shadow: 0 4px 0 0 var(--color-offblack);
}

#markdown h1::before {
    content: "// ";
    color: var(--color-text);
    font-weight: bold;
}

.dark #markdown h1::before {
    color: var(--color-text-dark);
}

#markdown h2 {
    font-size: 2rem;
    color: var(--color-text);
}

#markdown h3 {
    font-size: 1.5rem;
    color: var(--color-text);
}

#markdown h4 {
    font-size: 1.25rem;
    color: var(--color-text);
}

#markdown h5 {
    font-size: 1.1rem;
    color: var(--color-text);
}

#markdown h6 {
    font-size: 1rem;
    color: var(--color-text);
}

#markdown p,
#markdown li {
    font-size: 1.1rem;
    color: var(--color-text);
}

#markdown ul, #markdown ol {
    padding-left: 20px;
}

#markdown table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text);
    border: 1px solid var(--color-text);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 0 0 var(--color-text);
}

.dark #markdown table {
    color: var(--color-text);
    border: 1px solid var(--color-offwhite);
    box-shadow: 0 4px 0 0 var(--color-offwhite);
}

#markdown th,
#markdown td {
    border: 1px solid #ccc;
    padding: 12px 15px;
    text-align: left;
    border-radius: 0;
}

.dark #markdown th,
#markdown td {
    border: 1px solid var(--color-offwhite);
    padding: 12px 15px;
    text-align: left;
    border-radius: 0;
}

#markdown th {
    background-color: #f2f2f2;
    color: var(--color-text);
    font-weight: bolder;
}

.dark #markdown th {
    background-color: var(--color-offblack);
    color: var(--color-text);
    font-weight: bolder;
}

#markdown blockquote {
    background-color: var(--color-offwhite);
    padding: 20px 20px 7px 20px;
    margin-bottom: 20px;
    color: var(--color-text);
    border: 1px solid var(--color-text);
    border-radius: 10px;
    box-shadow: 0 4px 0 0 var(--color-text);
}

.dark #markdown blockquote {
    background-color: var(--color-offblack);
    padding: 20px 20px 7px 20px;
    margin-bottom: 20px;
    color: var(--color-text);
    border: 1px solid var(--color-offwhite);
    border-radius: 10px;
    box-shadow: 0 4px 0 0 var(--color-offwhite);
}

#markdown a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.3s;
}

#markdown a:hover {
    color: var(--color-link);
    text-decoration: underline;
}

#markdown code {
    background-color: #f2f2f2;
    color: var(--color-text);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 1.05rem;
}

#markdown img {
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    margin-top: 50px;
}

/* ========================
   Footer
   ======================== */
.footer {
    padding: 1.5rem 0;
    width: 100%;
    margin-top: auto;
    text-align: center;
    font-size: 0.95rem;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav li {
    display: inline;
}

.footer-nav a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: var(--color-text);
    text-decoration: underline;
    outline: none;
}

/* ========================
   404 Error Page
   ======================== */
.page-not-found {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
    text-align: center;
}

.page-not-found .error-code {
    font-size: 6rem;
    font-weight: bold;
    color: var(--color-error);
}

.page-not-found .error-message {
    font-size: 1.25rem;
    color: var(--color-text);
}


/* ========================
   Responsive Design
   ======================== */
@media (max-width: 991px) {
    .navbar-collapse .dropdown-menu {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .dropdown-item-mobile {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    #markdown {
        padding: 1rem 0 0 0;
    }

    #markdown h1 {
        font-size: 1.8rem;
    }

    #markdown h2 {
        font-size: 1.6rem;
    }

    #markdown h3 {
        font-size: 1.4rem;
    }

    #markdown h4 {
        font-size: 1.2rem;
    }

    #markdown h5 {
        font-size: 1.1rem;
    }

    #markdown h6 {
        font-size: 1rem;
    }

    #markdown p,
    #markdown li {
        font-size: 1rem;
    }
}
