/*
Theme Name: Career Topics
Theme URI: https://career.andtopics.jp
Author: andtopics
Description: キャリア情報メディア for career.andtopics.jp
Version: 1.0
*/

/* ===== リセット & ベース ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans JP', sans-serif; background: #FFFFFF; color: #333333; font-size: 15px; line-height: 1.8; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== カラー変数 ===== */
:root {
    --green:       #8B1A2E;
    --green-light: #F9E8EC;
    --green-dark:  #6B0F1F;
    --gray:        #F4F4F4;
    --gray-mid:    #CCCCCC;
    --text:        #333333;
    --text-light:  #777777;
    --white:       #FFFFFF;
}

/* ===== ヘッダー ===== */
#site-header { position: relative;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner { position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo a { font-size: 1.4rem; font-weight: 700; color: var(--green); letter-spacing: 0.05em; }
.site-logo span { color: var(--text); }
.global-nav ul { display: flex; gap: 32px; list-style: none; }
.global-nav a { font-size: 0.875rem; font-weight: 500; color: var(--text); transition: color 0.2s; }
.global-nav a:hover { color: var(--green); }
.hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== ヒーロー ===== */
#hero { background-size: cover; background-position: center; background-repeat: no-repeat; padding: 200px 20px; text-align: center; position: relative; }
#hero .hero-inner { position: relative; z-index: 1; }
.hero-inner h1 { color: #fff; }
.hero-inner p { color: rgba(255,255,255,0.9); }

/* ===== セクション共通 ===== */
.section { padding: 60px 20px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 1.3rem; font-weight: 500; color: var(--text); margin-bottom: 32px; padding-left: 12px; border-left: 4px solid var(--green); }

/* ===== 記事グリッド ===== */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--white); border: 1px solid #E8E8E8; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.article-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-3px); }
.article-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--gray); }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .thumb img { transform: scale(1.04); }
.article-card .card-body { padding: 16px; }
.article-card .card-cat { display: inline-block; font-size: 0.7rem; background: var(--green-light); color: var(--green); padding: 2px 8px; border-radius: 3px; margin-bottom: 8px; font-weight: 600; }
.article-card .card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.article-card .card-date { font-size: 0.75rem; color: var(--text-light); }

/* ===== 個別記事 ===== */
.single-wrap { max-width: 740px; margin: 0 auto; padding: 40px 20px; }
.single-header { margin-bottom: 32px; }
.single-cat { display: inline-block; font-size: 0.75rem; background: var(--green-light); color: var(--green); padding: 3px 10px; border-radius: 3px; font-weight: 600; margin-bottom: 12px; }
.single-title { font-size: 1.6rem; font-weight: 500; line-height: 1.5; margin-bottom: 12px; }
.single-meta { font-size: 0.8rem; color: var(--text-light); }
.single-thumb { border-radius: 8px; overflow: hidden; margin-bottom: 32px; }
.single-thumb img { width: 100%; }
.single-content { line-height: 1.9; }
.single-content h2 { font-size: 1.3rem; font-weight: 500; margin: 32px 0 16px; padding: 8px 16px; border-left: 4px solid var(--green); background: var(--green-light); }
.single-content h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 12px; color: var(--green-dark); }
.single-content p { margin-bottom: 16px; }
.single-content img { border-radius: 6px; margin: 16px 0; }
.single-content figcaption { font-size: 0.8rem; color: var(--text-light); text-align: center; margin-top: 4px; }

/* ===== 関連記事 ===== */
.custom-related-posts { margin-top: 48px; padding-top: 32px; border-top: 1px solid #E0E0E0; }
.custom-related-posts h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; padding-left: 12px; border-left: 4px solid var(--green); }
.custom-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.custom-related-item { display: block; border: 1px solid #E8E8E8; border-radius: 6px; overflow: hidden; transition: box-shadow 0.2s; }
.custom-related-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.custom-related-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.no-thumb { width: 100%; aspect-ratio: 16/9; background: var(--gray); }
.custom-related-item span { display: block; padding: 10px 12px; font-size: 0.82rem; font-weight: 600; line-height: 1.4; }

/* ===== ページネーション ===== */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 20px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; border: 1px solid var(--gray-mid); border-radius: 4px; font-size: 0.875rem; color: var(--text); transition: 0.2s; }
.pagination a:hover, .pagination .current { background: var(--green); border-color: var(--green); color: var(--white); }

/* ===== ビルダー一覧 ===== */
.builder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.builder-card { background: var(--white); border: 1px solid #E8E8E8; border-radius: 8px; padding: 24px; transition: box-shadow 0.2s; }
.builder-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.builder-card h3 { font-size: 1rem; font-weight: 700; color: var(--green-dark); margin-bottom: 8px; }
.builder-card p { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; }
.builder-card .builder-link { display: inline-block; margin-top: 12px; font-size: 0.8rem; color: var(--green); font-weight: 600; border-bottom: 1px solid var(--green); }

/* ===== ビルダー詳細 ===== */
.builder-single-wrap { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.builder-single-wrap h1 { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); margin-bottom: 24px; }
.builder-info-table { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.builder-info-table th, .builder-info-table td { padding: 12px 16px; border-bottom: 1px solid #E0E0E0; font-size: 0.9rem; text-align: left; }
.builder-info-table th { width: 30%; background: var(--green-light); color: var(--green-dark); font-weight: 600; }

/* ===== フッター ===== */
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo { font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.footer-desc { font-size: 0.8rem; margin-bottom: 32px; }
.footer-copy { font-size: 0.75rem; text-align: center; padding-top: 20px; border-top: 1px solid #444444; }

/* ===== モバイル ===== */
@media (max-width: 768px) {
    .global-nav { display: none; }
    .hamburger { display: flex; }
    .article-grid { grid-template-columns: 1fr; }
    .builder-grid { grid-template-columns: 1fr; }
    .custom-related-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner h1 { font-size: 1.4rem; }
    .single-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .custom-related-grid { grid-template-columns: 1fr; }
}

/* ===== フッター ===== */
.hm-footer { background: #4a0a1a; color: #ccc; padding: 48px 20px 24px; margin-top: 60px; }
.hm-footer-inner { max-width: 1100px; margin: 0 auto; }
.hm-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 768px) { .hm-footer-cols { grid-template-columns: repeat(2, 1fr); } }
.hm-footer-col h4 { color: #fff; font-size: 0.95em; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.hm-footer-col p { color: #aaa; font-size: 0.85em; }
.hm-footer-col ul { list-style: none; padding: 0; margin: 0; }
.hm-footer-col ul li { margin-bottom: 8px; }
.hm-footer-col ul li a { color: #aaa !important; font-size: 0.85em; }
.hm-footer-col ul li a:hover { color: #fff !important; }
.hm-footer-copy { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); color: #888; font-size: 0.82em; }
/* ===== コメント非表示 ===== */
#comments, .comments-area { display: none !important; }



/* ===== ページトップボタン ===== */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.4rem;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    z-index: 999;
}
#back-to-top:hover { background: var(--green-dark); transform: translateY(-2px); }

/* ===== 個別記事 リニューアル ===== */
.single-content p { font-size: 16px; line-height: 1.9; color: #333; margin-bottom: 1.5em; }
.single-content h2 { font-size: 1.2em; font-weight: 500; color: var(--green-dark); border-left: 4px solid var(--green); background: none; padding: 0 0 0 12px; margin: 2em 0 1em; }
.single-content h3 { font-size: 1.05em; font-weight: 600; margin: 1.5em 0 0.8em; color: var(--text); }
.single-content figure { margin: 2em 0; }
.single-content figure img { width: 100%; height: auto; border-radius: 6px; }
.single-content dl { background: #f5f7fa; border-radius: 6px; padding: 20px; margin: 1.5em 0; }
.single-content dt { font-weight: 700; color: var(--green-dark); margin-top: 12px; }
.single-content dd { margin-left: 0; color: #555; padding-bottom: 8px; border-bottom: 1px solid #e0e0e0; }
@media (max-width: 768px) {
    .single-content h2 { font-size: 1.05em; }
    .single-title { font-size: 1.2rem; }
}

/* ===== 記事内画像調整 ===== */
.single-content figure img {
    max-width: 90% !important;
    max-height: 500px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 6px;
}
/* 縦長画像対応 */
.single-content figure img[height] {
    max-width: 50% !important;
}
@media (max-width: 768px) {
    .single-content figure img {
        max-width: 100% !important;
        max-height: none !important;
    }
    .single-content figure img[height] {
        max-width: 100% !important;
    }
}

/* ===== エリア表示 ===== */
.hm-post-area { margin-bottom: 8px; font-size: 0.85rem; color: #555; }
.hm-area-link { color: var(--green-dark) !important; font-weight: 700; text-decoration: underline; }

/* ===== キャッチコピー ===== */
.site-catch { font-size: 0.78rem; color: var(--text-light); margin-left: 16px; flex: 1; align-self: flex-end; padding-bottom: 12px; }
@media (max-width: 768px) { .site-catch { display: none; } }

/* ===== グローバルナビ（hero下バー）===== */
.global-nav { background: var(--white); overflow-x: auto; white-space: nowrap; }
.global-nav::-webkit-scrollbar { display: none; }
.global-nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: flex-end; gap: 4px; }
.global-nav-inner a { display: inline-block; padding: 10px 16px; font-size: 0.85rem; color: var(--text); font-weight: 500; transition: color 0.2s; white-space: nowrap; text-decoration: none; }
.global-nav-inner a:hover { color: var(--green); }
@media (max-width: 768px) { .global-nav-inner { padding: 0 12px; } .global-nav-inner a { padding: 8px 10px; font-size: 0.78rem; } }

/* ===== 記事内リンク ===== */
.single-content a { color: var(--green); text-decoration: underline; }
.single-content a:hover { color: var(--green-dark); }

/* ===== ロゴサイズ ===== */
.site-logo img { max-height: 36px; width: auto; }

/* ===== New Topics タイトル調整 ===== */
.section-title { color: var(--green-dark) !important; font-weight: 500 !important; border-left-color: var(--green) !important; }
.card-title { color: var(--green-dark) !important; font-weight: 500 !important; }

/* ===== カテゴリ表示 ===== */
.hm-post-area { margin-bottom: 8px; font-size: 0.85rem; color: #555; }
.hm-area-link { color: #8B1A2E !important; font-weight: 700; text-decoration: underline; }
