/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;

    /*========== Colors ==========*/
    --primary-color: #4461F2;
    --primary-color-alt: #3751D8;
    --title-color: #263238;
    --text-color: #5E6C72;
    --text-color-light: #9DA8AD;
    --body-color: #FBFCFE;
    --container-color: #FFFFFF;
    --border-color: #E6E9EC;

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.25rem;
    --h1-font-size: 1.75rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1.125rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /*========== Margins ==========*/
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 968px) {
    :root {
        --biggest-font-size: 3.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

h1, h2, h3 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-2);
}

.section__subtitle {
    display: block;
    font-size: var(--normal-font-size);
    color: var(--text-color);
    margin: 0 auto 3rem;
    max-width: 600px;
}

.text-center {
    text-align: center;
}

.container {
    max-width: 1024px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/*=============== HEADER & NAV ===============*/
.header {
    width: 100%;
    background-color: var(--container-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 4px hsla(0, 0%, 15%, .1);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--title-color);
    font-weight: var(--font-bold);
}

.nav__toggle,
.nav__close {
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        background-color: var(--container-color);
        width: 80%;
        height: 100%;
        top: 0;
        right: -100%;
        padding: 4rem 2rem;
        transition: .3s;
        box-shadow: -2px 0 4px hsla(0, 0%, 15%, .1);
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: .3s;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
}

/* Show menu */
.show-menu {
    right: 0;
}

/*=============== BUTTONS ===============*/
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #FFF;
    padding: .9rem 1.75rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: .3s;
    border: 2px solid var(--primary-color);
}

.button:hover {
    background-color: var(--primary-color-alt);
    border-color: var(--primary-color-alt);
}

.button--primary {
    background-color: var(--primary-color);
}

.button--secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.button--secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.button--ghost {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    padding: .75rem 1.5rem;
}
.button--ghost:hover {
    background-color: var(--primary-color);
    color: #fff;
}


/*=============== HERO ===============*/
.hero__container {
    grid-template-columns: 1fr;
    padding-top: 2rem;
    align-items: center;
}

.hero__title {
    font-size: var(--biggest-font-size);
    line-height: 1.2;
    margin-bottom: var(--mb-1);
}

.hero__description {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-2);
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__image {
    position: relative;
    justify-self: center;
}

.hero__image img {
    border-radius: .75rem;
}

.hero__icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px hsla(220, 81%, 53%, 0.4);
}
.hero__icon--dollar {
    top: 10%;
    right: -25px;
}
.hero__icon--chart {
    bottom: 10%;
    left: -25px;
}

.hero__stats {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 2rem;
}

.hero__stat {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--container-color);
    padding: 1rem 1.5rem;
    border-radius: .5rem;
    border: 1px solid var(--border-color);
}
.hero__stat i {
    font-size: 2rem;
    color: var(--primary-color);
}
.hero__stat p {
    text-align: left;
    line-height: 1.3;
}

/*=============== ABOUT ===============*/
.about__container {
    align-items: center;
}
.about__data {
    text-align: center;
}
.about__list {
    display: flex;
    flex-direction: column;
    gap: var(--mb-0-75);
    margin-top: var(--mb-1-5);
    text-align: left;
    display: inline-flex;
}
.about__list li {
    display: flex;
    align-items: center;
    gap: var(--mb-0-5);
}
.about__list i {
    color: var(--primary-color);
    font-size: 1.25rem;
}
.about__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.about__card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: .5rem;
}
.about__card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-1);
}
.about__card h3 {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

/*=============== SERVICES ===============*/
.services__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.service__card {
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    text-align: left;
}
.service__icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: .5rem;
    display: grid;
    place-items: center;
    margin-bottom: var(--mb-1-5);
}
.service__icon i {
    font-size: 2rem;
    color: #fff;
}
.service__card h3 {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}
.service__card p {
    margin-bottom: var(--mb-1-5);
    font-size: var(--small-font-size);
}
.service__card ul {
    display: flex;
    flex-direction: column;
    gap: var(--mb-0-75);
}
.service__card ul li {
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.service__card ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: var(--font-bold);
}


/*=============== CONTACT ===============*/
.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact__card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: .75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border-color);
}
.contact__card i {
    font-size: 2rem;
    color: var(--primary-color);
}
.contact__card h4 {
    font-size: var(--normal-font-size);
    color: var(--title-color);
}
.contact__card p {
    font-size: var(--normal-font-size);
}
.contact__card span {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.contact__form {
    background-color: var(--container-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: .75rem;
}
.contact__form h3 {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1-5);
}
.form__group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.form__group label {
    font-weight: var(--font-medium);
}
.form__group input,
.form__group textarea {
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
}
.form__group input:focus,
.form__group textarea:focus {
    border-color: var(--primary-color);
}
.contact__form button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
}
.contact__form button i {
    font-size: 1.25rem;
}

/*=============== FOOTER ===============*/
.footer {
    padding: 2rem 0;
    background-color: var(--container-color);
    border-top: 1px solid var(--border-color);
}
.footer__container {
    text-align: center;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: var(--primary-color);
    padding: .5rem;
    border-radius: .25rem;
    z-index: var(--z-tooltip);
    opacity: .8;
    transition: .4s;
}
.scrollup:hover {
    opacity: 1;
}
.scrollup__icon {
    font-size: 1.25rem;
    color: #FFF;
}
/* Show Scroll Up */
.show-scroll {
    bottom: 3rem;
}

/*=============== MEDIA QUERIES ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    .hero__buttons {
        flex-direction: column;
    }
}

/* For medium devices */
@media screen and (min-width: 767px) {
    body {
        margin: 0;
    }
    .section {
        padding: 7rem 0 3rem;
    }
    .nav {
        height: calc(var(--header-height) + 1.5rem);
    }
    .nav__toggle,
    .nav__close {
        display: none;
    }
    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }
    .nav .button--ghost {
        display: inline-block;
    }
    .hero__container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    .hero__data {
        text-align: left;
    }
    .hero__image {
        order: 1;
    }
    .about__container {
        grid-template-columns: 1fr 1.2fr;
        gap: 3rem;
    }
    .about__data {
        text-align: left;
    }
    .services__container {
        grid-template-columns: repeat(4, 1fr);
    }
    .contact__container {
        grid-template-columns: .7fr 1fr;
        gap: 3rem;
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    .header, .footer {
       padding-left: 1rem;
       padding-right: 1rem;
    }
    .scrollup {
        right: 2rem;
    }
}