@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

html {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: whitesmoke;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.main {
    width: 80%;
    margin: 50px auto;
}

.featured-article img, .article img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 15px;
}

/* stickyu Navbar */

nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: whitesmoke;
}

.nav-left h1{
    font-size: 3rem;
    color: rgb(51, 51, 51);
    margin: 15px 0;
}

#navbar.scrolled .nav-left h1 {
    font-size: 1.5rem;
    transition: font-size 0.3s ease;
}

.nav-right a {
    margin-left: 20px;
    color: hsl(0, 0%, 13%)
}

.nav-right a:hover {
    color: hsl(0, 0%, 25%);
}

/* Featured Article Styles */
.featured-article {
    margin-bottom: 50px;
}

.featured-article h1 {
    font-size: 2.5rem;
    
}

.featured-article p {
    font-size: 1.2rem;
    color: rgb(85, 85, 85);
    margin-bottom: 20px;
}

/* Smaller Articles Styles */
.smaller-articles {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.article {
    flex: 1;
    margin: 0 15px;
    box-shadow:  0 0 15px rgba(0,0,0, 0.1);
    padding: 20px;
    border-radius: 5px;
}

.article h2 {
    font-size: 1.8rem;
    margin: 15px 0;
}

.article p {
    font-size: 1rem;
    color: rgb(85, 85, 85);
    display: -webkit-box;
  -webkit-line-clamp: 5; /* Nombre de lignes max */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}



a {
    text-decoration: none;
    color: hsl(211, 100%, 50%);
    transition: color 0.3s;
}

a:hover {
    color: hsl(211, 100%, 35%)
}

/* Footer */
footer {
    color:rgb(51, 51, 51);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-icons {
    margin-top: 10px;

}

.social-icons a {
    margin: 0 10px;
    color: hsl(0, 0%, 13%);
    transition: color 0.3s;
    font-size: 1.5rem;
}

.social-icons a:hover{
    color: hsl(0, 0%, 25%);
}

/* Media Queries ---------------------------- */

/* Tablet  */
@media screen and (max-width: 1025px) {
    .nav-left h1 {
        font-size: 1.5rem !important;
    }

    .main {
        width: 90%;
    }

    .featured-article h1 {
        font-size: 2.2rem;
    }

    .article h2 {
        font-size: 1.7rem;
    }

    .smaller-articles {
        flex-direction: column;
    }

    .article {
        margin-bottom: 20px;
    }
} 

/* Smartphone Vertical */
@media screen and (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px 5%;
    }

    .nav-right a {
        margin-left: unset;
        margin-right: 20px;
    }

    .featured-article h1 {
        font-size: 1.5rem;
    }

    .featured-article p {
        font-size: 1rem;
    }

    .article {
        margin: 10px 0;
    }

    .article h2 {
        font-size: 1.3rem;
    }


}