/*
Theme Name: oitttheme
Author: Shingo Nakanishi
Author URI: https://one-it-thing.com
License: MIT
License URI: https://opensource.org/license/mit/
Description: A simple and clean theme for WordPress, designed for readability and ease of use.
Text Domain: oitttheme
Version: 1.0
*/

/*
header
*/
body {
    font-family: Noto Sans JP, Hiragino Sans, Helvetica, Arial, sans-serif;
    background: #f1f1f1;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

body>header {
    width: 100%;
    background: #ffffff;
}

body>header div {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    padding: 0.6rem 0;
}

body>header div a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-right: 1rem;
}

.site-navigation {
    background: #111;
    padding: 5px 0 5px 0;
}

.site-navigation ul {
    max-width: 1000px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    text-align: right;
}

.site-navigation li {
    display: inline-block;
    margin: 0 15px 0 0;
}

.site-navigation a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}
/*
end of header
*/

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.search-bar {
    margin: 1rem auto;
    padding-bottom: 1rem;
}

.search-bar input[type="search"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.post-list {
    display: grid;
}

.post-list article {
    padding: 0rem 1.5rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

/* タイトル */
.post-list h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* 抜粋 */
.post-list p {
    font-size: 1rem;
    line-height: 1.6;
}

/* リンク */
.post-list a {
    color: #333;
    text-decoration: none;
}

.post-list a:hover {
    text-decoration: underline;
}

/* ページネーション */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination a,
.pagination span {
    margin: 0 5px;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
}

.pagination .current {
    background: #333;
    color: #fff;
}


/*
single
*/
.post-content {
    padding: 1rem 1rem;
    line-height: 1.8;
}

.post-content article {
    background: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-body p {
    margin-bottom: 1.2rem;
}

.post-body h2 {
    border-left: 4px solid #007acc;
    padding-left: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border: 1px solid #ccc;
}

.post-body blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1rem;
    color: #555;
    font-style: italic;
    margin: 1.5rem 0;
}


/*
footer
*/
footer {
    width: 100%;
}

.footer-info {
    background: #ffffff;
    color: #333;
}

.footer-info-items {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-info-item {
    width: 48%;
}

.footer-info-item>h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 15px;
    text-decoration-color: #007acc;
}

.footer-info-item>ul {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    text-align: left;
}

.footer-info-item>ul>li {
    margin-bottom: 0.5rem;
}

.footer-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 0.3rem 0;
    font-size: 0.8rem;
}

/* =========================================
   レスポンシブ対応
   ========================================= */

/* タブレット以下（最大幅768px） */
@media (max-width: 768px) {

    body{
        font-size: 0.9rem;
    }

    /* ヘッダー内のdivを中央寄せ */
    body>header div {
        padding: 0.6rem;
        text-align: center;
    }

    /* ナビゲーションを中央寄せ＆縦並び */
    .site-navigation ul {
        text-align: center;
    }

    .site-navigation li {
        display: inline-block;
        margin: 0 10px;
    }

    /* メインとサイドバーを縦並びに */
    .site-content {
        flex-direction: column;
    }

    main {
        max-width: 100%;
        padding: 1rem;
    }

    /* 投稿カード間隔を少し広げる */
    .post-list article {
        padding: 1rem;
    }

    .post-content {
        line-height: 1.8;
        padding: 0 0.5rem;
    }

    .post-content article {
        background: #fff;
        border-radius: 5px;
        padding: 0 0.2rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* ページネーション */
    .pagination .page-numbers:not(.prev):not(.next):not(.current) {
        display: none;
    }
    
    /* 現在のページと前後のボタンのみ表示 */
    .pagination .page-numbers.prev,
    .pagination .page-numbers.next,
    .pagination .page-numbers.current {
        display: inline-block;
    }

    /* フッター情報を縦並びに */
    .footer-info-items {
        flex-direction: column;
        gap: 1.5rem;
        margin-left: 1rem;
    }

    .footer-info-item {
        width: 100%;
    }
}

/* スマホ（最大幅480px） */
@media (max-width: 480px) {

    /* ロゴ文字サイズを縮小 */
    body>header div a {
        font-size: 1.2rem;
    }

    /* ナビゲーション項目の文字サイズを小さく */
    .site-navigation a {
        font-size: 14px;
        padding: 5px;
    }

    /* 記事タイトル・本文サイズ調整 */
    .post-list h2 {
        font-size: 1rem;
    }

    .post-list p {
        font-size: 0.9rem;
    }

    /* フッター文字も少し小さめ */
    .footer-footer {
        font-size: 0.7rem;
    }
}