@import url('https://fonts.googleapis.com/css? family=Poppins:200,300,400,500,600,700,800,900&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    box-sizing: border-box;
}

:root {
    --container-color: #090909;
    --second-color: #fd8f44;
    --text-color: #172317;
    --bg-color: #fff;

    --primary-color: #ffca00;
    --secondary-color: #240d00;
    --tertiary-color: #005100;
    --quaternary-color: #f28500;

}

::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;
}

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;
}


.container {
    max-width: 1068px;
    margin: auto;
    width: 100%;
}

.logo {
    max-width: 16rem;
    position: absolute;
    top: 2rem;
    left: 6rem;
    z-index: 20;
}

/* MENU BUTTON */

.toggle {
    position: fixed;
    top: 0;
    right: 0;
    width: 5rem;
    height: 4.8rem;
    background: var(--primary-color) url(../images/menu.png);
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
    cursor: pointer;
}

.toggle.active {
    background: var(--primary-color) url(../images/close.png);
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
}

.navigation {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navigation.active {
    left: 0;
}

.navigation ul {
    position: relative;
}

.navigation ul li {
    position: relative;
    list-style: none;
    text-align: center;
}

.navigation ul li a {
    font-size: 2.2rem;
    color: var(--tertiary-color);
    text-decoration: none;
    font-weight: 400;
}

.navigation ul li a:hover {
    color: var(--quaternary-color);
}

/* ======   HOME SECTION   ======  */

.home {
    width: 100%;
    min-height: 340px;
    background: var(--container-color);
    display: grid;
    justify-content: center;
    align-items: center;
}

.home-text {
    color: #f2caaf
        /* var(--bg-color) */
    ;
    text-align: center;
}

.home-title {
    font-size: 3rem;
    width: 100%;
}

.home-subtitle {
    color: #c9fedd;
    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;
}

.filter-item {
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
}

.active-filter {
    background: var(--second-color);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 4px;
}

/* ======   POSTS (17:30)   ======  */
.post {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, auto));
    justify-content: center;
    grid-gap: 1.5rem;
}

.post-box {
    background: var(--bg-color);
    box-shadow: 0 4px 14px hsl(355deg 25% 15% / 15%);
    padding: 15px;
    border-radius: 0.5rem;
}

.post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}

.post-img:hover {
    opacity: 0.5;
}

.category {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--second-color);
}

.post-title {
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    /*  To Retain Title in 2 Lines  */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-description {
    font-size: 0.9rem;
    line-height: 1.5rem;
    margin: 9px 0 10px;
    /*  To Retain Title in 3 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: 38px;
    height: 38px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 2px solid var(--tertiary-color);
}

.profile-name {
    font-size: 0.92rem;
    font-weight: 500;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin: 3rem;
}

.footer p {
    font-size: 1.2rem;
}

/* .social {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 1rem;
} */

/* 34:00  */
/* .social .bx {
    width: 25px;
    height: 25px;
} */

/* .social .bx:hover {
    color: var(--second-color);
    transition: 0.3s all linear;
} */

/*  POST PAGES  */

.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;
}

/* 38:00  */

.back-home {
    color: var(--second-color);
    font-size: 1.1rem;
}

.header-title {
    width: 90%;
    font-size: 2.6rem;
    color: var(--bg-color);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.header-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
}

.author {
    margin-top: 8rem;
    margin-bottom: 2rem;
    width: 90%;
    font-size: 1.1rem;

}

.post-content {
    margin-top: 1rem;
}

.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.3rem;
}

/*  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;
    }

    .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;
    }
}

@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;
    }
}

@media (max-width:396px) {
    .home-title {
        font-size: 3rem;
    }

    .home-subtitle {
        font-size: 0.9rem;
    }

    .home {
        min-height: 300px;
    }

    .post-box {
        padding: 10px;
    }

    .header-title {
        font-size: 1.4rem;
    }

    .header-img {
        height: 240px;
    }

    .logo {
        left: 1rem;
        max-width: 6.25rem;
    }

    .post-header {
        height: 335px;
    }

    .post-content {
        margin-top: 5rem;
    }

    .post-text {
        font-size: 0.875rem;
        line-height: 1.5rem;
        margin: 10px 0;
    }
}
