@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

@charset "UTF-8";

/* ====================================
   1. 基本設定・リセット
   ==================================== */
:root {
    --primary-color: #ff6b00; /* メインカラー（オレンジ） */
    --accent-color: #fcece4;  /* 薄いオレンジ */
    --text-color: #333333;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --container-width: 1000px;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

/* ====================================
   2. ヘッダー（追従なし・高さ極小版）
   ==================================== */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    
    /* ▼ 変更箇所：ここを sticky から relative に変えました */
    position: relative; 
    
    /* top: 0; は不要なので削除（または無効化） */
    z-index: 100;

    /* 直前の要望に合わせて高さを狭く設定しています */
    padding: 5px 0; 
}

/* ====================================
   3. メインビジュアル
   ==================================== */
.main-visual {
    width: 100%;
    height: 400px; /* PCでの高さ */
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #eee;
}

.mv-link-overlay {
    display: block;
    width: 100%;
    height: 100%;
}


/* ====================================
   4. カテゴリー別セクション（アイコンデザイン版）
   ==================================== */
.section-categories {
    background-color: var(--bg-color);
}

.category-area-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* カテゴリーの枠 */
.category-box {
    background: var(--white);
    border: 2px solid #eaeaea;
    border-radius: 12px;
    padding: 25px;
    width: calc(33.333% - 20px); /* 3列 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.category-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ヘッダー部分 */
.category-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 15px;
}

/* 丸いアイコン背景 */
.cat-icon-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 10px;
    transition: 0.3s;
}

.cat-icon-circle i {
    font-size: 2rem;
}

.category-box:hover .cat-icon-circle {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.cat-title-large {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
}

/* ピックアップ記事 */
.category-pickup {
    margin-bottom: 20px;
    flex-grow: 1;
}

.pickup-link {
    display: block;
}

.pickup-img {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.pickup-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s;
}

.pickup-link:hover .pickup-img img {
    transform: scale(1.05);
}

/* ピックアップのバッジ */
.badge-recommend {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff4757;
    color: #fff;
    font-size: 0.7rem; /* 文字サイズを微調整 */
    padding: 5px 10px; /* 余白を調整 */
    border-bottom-right-radius: 8px;
    font-weight: bold;
    z-index: 10;
    letter-spacing: 0.05em; /* 文字間隔を少し広げて読みやすく */
}

.pickup-text {
    font-size: 0.95rem;
    font-weight: bold;
    line-height: 1.5;
    color: var(--text-color);
}

.pickup-link:hover .pickup-text {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 一覧へボタン */
.category-footer {
    text-align: center;
    margin-top: auto;
}

.btn-category-more {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: #f4f4f4;
    color: #555;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.btn-category-more:hover {
    background: var(--primary-color);
    color: var(--white);
}


/* ====================================
   5. 最新の記事一覧
   ==================================== */
.section-latest {
    background-color: var(--white);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 0.3s;
    border: 1px solid #eee;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    height: 180px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cat-label {
    font-size: 0.75rem;
    background: #eee;
    padding: 3px 8px;
    border-radius: 4px;
    color: #666;
    font-weight: bold;
}

.article-date {
    font-size: 0.8rem;
    color: #999;
    font-family: monospace;
}

.card-title {
    font-size: 1rem;
    margin-top: 5px;
    line-height: 1.5;
    font-weight: bold;
}

/* 記事一覧を見るボタン */
.view-all-container {
    text-align: center;
    margin-top: 50px;
}

.btn-view-all {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 60px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
    transition: 0.3s;
}

.btn-view-all:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.4);
}


/* ====================================
   6. フッター
   ==================================== */
.site-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 0;
}


/* ====================================
   7. スマホ・タブレット対応
   ==================================== */
@media (max-width: 900px) {
    .category-box {
        width: calc(50% - 15px); /* タブレット2列 */
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-visual {
        height: 200px;
    }

    .category-box {
        width: 100%; /* スマホ1列 */
        margin-bottom: 10px;
    }

    .pickup-img img {
        height: 180px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* ====================================
   カテゴリーページ / アーカイブ用
   ==================================== */

/* ページヘッダー（カテゴリー名が表示される部分） */
.page-header {
    background-color: var(--accent-color); /* 薄いオレンジ背景 */
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* カテゴリーアイコン（大） */
.cat-icon-circle-large {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cat-icon-circle-large i {
    font-size: 2.5rem;
}

.page-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
}

.page-desc {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* パンくずリスト */
.breadcrumbs {
    background-color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
    color: #777;
    border-bottom: 1px solid #eee;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumbs span {
    font-weight: bold;
}

/* アーカイブセクション */
.section-archive {
    padding: 50px 0;
    background-color: var(--bg-color);
}

.card-excerpt {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
    line-height: 1.5;
}

/* ページネーション */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a, 
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: var(--white);
    color: var(--text-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.pagination a:hover,
.pagination span.current {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ====================================
   記事本文内のリンク色修正
   ==================================== */

/* 段落（pタグ）の中にあるリンクを青くする */
p a {
    color: #0066cc;
    text-decoration: none;
}

/* 箇条書きリストの中にあるリンク */
.entry-content li a,
main li a {
    color: #0066cc;
    text-decoration: none;
}

/* マウスを乗せた時だけ下線を出す */
p a:hover,
.entry-content li a:hover,
main li a:hover {
    text-decoration: underline;
}

/* ▼ 修正箇所：ボタンの色設定を正しく分離しました */

/* 1. 通常のナビやグレーのボタンは「文字色そのまま」 */
.main-nav a,
.btn-category-more,
.pagination a {
    color: inherit;
    text-decoration: none;
}

/* 2. 「記事一覧を見る」ボタンは「白文字」を強制 */
.btn-view-all {
    color: #ffffff !important; /* ここで白に指定 */
    text-decoration: none;
}

/* ====================================
   フッターのリンク（免責事項など）
   ==================================== */

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 40px; /* ★ここを20pxから40pxに広げました */
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ====================================
   ヘッダーの高さを極限まで狭くする設定
   ==================================== */

/* 1. ヘッダー自体の余白を最小に */
.site-header {
    padding: 5px 0; /* 上下5px (これでも広いなら 0 にしてください) */
}

/* 2. ロゴを囲むh1タグの「見えない余白」を完全削除 */
.logo {
    margin: 0;       /* ブラウザが勝手につける余白を消す */
    padding: 0;
    line-height: 1;  /* 行間の隙間をなくす */
    display: flex;   /* 余計な隙間を排除 */
    align-items: center;
}

/* 3. 画像サイズと配置の調整 */
.logo img {
    max-height: 150px; /* さらに小さく（必要に応じて数字を変えてください） */
    width: auto;
    margin: 0;
    display: block;   /* 画像下の隙間を完全に消す */
}

/* 4. ヘッダー内部の整列と余白削除 */
.header-inner {
    min-height: auto; /* 高さを強制しない */
    padding: 0;       /* 内側の余白削除 */
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
}

/* 5. メニュー（ナビ）の余白も念のため削除 */
.main-nav ul {
    margin: 0;
    padding: 0;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}

/* ====================================
   ヘッダーメニューの修正用コード（追記）
   ==================================== */

/* 1. ロゴとメニューを左右に離して配置する */
.header-inner {
    justify-content: space-between; /* ロゴは左、メニューは右へ */
    width: 100%;
}

/* 2. メニューのリストを横並びにする（ここが重要！） */
.main-nav ul {
    display: flex;       /* 横並びにする */
    list-style: none;    /* ・（黒丸）を消す */
    gap: 30px;           /* メニュー同士の間隔 */
    align-items: center; /* 上下中央揃え */
}

/* 3. メニューの文字のデザイン */
.main-nav li a {
    display: block;      /* クリック範囲を広げる */
    font-weight: bold;   /* 太文字 */
    font-size: 1rem;     /* 文字サイズ */
    color: #333;         /* 文字色（黒） */
    padding: 10px 0;     /* 上下の余白 */
    position: relative;  /* 下線のアニメーション用 */
}

/* 4. マウスを乗せた時の動き（オレンジ色＋下線） */
.main-nav li a:hover {
    color: #ff6b00;      /* メインカラーのオレンジに変更 */
}

/* (オプション) スマホの時はメニューを隠すか調整が必要 */
@media screen and (max-width: 768px) {
    .main-nav {
        display: none; /* とりあえずスマホでは非表示（必要ならハンバーガーメニュー等に） */
    }
}
