
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    cursor: default;
}

:root{
    --green: #47cfac;
    --gray: rgb(235, 239, 240);
    --black: #292929;
    --white: #ffffff;
}

/* En el home, no hay scroll, usamos position fiex y pripiedades de distancia en cero */
body{
    display: grid;
    height: 100vh;
    grid-template-rows: auto 1fr auto;  
}

.home-body{
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

a{
    text-decoration: none;
    display: inline;
    color: var(--black);
}

header{
    width: 100%;
    height: 140px;
    display: grid;
    grid-template-rows: 1fr 2fr;
}

header .header-icons{
    background: var(--green);
    width: 100%;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
    padding: 0 48px;

}

header .icons{
    list-style: none;
    display: flex;
    height: 100%;
    width: auto;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
}

header .icons  li{
    /* background: green; */
    height: 100%;
    display: grid;
    place-items: center;
}

header .icons  i{
    color:  var(--white);
}

header .icons i::before{
    margin: 0;
    padding: 0;
}

header nav{
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    width: 100%;
    background: white;
    align-items: center;
    box-sizing: border-box;
    padding: 0 48px;
}

.nav-logo{
    justify-self: flex-start;
    height: 100%;
    align-content: center;
}

.nav-logo a{
    display: flex;

}

.nav-logo a img{
    width: 220px;
    margin-left: -25px;
}

.profile-link{
    justify-self: flex-end;

    a{
        border-bottom: 1px solid;
    }
}

.main{
    display: grid;
    height: 100%;
    grid-template-rows: 1fr 4fr;
    justify-items: center;
    background-image: url('../assets/img/Cover.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.main h1{
    justify-self: center;
    align-self: end;
    color: var(--white);
}

.main .home-button{
    cursor: pointer;
    width: 110px;
    height: 50px;
    place-self: center;
    font-weight: bold;
    background: var(--green);
    border: none;
    border-radius: 8px;

    a{
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        width: 100%;
    }
}

.home-button:hover{
    background: #51e9c3;
}

/*------------------------------*/
h3{
    padding: 16px 0;
}

h2{
    cursor: pointer;
}

h2:hover{
    text-decoration: underline;
}

img:hover, a:hover, i:hover{
    cursor: pointer;
}


.main-blog{
    background: var(--gray);
    width: 100%;
    height: 420px; /*420px*/
    padding: 0 48px 48px 48px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 512px 1fr;
    column-gap: 40px;
}

.main-blog-presentation{
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
}

.main-blog-presentation img{
    width: 100%;
    aspect-ratio: 512 / 307;
    display: grid;
    place-items: center;
    border-radius: 8px;
 
}

.main-blog-intro{
    height: calc(100% - 60px);
    box-sizing: border-box;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.main-blog-intro p{
    /*Con las primeras tres truncamos el texto despues de x lineas*/
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    text-align: start;
    max-height: 144px;
    white-space: wrap;

}

.read-more{
    width: 100px;
    height: 42px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border-radius: 8px;
    border: 2px var(--green) solid;
    margin: 0;
}

.read-more:hover{
    background: var(--green);
}

.all-news{
    padding: 0 48px 100px 48px;
    box-sizing: border-box;
}

.all-news h3{
    text-align: center;
    border-bottom: var(--gray) 2px solid;
}

.news-grid{
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(400px,1fr));
    gap: 20px;
}

.card{
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 24px;
    padding-bottom: 24px;
    border: solid 2px var(--gray);
    border-radius: 8px;
}

.card img{
    height: 200px;
    width: 100%;
    object-fit: cover;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;

}

.card h4, .card p, .card a{
    margin: 0 24px;
}

.card p{
    max-height: 98px;
    overflow: hidden;    
    mask-image: linear-gradient(black 50% ,transparent);
}


footer{
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 12px;
    height: 80px;
    border-top: 20px solid var(--green);
    width: 100%;
    background: var(--black);
    color: var(--white);
    padding: 0 48px;
    box-sizing: border-box;
}


/* ------------------------------------------- */

.blog-main{
    display: grid;
    grid-template-rows: auto 1fr auto;
    row-gap: 32px;
}

.new-image{
    box-sizing: border-box;
    padding: 0 48px;
}

.new-image img{
    width: 100%;
    min-height: auto;
    max-height: 600px;
    display: grid;
    object-fit: cover;
    place-items: center;
    border-radius: 8px;
}

.new-content{
    padding: 0 48px;
    box-sizing: border-box;
}

.new-content h3{
    border-bottom: var(--gray) 2px solid;
}

.new-content h1{
    font-size: 28px;
    box-sizing: border-box;
    padding: 20px 0;
}

.new-content p{
    margin-bottom: 16px;
}

.contact {
    background: var(--gray);
    box-sizing: border-box;
    padding:  70px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px,600px));
    column-gap: 200px;
    row-gap: 40px;
    justify-content: space-around;
}

.contact-card{
    height: 140px;
    display: grid;
    grid-template-columns: auto 3fr;
    grid-template-rows: 1fr 2fr;
    align-items: center;
    box-sizing: border-box;
    column-gap: 16px;
}

.contact-card img{
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 100%;
}

.contact-card a{
    border-bottom: 1px solid;
    width: min-content;

}

.profile-main{
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 32px;
}



.profile-intro{
    height: auto;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: 1fr 2fr;
    align-items: center;
    box-sizing: border-box;
    column-gap: 40px;
    background: var(--gray);
    padding: 60px 48px;
}

.profile-intro img{
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 240px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 100%;
    display: grid;
    align-content: flex-start;
}

.profile-intro h1{
    font-size: 32px;
}


.profile-projects{
    padding: 0 48px;
}

.profile-projects h3{
    border-bottom: var(--gray) 2px solid;
    text-align: center;
}

.projects-grid{
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(400px,1fr));
    gap: 32px;
    justify-content: center;
}

.project-card{
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
    padding-bottom: 24px;
    border: solid 2px var(--gray);
    border-radius: 8px;
    box-sizing: border-box;
    padding: 24px;

    h4{
        align-content: center;
        font-size: 20px;

    }

}

.project-card:hover{
    cursor: pointer;
    background: var(--gray);
}



@media (max-width: 880px) {
    
    header nav, .all-news, .new-image, .new-content, .profile-projects{
        padding: 0 30px;
    }
    header .header-icons{
        justify-content: center;
    }

    .contact{
        padding: 70px 30px;
    }

    .main-blog{
        grid-template-rows: auto 1fr;
        grid-template-columns: 1fr;
        padding-bottom: 0;
        padding: 0 30px;
    }

    .main-blog-presentation img{
        width: 100%;
        height: 280px;
        object-fit: cover;
    }

    .main-blog-intro p{
        display: none;
    }

    .main-blog-intro{
        display: grid;
        margin-top: 0;
        grid-template-columns: 1fr auto;
        height: 100%;
        justify-content: space-between;
        align-items: center;
        column-gap: 24px;

    }

    .main-blog-intro h2{
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: minmax(200px,auto);
    }

    .profile-intro{
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        place-items: center;
        padding: 60px 30px;
        row-gap: 32px;

        h1{
            text-align: center;
        }


    }
}


