/**
 * レイアウト修正用CSS
 * SWELL依存で崩れたレイアウトを修正
 */

/* ========================================
   全体的なコンテンツエリア調整
======================================== */
.site-content,
.content-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 1em;
}

article.post,
article.page {
    background: #fff;
    padding: 2em;
    margin-bottom: 2em;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 記事コンテンツ内の余白調整 */
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* ========================================
   サイドバー調整（ある場合）
======================================== */
.site-main {
    float: left;
    width: 70%;
    padding-right: 2em;
}

.widget-area,
.sidebar {
    float: right;
    width: 30%;
}

/* サイドバーなしの場合 */
.no-sidebar .site-main {
    float: none;
    width: 100%;
    padding-right: 0;
}

/* ========================================
   フロート解除
======================================== */
.site-content::after,
.content-area::after,
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   記事メタ情報の調整
======================================== */
.entry-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #e0e0e0;
}

.entry-title {
    font-size: 2em;
    line-height: 1.3;
    margin: 0 0 0.5em;
    color: #333;
}

.entry-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1em;
}

.entry-meta span {
    margin-right: 1em;
}

.entry-footer {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #666;
}

/* ========================================
   カテゴリー・タグ表示
======================================== */
.cat-links,
.tags-links {
    display: inline-block;
    margin-right: 1em;
}

.cat-links a,
.tags-links a {
    display: inline-block;
    padding: 0.25em 0.75em;
    margin: 0.25em;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85em;
}

.cat-links a:hover,
.tags-links a:hover {
    background: #007cba;
    color: #fff;
}

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

.page-numbers {
    display: inline-block;
    padding: 0.5em 1em;
    margin: 0 0.25em;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
}

.page-numbers:hover {
    background: #007cba;
    color: #fff;
}

.page-numbers.current {
    background: #007cba;
    color: #fff;
}

/* ========================================
   コメントエリア
======================================== */
.comments-area {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 2px solid #e0e0e0;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2em;
    padding: 1em;
    background: #f9f9f9;
    border-radius: 4px;
}

.comment-content {
    margin-top: 1em;
}

.comment-metadata {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.5em;
}

/* ========================================
   アーカイブページ
======================================== */
.archive .page-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid #e0e0e0;
}

.archive-title {
    font-size: 1.8em;
    margin: 0;
}

.archive-description {
    margin-top: 1em;
    color: #666;
}

/* ========================================
   検索結果ページ
======================================== */
.search-results .entry-summary {
    margin-top: 1em;
    padding: 1em;
    background: #f9f9f9;
    border-left: 3px solid #007cba;
}

/* ========================================
   404ページ
======================================== */
.error-404 .page-content {
    text-align: center;
    padding: 3em 1em;
}

.error-404 .page-title {
    font-size: 3em;
    margin-bottom: 0.5em;
}

/* ========================================
   モバイル対応
======================================== */
@media (max-width: 768px) {
    .site-content,
    .content-area {
        padding: 1em;
    }
    
    article.post,
    article.page {
        padding: 1em;
    }
    
    .site-main {
        float: none;
        width: 100%;
        padding-right: 0;
    }
    
    .widget-area,
    .sidebar {
        float: none;
        width: 100%;
        margin-top: 2em;
    }
    
    .entry-title {
        font-size: 1.5em;
    }
}

/* ========================================
   印刷用スタイル
======================================== */
@media print {
    .site-header,
    .site-footer,
    .widget-area,
    .sidebar,
    .navigation,
    .comments-area {
        display: none;
    }
    
    .site-main {
        float: none;
        width: 100%;
        padding: 0;
    }
    
    article {
        box-shadow: none;
        border: none;
    }
}

/* ========================================
   アクセシビリティ
======================================== */
.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;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ========================================
   ユーティリティクラス
======================================== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 1.5em; }
.mt-4 { margin-top: 2em; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 1.5em; }
.mb-4 { margin-bottom: 2em; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.5em; }
.pt-2 { padding-top: 1em; }
.pt-3 { padding-top: 1.5em; }
.pt-4 { padding-top: 2em; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.5em; }
.pb-2 { padding-bottom: 1em; }
.pb-3 { padding-bottom: 1.5em; }
.pb-4 { padding-bottom: 2em; }