/* =======================================================
   ARCHIVE FUNCTIONALITY STYLES
   ======================================================= */

/* =======================================================
   DATE ARCHIVE STYLES
   ======================================================= */

/* 日付アーカイブヘッダー */
.date-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.date-archive-header .archive-title {
    font-size: 2.5rem;
    color: #013567;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.date-archive-header .archive-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* 日付ナビゲーション */
.date-navigation {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.date-nav-controls {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.year-selector,
.month-selector {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.selector-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid #013567;
    padding-bottom: 8px;
}

.year-list,
.month-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.year-item,
.month-item {
    margin: 0;
}

.year-link,
.month-link {
    display: block;
    padding: 12px 15px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
    font-weight: 500;
}

.year-link:hover,
.month-link:hover {
    background: #e9ecef;
    border-color: #013567;
    transform: translateY(-2px);
}

.year-item.current .year-link,
.month-item.current .month-link {
    background: #013567;
    color: #fff;
    border-color: #013567;
}

.year-link .count,
.month-link .count {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 3px;
}

/* 前後ナビゲーション */
.date-nav-arrows {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
}

.nav-prev,
.nav-next {
    text-align: center;
}

.nav-current {
    text-align: center;
}

.nav-link {
    display: inline-block;
    padding: 10px 20px;
    background: #013567;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.current-period {
    font-size: 1.2rem;
    font-weight: bold;
    color: #013567;
    padding: 10px 20px;
    background: #fff;
    border-radius: 25px;
    display: inline-block;
}

/* アーカイブ統計 */
.archive-stats {
    margin-bottom: 30px;
    padding: 20px;
    background: #e7f3ff;
    border-left: 4px solid #013567;
    border-radius: 5px;
}

.stats-text {
    margin: 0;
    color: #013567;
    font-weight: 500;
}

/* 日付アーカイブ記事一覧 */
.date-archive-items {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.archive-item {
    margin-bottom: 25px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ニュース記事スタイル */
.news-article,
.product-article,
.post-article {
    padding: 25px;
}

.news-meta,
.product-meta,
.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.news-date,
.product-date,
.post-date {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 日付アーカイブページネーション */
.date-archive-pagination {
    text-align: center;
    margin-top: 40px;
}

.date-archive-pagination .page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 12px 18px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.date-archive-pagination .page-numbers:hover,
.date-archive-pagination .page-numbers.current {
    background: #013567;
    color: #fff;
    border-color: #013567;
    transform: translateY(-2px);
}

/* 記事が見つからない場合 */
.no-posts-found {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.no-results-message h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results-message p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.no-results-actions {
    margin-top: 30px;
}

.back-to-archive,
.back-to-home {
    display: inline-block;
    padding: 12px 25px;
    background: #013567;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-to-archive:hover,
.back-to-home:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

/* 日付アーカイブサイドバー */
.date-archive-sidebar {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 3px solid #013567;
    padding-bottom: 8px;
}

.sidebar-links,
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li,
.recent-posts li {
    margin-bottom: 10px;
}

.sidebar-links a,
.recent-post-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    background: #fff;
}

.sidebar-links a:hover,
.recent-post-link:hover {
    color: #013567;
    background: #e7f3ff;
}

.recent-post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-title {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #999;
}

/* =======================================================
   WIDGET STYLES
   ======================================================= */

/* カスタムアーカイブウィジェット */
.widget_custom_archives {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.widget_custom_archives .widget-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid #013567;
    padding-bottom: 8px;
}

.custom-archives-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-archive-item {
    margin-bottom: 8px;
}

.custom-archive-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    background: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.custom-archive-link:hover {
    color: #013567;
    background: #e7f3ff;
    transform: translateX(5px);
}

.custom-archive-link .post-count {
    font-size: 0.8rem;
    color: #999;
}

/* カスタムカテゴリーウィジェット */
.widget_custom_categories {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.widget_custom_categories .widget-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid #013567;
    padding-bottom: 8px;
}

.custom-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-category-item {
    margin-bottom: 8px;
}

.custom-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    background: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.custom-category-link:hover {
    color: #013567;
    background: #e7f3ff;
    transform: translateX(5px);
}

/* カテゴリー別の色分け */
.custom-category-item.category-お知らせ .custom-category-link:hover {
    background: #d4edda;
    color: #28a745;
}

.custom-category-item.category-技術コラム .custom-category-link:hover {
    background: #cce7ff;
    color: #007bff;
}

.custom-category-item.category-製品情報 .custom-category-link:hover {
    background: #fff3cd;
    color: #fd7e14;
}

.custom-category-item.category-イベント .custom-category-link:hover {
    background: #f8d7da;
    color: #dc3545;
}

/* 高度な検索ウィジェット */
.widget_advanced_search {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.widget_advanced_search .widget-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid #013567;
    padding-bottom: 8px;
}

.advanced-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-field .search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field .search-input:focus {
    border-color: #013567;
}

.filter-group {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.post-type-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.option-label:hover {
    background: #e9ecef;
}

.option-label input[type="checkbox"] {
    margin: 0;
}

.category-select,
.year-select,
.month-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    outline: none;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.search-submit {
    margin-top: 10px;
}

.search-button {
    width: 100%;
    padding: 12px 20px;
    background: #013567;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: #0052a3;
}

/* 人気記事ウィジェット */
.widget_popular_posts {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.widget_popular_posts .widget-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid #013567;
    padding-bottom: 8px;
}

.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.popular-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.popular-post-item:last-child {
    margin-bottom: 0;
}

.popular-post-thumbnail {
    flex-shrink: 0;
}

.popular-post-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.popular-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-title a:hover {
    color: #013567;
}

.popular-post-date {
    font-size: 0.8rem;
    color: #999;
}

/* =======================================================
   RESPONSIVE STYLES
   ======================================================= */

@media (max-width: 768px) {
    /* 日付アーカイブヘッダー */
    .date-archive-header .archive-title {
        font-size: 2rem;
    }
    
    /* 日付ナビゲーション */
    .date-nav-controls {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .year-list,
    .month-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .date-nav-arrows {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .nav-prev,
    .nav-next,
    .nav-current {
        text-align: center;
    }
    
    /* アーカイブ記事 */
    .news-content,
    .product-content,
    .post-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-thumbnail,
    .product-thumbnail,
    .post-thumbnail {
        width: 100%;
    }
    
    /* サイドバー */
    .date-archive-sidebar {
        margin-top: 30px;
        padding: 20px;
    }
    
    /* ウィジェット */
    .post-type-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-range {
        grid-template-columns: 1fr;
    }
    
    .popular-post-item {
        flex-direction: column;
        text-align: center;
    }
    
    .popular-post-thumbnail {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .date-archive-header {
        padding: 30px 15px;
    }
    
    .date-archive-header .archive-title {
        font-size: 1.8rem;
    }
    
    .date-nav-controls,
    .date-nav-arrows {
        padding: 15px;
    }
    
    .year-list,
    .month-list {
        grid-template-columns: 1fr 1fr;
    }
    
    .archive-item {
        margin-bottom: 20px;
    }
    
    .news-article,
    .product-article,
    .post-article {
        padding: 20px;
    }
}