/* Google fonts */
@import url('https://fonts.googleapis.com/css2?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');
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    font-family: "Poppins", sans-serif;
}

/* Variables */
:root {
--second-color: #676358;
    /*Other Optional main color*/
     /*--second-color: #fd7d71*/
    --text-color: #e5e5e5;
    --container-color: #000000;
    --bg-color: #000000;
    --text-alter-color: #908b7b;
    --text-header-color: #9e2c2c;
}
body{
    color: var(--text-color);
    background: var(--bg-color);
}
a{
    text-decoration: none;
}
img{
    width: 100%;
}
section{
    padding: 3rem 0 2rem;
}
.container{
    max-width: 1060px;
    margin: auto;
    width: 100%;
}
header{
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: .3s;
}
header.shadow .nav{
    background: #b9b39e;
}
header.shadow .logo,
header.shadow .admin-btn .bx{
    color: var(--bg-color);
}
/*.nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    padding: 12px 20px;
    border-radius: 12px;
}
.logo{
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-alter-color);
}
.logo span{
    color: var(--second-color);
}
.nav-right{
    display: flex;
    align-items: center;
    column-gap: 1rem;
}
.admin-btn .bx{
    color: var(--bg-color);
    font-size: 20px;
}
.write-btn{
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--bg-color);
    background: var(--bg-color);
    padding: 7px 17px;
    font-size: 0.96rem;
    border-radius: 8px;
}*/
.home{
    width: 100%;
    min-height: 440px;
    background: var(--container-color);
    display: grid;
    justify-content: center;
    align-items: center;
}
.home-content h2{
    font-family: 'Poppins light';
    font-size: 3rem;
    color: #fff;
    text-align: center;
}
.home-content h2 span{
    font-family: 'Mukta Extralight';
    font-size: 3rem;
    color: #762121;
    text-align: center;
}
.search-box{
    background: var(--text-color);
    border-radius: 10px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1.5rem;
}
.search-box .bx{
    font-size: 20px;
    color: var(--text-color);
}
.search-box input{
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 10px 0;
}

/* Posts */
.posts{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.post{
    border: 1px solid #000000;
    background: var(--bg-color);
    padding: 15px;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.post:hover{
    box-shadow: 0 4px 14px hsl(355deg, 25%, 15% / 10%);
    transition: box-shadow 0.4s;
}
.post-img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}
.post-category{
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--second-color);
    margin-top: 0.5rem;
}

.post-desc{
    font-size: .84rem;
    line-height: 1.4rem;
    color: var(--text-alter-color);
    margin: 5px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more{
    font-size: 0.96rem;
    color: var(--text-alter-color);
}
.read-more:hover{
    color: var(--text-color);
    transition: 0.3s ease-in-out;
}
.footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-top: auto;
}
.footer p{
    font-size: 0.938rem;
}
.social{
    display: flex;
    align-items: center;
    column-gap: 1rem;
}
.social .bx{
    font-size: 1.4rem;
    color: var(--text-color);
}
.social .bx:hover{
    color: var(--second-color);
    transition: 0.3s all linear;
}
.post-header{
    width: 100%;
    height: 500px;
    background: var(--container-color);
}
.post-container{
    max-width: 800px;
    margin: auto;
    width: 100%;
}
.header-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem !important;
}
#post-category{
    color: var(--second-color);
    font-size: 1rem;
    font-weight: 500;
}
.header-title{
    width: 90%;
    font-size: 2.6rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
    font-family: 'Poppins light';
}
#post-image{
    width: 100%;
    height: 420px;
}
#post-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: cover;
}
.post-content{
    margin-top: 12rem !important;
}
.post-content p{
    font-size: 1rem;
    line-height: 1.7rem;
    text-align: justify;
}
.share{
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1rem;
}
.share-title{
    font-size: 1.1rem;
}
.add-post{
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: var(--container-color);
}
.add-post h1{
    font-size: 2rem;
    color: var(--bg-color);
    margin-bottom: 2rem;
    text-align: center;
}
.add-post form{
    width: 95%;
    max-width: 640px;
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px hsl(355deg, 25%, 15% / 10%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.add-post form input[type="text"],
.add-post form input[type="file"]{
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
#editor-container{
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.add-post form button{
    padding: 0.75rem 1.5rem;
    background: var(--second-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}
.add-post form button:hover{
    background: var(--text-color);
    color: var(--bg-color);
}
.add-post a{
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--second-color);
    text-align: center;
    display: block;
    text-decoration: none;
}
.admin-panel{
    padding: 3rem 1rem;
    background: var(--container-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.admin-panel h1{
    font-size: 2rem;
    color: var(--bg-color);
    margin-bottom: 2rem;
    text-align: center;
}
.add-post-link{
    font-size: 1rem;
    color: var(--second-color);
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
}
#post-table{
    width: 100%;
    max-width: 1060px;
    border-collapse: collapse;
    margin-bottom: 2rem;
}
#post-table th,
#post-table td{
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
    
}
#post-table th{
    font-weight: 600;
    background: var(--second-color);
    color: var(--bg-color);
    text-transform: uppercase;
}
#post-table td{
    color: var(--bg-color);
}
#post-table img{
    width: 100px;
    height: 60px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}
.delete-button{
    padding: .5rem 1rem;
    background: var(--second-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}
.delete-button:hover{
    background: var(--text-color);
}
.admin-back-link{
    font-size: 1rem;
    color: var(--second-color);
    text-decoration: none;
    margin-top: 1rem;
}
/*Responsive*/
@media (max-width: 1080px){
    .container{
        margin: 0 auto;
        width: 95%;
    }
    .home-content h2{
        font-size: 3rem;
    }
    .post-content{
        margin-top: 10rem !important;
    }
    .header-img{
        width: 100%;
        height: auto;
    }
}
@media (max-width: 1060px){
    .post-container{
        margin: 0 auto;
        width: 95%;
    }
    .home-content h2{
        font-size: 3rem;
    }
    .post-content{
        margin-top: 5rem !important;
    }
    .sub-heading{
        margin-top: 5rem !important;
    }
}
@media (max-width: 920px){
    .posts{
        grid-template-columns: repeat(2, 1fr);
    }
    ol{
        padding-left: 20px;
    }
}
@media (max-width: 800px){
    .post-container{
        margin: 0 auto;
        width: 95%;
    }
}
@media (max-width: 750px){
    .post-container{
        margin: 0 auto;
        width: 95%;
    }
    .header-content{
        margin-top: 4rem !important;
    }
    .post-content h2{
        margin-top: 2rem !important;
    }
    .sub-heading{
        margin-top: 2rem !important;
    }
}
@media (max-width: 720px){
    .nav{
        padding: 8px 12px;
    }
    .section{
        padding: 2rem 0;
    }
    .header-content{
        margin-top: 4rem !important;
    }
    .home{
        min-height: 380px;
    }
    .home-content h2{
        font-size: 2.4rem;
    }
    .header-title{
        font-size: 1.6rem;
        font-weight: 500;
    }
    #post-image{
        height: auto;
        width: 100%;
    }
    .post-header{
        height: 405px;
    }
    .post-content{
        margin-top: 9rem !important;
    }
    .add-post h1, 
    .admin-panel h1{
        font-size: 1.6rem;
    }
    .post-text{
        font-size: 14px;
    }

}
@media (max-width: 570px){
    tr{
        display: grid;
    }
    .posts{
        grid-template-columns: 1fr;
    }
    .post-header{
        height: 390px;
    }
    #post-image{
        height: 320px;
    }
    .footer{
        flex-direction: column;
        row-gap: 1rem;
        padding: 20px 0;
        text-align: center;
    }
}
@media (max-width: 400px){
    .logo{
        font-size: 1.2rem;
    }
    .home-content h2{
        font-size: 2rem;
    }
    .home{
        min-height: 300px;
        padding-top: 4rem !important;
    }
    .post{
        padding: 20px;
    }
    .post-text{
        font-size: 0.9rem;
        line-height: 1.4rem;
    }
    .header-title{
        font-size: 1.2rem;
        padding: 10px;
    }
    #post-image{
        height: auto;
        max-width: 100%;
    }
    .post-header{
        height: auto;
        padding: 1rem 0;
    }
    .post-content{
        margin-top: 1rem !important;
       
    }
    footer{
        position: relative;
        width: 100%;
        bottom: 0;
        padding: 15px;
    }
}
@media (max-width: 320px){
    header-image{
        height: 180px;
    }
}
/*Posts*/
.post{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, auto));
    justify-content: center;
    gap: 1.5rem;
}
.post-box{
    background: var(--bg-color);
    box-shadow: 0 4px 14px hsl(355deg 25% 15% / 10%);
    padding: 15px;
    border-radius: 0.5rem;
    border-color: #000000;
}
.post-img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
    border-color: #000000;
}
.post-box .bx {
    font-size: 1rem;
    font-weight: 500;
    color: #999999;
}
.post-box .btn{
    font-size: 0.9rem;
    color: var(--text-header-color)
}
.post-box .btn:hover{
    color: var(--text-color);
    transition: 0.3s all linear;
}
.post-title{
    font-family: 'Poppins';
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    /*To remain Title in 2 lines*/
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.content-box .img{
    height: 100%;
   width: 100%;
   object-fit: cover;
   
}
.bx {
    display: flex;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 4px;
}
.post-box .preview-text{
    font-size: 0.9rem;
    line-height: 1.5rem;
    margin: 5px;
     /*To remain Title in 3 lines*/
     display: -webkit-box;
     -webkit-line-clamp: 3;
     -webkit-box-orient: vertical;
     overflow: hidden;
}
.profile-img{
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--second-color);
}
.back-home{
    color: var(--second-color);
    font-size: 0.9rem;
}
.header-img{
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}
.sub-heading{
    color: #fff;
    font-size: 1.2rem;
    font-family: 'Poppins Light';
    margin-top: 10rem !important;
}
.post-text{
    font-size: .5rem;
    line-height: 1.2rem;
    margin: 1rem 0;
    text-align: justify;
}
.post-text-1{
    font-family: sans-serif;
    font-style: italic;
    font-size: 0.2rem;
    line-height: 1rem;
    margin: 1rem 0;
    text-align: justify;
}
.nav-container {
    position: relative; /* Ensures absolute elements inside can move freely */
}
.user-img{
    
    top: 10px;
    left: 10px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
     /* Prevents any overflow from affecting the shape */
}
.user{
    position: absolute;
    top: 10px; /* Ensures the container follows */
    left: 10px;
   
}

/*#user-img{
    transition: opacity 0.3s ease-in-out;
    position: absolute; 
    height: auto;
}*/
.mail{
    font-size: 1rem;
    font-family: 'Poppins';
    padding: 2px 1px;
    align-items: center;
}
.sub-heading-2{
    color: #762121;
    font-size: 1.1rem;
    text-align: left;
    line-height: 1.2rem;
    font-style: italic;
}
.user{
    border-radius: 50%;
    overflow: hidden;
    width: 80px;
    height: 80px;
}
.sub-heading-3{
    font-family: 'Poppins light';
    font-size: 1rem;
    color: #9e2c2c;
}
.alt-img{
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.2rem;
}
.social-lnks{
    display: flex;
    padding: 80px 0;
}
.pic-cred{
    color: var(--text-header-color);
    font: 0.9rem;
}
.pic-cred:hover{
    color: var(--text-color);
}
.lnk{
    color: var(--text-color);
}
.footer .bx{
    align-items: center;
    padding: 5px;
}
