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

body {
    line-height: 1.6;
    color: #333;
    background: #fffcea;
    min-height: 100vh;
    font-size: 1.1em;
}
body {
    font-family: "BIZ UDPゴシック", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN W4", "YuGothic", "Yu Gothic Medium", "Meiryo", "メイリオ", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-smooth: always;
}

/* 記事ページ用の背景色オーバーライド */
body.article-page {
    background: #ffffff;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 80px;
    z-index: 1000;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    min-height: 60px;
}

.header-title {
    position: absolute;
    left: 0;
    top: 0;
}

.magazine-title {
    margin: 0;
    line-height: 1;
}

.magazine-title img {
    width: 350px;
    height: auto;
    display: block;
}

.header-nav {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 30px;
    top: 30px;
}

.nav-btn {
    width: 41px;
    height: 41px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.nav-btn:hover {
    transform: scale(1.15);
}

.nav-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* メインコンテンツ */
.main-content {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 50px 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* 記事ページ用のコンテンツラッパー（全幅表示） */
.content-wrapper.article-page {
    grid-template-columns: 1fr;
    gap: 0;
}



/* コンテンツセクション */
.contents-section {
    padding: 25px 0 40px;
}

.contents-title {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 24px;
    color: #3c3536;
    margin-bottom: 50px;
    font-weight: 600;
    letter-spacing: 5px;
    position: relative;
}

.first-letter {
    color: #cea55e;
}

.contents-title::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 4px;
    background: #cea55e;
}

.contents-title::after {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: #cea55e;
}

.contents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
}

.content-item:hover {
    transform: translateY(-6px);
}

.content-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.content-number img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.content-text {
    font-size: 1.1em;
    line-height: 1.5;
    flex: 1;
}

/* PAGE TOPボタン */
.page-top {
    text-align: center;
    margin: 40px auto 0;
    max-width: 1200px;
    padding: 0 0 30px;
}

.page-top-btn {
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 120px;
    height: auto;
}

.page-top-btn:hover {
    transform: translateY(-8px) scale(1.15);
}

/* フッター */
.footer {
    margin-top: 0px;
    padding: 60px 0 0;
    background: #e9c990;
    position: relative;
    min-height: 250px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    position: relative;
    min-height: 190px;
    background: url('../images/bg_footer.svg') no-repeat center bottom;
    background-size: auto 137px;
}

.copyright {
    color: #FFF;
    font-size: 0.75em;
    margin-bottom: 40px;
}

/* ヒーロー画像 */
.hero-image {
    position: relative;
}

.hero-bg-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* 2列グリッドレイアウト用のスタイル */
.contents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}



/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header {
        min-height: 70px;
    }
    
    .header-content {
        min-height: 50px;
    }
    
    .header-nav {
        top: 15px;
    }
    
    .magazine-title img {
        width: 250px;
    }
    
    .main-content {
        margin-top: 120px; /* ヘッダーとの重なりを防ぐためさらに増加 */
        padding: 30px 20px 0; /* パディングも調整 */
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 30px; /* ヒーロー画像との余白をさらに調整 */
    }
    
    /* ヒーロー画像を80%のサイズに調整 */
    .hero-image {
        transform: scale(0.8);
        transform-origin: center top;
        margin-bottom: -20%; /* スケール調整による余白の調整 */
    }
    
    .contents-section {
        padding: 20px;
    }
    
    .content-text {
        font-size: 1em;
    }

    /* 2列グリッドレイアウト用のスタイル */
    .contents-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .header {
        min-height: 60px;
    }
    
    .header-content {
        min-height: 40px;
    }
    
    .header-nav {
        top: 10px;
    }
    
    .magazine-title img {
        width: 200px;
    }
    
    .main-content {
        padding: 0 10px;
        margin-top: 100px; /* ヘッダーとの重なりを防ぐためさらに増加 */
    }
    
    .content-wrapper {
        margin-top: 25px; /* ヒーロー画像との余白をさらに調整 */
    }
    
    /* ヒーロー画像を80%のサイズに調整 */
    .hero-image {
        transform: scale(0.8);
        transform-origin: center top;
        margin-bottom: -20%; /* スケール調整による余白の調整 */
    }
}

/* 印刷時の設定 */
@media print {
    /* includes内のHTML要素を非表示 */
    .header,
    .footer,
    .contents-section,
    .page-top,
    #header-placeholder,
    #contents-placeholder,
    #footer-placeholder {
        display: none !important;
    }
    
    /* メインコンテンツのみを印刷 */
    .main-content {
        margin-top: 0;
        padding: 0;
        max-width: none;
    }
    
    /* 背景色を白に設定 */
    body {
        background: white !important;
    }
    
    /* ページの余白を設定 */
    @page {
        margin: 1in;
    }
    
    /* リンクの下線を表示 */
    a {
        text-decoration: underline;
        color: #000 !important;
    }
    
    /* 画像の印刷最適化 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
