/* ---------------------------------------------------------- */
/*                      Variablen                             */
/* ---------------------------------------------------------- */
:root {
  --category-wild: #fff8f0;
  --category-wissen: #fff0fb;
  --category-welt: #e6fdff;
  --category-wow: #fefff0;

   --card-wow-2: #ffe13a;

  --text-dark: #212121;
  --primary-light: #f7fff0;

  --page-padding: 60px;
}


/* ---------------------------------------------------------- */
/*                        Global Styles                       */
/* ---------------------------------------------------------- */
body {
    background-image: url('../assets/images/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;

    margin: 0;
    margin-bottom: 50px;
    font-family: "Outfit", sans-serif;
    color: var(--text-dark);
}

.page-content {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}


/* ---------------------------------------------------------- */
/*                           Navbar                           */
/* ---------------------------------------------------------- */
.navbar {
    position: relative;
    height: 120px;
}

.nav-buttons {
    position: absolute;
    display: flex;
    top: 75px;
    right: 0px;
    gap: 25px;
}

.icon {
    width: 55px;
    height: 55px;
    cursor: pointer;
}

.category-icon {
    text-decoration: none;
}

/* ---------------------------------------------------------- */
/*                    Startseite - Hero Fact                  */
/* ---------------------------------------------------------- */
.hero-text {
    max-width: 60rem;
    padding-bottom: 30px;
}

.hero-text h1 {
    font-size: 5.2rem;
    font-weight: 700;
    margin-bottom: -0.1em;
    margin-top: 0;
    color: var(--primary-light);
}

.hero-text h2 {
    font-size: 5.2rem;
    font-weight: 700;
    color: var(--card-wow-2);
    line-height: 1.2;     
    margin-top: 0;
}

/* ---------------------------------------------------------- */
/*                 Startseite - Category Cards                */
/* ---------------------------------------------------------- */

.categories {
    display: flex;
    flex-wrap: nowrap;  
    gap: clamp(20px, 3vw, 60px);
}

.card {
    text-decoration: none;

    width: clamp(140px, 22vw, 275px);
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    color: var(--text-dark);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 0.5em;
    font-size: clamp(1.1rem, 1.2vw, 1.4rem);
}

.card p {
    text-decoration: none;

    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
}

.emoji {
    font-size: 3.4em;
}

/* Card Backgrounds */
.card-wild { background: var(--category-wild); }
.card-wissen { background: var(--category-wissen); }
.card-welt { background: var(--category-welt); }
.card-wow { background: var(--category-wow); }

/* ---------------------------------------------------------- */
/*                      Formular Overlay                      */
/* ---------------------------------------------------------- */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 40, 0.75);

    display: none;
    align-items: center;
    justify-content: center;
}

.overlay:target {
    display: flex;
}

.overlay-box {
    background: var(--primary-light);
    width: 90%;
    max-width: 720px;
    border-radius: 18px;
    padding: 30px;
    position: relative;
}

.overlay-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    text-decoration: none;
    color: #000;
}

.overlay-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.overlay-form {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

/* Labels */
.field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

/* Inputs */
.field input,
.field select,
.field textarea {
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    font-family: inherit;
}

.field textarea {
    resize: vertical;
    min-height: 90px;
}

/* Fokus */
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #8bcf7a;
}

/* Buttons */
.overlay-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.btn-cancel {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.btn-save {
    background: #c8efb1;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-save:hover {
    background: #b5e69b;
}


/* ---------------------------------------------------------- */
/*                            TABLET                          */
/* ---------------------------------------------------------- */
@media (max-width: 1300px) {
    .hero-text {
        padding-left: 40px;
        padding-right: 40px;
    }

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

    .hero-text h2 {
        font-size: 4rem;
    }

    .categories {
        padding-left: 40px;
        padding-right: 40px;
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 30px;
        justify-content: flex-start;
    }

    .card {
        width: clamp(200px, 38vw, 480px);
        aspect-ratio: 4 / 3;
    }
}

/* ---------------------------------------------------------- */
/*                           MOBILE                           */
/* ---------------------------------------------------------- */
@media (max-width: 800px) {
    .page-content {
        width: 100%;
    }
    .navbar {
        width: 95%;
        height: 80px;
        padding: 20px;

        display: flex;
        align-items: center;
    }

    .nav-buttons {
        position: static;        
        justify-content: center; 
        gap: 15vw;               
        width: 100%;
        margin-top: 2vh;
    }

    .icon {
        width: 45px;
        height: 45px;
    }

    .hero-text {
        padding-left: 50px;
        padding-right: 50px;
        max-width: 80%;
    }

    .hero-text h1 {
        font-size: clamp(1.8rem, 14vw, 3.8rem);
        line-height: 1.1;
        margin-bottom: 0.1em;
    }

    .hero-text h2 {
        font-size: clamp(1.8rem, 14vw, 3.8rem);
        line-height: 1.1;
        margin-bottom: 2rem;
    }

    .categories {
        padding: 20px;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x;
        gap: 16px;
    }

    .card {
        width: 215px;
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: clamp(230px, 60vw, 320px);
        aspect-ratio: 1 / 1;
        scroll-snap-align: center;

        font-size: clamp(1rem, 4vw, 1.2rem);
    }

    .card p {
        font-size: 1.1em;
    }

    .emoji {
        font-size: 2.2em;
    }
}
