/* =========================
   MAIN – SECTION 1 (introblok bovenaan)
   ========================= */

/* Bron: over background img https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/background-image 
en hulp gehad van de studenten assistent*/
main > section:first-of-type {
    background-image: linear-gradient(
        to top,
        var(--gradient-top),
        var(--gradient-bottom)), url("../images/services-trainmore-secondary-hero-desktop.webp");
    background-size: cover;
    padding: 1em 0em 6em 1em;
}

/* SECTION 1 hoofdtitel */
main > section:first-of-type h1 {
    color: var(--color-text1);
    font-family: "integral";
    padding: 1em 0 0 0;
    font-size: clamp(2em, 5vw, 6em);
}

/* SECTION 1 subtitel (h2) */
main > section:first-of-type h2 {
    color: var(--color-text1);
    font-family: "Manifold";
    font-weight: 200;
    text-transform: uppercase;
    font-size: clamp(1em, 2.5vw, 1.3em);
    letter-spacing: .12em;
    padding: 0;
}

/* SECTION 1 tekst */
main > section:first-of-type p {
    font-size: clamp(0.9em, 1.2vw, 1.2em);
    color: var(--color-text1);
}

/* SECTION 1 grotere schermen: tekst smaller */
@media (min-width: 54em) {
    main > section:first-of-type p {
        padding: 0em 1em 4em 0em;
        width: 50%;
    }
}

/* =========================
   MAIN SECTION 2 (wellness cards)
   ========================= */
/* horizontale lijst met kaarten */
main > section:nth-of-type(2) > ul {
    list-style: none;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1em;
    margin: 0;
    gap: 1em;
    scrollbar-color: var(--color-scroll-red) var(--color-scroll-white);
}

/* individuele kaart */
main > section:nth-of-type(2) > ul > li {
    position: relative;
    scroll-snap-align: start;
    width: 20em;
    height: 25em;
    flex-shrink: 0; 
}

/* kaart afbeelding */
main > section:nth-of-type(2) > ul > li > img {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0em 0em 0em 1em;
}

/* kaarttitel */
main > section:nth-of-type(2) > ul > li > h3 {
    position: absolute;
    bottom: 3.5em;
    left: 1.5em;
    font-family: "integral";
    font-size: 1.2em;
    text-transform: uppercase;
    color: var(--color-text1);
    z-index: 3;
}

/* kaartknop */
main > section:nth-of-type(2) > ul > li > a {
    position: absolute;
    bottom: 2em;
    left: 1.9em;
    padding: 0.7em;
    border: 0.1em solid var(--color-border);
    color: var(--color-text1);
    text-decoration: none;
    font-family: "Manifold";
    font-weight: 600;
    font-size: 0.90em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
}

main > section:nth-of-type(2) > ul > li > a:hover {
    background: var(--color-text);
    color: var(--color-text2);
}

main > section:nth-of-type(2) > ul > li > a:active {
    transform: scale(0.95);
}

/* SECTION 2 – DESKTOP scroll buttons */
/* Uitleg van sanne gekregen hoef ik niet uit te leggen */
@supports selector(::scroll-button(*)) {
    @media (min-width: 60em) {
        main > section:nth-of-type(2) > ul {
            scroll-behavior: smooth;
            overscroll-behavior-x: contain;
            anchor-name: --wellness-carousel;
        }

        main > section:nth-of-type(2) > ul::scroll-button(*) {
            position: absolute;
            position-anchor: --wellness-carousel;
            position-area: block-end center;
            appearance: none;
            border: none;
            background: transparent;
            width: 2em;
            aspect-ratio: 1;
            border-radius: 999px;
            color: var(--color-text);
            cursor: pointer;
            font-size: 1.6rem;
        }

        main > section:nth-of-type(2) > ul::scroll-button(right) {
            content: "→";
            translate: 8em 0;
        }

        main > section:nth-of-type(2) > ul::scroll-button(left) {
            content: "←";
            translate: -8em 0;
        }

        main > section:nth-of-type(2) > ul::scroll-button(*):hover {
            background: var(--color-scroll-red);
        }

        main > section:nth-of-type(2) > ul::scroll-button(*):active {
            transform: scale(0.95);
        }

        main > section:nth-of-type(2) > ul::scroll-button(*):disabled {
            cursor: default;
            color: var(--color-muted);
        }
    }
}

/* Bron: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/flex-direction */
/* =========================
   MAIN – SECTION 3 (Hulp nodig)
   ========================= */

main > section:nth-of-type(3) {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 1em;
}

main > section:nth-of-type(3) > h2 {
    padding:0;
}

main > section:nth-of-type(3) > img {
    width: 100%;
    height: auto;
}

main > section:nth-of-type(3) > p {
    font-size: 1em;
}
/* Bron: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/align-items */
/* Bron: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/justify-content */
/* contact knop */
main > section:nth-of-type(3) > a {
    display:flex;
    justify-content: center;
    padding: 0.8em 1.8em;
    border: 0.1em solid var(--color-text);
    background-color: var(--color-button);
    color: var(--color-text2);
    font-family: "Manifold";
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

main > section:nth-of-type(3) > a:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
main > section:nth-of-type(3) > a:active {
    transform: scale(0.95);
}


@media (min-width: 50em) {
    main > section:nth-of-type(3) {
        display: grid;                 
        grid-template-columns: 1fr 1fr;                
        padding: 2em;               
    }

    main > section:nth-of-type(3) > img {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 95%;
}

    main > section:nth-of-type(3) > p {
    grid-column: 1;
    grid-row: 2;
    font-size: 1em;
    line-height: 1.6;
    padding:0em 1em 0em 0em;
}

    main > section:nth-of-type(3) > a {
    width: 55%;
}
}

@media (min-width: 60em) {
    main > section:nth-of-type(3) {
        padding:8em;
    }
}

/* =========================
   MAIN – SECTION 4 (Form)
   ========================= */
main > section:nth-of-type(4) {
    padding: 1em;
    background-color:var(--color-background-pink);
}

main > section:nth-of-type(4) > h2 {
    font-family: "integral";
    text-transform: uppercase;
    letter-spacing: .06em;
    padding:0;
}

main > section:nth-of-type(4) > p {
    font-family: "Manifold";
    font-size: 0.9em;
    line-height: 1.6;
}

main > section:nth-of-type(4) form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}
/* Bron: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/flex-wrap */
/* Uitleg van Sanne https://codepen.io/shooft/pen/vEGQEbg */
/* labels */
main > section:nth-of-type(4) form > label {
    display: flex;
    flex-wrap: wrap;      
    column-gap: 0.5em;    
}

/* required sterretje */
label:has(input[required])::after {
    content: "*";
    color:var(--color-accent-red);
}

/* input na de tekst */
label:has(input[required]) input {
    order: 1;
}

/* Inputs */
main > section:nth-of-type(4) form input[type="text"],
main > section:nth-of-type(4) form input[type="email"],
main > section:nth-of-type(4) form input[type="tel"] {
    width: 100%;
    padding: 1.3em;
    border: 1.5px solid var(--color-background-grey);
    border-radius: 0.5em;
    background: transparent;
    color: var(--color-text);
    font-family: "Manifold";
    font-size: 0.9em;
}

main > section:nth-of-type(4) form input[type="text"]:focus-visible,
main > section:nth-of-type(4) form input[type="email"]:focus-visible,
main > section:nth-of-type(4) form input[type="tel"]:focus-visible {
    outline: 2px solid var(--color-accent-red);
    outline-offset: 0.1em;
}

/* Checkbox label */
main > section:nth-of-type(4) form > label:last-of-type {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8em;
    font-size: 0.8em;
    line-height: 1.5em;
}

/* Checkbox */
main > section:nth-of-type(4) form input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
  }  

/* Button */
main > section:nth-of-type(4) form > button {
    background: var(--color-accent-red);
    color: var(--color-text1);
    border: none;
    font-family: "Manifold";
    font-size: 0.9em;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0.8em 2.5em;             
    justify-self: start;  
}

main > section:nth-of-type(4) form > button:hover {
    background: var(--color-text);
    color: var(--color-text2);
}

main > section:nth-of-type(4) form > button:active {
    transform: scale(0.97);
}

@media (min-width: 35em) {
    main > section:nth-of-type(4) {
        padding: 1em 5em 1em 1em;
    }

    /* Button */
    main > section:nth-of-type(4) form > button {
        display: flex; 
        justify-content: center;
        align-items: center;
        padding: 1em 5em ; 
    }
}

@media (min-width: 55em) {
    main > section:nth-of-type(4) {
        padding: 1em 20em 1em 20em;
    }

    main > section:nth-of-type(4) > h2 {
        text-align: center;
    }

    main > section:nth-of-type(4) > p {
        text-align: left
    }

    main > section:nth-of-type(4) form > button {
      width:20%;
    }
}

/* =========================
   MAIN – SECTION 5 (App download)
   ========================= */
main > section:nth-of-type(5) {
    display: grid;
    padding: 1em;
}

main > section:nth-of-type(5) p{
    text-align: left;
}

main > section:nth-of-type(5)> h2{
    padding:0em;
}

main > section:nth-of-type(5) > img {
    padding:0em 1.3em 0em 0em;
    width: 100%;
}

main > section:nth-of-type(5) > a {
    display: flex;
    gap: 0.5em;
}

main > section:nth-of-type(5) > a > img {
    width: 7em;
    height: auto;
    transition: transform 0.15s ease;
}

main > section:nth-of-type(5) > a > img:hover {
    transform: translateY(-0.15em);
}

main > section:nth-of-type(5) > a > img:active {
    transform: scale(0.92);
}

@media (min-width: 54em) {
    main > section:nth-of-type(5){
        padding:1em;
    }

    main > section:nth-of-type(5) > img {
        grid-row: 1 / 5;     
        max-width: 100%;
    }

    main > section:nth-of-type(5) > p {
        line-height: 1.5;
        font-size: 1em;
        width: 28em;
    }

    main > section:nth-of-type(5) > a {
        grid-column: 2;
        grid-row: 3;
    }

    main > section:nth-of-type(5) > a > img {
        max-width: 10em;
        height: auto;
    }
}

@media (min-width: 70em) {
    main > section:nth-of-type(5){
        padding:9em;
    }
    
    main > section:nth-of-type(5) > img {
        max-width: 100%;
    }
    
    main > section:nth-of-type(5) > p {
        line-height: 1.5;
        font-size: 1em;
        width: 28em;
    }
    
    main > section:nth-of-type(5) > a > img {
        max-width: 10em;
    }
}