/*
===============
Fonts
===============
*/
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");

/*
===============
Variables
===============
*/

:root {
    /* dark shades of primary color*/
    --clr-primary-1: hsl(228, 56%, 52%);
    --clr-primary-2: hsl(228, 77%, 27%);
    --clr-primary-3: hsl(228, 72%, 37%);
    --clr-primary-4: hsl(227, 63%, 48%);
    /* primary/main color */
    --clr-primary-5: hsl(227, 78%, 60%);
    /* lighter shades of primary color */
    --clr-primary-6: hsl(228, 89%, 70%);
    --clr-primary-7: hsl(228, 90%, 76%);
    --clr-primary-8: hsl(230, 86%, 81%);
    --clr-primary-9: hsl(228, 90%, 88%);
    --clr-primary-10: hsl(228, 100%, 96%);
    /* darkest grey - used for headings */
    --clr-grey-1: hsl(209, 61%, 16%);
    --clr-grey-2: hsl(211, 39%, 23%);
    --clr-grey-3: hsl(209, 34%, 30%);
    --clr-grey-4: hsl(209, 28%, 39%);
    /* grey used for paragraphs */
    --clr-grey-5: hsl(210, 22%, 49%);
    --clr-grey-6: hsl(209, 23%, 60%);
    --clr-grey-7: hsl(211, 27%, 70%);
    --clr-grey-8: hsl(210, 31%, 80%);
    --clr-grey-9: hsl(212, 33%, 89%);
    --clr-grey-10: hsl(210, 36%, 96%);
    --clr-white: #fff;
    --ff-primary: "Roboto", sans-serif;
    --ff-secondary: "Open Sans", sans-serif;
    --transition: all 0.3s linear;
    --spacing: 0.25rem;
    --radius: 0.5rem;
    --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --max-width: 1170px;
}

/*
===============
Global Styles
===============
*/

*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ff-secondary);
    background: var(--clr-white);
    color: var(--clr-grey-1);
    line-height: 1.5;
    font-size: 0.875rem;
    /*min-height: 100vh;*/
}

ul {
    list-style-type: none;
}

a {
    text-decoration: none;
}

img:not(.nav-logo) {
    width: 100%;
    display: block;
}

h1,
h2,
h3,
h4 {
    letter-spacing: var(--spacing);
    text-transform: capitalize;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    font-family: var(--ff-primary);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 0.875rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--clr-grey-5);
}

@media screen and (min-width: 800px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1rem;
    }

    body {
        font-size: 1rem;
    }

    h1,
    h2,
    h3,
    h4 {
        line-height: 1;
    }
}

/*  global classes */

.btn {
    text-transform: uppercase;
    background: var(--clr-primary-5);
    color: var(--clr-primary-10);
    padding: 0.375rem 0.75rem;
    letter-spacing: var(--spacing);
    display: inline-block;
    font-weight: 700;
    transition: var(--transition);
    font-size: 0.875rem;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.btn:hover {
    color: var(--clr-primary-1);
    background: var(--clr-primary-7);
}

/* section */
.section {
    padding: 5rem 0;
}

.section-center {
    width: 90vw;
    margin: 0 auto;
    max-width: 1170px;
}

@media screen and (min-width: 992px) {
    .section-center {
        width: 95vw;
    }
}

/* added during recording */
.underline {
    width: 5rem;
    height: .25rem;
    margin-bottom: .25rem;
    background: var(--clr-primary-5);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: 4rem;
    text-align: center;
}

.bg-grey {
    background: var(--clr-grey-10);
}

/*
===============
Navbar
===============
*/
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h2 {
    font-size: 1.375rem;
    padding-top: .75rem;
    padding-left: .35rem;
    color: var(--clr-grey-4);
}

.logo .nav-logo {
    width: 2.5rem;
}

.nav-links {
    display: none;
}

.nav {
    height: 5rem;
    padding: 1rem;
    display: grid;
    align-items: center;
    transition: var(--transition);
    background: var(--clr-primary-10);
}

.nav-center {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}

.nav-btn {
    background: transparent;
    border-color: transparent;
    color: var(--clr-primary-5);
    font-size: 2rem;
    cursor: pointer;
    justify-self: end; /* to move the btn to the end*/
}

@media screen and (min-width: 768px) {
    .nav {
        background: var(--clr-primary-10);
    }

    .nav-btn {
        display: none;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        justify-items: center;
        -moz-column-gap: 2rem;
             column-gap: 2rem;
        justify-self: end;
    }

    .nav-links a {
        text-transform: capitalize;
        color: var(--clr-grey-1);
        font-weight: bold;
        letter-spacing: var(--spacing);
        transition: var(--transition);
        white-space: nowrap;
    }

    .nav-links a:hover {
        color: var(--clr-primary-5)
    }

    .nav-center {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
    }
}

/* fixed navbar */
.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--clr-white);
    z-index: 2;
    box-shadow: var(--light-shadow);
}

/*
===============
Sidebar
===============
*/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr-grey-10);
    z-index: 4;
    display: grid;
    /*align-items: center;*/
    /*justify-content: center;*/
    place-items: center; /* equal align item and justify content*/
    transition: var(--transition);
    /* add later*/
    transform: translateX(-100%);
}

.show-sidebar {
    transform: translateX(0);
}

.sidebar-links {
    text-align: center;
}

.sidebar-links a {
    font-size: 2rem;
    text-transform: capitalize;
    transition: var(--transition);
    color: var(--clr-grey-5);
    letter-spacing: var(--spacing);
    display: inline-block;
    margin-bottom: 1.5rem;
}

.sidebar-links a:hover {
    color: var(--clr-primary-5);
}

/*.social-icons {*/
/*    display: grid;*/
/*    margin-top: 3rem;*/
/*    width: 20rem;*/
/*    grid-template-columns: repeat(5, 1fr);*/
/*    justify-items: center;*/
/*}*/

/*.social-icon {*/
/*    font-size: 1.5rem;*/
/*    color: var(--clr-grey-1);*/
/*    transition: var(--transition);*/
/*}*/

/*.social-icon:hover {*/
/*    color: var(--clr-primary-5);*/
/*}*/

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: transparent;
    border-color: transparent;
    transition: var(--transition);
    color: #bb2525;
    cursor: pointer;
}

.close-btn:hover {
    color: #e66b5b;
}

/*
===============
Hero
===============
*/
.hero .underline {
    margin-bottom: .5rem;
    margin-left: 0;
}

.hero-img {
    display: none;
}

.hero {
    /*background: var(--clr-primary-10);*/
    background-repeat: no-repeat;
    background-size: cover;
    background: var(--clr-grey-4);
    background-image: url("../images/background_just_640x512.png");


    /*min-height: 80vh;*/
}
.hero-center .title{
    margin-top: 2rem;
    text-align: center;
    color: var(--clr-grey-4);
}
.hero-center {
    min-height: calc(60vh - 5rem);
    display: grid;
    place-items: center;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    /*row-gap: 1rem;*/
}
.hero-center .flags-container{
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    column-gap: 1rem;
    place-items: center;
}

.flag {
    border-radius: var(--radius);
}

.percent{
    border-radius: 50%;
}

/*
===============
payment method
===============
*/
.payments{
    padding: 2rem 0;
    background: var(--clr-primary-10);
}

.payments .title{
    text-align: center;
    padding-bottom: 1rem;
}
.payments .methods{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: .502rem;
    place-items: center;

}

.methods img{
    height: 5rem;
    width: 5rem;
    object-fit: cover;
    background: var(--clr-white);
}

/*
===============
Timeline
===============
*/
.timeline-center {
    width: 80vw;
    max-width: 40rem;
}

.timeline-item {
    border-bottom: 2px dashed var(--clr-primary-5);
    margin: 0;
    padding: 4rem 2rem;
    position: relative;
}

.timeline p {
    margin-bottom: 0;
}

.timeline-item:nth-child(2n) {
    border-left: 2px dashed var(--clr-primary-5);
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
    margin-right: 2rem;
    padding-right: 2rem;
}

.timeline-item:nth-child(2n+1) {
    border-right: 2px dashed var(--clr-primary-5);
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
    margin-left: 2rem;
    padding-left: 2rem;
}

.timeline-item:first-child {
    border-top-right-radius: 0;
}

.timeline-item:last-child {
    border-bottom: 0;
    border-bottom-right-radius: 0;
}

.number {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-bottom: 0;
    background: var(--clr-primary-5);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--clr-white);
    font-weight: bold;
}

/* with nth-child instead of using 2n for even
and 2n+1 for odd we can just write
even and odd directly
*/
.timeline-item:nth-child(even) .number {
    left: 0;
}

.timeline-item:nth-child(odd) .number {
    right: -2rem;
    /*or use transform */
    /*right: 0;*/
    /*transform: translate(50%, -50%);*/
}


/*
===============
Footer
===============
*/
.footer{
    padding: 2rem;
    background: var(--clr-primary-4);
    display: grid;
    place-items: center;
}


.footer p{
    font-size: 1.25rem;
    text-transform: capitalize;
    color: var(--clr-white);
    text-align: center;
}
/*
===============
Single Page
===============
*/
.single-page{
    background: var(--clr-primary-10);
    min-height: calc(100vh - 5rem - 198px);
}

.page-info{
    max-width: 700px;
}

.page-info a{
    text-transform: uppercase;
    color: var(--clr-primary-5);
    transition: var(--transition);
}
.page-info a:hover{
    color: var(--clr-primary-1);
}
/*
===============
Projects Page
===============
*/
.project-hero{
    height: 40vh;
    background: var(--clr-primary-10);
    display: grid;
    place-items: center;
}

.project-hero .section-title{
    margin-bottom: 0;
}

.single-project{
    background: var(--clr-grey-10);
}

.project-container img{
    border-top-right-radius: var(--radius);
    border-top-left-radius: var(--radius);
    height: 15rem;
    -o-object-fit: cover;
       object-fit: cover;
}
.project-container{
    position: relative;
}

.project-icon{
    position: absolute;
    font-size: 1.75rem;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    background: var(--clr-primary-5);
    color: var(--clr-primary-2);
    border-radius: 50%;
    border: .375rem solid var(--clr-grey-10)
}

.project-details{
    padding: 2rem 1.5rem;
}

.project-footer{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    color: var(--clr-primary-5);
}

.project-footer a{
    color: var(--clr-primary-5);
    text-transform: capitalize;
    transition: var(--transition);
    justify-self: end;
}

.project-footer a:hover{
    color: var(--clr-primary-2);
}

.projects-page-center{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 3rem 1rem;
}
