/*********************/
/* CUSTOM PROPERTIES */
/*********************/
:root {
    --donkerrood: rgb(107, 24, 49);
    --cream: #f2e2da;
    --light-bg: #f7f7f7;
    --section-bg: #f1e2d5;
    --text: #261313;
    --accent: #c99a6b;
    --white: #ffffff;
    --radius-lg: 18px;
}




/************/
/* HEADING */
/************/



@media (max-width:24em) {

    h2 {
        font-size: 2em;
    }

    p {
        font-size: 1em;
    }

    a {
        font-size: 1em;
    }



}


p, h2, h1, a, li a {
	color: var(--text);
}



/************/
/* SECTION 1 */
/************/

main>div:nth-of-type(1) {
    min-height: 15em;
    background-image: url("../images/Costa-club-Hero-Image.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--donkerrood);


    @media (width > 90em) {
        min-height: 25em;
    }
}

main section:nth-of-type(1) {
    background: var(--cream);
    display: grid;
    max-width: 684px;
    padding: 5em 1em;
    margin: -80px auto 5em;
    border-radius: 24px;
    text-align: center;
    z-index: 2;

    @media (width > 24em) {
        padding: 3em 3em;
    }
}

section:nth-of-type(1) a:nth-of-type(1) {
    font-size: 1em;
    justify-self: center;
    background: var(--donkerrood);
    color: var(--white);
    padding: 1em 2em;
    border-radius: 2em;
    text-decoration: none;
    margin-bottom: 2.5em;

    @media (width > 24em) {
        font-size: 1.3em;
    }
}


section a {
    font-size: 1.3em;
    color: var(--text);
    text-decoration: underline 2px;
    text-underline-offset: 4px;
}

section a:hover {
    color: var(--hover-color);
}

section a:nth-of-type(1):hover {
  background-color: var(--hover-color);
}



section:nth-of-type(1) {
    background: var(--donkerrood);
    padding: 1.5rem 1rem 2rem;
    text-align: center;
}

















/***************************************************************************************/
/* SECTION 2, 3 (en 4) GRID (met uitleg want dit duurde 6 uur om voor elkaar te krijgen) */
/**************************************************************************************/
main {
    display: grid;
    grid-template-columns:
        1fr minmax(min(15%, 60px),
            1fr) min(690px, 100% - min(30%, 120px)) minmax(min(15%, 60px),
            1fr) 1fr;
}

/* alles in de main in het midden gezet */
main>* {
    grid-column: 3 / 4;
}

/* anders is het eerste plaatje niet de hele pagina wijd*/
main>div.hero {
    grid-column: 1 / -1;

}

/* de 2e en 3e sectie moeten in het midden van het grid staan en een border krijgen */
/* geleidelijk witruimte met clamp() (smooth want anders versprong de site) sectie 2 en 3 breder dan 4.
zonder clamp versprongen alle grids en flexbox*/
section:nth-of-type(2),
section:nth-of-type(3) {
    justify-self: center;
    grid-column: 2/5;
    border-radius: 1em;

    @media(min-width:90em) {
        width: clamp(42rem, 70vw, 70rem);
    }
}

/* belangrijk voor de halve circkels */
section:nth-of-type(2),
section:nth-of-type(3) {
    overflow: hidden;
}















/**************/
/* SECTION 2 */
/**************/
section:nth-of-type(2) {
    margin-top: 5em;
    margin-bottom: 5em;
    display: grid;
    background-color: var(--donkerrood);

    @media (width > 50em) {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

}

/* img */
section:nth-of-type(2) article:nth-of-type(2) {
    background-color: var(--donkerrood);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3em;
    min-width: 1em;

    @media (width > 50em) {
        background: var(--donkerrood);
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 30em;
        min-width: 20em;

        order: 3;

    }

}


/* text  */
section:nth-of-type(2) article:nth-of-type(1) {
    background: var(--cream);
    padding: 3em 2em;
    position: relative;
    z-index: 0;
    text-align: center;

    @media (width > 50em) {
        order: 5;
        text-align: left;
        padding: 3.5rem;
        padding-left: 2em;
    }

}

/* halve cirkel TUSSEN tekst  */
section:nth-of-type(2) article:nth-of-type(1):after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6em;
    width: 100%;
    height: 10em;
    background: var(--cream);
    border-radius: 0 0 100% 100%;

    @media (width > 50em) {
        max-height: 35em;
        order: 4;
        left: -10em;
        top: 0;


        width: 10em;
        height: 100%;

        background: var(--cream);
        border-radius: 100% 0 0 100%;
    }
}


















/************/
/* SECTION 3 */
/************/
section:nth-of-type(3) {
    margin-top: 5em;
    margin-bottom: 5em;
    display: grid;
    background-color: var(--donkerrood);

    @media (width > 50em) {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

}



/* img */
section:nth-of-type(3) article:nth-of-type(2) {
    background-color: var(--donkerrood);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3em;
    min-width: 1em;

    @media (width > 50em) {
        min-height: 30em;
        min-width: 20em;
        background: var(--donkerrood);
        display: flex;
        justify-content: center;
        align-items: center;
        order: 5;

    }

}


/* text  */
section:nth-of-type(3) article:nth-of-type(1) {
    background: var(--cream);
    padding: 3em 1em;
    position: relative;
    z-index: 0;
    text-align: center;

    @media (width > 50em) {
        max-height: 35em;
        order: 3;
        text-align: left;
        padding: 3.5rem;
        padding-left: 2em;
    }

}

/* halve cirkel TUSSEN tekst  */
section:nth-of-type(3) article:nth-of-type(1):after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -6em;
    width: 100%;
    height: 10em;
    background: var(--cream);
    border-radius: 0 0 100% 100%;

    @media (width > 50em) {
        max-height: 35em;
        order: 4;
        right: -10em;
        top: 0;


        width: 10em;
        height: 100%;

        background: var(--cream);
        border-radius: 0 100% 100% 0;
    }
}

















/************/
/* SECTION 4 */
/************/
section:nth-of-type(4) {
    background: var(--background);
    display: grid;
    gap: 2rem;
    align-items: center;
    grid-template-columns: 1fr;
    justify-self: center;

    @media (min-width: 920px) {
        grid-template-columns: minmax(18rem, 1fr) minmax(30rem, 1.2fr);
        margin-bottom: 3em;
    }
}

section:nth-of-type(4) img {
    border-radius: 1.5em;
    width: 100%;

}

section:nth-of-type(4) h2 {
    font-size: 1.5em;
    font-weight: 700;
}

section:nth-of-type(4) article {
    min-height: 3em;
    min-width: 1em;
}









/************/
/* SECTION 5 */
/************/
section:nth-of-type(5) {
    background: var(--background);
    display: grid;
    gap: 2rem;
    align-items: center;
    grid-template-columns: 1fr;
    justify-self: center;
    margin-top: 5em;

    @media (min-width: 920px) {
        grid-template-columns: minmax(30rem, 1.2fr) minmax(18rem, 1fr);
        margin-top: 3em;
    }
}

section:nth-of-type(5) img {
    border-radius: 1.5em;
    width: 100%;

}

section:nth-of-type(5) h2 {
    font-size: 1.5em;
    font-weight: 700;
}

section:nth-of-type(5) article {
    min-height: 3em;
    min-width: 1em;
}






/* easter egg */

.easter-egg {
    width: 2em;
}

.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  background: red;
  animation: fall 1.5s linear forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}