/*
Theme Name: Bistora Custom
Theme URI: https://bistora.jp
Author: Bistora
Author URI: https://bistora.jp
Description: 完全オリジナルのカスタムテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bistora-custom
*/

/* ========================================
   リセット & ベーススタイル
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   レイアウト
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   ヘッダー
   ======================================== */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #333;
}

.site-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* ナビゲーション */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover {
    border-bottom-color: #0066cc;
}

/* ========================================
   メインコンテンツ
   ======================================== */

.site-main {
    padding: 60px 0;
    min-height: 60vh;
    background-color: #fff;
}

/* 固定ページ用の追加スタイル */
.single-page {
    max-width: 800px;
    margin: 0 auto;
}

.single-page .entry-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.single-page .entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.single-page .entry-content p {
    margin-bottom: 20px;
}

.single-page .entry-content h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: #333;
}

.single-page .entry-content h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #333;
}

.single-page .entry-content ul,
.single-page .entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-page .entry-content li {
    margin-bottom: 10px;
}

/* 投稿リスト */
.posts-list {
    display: grid;
    gap: 40px;
}

.post-item {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 40px;
}

.post-item:last-child {
    border-bottom: none;
}

.entry-header {
    margin-bottom: 20px;
    text-align: center;
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.entry-title a {
    color: #333;
}

.entry-title a:hover {
    color: #0066cc;
}

.entry-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.entry-content p {
    margin-bottom: 15px;
}

.more-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
}

.more-link:hover {
    background-color: #004499;
    color: #fff;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* ========================================
   フッター
   ======================================== */

.site-footer {
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

/* ========================================
   検索フォーム
   ======================================== */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 20px 0;
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.search-field:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-submit {
    padding: 12px 30px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: #004499;
}

.search-form-wrapper {
    margin: 40px 0;
}

.search-form-wrapper h2,
.search-form-wrapper h3 {
    margin-bottom: 15px;
}

/* ========================================
   404ページ & エラーメッセージ
   ======================================== */

.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 .page-header {
    margin-bottom: 40px;
}

.error-404 .page-title {
    font-size: 48px;
    color: #e53935;
    margin-bottom: 20px;
}

.error-404 .page-content {
    max-width: 800px;
    margin: 0 auto;
}

.error-404 .search-form-wrapper,
.error-404 .recent-posts,
.error-404 .back-home {
    margin: 40px 0;
    text-align: left;
}

.error-404 .recent-posts ul {
    list-style: none;
    padding: 0;
}

.error-404 .recent-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.error-404 .recent-posts li:last-child {
    border-bottom: none;
}

.error-404 .back-home {
    text-align: center;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
}

.no-posts h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

/* ========================================
   アーカイブページ
   ======================================== */

.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0066cc;
}

.page-header .page-title {
    font-size: 36px;
    margin-bottom: 10px;
}

.archive-description {
    font-size: 16px;
    color: #666;
    margin-top: 15px;
}

/* ========================================
   個別投稿ページ
   ======================================== */

.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.single-post .entry-meta {
    font-size: 15px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.single-post .entry-thumbnail {
    margin-bottom: 30px;
}

.single-post .entry-content {
    font-size: 18px;
    line-height: 1.8;
}

.single-post .entry-content h2 {
    font-size: 28px;
    margin: 40px 0 20px;
}

.single-post .entry-content h3 {
    font-size: 24px;
    margin: 30px 0 15px;
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-post .entry-content li {
    margin-bottom: 10px;
}

.single-post .entry-content img {
    height: auto;
    margin: 20px 0;
}

.single-post .entry-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

/* 投稿ナビゲーション */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

.post-navigation a {
    flex: 1;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.post-navigation a:hover {
    background-color: #e8e8e8;
}

/* ========================================
   固定ページ
   ======================================== */

.single-page .entry-header {
    margin-bottom: 30px;
}

.single-page .entry-title {
    font-size: 40px;
    line-height: 1.2;
}

.single-page .entry-content {
    font-size: 18px;
    line-height: 1.8;
}

/* ========================================
   ユーティリティ
   ======================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

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

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .entry-title {
        font-size: 24px;
    }
    
    .single-post .entry-title,
    .single-page .entry-title {
        font-size: 28px;
    }
    
    .error-404 .page-title {
        font-size: 32px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .search-form {
        flex-direction: column;
    }
}

