@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
img{width: 100%}

body{
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
}

nav{
    display: flex; /* now we are putting it side by side */
    padding: 2% 6%;
    justify-content:space-between;
    align-items: center;
    

}

nav img{
    width: 130px; /* Logo Size */
    
}
nav a{
    text-decoration:none;
} /* this is to remove the underline under the logo */
.logoname{
    color:black;
    font-size:15px;
    font-weight:bold;
    text-align: left;
    margin-top:-20px;
    text-decoration: none;
}
.nav-links{
    flex:1; /* flex 1 is equivalent to flex 1 1 0*/
    text-align: right;
}

.nav-links ul li{
    list-style: none; /* removing the bullet points */
    display: inline-block; /* come horizontally */
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a{
    color:black;
    text-decoration:none;
    font-size: 14px;
}

.nav-links ul li::after{
    content:'';
    width: 0%;
    height: 2px;
    background: #f44336;
    display:block;
    margin:auto; 
    transition: 0.5s;   
}

.nav-links ul li:hover::after{
    width: 100%;

}

nav .fa{
    display: none;
}

/****************/
.main-container{
    width: 90vw;
    margin: 0 auto;
    padding: 40px 0;
}
.main-container > h1{
    text-align: center;
    padding: 10px 0;
    font-size: 50px;
    font-weight: bold;
}
.main-container > p{
    font-weight: 300;
    padding: 10px 0;
    opacity: 0.7;
    text-align: center;
}
.category-head{
    margin: 30px 0;
}
.category-head ul{
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.category-title{
    flex: 0 0 calc(16.6667% - 10px);
    display: flex;
    justify-content:center;
    background: #a8a8a8;
    padding: 12px;
    color: #fff;
    margin: 5px;
    cursor: pointer;
    transition: all 0.4s ease;
}
.category-title:hover{
    opacity: 0.7;
}
.category-title li{
    padding: 0 10px;
}
.category-title span{
    color: #222;
}

/** single post **/
.posts-main-container{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 40px;
}
.posts-main-container > div{
    box-shadow: 0px 8px 22px -12px rgba(0, 0, 0, 0.64);
}
.post-img{
    position: relative;
}
.category-name{
    position: absolute;
    top: 20px;
    left: 20px;
    text-transform: uppercase;
    font-size: 13px;
    color: #fff;
    padding: 4px 10px;
    border-radius: 2px;
}
.business .category-name{
    background: #00a7ea;
}
.culture .category-name{
    background: #f03250;
}
.politics .category-name{
    background: #f0544f;
}
.finance .category-name{
    background: #2c2a4a;
}
.sports .category-name{
    background: #a1e44d;
}


.post-content{
    padding: 25px;
}
.post-content-top{
    background: #80ced7;
    color: #fff;
    opacity: 0.8;
    padding: 5px 0 5px 15px;
}
.post-content-top span{
    padding-right: 20px;
}
.post-content-top .fa-comment, .post-content-top .fa-calendar{
    padding-right: 5px;
}
.post-content h2{
    font-size: 22px;
    padding: 12px 0;
    font-weight: 400;
}
.post-content p{
    opacity: 0.7;
    font-size: 15px;
    line-height: 1.8;
}
.read-btn{
    border: none;
    padding: 8px 15px;
    display: block;
    margin: 5px auto;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid #292929;
    background: transparent;
    margin-bottom: 40px;
}

.read-btn:hover{
    background: #f6f6f6;
}



/***************/
@media(max-width: 1170px){
    .posts-main-container{
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 768px){
    .posts-main-container{
        grid-template-columns: 1fr;
    }
}

@media(max-width: 700px){
    .textbox h1{
        font-size:20px;
    
    }

    .nav-links ul li{
        display:block;
    }
    
    nav img{
        width: 90px; /* Logo Size */
    }

    .logoname{
        color:black;
        font-size:12px;
        font-weight:bold;
        text-align: left;
        margin-top:-20px;
    }
    .nav-links{
        position: fixed;
        background: #2e2c2c;
        height: 100vh;
        width: 200px;
        top:0;
        right:-200px;
        text-align:left;
        z-index:2;
        transition: 1s;

    }
    nav .fa-bars{
        display: block;
        color: black;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }
    nav .fa-times{
        display: block;
        color: white;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }

    .nav-links ul{
        padding:20px;
    }

    .nav-links ul li a{
        color:white;
        text-decoration:none;
        font-size: 14px;
    }

    .nav-links ul li::after{
        content:'';
        width: 0%;
        height: 2px;
        background: white;
        display:block;
        margin:auto; 
        transition: 0.5s;   
    }
    
    .nav-links ul li:hover::after{
        width: 100%;

    
    }
}
/***********/

.active{
    background: #f0544f;
}