home {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h2 {
    margin: 0;
}

header h2 a {
    text-decoration: none;
    color: var(--accent);
    margin: 0;
}

header:has(.search-bar) {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

header .search-bar {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 20px 10px;
    text-align: left;
    font-size: 1rem;
    color: #fff;
}

.search-bar-close {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
}

header .search-bar input {
    padding: 10px;
    width: fit-content;
    max-width: 100%;
    height: fit-content;
    border: 2px solid #ccc;
    border-radius: 20px;
    outline: none;
    background-color: #ccc;
}

header .search-bar.active {
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #222;
    height: 100dvh;
    width: 70%;
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        display: flex;
        transform: translateX(-200px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

header .search-bar.active input {
    margin-top: 50px;
    position: sticky;
    align-self: center;
    top: 50px;
}

header .search-bar-result {
    width: 100%;
    overflow: auto;
    padding: 10px;
}

header .search-bar-result .search-result-item {
    border-bottom: 1px solid var(--border);
    padding: 30px 50px;
    cursor: pointer;
}

header .search-bar-result .search-result-item:hover {
    background-color: #505050;
}

home .home-banner {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    max-height: calc(34px * 3);
    overflow: hidden;
}

home .home-banner .tag-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    background-color: #f36f6f;
    padding: 10px;
    margin: 2px;
    border-radius: 20px;
    box-shadow: 3px 3px 10px #00000020;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

home .home-recommendation {
    display: flex;
}

home .home-articles-container {
    user-select: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

home .home-most-views {
    min-width: 20%;
}

home .home-most-views .most-view-title {
    cursor: pointer;
    margin: 10px;
}

home .home-most-views .most-view-title:hover {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

home .home-articles-container .article-item {
    cursor: pointer;
    background-color: #222222;
    box-shadow: 5px 5px 15px #00000020;
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    min-width: 280px;
    max-width: 70%;
    width: 30%;
    margin-bottom: 40px;
}

home .home-articles-container .article-item:first-child {
    background-color: var(--bg);
    min-width: 280px;
    max-width: 70%;
    width: 60%;
}

home .home-articles-container .article-item:first-child h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #666666;
    text-align: center;
    margin-bottom: 15px;
}

home .show-more-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

home .show-more-btn {
    border: 2px solid #a7a7a7;
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 3px 3px 10px #00000020;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

home .home-most-likes {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px;
    padding: 50px;
    border-radius: 20px;
}

home .home-most-likes .article-item {
    cursor: pointer;
}

home .home-most-likes h3 {
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

home .home-most-likes p {
    font-size: 1.2rem;
    text-align: center;
    margin: 20px;
}

home .home-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap-reverse;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
}

home .community-members {
    flex: 0 0 30%;
    max-width: 300px;
    position: sticky;
    top: 0;
}

home .community-members h1 {
    font-size: 30px;
}

home .logo {
    justify-self: center;
    width: 150px;
    max-width: 100%;
    height: 150px;
    background-image: url(../img/noteest/noteest_min_500x_144p.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(50%);
    filter: sepia(50%);
    transform: rotate(45deg);
    animation: stepSpin 5s ease-in-out 1;
}

@keyframes stepSpin {
    0% {
        scale: 1;
        transform: rotate(45deg);
        opacity: 0.2;
    }

    25% {
        transform: rotate(225deg);
    }

    50% {
        transform: rotate(225deg);
        opacity: 1;
        scale: 1.2;
    }

    75% {
        transform: rotate(405deg);
        opacity: 0.2;
    }

    100% {
        transform: rotate(405deg);
        opacity: 1;
        scale: 1;
    }
}

home h1 {
    margin-top: 50px;
    text-align: center;
    font-size: 50px;
}

.users {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.user img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #333;
    object-fit: cover;
}

.user {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
    margin: 5px;
}

.new-note-templete {
    margin: 0px 20px;
    flex: 0 0 50%;
    max-width: 1000px;
}

.new-note-templete h1 {
    font-size: 30px;
}

.new-note-item {
    background-color: #f7f7f7;
    box-shadow: 5px 5px 15px #00000020;
    border-radius: 10px;
    padding: 20px;
    max-width: 70%;
    width: 90%;
    margin-bottom: 40px;
}

.new-note-auth {
    font-size: 15px;
    text-align: start;
}

.new-note-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: #666666;
    text-align: center;
    margin-bottom: 15px;
}

.new-note-title strong {
    cursor: pointer;
}

.new-note-summary {
    font-size: 1.2rem;
    color: #707070;
    text-align: center;
    margin: 20px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-note-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.new-note-tags .tag {
    background-color: #f36f6f;
    color: #fff;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 2px 2px 5px #00000020;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

.new-note-tags .tag:hover {
    background-color: #e2e2e2;
    color: #333;
}

.new-note-date {
    color: #999999;
    text-align: end;
}

.new-note-link {
    text-align: end;
}

.new-note-link a {
    color: #75a0c4;
    text-decoration: none;
    font-size: larger;
}

@media (max-width: 480px) {
    header .search-bar input {
        font-size: 16px;
    }
}


@media (max-width: 768px) {
    header .search-bar-result .search-result-item {
        padding: 10px 0px;
    }

    home h1 {
        text-align: center;
        font-size: 35px;
    }

    home .community-members {
        flex: 0 0 100%;
        max-width: unset;
        position: unset;
    }

    home .home-most-likes h3 {
        font-size: 2rem;
        font-weight: bold;
        text-align: center;
        margin: 0;
    }

    home .home-most-views {
        margin: 50px;
    }

    home .home-most-views h2 {
        text-align: center;
    }

    home .home-recommendation {
        flex-wrap: wrap;
    }

    .user {
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .user img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 3px solid #333;
        object-fit: cover;
    }

    .new-note-templete {
        margin: 0px;
        flex: 0 0 90%;
        max-width: 600px;
    }

    .new-note-templete h1 {
        font-size: 30px;
    }

    .new-note-title {
        font-size: 1.8rem;
        font-weight: bold;
        color: #666666;
        text-align: center;
        margin-bottom: 15px;
    }

    header {
        font-size: 20px;
        font-weight: bolder;
    }
}