@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
*/

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

#toc1{
	color:#000000;
}

/* ナビゲーション：モダングラデーション */
.date-archive-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.year-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.year-item {
    position: relative;
}
.year-link {
    display: block;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.year-link:hover,
.year-item.active > .year-link {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.month-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 160px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
.year-item:hover .month-dropdown,
.year-item.active .month-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(8px);
}
.month-list {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}
.month-item a {
    display: block;
    padding: 0.5rem 1rem;
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.month-item a:hover,
.month-item.active a {
    background: #667eea;
    color: white;
    padding-left: 1.5rem;
}

/* コンテンツ */
.date-archive-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.page-title {
    text-align: center;
    color: #667eea;
    font-size: 2rem;
    margin: 0 0 2rem;
    font-weight: 700;
}
.date-month {
    margin-bottom: 3rem;
}
.month-title {
    margin: 0 0 1.5rem;
    padding-left: 0.75rem;
    border-left: 5px solid #667eea;
    font-size: 1.4rem;
    color: #333;
}
.posts-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.2);
}
.post-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}
.post-thumb {
    width: 120px;
    flex-shrink: 0;
}
.date-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.no-thumb {
    width: 100%;
    height: 120px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}
.post-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.4;
}
.post-date {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.post-tags {
    margin-top: auto;
}
.post-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #667eea;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.3rem;
    text-decoration: none;
    transition: 0.2s;
}
.post-tag:hover {
    background: #667eea;
    color: white;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .year-list { flex-direction: column; align-items: center; }
    .year-link { text-align: center; }
    .month-dropdown { position: static; transform: none; box-shadow: none; }
    .year-item:hover .month-dropdown { opacity: 1; visibility: visible; transform: none; }
    .posts-grid { grid-template-columns: 1fr; }
}


/* ===== 月ドロップダウンが見切れるのを完全解決 ===== */
.date-archive-nav {
    overflow: visible !important;     /* 必須：親のoverflowを解除 */
    border-radius: 12px 12px 0 0;     /* 下は丸めない（ドロップダウン用） */
    padding-bottom: 0;                /* 余白調整 */
}

.nav-inner {
    position: relative;               /* z-indexの基準 */
    overflow: visible !important;
}

/* ドロップダウン本体 */
.month-dropdown {
    position: absolute;
    top: calc(100% + 8px);            /* 少し隙間を開ける */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 160px;
    border-radius: 12px;              /* 丸み統一 */
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    overflow: visible !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;                    /* 最前面 */
    pointer-events: none;             /* 初期はクリック無効 */
}

.year-item:hover .month-dropdown,
.year-item.active .month-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;             /* ホバー時のみクリック可 */
}

/* ドロップダウン内のリスト */
.month-list {
    padding: 0.75rem 0;
    margin: 0;
}

.month-item a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #444;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    border-radius: 8px;
    margin: 0 0.75rem;
}

.month-item a:hover,
.month-item.active a {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(4px);
}

/* スマホ対応：ホバー無効 → クリックで開く */
@media (max-width: 768px) {
    .year-item {
        position: relative;
    }
    .year-link {
        padding-right: 2rem;
    }
    .year-link::after {
        content: "▼";
        position: absolute;
        right: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0 (…) 
    }
    .month-dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.95);
        border-radius: 0 0 12px 12px;
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
    }
    .year-item.active .month-dropdown {
        display: block;
    }
}


.taxonomy-list-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.taxonomy-title {
    text-align: center;
    color: #667eea;
    font-size: 2.2rem;
    margin: 0 0 2.5rem;
    font-weight: 700;
    position: relative;
}
.taxonomy-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 1rem auto 0;
    border-radius: 2px;
}
.taxonomy-grid {
    gap: 1.8rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.taxonomy-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
	display: inline-flex;
	margin:0.5em;
}
.taxonomy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 35px rgba(102, 126, 234, 0.2);
}
.taxonomy-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.taxonomy-thumb {
    height: 160px;
    overflow: hidden;
}
.taxonomy-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.taxonomy-card:hover .taxonomy-thumb img {
    transform: scale(1.08);
}
.taxonomy-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.taxonomy-name {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
}
.taxonomy-count {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 0.75rem;
}
.taxonomy-desc {
    margin: 0 0 auto;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ヘッダー：タイトル＋並び替え */
.taxonomy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}
.taxonomy-title {
    margin: 0;
    color: #667eea;
    font-size: 2rem;
    font-weight: 700;
}
.orderby-switch {
    display: flex;
    background: #f0f0f0;
    border-radius: 50px;
    padding: 0.35rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}
.orderby-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}
.orderby-btn.active,
.orderby-btn:hover {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* サムネイル：最新記事 */
.taxonomy-thumb {
    height: 160px;
    overflow: hidden;
    background: #f8f9fa;
}
.taxonomy-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.taxonomy-card:hover .taxonomy-thumb img {
    transform: scale(1.1);
}
.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.9rem;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

.taxonomy-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
}
.taxonomy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 35px rgba(102, 126, 234, 0.2);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .taxonomy-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .taxonomy-thumb {
        height: 140px;
    }
}
/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

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

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