/* Google fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

*{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    box-sizing: border-box;
}

/* Variable */
:root{
    --container-color: #433544;
    --second-color: #b944fd;;
    --text-color: #172317;
    --bg-color: #fff;
}
::selection {
    color: var(--bg-color);
    background: var(--second-color);
}
a {
    text-decoration: none;
}
li {
    list-style: none;
}
img {
    width: 100%;
}
section {
    padding: 3rem 0 2rem;
}
.container {
    max-width: 1068px;
    margin: auto;
    width: 100%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
}
header.shadow {
    background: var(--bg-color);
    box-shadow: 0 1px 4px hsl(0 4% 14% / 10%);
    transition: 0.4s;
}
header.shadow .logo{
    color: var(--text-color);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bg-color);
}
.logo span {
    color: var(--second-color);
}
.login{
    padding: 8px 14px;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 4px;
    background: var(--second-color);
    color: var(--bg-color);
}
.login:hover{
    background: hsl(280deg 9% 55% / 59%);
    transition: .3s;
}

/* Home */
.home {
    width: 100%;
    min-height: 440px;
    background: var(--container-color);
    display: grid;
    justify-content: center;
    align-items: center;
}
.home-text {
    color: var(--bg-color);
    text-align: center;
}
.home-title {
    font-size: 3.5rem;
}
.home-subtitle {
    font-size: 1rem;
    font-weight: 400;
}

/* Post Filter */
.post-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 1.5rem;
    margin-top: 2rem !important;
}
.filter-item {
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}
.filter-item:hover{
    background: var(--second-color);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 4px;
}
.active-filter {
    background: var(--second-color);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Posts */
.post {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 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;
}
.post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}
.category {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--second-color);
}
.post-title {
    font-size: 1.3.rem;
    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;
}
.post-date {
    display: flex;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 4px;
}
.post-description {
    font-size: 0.9rem;
    line-height: 1.5rem;
    margin: 5px 0 10px;
    /* To Remain Title in 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--second-color);
}
.profile-name {
    font-size: 0.82rem;
    font-weight: 500;
}

/* footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}
.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 Content */
.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;
}
.back-home {
    color: var(--second-color);
    font-size: 0.9rem;
}
.header-title {
    width: 90%;
    font-size: 2.6rem;
    color: var(--bg-color);
    text-align: center;
    margin-bottom: 1rem;
}
.header-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
}
.post-content {
    margin-top: 10rem !important;
}
.sub-heading {
    font-size: 1.2rem;
}
.post-text {
    font-size: 1rem;
    line-height: 1.7rem;
    margin: 1rem 0;
    text-align: justify;
}

/* Share */
.share {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1rem;
}
.share-title {
    font-size: 1.1rem;
}

/* Login */
.container2 {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4070f4;
    column-gap: 30px;
}
.form{
    position: absolute;
    max-width: 430px;
    width: 100%;
    padding: 30px;
    border-radius: 6px;
    background: #fff;
}
.form.signup {
    opacity: 0;
    pointer-events: none;
}
.forms.show-signup .form.signup {
    opacity: 1;
    pointer-events: auto;
}
.forms.show-signup .form.login {
    opacity: 0;
    pointer-events: none;
}
h4 {
    font-size: 28px;
    font-weight: 600;
    color: #232836;
    text-align: center;
}
form {
     margin-top: 30px;
}
.form .field {
    position: relative;
    height: 50px;
    width: 100%;
    margin-top: 20px;
    border-radius: 6px;
}
.field input,
.field button {
    height: 100%;
    width: 100%;
    border: none;
    font-size: 16px;
    font-weight: 400;
    border-radius: 6px;
}
.field input {
    outline: none;
    padding: 0 15px;
    border: 1px solid #CACACA;
}
.field input:focus {
    border-bottom-width: 2px;
}
.eye-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #8b8b8b;
    cursor: pointer;
    padding: 5px;
}
.field button {
    color: #fff;
    background-color: #0171d3;
    transition: all 0.3s ease;
    cursor: pointer;
}
.field button:hover {
    background-color: #016dcb;
}
.form-link {
    text-align: center;
    margin-top: 10px;
}
.form-link span, 
.form-link a {
    font-size: 14px;
    font-weight: 400;
    color: #232836;
}
.form a {
    color: #0171d3;
    text-decoration: none;
}
.form-content a:hover {
    text-decoration: underline;
}
.line {
    position: relative;
    height: 1px;
    width: 100%;
    margin: 36px 0;
    background-color: #d4d4d4;
}
.line::before {
    content: 'or';
    position: absolute;
    top: 50%;
    right: 40%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    color: #8b8b8b;
    padding: 0 15px;
}
.media-options a {
    display: flex;
    align-items: center;
    justify-content: center;
}
a.facebook {
    color: #fff;
    background-color: #4267b2;
}
a.facebook .facebook-icon {
    height: 28px;
    width: 28px;
    color: #0171d3;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}
.facebook-icon,
img.google-img {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
}
img.google-img {
    height: 20px;
    width: 20px;
    object-fit: cover;
}
a.google {
    border: 1px solid #CACACA;
}
a.google span {
    font-weight: 500;
    opacity: 0.6;
    color: #232836;
}

/* login 2 */
.overlay {
    width: 100%;
    position: absolute;
    top: 0%;
    background: rgba(0, 0, 0, 0.5);
    height: 100vh;
    z-index: -1;
    opacity: 0;
    transition: 1s;
}
.showoverlay {
    opacity: 1;
    z-index: 1;
}
.loginform {
    width: 350px;
    padding: 50px 20px;
    background-color: white;
    position: absolute;
    transition: 2s;
    left: 50%;
    top: -50%;
    z-index: 9;
    box-shadow: 0px 0px 10px 3px #ccc;
    transform: translate(-50%, -50%);
}
.showloginform {
    top: 50%;
}
.loginform input {
    width: 100%;
    margin-bottom: 15px;
    height: 45px;
}
 .loginform .eye-icon {
    top: 50%;
    right: 25px;
}
.loginform .field button {
    padding: 10px;
}
.loginform form {
    margin-top: 0;
}
.loginform span {
    position: absolute;
    right: 0px;
    width: 30px;
    height: 30px;
    color: white;
    line-height: 30px;
    cursor: pointer;
    background-color: green;
    text-align: center;
    top: 0px;
}
.loginform span:hover {
    background-color: red;
}

/* Responsive */
@media (max-width: 1060px) {
    .container {
        margin: 0 auto;
        width: 95%;
    }
    .home-text {
        width: 100%;
    }
}

@media (max-width: 800px) {
    .nav {
        padding: 14px 0;
    }
    .post-container {
        margin: 0 auto;
        width: 95%;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 10px 0;
    }
    section {
        padding: 2rem 0;
    }
    .header-content {
        margin-top: 3rem !important;
    }
    .home {
        min-height: 380px;
    }
    .home-title {
        font-size: 3rem;
    }
    .header-title {
        font-size: 2rem;
    }
    .header-img {
        height: 370px;
    }
    .post-header {
        height: 435px;
    }
    .post-content {
        margin-top: 9rem !important;
    }
}

@media (max-width: 570px) {
    .post-header {
        height: 390px;
    }
    .header-title {
        width: 100%;
    }
    .header-img {
        height: 340px;
    }
    .footer {
        flex-direction: column;
        row-gap: 1rem;
        padding: 20px 0;
        text-align: center;
    }
    .login {
        padding: 6px 12px
    }
}

@media (max-width: 396px) {
    .home-title {
        font-size: 2rem;
    }
    .home-subtitle {
        font-size: 0.9rem;
    }
    .home {
        min-height: 300px;
    }
    .post-box {
        padding: 10px;
    }
    .header-title {
        font-size: 1.4rem;
    }
    .header-img {
        height: 240px;
    }
    .post-header {
        height: 335px;
    }
    .post-content {
        margin-top: 5rem !important;
    }
    .post-text {
        font-size: 0.875rem;
        line-height: 1.5rem;
        margin: 10px 0;
    }
    .login {
        padding: 5px 10px;
    }
    .filter-item {
        font-size: 0.8rem
    }
}

@media screen and (max-width: 400px) {
    .form {
        padding: 15px 10px;
    }
}