/* トップ画面 */
/* メインビジュアル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* outline: 2px solid red; */
}
html,
body {
    height: 100%;
    max-width: 100%;
    /* overflow-x: hidden; */
    margin: 0;
    padding: 0;
}
.wrapper {
    min-height: 100%;
    position: relative;
}
.content {
    padding-bottom: 4rem;
}
/* header */
.header {
    border-bottom: 2px solid #ddd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.top-button-flex {
    display: flex;
    align-items: center;
}
@media (max-width: 768px) {
    .top-button-flex {
        flex-direction: column;
    }
    .sign-up-button,
    .login-button {
        width: 100px;
        font-size: 12px;
        margin-right: 0;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .sign-up-button {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .header {
        border-bottom: none;
        box-shadow: none;
    }
    .top-button-flex {
        flex-direction: initial;
    }
    .sign-up-button,
    .login-button {
        width: unset;
        font-size: 10px;
        padding-right: 1rem;
        padding-left: 1rem;
        margin-bottom: 0;
    }
    .sign-up-button {
        margin-right: 1rem;
    }
}

/* footer */
.footer {
    width: 100%;
    height: 4rem;
    line-height: 4rem;
    position: absolute;
    bottom: 0;
}
.footer-login {
    position: unset;
}

.footer-admin {
    width: 100%;
    height: 4rem;
    line-height: 4rem;
}
.footer-copy {
    background: linear-gradient(90deg, #00c6ff, #0072ff, #00ff72);
    -webkit-background-clip: text;
    color: transparent;
}
ul,
li {
    list-style: none;
}
.top-mv {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url("/images/index/bookshelves.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.top-mv::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 115, 221, 0.4);
    pointer-events: none;
    z-index: 10;
}
.top-mv-box {
    position: absolute;
    width: 80%;
    height: auto;
    background-color: white;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.top-mv-title {
    font-size: 2.8rem;
    line-height: 1.5;
    font-weight: 600;
    background: linear-gradient(90deg, #00c6ff 20%, #0072ff 50%, #00ff72 80%);
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 1rem;
}
.top-mv-sutitle {
    line-height: 1.8;
}
.top-mv-sutitle span {
    background: linear-gradient(
        transparent 40%,
        yellow 40% 90%,
        transparent 90%
    );
}
.top-my-img-flex {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.top-mv-flex {
    display: flex;
    flex-direction: column;
}
.top-my-img {
    width: calc((100% / 3) - 1rem);
    height: 100%;
    aspect-ratio: 200/130;
    margin-right: 1rem;
}
.top-my-img:nth-child(3n) {
    margin-right: 0;
}

.top-mv-text {
    text-align: left;
    line-height: 1.8;
}
.top-mv-list {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}
.top-mv-list-item {
    display: flex;
    align-items: center;
    color: #000;
    margin-bottom: 1rem;
    font-weight: 600;
}
.check-img {
    width: 1.2rem;
    margin-right: 0.5rem;
}
.list-item-text {
    font-size: 16px;
}
@media (max-width: 1024px) {
    .list-item-text {
        font-size: 12px;
    }
    .top-mv-box {
        width: 90%;
    }
    .top-my-img {
        margin-right: 1rem;
    }
    .top-mv {
        height: 80vh;
    }
}
@media (max-width: 768px) {
    .list-item-text {
        font-size: 12px;
    }
    .top-my-img-flex {
        margin-right: auto;
        margin-bottom: 1rem;
    }
    .top-mv-list {
        margin-right: auto;
    }
    .top-mv {
        height: 80vh;
    }
}
@media (max-width: 480px) {
    .top-my-img-flex {
        margin-bottom: 2rem;
    }
    .list-item-text {
        font-size: 10px;
    }
}

/* 投稿セクション */
.top-post-section {
    width: 100%;
    height: auto;
}
.top-post-title {
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.title-frontend::after {
    font-size: 3.2rem;
    font-family: cursive;
    position: absolute;
    content: "FrontEnd";
    color: #eee;
    left: 55%;
    z-index: -1;
}
.title-backend::after {
    font-size: 3.2rem;
    font-family: cursive;
    position: absolute;
    content: "BackEnd";
    color: #eee;
    left: 55%;
    z-index: -1;
}
.title-server::after {
    font-size: 3.2rem;
    font-family: cursive;
    position: absolute;
    content: "Server/Infrastructure";
    color: #eee;
    left: 50%;
    z-index: -1;
    transform: translateX(-50%);
}
.title-webdesign::after {
    font-size: 3.2rem;
    font-family: cursive;
    position: absolute;
    content: "WebDesign";
    color: #eee;
    left: 55%;
    z-index: -1;
}
.title-webgeneral::after {
    font-size: 3.2rem;
    font-family: cursive;
    position: absolute;
    content: "General";
    color: #eee;
    left: 55%;
    z-index: -1;
}

.top-list {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(calc((100% / 4) - 1rem), 1fr)
    );
    gap: 1rem;
}

.top-list-item {
    width: 100%;
    margin-right: 1rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    height: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}
.top-list-item-category {
    width: 100%;
    margin-right: 1rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    height: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.top-list-item-btn {
    font-size: 0.8rem;
    display: block;
    width: 40%;
    border-radius: 5px;
    margin-left: auto;
}
.top-list-item:nth-child(4n) {
    margin-right: 0;
}
.top-list-item-category:nth-child(4n) {
    margin-right: 0;
}
.top-list-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    aspect-ratio: 411/308;
    transition: transform 0.3s ease;
}
.top-list-item:hover .top-list-img {
    transform: scale(1.05);
}
.top-list-item-category:hover .top-list-img {
    transform: scale(1.05);
}
.top-list-title {
    font-size: 16px;
}
.top-list-genre-flex {
    display: flex;
}

.top-list-genre {
    display: inline-block;
    padding: 0.1rem 0.7rem;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #eee;
}
.top-list-genre:nth-child(2) {
    margin-left: 0.5rem;
}
.top-list-genre:nth-child(3) {
    margin-left: 0.5rem;
}
.category-btn {
    font-size: 0.8rem;
    width: 16rem;
    margin: auto;
    padding: 1rem;
    border-radius: 5px;
}
.backto-Top-btn {
    font-size: 1.2rem;
    width: 16rem;
    margin: auto;
    margin-top: 2rem;
    margin-bottom: 6rem;
    padding: 1rem;
    border-radius: 5px;
}
@media (max-width: 1024px) {
    .top-list {
        grid-template-columns: repeat(
            auto-fill,
            minmax(calc((100% / 3) - 1rem), 1fr)
        );
        gap: 1rem; /* アイテム間のスペース */
    }
    .top-mv-title {
        font-size: 2.4rem;
    }
    .top-list-item:nth-child(7),
    .top-list-item:nth-child(8) {
        display: none;
    }
    .top-list-title {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .top-list {
        display: grid;
        grid-template-columns: repeat(
            auto-fill,
            minmax(calc((100% / 2) - 1rem), 1fr)
        );
        gap: 1rem; /* アイテム間のスペース */
    }
    .top-mv-title {
        font-size: 2rem;
    }
    .title-frontend::after,
    .title-backend::after,
    .title-server::after,
    .title-webdesign::after,
    .title-webgeneral::after {
        font-size: 2.4rem;
    }
    .backto-Top-btn {
        margin-bottom: 4rem;
    }
    .top-list-item:nth-child(5),
    .top-list-item:nth-child(6) {
        display: none;
    }
    .top-list-title {
        font-size: 12px;
        margin-top: 1rem;
    }
    .top-list-genre {
        display: inline-block;
        padding: 0 0.6rem;
        border: 1px solid #eee;
        border-radius: 6px;
        background-color: #eee;
    }
    .top-list-content {
        font-size: 10px;
    }
}
@media (max-width: 480px) {
    .top-inner {
        border-top: 2px solid #ddd;
    }
    .top-list {
        display: grid;
        grid-template-columns: repeat(
            auto-fill,
            minmax(calc((100% / 2) - 1rem), 1fr)
        );
        gap: 1rem; /* アイテム間のスペース */
    }
    .top-mv-title {
        font-size: 1.8rem;
    }
    .title-frontend::after,
    .title-backend::after,
    .title-server::after,
    .title-webdesign::after,
    .title-webgeneral::after {
        font-size: 1.8rem;
    }
    .flex-wrap {
        flex-direction: column;
        margin-bottom: 0;
    }
    .top-list-title {
        font-size: 12px;
        margin-top: 0.5rem;
    }
    .top-list-user {
        margin-right: auto;
        font-size: 10px;
        margin-top: -0.5rem;
    }
    .top-list-time {
        margin-right: auto;
        font-size: 10px;
    }
    .top-list-genre {
        font-size: 10px;
    }
    .top-list-item-btn {
        font-size: 0.6rem;
    }
    .category-btn {
        font-size: 0.7rem;
        width: 14rem;
        padding: 0.5rem;
    }
    .backto-Top-btn {
        font-size: 1rem;
        width: 14rem;
        padding: 0.5rem;
        margin-bottom: 3rem;
    }
}

/* 検索バー、検索ページ */
.search-bar {
    display: block;
    width: 40%;
    margin: auto;
    border: 1px solid #ddd;
    border-radius: 30px;
}
.search-bar-responsive {
    display: none;
}
.search-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 1rem;
}
.search-input {
    width: 100%;
    outline: none;
}
.search-bar-button {
    padding: 0.3rem 0.7rem;
    border-radius: 0 30px 30px 0;
    background-color: #ddd;
}
.search-bar-button:hover {
    background-color: #578df7;
    opacity: 0.8;
}
.search-bar-img {
    width: 30px;
    display: inline-block;
    cursor: pointer;
}
@media (max-width: 1024px) {
    .search-bar {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .search-bar {
        width: 45%;
    }
    .search-bar-flex {
        height: 27px;
    }
    .search-bar-button {
        padding: 0.1rem 0.7rem;
    }
    .search-bar {
        width: 45%;
    }
    .search-input {
        font-size: 10px;
    }
}
@media (max-width: 480px) {
    .search-bar {
        display: none;
    }
    .search-bar-responsive {
        display: block;
        width: 80%;
        margin: auto;
        border: 1px solid #ddd;
        border-radius: 30px;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    .search-bar-flex {
        height: 25px;
    }
    .search-bar-button {
        padding: 0 0.7rem;
    }
}

/* カテゴリー別一覧ページ */
.category-mv {
    width: 100%;
    height: 50vh;
    background-image: url("/images/index/book04.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 5rem;
}
.category-mv::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.category-mv-title {
    width: 100%;
    text-align: center;
    font-size: 2.4rem;
    position: absolute;
    color: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    letter-spacing: 0.1em;
    z-index: 2;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000,
        -1px 1px 0 #000;
}
@media (max-width: 1024px) {
    .category-mv-title {
        font-size: 2rem;
    }
}
@media (max-width: 768px) {
    .category-mv-title {
        font-size: 1.8rem;
    }
    .category-mv {
        height: 40vh;
        margin-bottom: 3rem;
    }
}
@media (max-width: 480px) {
    .category-mv-title {
        font-size: 1.2rem;
    }
    .category-mv {
        height: 30vh;
        margin-bottom: 2rem;
    }
}

/* 記事詳細ページ */
.show-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
.show-section-inner {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding-right: 2rem;
    padding-left: 2rem;
}
.show-section-flex {
    display: flex;
}
.show-img {
    width: 45%;
    height: auto;
    margin-bottom: 2rem;
    border: 5px double #ffdbc9;
}
.show-description {
    width: 55%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin-left: 1rem;
}
.show-title {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}
.show-title span {
    font-size: 1.6rem;
}
.show-flex {
    padding-bottom: 0.5rem;
}
.show-user {
    font-size: 1rem;
    letter-spacing: 0.1em;
}
.show-updated {
    font-size: 1rem;
    letter-spacing: 0.1em;
}
.show-review {
    font-size: 1.2rem;
}
.show-review-text {
    font-size: 1rem;
    width: 100%;
    height: auto;
    min-height: 600px;
    line-height: 1.8;
    overflow-y: auto;
    background-color: aliceblue;
    border: 1px solid #eee;
    padding: 1rem;
    white-space: pre-wrap;
}
.related-title {
    padding-top: 4rem;
    border-top: 1px solid #eee;
}
.category-link {
    font-size: 14px;
}
.show-genre span {
    font-size: 1rem;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}
@media (max-width: 1024px) {
    .show-section {
        padding-top: 4rem;
    }
    .show-title,
    .show-review {
        font-size: 1rem;
    }
    .show-title span {
        font-size: 1.1rem;
    }
    .show-category,
    .show-genre,
    .show-author,
    .show-publisher,
    .show-url,
    .show-user,
    .show-updated,
    .show-review-text {
        font-size: 0.8rem;
    }
    .show-category span,
    .show-genre span {
        font-size: 0.8rem;
        padding-top: 0.1rem;
        padding-bottom: 0.1rem;
    }
}
@media (max-width: 768px) {
    .show-section {
        padding-top: 3rem;
    }
    .show-section-inner {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    .show-description {
        margin-left: 0;
    }
    .show-title,
    .show-review {
        font-size: 0.8rem;
    }
    .show-title span {
        font-size: 0.9rem;
    }
    .show-category,
    .show-genre,
    .show-author,
    .show-publisher,
    .show-url,
    .show-user,
    .show-updated,
    .show-review-text {
        font-size: 0.7rem;
    }
    .show-genre span {
        font-size: 0.6rem;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1.87;
    }
    .category-link {
        font-size: 10px;
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
    }
}

@media (max-width: 480px) {
    .show-section-inner {
        border-top: 2px solid #ddd;
    }
    .show-section {
        padding-top: 2rem;
        padding-bottom: 0;
    }
    .show-section-flex {
        flex-direction: column;
    }
    .show-img {
        width: 100%;
        margin-bottom: 1rem;
    }
    .show-description {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .show-title,
    .show-review {
        font-size: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .show-title {
        font-size: 1rem;
        padding-left: 0;
        padding-right: 0;
    }
    .show-title span {
        font-size: 1.1rem;
    }
    .show-category,
    .show-genre,
    .show-author,
    .show-publisher,
    .show-url,
    .show-user,
    .show-updated,
    .show-review-text {
        font-size: 0.8rem;
        padding-left: 0;
        padding-right: 0;
    }
    .show-url a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .show-review-text {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
    .show-category span,
    .show-genre span {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
    .show-review {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    .category-link {
        font-size: 10px;
    }
}
