/* Font Imports */
@font-face {
    font-family: "Handel Gothic";
    src: url(../../fonts/handel_gothic_regular.otf) format("opentype");
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Improves perceived performance by showing fallback font immediately */
}

/* Reset and Base Styles */
html {
    font-family: "Handel Gothic", sans-serif;
    font-size: 1rem;
}

body {
    position: relative;
    width: 100%;
    margin: 0;
}

/* Typography */
h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

h4 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

/* Layout Elements */
section {
    margin-bottom: 64px;
}

header {
    width: 100%;
    background-color: #003b9f;
}

header.startpage {
    position: absolute;
    background-color: unset;
    z-index: 2;
}

header img, footer img {
    width: 256px;
    height: auto;
    margin: 12px;
}

nav > * {
    vertical-align: middle;
}

/* Navigation Components */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    min-width: 160px;
    white-space: nowrap;
    margin-left: -8px;
}

.dropdown > a:hover ~ .dropdown-content, .dropdown-content:hover {
    display: flex;
    flex-direction: column;
    line-height: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.grid-header {
    position: relative;
}

#mobile-nav {
    position: absolute;
    top: 0;
    display: none; /* flex if active */
    flex-direction: column;
    background-color: #003b9f;
    width: 100vw;
    height: 100vh;
    text-align: center;
}

#mobile-nav > a {
    margin: 12px;
}

/* Page-Specific Components */
#hero {
    position: relative;
    overflow: hidden;
}

#hero img {
    width: 100%;
    height: auto;
}

#hero .hero-text {
    color: white;
    text-align: center;
    transform: rotate(-10deg);
}

#hero .hero-text > * {
    text-shadow: black 1px 1px 30px;
}

#hero .hero-text #countdown {
    font-size: 2rem;
}

#hero .hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /*background-color: rgba(0, 0, 0, 0.5);*/
    padding: 0 50px;
    width: max-content;
}

#partners {
    background-image: url(../../images/KiJu_Stofffarbe.jpg);
    background-color: rgba(0, 0, 0, 0.25);
    background-blend-mode: darken;
    padding: 16px 0 32px 0;
}

.partner-logo {
    max-width: 20%;
}

.partner-logo img {
    width: 100%;
    height: auto;
}

#kontakt form {
    display: flex;
    flex-direction: column;
    width: 66%;
    margin: 0 auto;
}

#kontakt form > * {
    margin-bottom: 16px;
}

#kontakt form .button, #kontakt form input {
    font-family: "Handel Gothic", sans-serif;
}

#kontakt form > div:first-child > input {
    width: 100%;
}

#kontakt form > div:first-child > input:first-child {
    margin-right: 16px;
}

#kontakt form input#privacy {
    margin: 0;
}

#kontakt form > div:first-child > input:last-child {
    margin-left: 16px;
}

#kontakt input[type="text"], #kontakt input[type="email"] {
    height: 48px;
    padding: 0 16px;
}

#kontakt textarea {
    height: 128px;
    padding: 16px;
    resize: none;
}

#board {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

#board h1 {
    margin-bottom: 48px;
}

#board img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 400px;
    max-height: 400px;
    object-fit: cover;
    margin: 0 auto 16px auto;
    display: block;
}

.board-card {
    text-align: center;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
}

.board-card p {
    margin: 4px 0;
    text-align: center;
}

#imprint {
    max-width: 1000px;
    margin: 0 auto;
}

#imprint h1 {
    text-align: center;
    margin-bottom: 48px;
}

.imprint-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.imprint-section {
    display: flex;
    flex-direction: column;
}

.imprint-section h2 {
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 16px;
}

.imprint-section p {
    margin: 4px 0;
    line-height: 1.6;
}

.imprint-disclaimer {
    margin-top: 32px;
}

.imprint-disclaimer h2 {
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 16px;
}

.imprint-disclaimer p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 16px;
}

#privacy {
    max-width: 1000px;
    margin: 0 auto;
}

#privacy h1 {
    text-align: center;
    margin-bottom: 48px;
    font-size: 2.5rem;
}

#privacy h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 48px;
    margin-bottom: 24px;
}

#privacy h3 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 32px;
    margin-bottom: 16px;
}

#privacy h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 24px;
    margin-bottom: 12px;
}

#privacy p {
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: justify;
}

#privacy ul {
    margin: 16px 0;
    padding-left: 32px;
}

#privacy li {
    line-height: 1.6;
    margin-bottom: 12px;
}

#privacy a {
    color: #003b9f;
    text-decoration: underline;
}

#privacy .emphasis {
    font-weight: bold;
}

#privacy .contact-info {
    margin: 16px 0;
    line-height: 1.8;
}

#privacy .date {
    text-align: center;
    margin-top: 48px;
    font-style: italic;
}

/* UI Components */
.button {
    text-align: center;
    color: #ffffff;
    background-color: #003b9f;
    padding: 12px 24px;
    border: none;
}

.icon {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 8px;
    filter: invert(100%);
}

.checkbox-container {
    position: relative;
    width: 60%;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 1rem;
    height: 1rem;
}

/* Layout Utility Classes */
.flex {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}

.flex-row-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.space-between {
    justify-content: space-between;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 32px;
    margin: 0 auto;
    max-width: 100%;
}

.grid-header-footer {
    display: grid;
    grid-template-columns: 1fr 265px 1fr;
    align-items: center;
    justify-items: center;
}

/* Sizing Utility Classes */
.w-100 {
    width: 100%;
}

.w-60 {
    width: 60%;
}

.w-30 {
    width: 30%;
}

/* Spacing Utility Classes */
.mt-32 {
    margin-top: 32px;
}

.mr-32 {
    margin-right: 32px;
}

.p-64 {
    padding: 64px;
}

/* Text Utility Classes */
.text-center {
    text-align: center;
}

.text-white {
    color: #ffffff;
}

/* Color Utility Classes */
.background-blue {
    background-color: #003b9f;
}

/* Display Utility Classes */
.hidden {
    display: none;
}

/* Desktop-Specific Rules */
@media (min-width: 769px) {
    .hidden-desktop {
        display: none;
    }
}

/* Mobile Media Query */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    .flex-row:not(footer .flex-row) {
        flex-direction: column;
        gap: 16px;
    }

    header img, footer img {
        width: 180px;
        margin: 8px;
    }

    #hero .hero-overlay {
        top: auto;
        bottom: 20%;
        left: 50%;
        transform: translate(-50%, 0) rotate(-10deg);
        width: auto;
        padding: 16px 32px;
    }

    #hero .hero-text {
        transform: none;
    }

    #hero .hero-text > * {
        margin: 4px 0;
    }

    #hero .hero-text h1 {
        font-size: 1.6rem;
    }

    #hero .hero-text h4 {
        font-size: 1rem;
    }

    #hero .hero-text #countdown {
        font-size: 1rem;
    }

    .w-60 {
        width: 90%;
    }

    .partner-logo {
        max-width: 45%;
        margin-bottom: 16px;
    }

    #kontakt form {
        width: 90%;
    }

    #kontakt div:first-child {
        flex-direction: column;
    }

    #kontakt form input[type="text"], #kontakt form input[type="email"] {
        width: calc(100% - 32px) !important;
        margin: 0 !important;
    }

    .checkbox-container {
        width: 100%;
    }

    #kontakt form > div:last-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    #kontakt form > div:last-child .w-30 {
        width: 100%;
    }

    #next-event .flex {
        padding: 0 16px;
        width: 100%;
        box-sizing: border-box;
    }

    #partners {
        padding: 16px;
    }

    .hidden-mobile {
        display: none;
    }

    footer {
        padding-bottom: 16px;
        text-align: center;
    }

    .grid-2, .grid-header-footer:not(.grid-header) {
        grid-template-columns: 100%;
    }

    #board {
        padding: 16px 8px;
    }

    #board h1 {
        margin-bottom: 32px;
    }

    .board-card {
        padding: 8px;
    }

    .imprint-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    #imprint h1 {
        margin-bottom: 32px;
    }

    #privacy {
        padding: 16px;
    }

    #privacy h1 {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }

    #privacy h2 {
        font-size: 1.4rem;
        margin-top: 32px;
    }

    #privacy h3 {
        font-size: 1.2rem;
        margin-top: 24px;
    }

    #privacy h4 {
        font-size: 1.1rem;
        margin-top: 20px;
    }
}

/* Tablet Media Query */
@media (min-width: 769px) and (max-width: 1024px) {
    #kontakt form {
        width: 80%;
    }

    .partner-logo {
        max-width: 20%;
    }
}