/**
 * static-pages.css
 * 「睡眠負債とは」等の固定ページ用スタイル
 * レイアウト修正版
 */

/* ========================================
   親テーマのスタイルを上書き（重要）
======================================== */
/* より詳細度を上げて確実に適用 */
body.page .static-page-wrapper .container,
body.page-template-page-template-static .static-page-wrapper .container,
body.sleep-debt-page .static-page-wrapper .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100%;
    display: block;
}

/* mainタグ直下のレイアウトも確実に設定 */
body.page #main,
body.page-template-page-template-static #main,
body.sleep-debt-page #main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ========================================
   固定ページ用スタイル
======================================== */

/* ページ全体のレイアウト */
.static-page-wrapper {
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 40px 0;
    width: 100%;
}

/* ページヘッダー */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.page-title {
    font-size: 2.5em;
    color: var(--main-color, #005731);
    margin-bottom: 20px;
    font-weight: 700;
}

.page-excerpt {
    font-size: 1.2em;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* パンくずリスト */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 0.9em;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb li::after {
    content: ">";
    margin-left: 10px;
    color: #999;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: var(--sub-color, #009944);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* メインコンテンツエリア - シンプルレイアウトに変更 */
.static-content {
    max-width: 900px;
    margin: 0 auto;
}

/* 記事本文 */
.content-article {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-article h2 {
    font-size: 1.8em;
    color: var(--main-color, #005731);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-color, #005731);
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    font-size: 1.4em;
    color: #333;
    margin: 30px 0 15px;
}

.content-article h4 {
    font-size: 1.2em;
    color: #555;
    margin: 20px 0 10px;
}

.content-article p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

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

.content-article li {
    line-height: 1.8;
    margin-bottom: 10px;
}

.content-article img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-article blockquote {
    background: #f5f5f5;
    border-left: 4px solid var(--sub-color, #009944);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
}

.content-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.content-article th,
.content-article td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.content-article th {
    background: var(--main-color, #005731);
    color: white;
    font-weight: 600;
}

.content-article tr:nth-child(even) {
    background: #f9f9f9;
}

/* サイドバー - 削除（目次機能が存在しないため） */
.content-sidebar,
.sidebar-sticky,
.table-of-contents,
.related-links {
    display: none;
}

/* ページフッター */
.page-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, var(--main-color, #005731), var(--sub-color, #009944));
    color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.cta-section h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: white;
}

.cta-section p {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn {
    background: white;
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.cta-section .btn-primary {
    color: var(--main-color, #005731);
}

.cta-section .btn-secondary {
    color: var(--sub-color, #009944);
    background: rgba(255, 255, 255, 0.9);
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ページメタ情報 */
.page-meta {
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* 強調ボックス */
.highlight-box {
    background: #f0f8f4;
    border: 1px solid #009944;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.highlight-box h4 {
    color: #005731;
    margin-bottom: 10px;
}

/* 注意ボックス */
.warning-box {
    background: #fff9f0;
    border: 1px solid #ff9800;
    border-left-width: 4px;
    border-radius: 4px;
    padding: 20px;
    margin: 30px 0;
}

.warning-box::before {
    content: '⚠';
    font-size: 1.2em;
    color: #ff9800;
    margin-right: 10px;
}

/* 図表 */
.figure {
    margin: 40px 0;
    text-align: center;
}

.figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.figure-caption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* テーブル */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #005731;
}

.data-table tr:hover {
    background: #f9f9f9;
}

/* 参考文献 */
.references {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.references h3 {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.references ol {
    font-size: 0.9em;
    color: #666;
}

.references li {
    margin-bottom: 10px;
}

/* カスタム参考文献スタイル（参考文献ページ用） */
.custom-references {
    margin: 40px 0;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .static-page-wrapper {
        padding: 20px 0;
    }
    
    .static-page-wrapper .container {
        padding: 0 15px !important;
    }
    
    .page-title {
        font-size: 2em;
    }
    
    .page-excerpt {
        font-size: 1.1em;
    }
    
    .content-article {
        padding: 20px;
    }
    
    .content-article h2 {
        font-size: 1.5em;
    }
    
    .content-article h3 {
        font-size: 1.3em;
    }
    
    .data-table {
        font-size: 0.9em;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    blockquote {
        padding: 15px 15px 15px 30px;
    }
    
    .cta-section {
        padding: 30px 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 印刷対応 */
@media print {
    .static-page-wrapper {
        padding: 0;
        background: white;
    }
    
    .cta-section,
    .breadcrumb {
        display: none;
    }
    
    .content-article {
        box-shadow: none;
        padding: 0;
    }
    
    .page-header {
        border-bottom: 1px solid #000;
    }
    
    .content-article h2 {
        border-bottom-color: #000;
    }
    
    .warning-box,
    .highlight-box {
        border: 1px solid #000;
        background: white;
    }
}

/* アクセシビリティ向上 */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
}

.skip-link:focus {
    left: 20px;
    top: 20px;
    padding: 10px;
    background: #005731;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.6s ease-out;
}