@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

* {
    padding: 0;
    margin: 0;
    font-family: "Raleway", sans-serif;
    text-decoration: none;
    scroll-behavior: smooth;
}

:root {
    --global-max-width: 1280px;
}

p {
    line-height: 25px;
}

nav {
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: all 300ms;
}

nav .icon {
    font-size: 1.3rem;
    color: white;
    display: none;
    cursor: pointer;
}

.nav-container {
    display: flex;
    max-width: var(--global-max-width);
    justify-content: space-between;
    margin: 0 auto;
    padding: 2em;
    transition: padding 500ms;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    column-gap: 2em;
}

.nav-container .logo {
    color: white;
}

.nav-list a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.nav-list a:hover, .nav-list a:focus  {
    border-bottom: 2px solid white;
}

header {
    background: linear-gradient(to right, rgb(100, 225, 250),rgb(30, 150, 255));
}

header h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 2rem;
}

header p {
    color: white;
    margin-bottom: 4rem;
}

.header-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    max-width: var(--global-max-width);
    margin: 0 auto;
    padding: 10em 2em;
    position: relative;
    align-items: center;
}

.btn-white {
    color: rgb(90, 200, 255);
    text-decoration: none;
    background-color: white;
    padding: 1em 2em;
    border-radius: 100px;
    font-weight: 600;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.1);
    transition: transform 300ms;
}

.btn-white:hover {
    transform: translateY(-5px);
}

.btn-transparent {
    color: white;
    text-decoration: none;
    border: 2px solid white;
    padding: 1em 2em;
    border-radius: 100px;
    font-weight: 600;
    transition: color, background-color 150ms;
}

.btn-transparent:hover {
    background-color: white;
    color: rgb(90, 200, 255);
}

.btn-blue {
    color: rgb(30, 150, 255);
    background-color: rgb(232, 246, 255);
    text-decoration: none;
    border: 2px solid rgb(30, 150, 255);
    padding: 1em 2em;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: color, background-color 150ms;
}

.btn-blue:hover {
    background-color: rgb(30, 150, 255);
    color: white;
}

.btn-container {
    display: flex;
    gap: 2rem;
}

header img {
    max-width: min(100%, 500px);
    display: block;
    margin: 0 auto;
}

.container {
    max-width: var(--global-max-width);
    margin: 0 auto;
    padding: 5rem 2rem;
}

.flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 2rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cards .element:nth-child(1) {
    background-image: url(img/bg01.webp);
}
.cards .element:nth-child(2) {
    background-image: url(img/bg02.webp);
}
.cards .element:nth-child(3) {
    background-image: url(img/bg03.webp);
}

.cards .element {
    background-color: white;
    height: 500px;
    box-shadow: 15px 15px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.cards .text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background-color: white;
    border-radius: 0px 0px 10px 10px;
}

.cards h4 {
    margin-bottom: 1rem;
}

.cards p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.cards a {
    display: inline-block;
    font-size: 0.9rem;
    color: rgb(30, 150, 255);
    font-weight: 700;
    transition: transform 300ms;
}

.cards a:hover {
    transform: translateX(10px);
}

.img-text {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

.img-text h3 {
    margin-bottom: 2rem;
}

.img-text p {
    margin-bottom: 4rem;
}

.img-text img {
    max-width: min(100%, 600px);
}

form {
    max-width: 600px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

form input, textarea {
    background-color: rgb(232, 246, 255);
    border: none;
    box-shadow: none;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    flex: 1;
    font-size: 1rem;
    box-sizing: border-box;
}

form div {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

form input::placeholder, textarea::placeholder {
    font-size: 1rem;
    color: rgb(30, 150, 255);
}

form textarea {
    width: 100%;
}

footer {
    background-color: rgb(30, 150, 255);
}

.grid-autofill {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
/* 
.grid-autofill > div {
    margin: 0 auto;
} */

footer a:visited {
    color: white;
}

@media screen and (max-width: 1000px) {
    h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    .img-text {
        grid-template-columns: 1fr;
    }

    .img-text p {
        font-size: 0.9rem;
        text-align: center;
    }

    .img-text img {
        display: block;
        margin: 0 auto;
    }
    .img-text a {
        display: block;
        text-align: center;
        margin: 0 auto;
        max-width: fit-content;
    }

    .img-text.reverse .right {
        order: 0;
    }
    .img-text.reverse .left {
        order: 1;
    }
}

@media screen and (max-width: 850px) {
    .header-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-bottom: 3rem;
    }

    header .btn-container {
        flex-direction: column;
    }

    header .btn-container a {
        display: block;
        margin: 0 auto;
    }
    
    nav .icon {
        display: block;
    }
    
    .nav-list {
        display: none;
    }

    nav.responsive .nav-list {
        display: block;
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        transform: translateY(100%);
    }

    nav.responsive .nav-list a {
        display: block;
        padding: 1rem 2rem;
        background-color: rgb(30, 150, 255);
    }

    nav.responsive .nav-list a:hover {
        border: 2px solid white;
    }

    .container {
        padding-inline: 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .cards .element {
        height: 400px;
    }

    .flex {
        flex-direction: column;
        gap: 1rem;
    }

    h4, h3 {
        text-align: center;
    }

    footer h4 {
        text-align: left;
    }
    
}

@media screen and (max-width: 684px) {
    form > div {
        flex-direction: column;
    }

    .grid-autofill {
        text-align: center;
    }

    footer h4 {
        text-align: center;
    }
}