@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&family=Saira:ital,wght@0,100..900;1,100..900&display=swap');
:root {
   --f1-red: #e10600;
   --aston-martin: #229971;
   --ferrari: #e8002d;
   --williams: #1868db;
   --mclaren: #ff8000;
   --redbull: #3671c6;
}
body {
    width: 100vw;
}
.page-wrapper {
    font-family: saira;
    background: url(../Ressourcer/design/hero-banner.jpeg) top / 163% no-repeat, black;
}
section {
    display: flex;
    justify-content: center;
}
.content-wrapper {
    width: 1080px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
img {
    display: block;
}


/* header */

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
input[type=checkbox] {
    display: none;
}
nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3rem;
    margin: 75px 0 56px 0;
    width: 90%;
    border-radius: .75rem;
    background: url(../Ressourcer/design/squares.webp) left / contain no-repeat, url(../Ressourcer/design/squares.webp) right / contain no-repeat;
    background-color: black;
}
nav a {
    text-decoration: none;
    color: white;
    padding: 1rem;
    display: block;
    text-transform: uppercase;
}
nav li:nth-of-type(2) {
    margin-right: 15%;
}
nav li:nth-of-type(3) {
    margin-left: 15%;
}
nav figure {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 9rem;
    height: 9rem;
    background-color: white;
    border: 1rem black solid;
    border-radius: 50%;
    overflow: visible;
    position: absolute;
    top: 1rem;
}
nav figure:hover {
    cursor: pointer;
}

h1,
h2 {
    color: white;
    text-transform: uppercase;
    font-weight: bold;
}
h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
}
h2 {
    font-size: 3rem;
    position: relative;
}
header h2 {
    margin-bottom: 3rem;
}
header h2::before,
header h2::after {
    content: "";
    background: url(../Ressourcer/design/dots.png);
    width: 72px;
    height: 20px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
header h2::before {
    left: -80px;
}
header h2::after {
    right: -80px;
}


/* section 1 */

.divider {
    background: url(../Ressourcer/design/stripes.webp) repeat-x;
    height: 1rem;
}
.section1 {
    display: flex;
    background-color: hsla(0, 0%, 0%, .9);
}
.three-columns {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}
.columns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.column-header {
    color: white;
    font-size: 1.5rem;
    margin-top: 3rem;
}
.columns > div {
    display: flex;
    border-radius: .5rem;
}
.column-card-1,
.column-card-2,
.column-card-3,
.column-card-4,
.column-card-5,
.column-card-6,
.column-card-7,
.column-card-8 {
    transition: transform .3s;
}
.column-card-1:hover,
.column-card-2:hover,
.column-card-3:hover,
.column-card-4:hover,
.column-card-5:hover,
.column-card-6:hover,
.column-card-7:hover,
.column-card-8:hover {
    cursor: pointer;
    transform: translateX(1rem);
}
.columns figure {
    width: 4rem;
    border-radius: .5rem 0 0 .5rem;
}
.column-card-1 figure {
    background-color: #036D72;
}
.column-card-2 figure {
    background-color: #444C56;
}
.column-card-3 figure {
    background-color: #FEB041;
}
.column-card-4 figure {
    background-color: #B8232B;
}
.columns img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top;
}
.columns .card-content {
    background-color: hsla(0, 0%, 35%, .5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    width: 256px;
    border-radius: 0 2px 0 2px;
    padding: .5rem;
}
.columns .card-header {
    color: white;
}
.columns .card-subheader,
.columns .card-text-1,
.columns .card-text-2,
.columns .card-text-3 {
    color: lightgray;
}
.columns .card-color {
    width: .5rem;
    border-radius: 0 .5rem .5rem 0;
}
.column-card-1 .card-color,
.column-card-6 figure,
.column-card-6 .card-color {
    background-color: var(--aston-martin);
}
.column-card-2 .card-color,
.column-card-7 figure,
.column-card-7 .card-color {
    background-color: var(--redbull);
}
.column-card-3 .card-color,
.column-card-8 figure,
.column-card-8 .card-color {
    background-color: var(--mclaren);
}
.column-card-4 .card-color,
.column-card-5 figure,
.column-card-5 .card-color {
    background-color: var(--ferrari);
}

.column-card-9 {
    border: .5rem solid hsla(0, 0%, 35%, .5);
}
.column-card-9 figure {
    width: 100%;
    border-radius: initial;
}
.column-card-9 img {
    aspect-ratio: initial;
    padding: 9px 0;
}
.column-card-9 .card-content {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    background-color: initial;
}
.column-card-9 .card-header,
.column-card-9 .card-text-1,
.column-card-9 .card-text-2,
.column-card-9 .card-text-3 {
    padding: .25rem .5rem;
}
.column-card-9 .card-header,
.column-card-9 .card-text-2 {
    background-color: hsla(0, 0%, 35%, .5);
}


/* section 2 */

.section2 {
    background-color: var(--f1-red);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.section2::after {
    content: "";
    background: url(../Ressourcer/design/logo-symbol-f1-white.webp) center no-repeat;
    background-color: hsla(0, 0%, 100%, .2);
    border-radius: 50%;
    width: 11rem;
    height: 11rem;
    position: absolute;
    top: 3rem;
}
.section2 h2 {
    margin: 16rem 0 3rem 0;
}
form {
    margin-bottom: 3rem;
    width: 60%;
    display: flex;
    flex-wrap: wrap;
}
label,
input,
textarea {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.2rem;
}
label {
    margin-bottom: .5rem;
    color: white;
}
label[for=name],
label[for=email],
input[type=text],
input[type=email] {
    width: calc(50% - .5rem);
}
label[for=name],
input[type=text] {
    margin-right: 1rem;
}
label[for=message] {
    width: 100%;
}
textarea {
    width: 100%;
    height: 15rem;
}
input,
textarea {
    background-color: black;
    color: white;
    border-radius: .5rem;
    padding: .5rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
}
input[type=submit] {
    width: 100%;
    background-color: white;
    color: black;
    font-weight: bold;
}


/* section 3 */

.section3 {
    background-color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.section3::after {
    content: "";
    background: url(../Ressourcer/design/logo-symbol-f1-white.webp) center no-repeat;
    background-color: hsla(0, 0%, 100%, .2);
    border-radius: 50%;
    width: 11rem;
    height: 11rem;
    position: absolute;
    top: 3rem;
}
.section3 h2 {
    margin: 16rem 0 3rem 0;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}
.cards > div {
    width: calc(25% - .75rem);
}
.cards figure {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}
.cards img {
    width: 100%;
    transition: transform .3s;
}
.cards figure::before {
    color: white;
    background-color: black;
    padding: .25rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
}
.cards .card-1 figure::before {
    content: "Sep 10 2026";
}
.cards .card-2 figure::before {
    content: "Okt 23 2026";
}
.cards .card-3 figure::before {
    content: "Nov 17 2026";
}
.cards .card-4 figure::before {
    content: "Dec 08 2026";
}
.cards .card-5 figure::before {
    content: "Jan 05 2027";
}
.cards .card-6 figure::before {
    content: "Feb 27 2027";
}
.cards .card-7 figure::before {
    content: "Mar 12 2027";
}
.cards .card-8 figure::before {
    content: "Apr 03 2027";
}
.cards figure:after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-color: hsla(0, 0%, 0%, .2);
    position: absolute;
    top: 0;
    left: 0;
    transition: background-color .3s;
}
.cards > div:hover img {
    transform: scale(1.1);
}
.cards > div:hover figure:after {
    background-color: hsla(0, 0%, 0%, .0);
}
.cards .card-content {
    background-color: white;
    border-radius: 0 0 1rem 1rem;
    padding: 2rem 1rem 1rem 1rem;
    text-align: center;
    position: relative;
}
.cards .card-content::after {
    content: "";
    display: block;
    width: 46px;
    height: 32px;
    position: absolute;
    top: 0;
    right: 50%;
    transform: translate(50%, -50%);
}
.cards .card-1 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-australia.webp);
}
.cards .card-2 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-china.webp);
}
.cards .card-3 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-usa.webp);
}
.cards .card-4 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-japan.webp);
}
.cards .card-5 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-monaco.webp);
}
.cards .card-6 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-belgium.webp);
}
.cards .card-7 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-spain.webp);
}
.cards .card-8 .card-content::after {
    background: url(../Ressourcer/country-flags/flag-italy.webp);
}


/* footer */

footer {
    display: flex;
    justify-content: center;
    background-color: var(--f1-red);
    text-transform: uppercase;
}
footer .footer-columns {
    width: 100%;
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}
footer .columns {
    flex: 1;
}
footer .column-header {
    display: flex;
    justify-content: center;
}
footer li {
    border-bottom: solid 1px black;
}
footer li:last-child {
    border: none;
}
footer a {
    text-decoration: none;
    color: black;
    display: block;
    padding: .5rem;
    text-align: center;
    transition: color .3s;
}
footer a:hover {
    color: white;
}


/* responsive */

@media (max-width: 1280px) {
    .content-wrapper {
        width: 750px;
    }

    /* header */
    h1 {
        font-size: 4.3rem;
    }
    h2 {
        font-size: 2.4rem;
    }

    /* section 1 */
    .three-columns {
        flex-wrap: wrap;
    }
    .three-columns .columns {
        width: calc(50% - 1.5rem);
    }
    .columns figure {
        width: 6rem;
    }
    .columns .card-content {
        flex: 1;
    }
    .columns:last-child {
        width: 100%;
    }
    .column-card-9 .card-img {
        width: 100%;
    }
    .column-card-9 figure{
        width: 100%;
    }

    /* section 2 */
    .section2 {
        text-align: center;
    }

    /* section 3 */
    .cards {
            font-size: .93rem;
    }
    .cards > div {
        width: calc(50% - .5rem);
    }
}
@media (max-width: 768px) {
    .content-wrapper {
        width: 90%;
    }

    /* header */
    nav ul {
        flex-direction: column;
        background: none;
        background-color: var(--f1-red);
        width: unset;
        height: unset;
        margin: 0;
        padding-top: 13rem;
        border-radius: 0;
        height: 100vh;
        justify-content: start;
        align-self: flex-end;
        position: absolute;
        z-index: 2;
        transition: transform .3s;
        transform: translateX(100%);
    }
    input:checked + nav ul {
        transform: translateX(0);
    }
    input:checked + nav figure {
        transform: translateX(50%);
    }
    label[for=mobile-menu] {
        background: url(../Ressourcer/design/hamburger-menu-white.svg) center / cover;
        display: block;
        width: 3rem;
        aspect-ratio: 1;
        position: absolute;
        top: 0;
        right: 0;
        z-index: 4;
    }
    nav figure {
        right: 20vh;
        z-index: 3;
        transform: translateX(225%);
        transition: transform .3s;
    }
    nav li {
        margin: 0 !important;
        padding: .5rem;
        padding-left: 1rem;
    }
    nav a {
        padding: 0;
        min-width: 40vh;
    }
    h1 {
        margin-top: 3rem;
    }

    /* section 1 */
    .three-columns {
        width: 100%;
    }
    .three-columns .columns {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .section1 .three-columns .column-header {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .three-columns .columns > div {
        width: calc(50% - .5rem);
    }
    .three-columns .card-content {
        flex: 1;
    }
    .section1 .three-columns .column-card-9 {
        width: 100%;
    }

    /* section 2 */
    .section2 h2 {
        text-align: center;
    }
    textarea {
        height: 10rem;
    }

    /* section 3 */
    .cards .card-content {
        font-size: 1.25rem;
    }

    /* footer */
    footer a {
        font-size: .75rem;
    }
}
@media (max-width: 640px) {
    /* section 1 */
    .three-columns .columns {
        flex-direction: column;
        width: 100%;
    }
    .three-columns .columns > div {
        width: 100%;
    }
    .section1 .three-columns .column-card-9 {
        width: calc(100% - 1rem);
    }

    /* section 2 */
    .section2 h2 {
        font-size: 2.3rem;
    }

    /* section 3 */
    .cards > div {
        width: 100%;
    }
}