@charset "UTF-8";
/*
Theme Name: Cocoon Child - Cyber Security Lab
Description: Cyber Security Lab用のCocoon子テーマ
Theme URI: https://wp-cocoon.com/
Author: Cyber Security Lab
Author URI: 
Template: cocoon-master
Text Domain: cocoon-child-cyber-security-lab
Version: 1.0.0
*/

/* ==========================================================================
   共通スタイル
   ========================================================================== */

:root {
    --primary-color: #19448e;
    --secondary-color: #e60033;
    --text-color: #333;
    --bg-color: #fff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #666;
}

/* ==========================================================================
   TOPページのカスタマイズ
   ========================================================================== */

/* ヒーローセクション */
.home .hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d2149 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.home .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.home .hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.home .hero-section p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.home .hero-notice {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.home .hero-notice i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffd700;
}

.home .hero-notice p {
    margin: 0;
    font-size: 1rem;
}

/* セクション共通スタイル */
.home .section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.home .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* カテゴリーセクション */
.home .category-section {
    padding: 60px 0;
}

.home .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.home .category-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-medium);
}

.home .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(25, 68, 142, 0.15);
    border-color: var(--primary-color);
}

.home .category-card a {
    display: block;
    padding: 30px;
    text-decoration: none;
    color: inherit;
}

.home .category-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.home .category-card .post-count {
    display: inline-block;
    background: var(--gray-light);
    color: var(--gray-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.home .category-card .category-description {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* 最新記事セクション */
.home .recent-posts-section {
    background: var(--gray-light);
    padding: 60px 0;
}

.home .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.home .post-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.home .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(25, 68, 142, 0.15);
}

.home .post-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home .post-thumbnail-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-medium);
    position: relative;
}

.home .post-thumbnail-wrapper.no-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #0d2149);
    color: #fff;
}

.home .post-thumbnail-wrapper.no-thumbnail i {
    font-size: 3rem;
    opacity: 0.3;
}

.home .post-card .post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home .post-card:hover .post-thumbnail {
    transform: scale(1.05);
}

.home .post-card .post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home .post-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.5;
    color: var(--text-color);
    flex: 0;
}

.home .post-card .post-meta {
    color: var(--gray-dark);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    flex: 0;
}

.home .post-card .post-category {
    color: var(--primary-color);
    font-weight: 600;
}

.home .post-card .post-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.home .view-all-posts {
    text-align: center;
}

.home .view-all-posts .button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.home .view-all-posts .button:hover {
    background: #0d2149;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 68, 142, 0.3);
}

/* タグクラウド */
.home .tag-cloud-section {
    padding: 60px 0;
    background: #fff;
}

.home .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.home .tag-cloud .tag-item {
    background: var(--gray-medium);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.home .tag-cloud .tag-item:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(25, 68, 142, 0.2);
}

.home .tag-cloud .tag-count {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* 学習ガイドセクション */
.home .learning-guide-section {
    background: linear-gradient(135deg, var(--gray-light) 0%, #fff 100%);
    padding: 60px 0;
}

.home .guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.home .guide-card {
    background: #fff;
    border-radius: 6px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.home .guide-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(25, 68, 142, 0.15);
}

.home .guide-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.home .guide-card h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.home .guide-card p {
    color: var(--gray-dark);
    line-height: 1.6;
    margin-bottom: 20px;
}

.home .guide-card a {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.home .guide-card a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .home .hero-section {
        padding: 60px 20px;
    }
    
    .home .hero-section h1 {
        font-size: 2rem;
    }
    
    .home .hero-section p {
        font-size: 1.1rem;
    }
    
    .home .section-title {
        font-size: 1.8rem;
    }
    
    .home .category-grid,
    .home .posts-grid,
    .home .guide-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .home .post-thumbnail-wrapper {
        height: 180px;
    }
    
    .home .tag-cloud .tag-item {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.home .category-card,
.home .post-card,
.home .guide-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.home .category-card:nth-child(1),
.home .post-card:nth-child(1),
.home .guide-card:nth-child(1) {
    animation-delay: 0.1s;
}

.home .category-card:nth-child(2),
.home .post-card:nth-child(2),
.home .guide-card:nth-child(2) {
    animation-delay: 0.2s;
}

.home .category-card:nth-child(3),
.home .post-card:nth-child(3),
.home .guide-card:nth-child(3) {
    animation-delay: 0.3s;
}

.home .category-card:nth-child(4),
.home .post-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Cocoonのデフォルトスタイルの調整 */
.home .main {
    padding: 0;
}

.home .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: auto;
}

.home .entry-content {
    max-width: 100%;
}

.home .content {
    padding: 0;
}

.home .breadcrumb {
    display: none;
}

.home #sidebar {
    display: none;
}

.home .main {
    width: 100%;
    float: none;
}

/* Font Awesome互換性 */
.home .fa {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* ==========================================================================
   投稿一覧ページのスタイル
   ========================================================================== */

/* Cocoonのデフォルトスタイルをリセット */
body.page-template-page-all-posts .main {
    width: 100%;
    float: none;
    padding: 0;
}

body.page-template-page-all-posts #sidebar {
    display: none;
}

body.page-template-page-all-posts .content {
    padding: 0;
}

body.page-template-page-all-posts .breadcrumb {
    margin-bottom: 30px;
}

.all-posts-main {
    padding: 40px 0;
    min-height: 80vh;
}

.all-posts-main .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: auto;
}

/* ページヘッダー */
.all-posts-main .page-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 20px;
}

.all-posts-main .page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.all-posts-main .page-description {
    font-size: 1.1rem;
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto;
}

/* フィルターセクション */
.posts-filter-section {
    margin-bottom: 40px;
    text-align: center;
}

.filter-tabs {
    display: inline-flex;
    background: var(--gray-light);
    border-radius: 4px;
    padding: 4px;
    gap: 4px;
}

.filter-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.filter-tab:hover {
    background: rgba(25, 68, 142, 0.1);
}

.filter-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* 投稿グリッド */
.all-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.post-item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-medium);
    height: 100%;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(25, 68, 142, 0.15);
    border-color: var(--primary-color);
}

.post-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.post-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-item-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-medium);
    position: relative;
}

.post-item-thumbnail.no-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #0d2149);
    color: #fff;
}

.post-item-thumbnail.no-thumbnail i {
    font-size: 3rem;
    opacity: 0.3;
}

.post-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-item-thumbnail img {
    transform: scale(1.1);
}

.post-item-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-item-title {
    font-size: 1.3rem;
    margin: 0 0 12px 0;
    line-height: 1.5;
    color: var(--text-color);
    font-weight: 600;
    min-height: 2.6em;
}

.post-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.post-item-meta i {
    margin-right: 4px;
    font-size: 0.85em;
}

.post-item-meta .post-category {
    color: var(--primary-color);
    font-weight: 600;
}

.post-item-excerpt {
    flex: 1;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag-badge {
    display: inline-block;
    background: var(--gray-medium);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Font Awesome互換性（投稿一覧ページ） */
.all-posts-main .fa {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* ページネーション */
.pagination-wrapper {
    text-align: center;
    margin-top: 50px;
    clear: both;
    width: 100%;
}

.pagination-wrapper .page-numbers {
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center;
    align-items: center;
    width: auto;
    max-width: 600px;
    border: none;
}

.pagination-wrapper .page-numbers li {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    float: none !important;
}

.pagination-wrapper .page-numbers li a,
.pagination-wrapper .page-numbers li span {
    display: inline-block !important;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    background: var(--gray-light);
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid var(--gray-medium);
    min-width: 44px;
    text-align: center;
    white-space: nowrap;
}

.pagination-wrapper .page-numbers li a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination-wrapper .page-numbers li .current,
.pagination-wrapper .page-numbers li span.current {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.pagination-wrapper .page-numbers li .dots {
    background: transparent !important;
    border: none !important;
    color: var(--gray-dark);
    cursor: default;
}

/* Cocoonの全てのページネーションスタイルを強制リセット */
body.page-template-page-all-posts .pagination-wrapper *,
body.page-template-page-all-posts .page-numbers *,
body.page-template-page-all-posts .pagination * {
    box-sizing: border-box !important;
}

body.page-template-page-all-posts .pagination,
body.page-template-page-all-posts .page-numbers,
body.page-template-page-all-posts .pagination ul {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    float: none !important;
    clear: none !important;
}

body.page-template-page-all-posts .pagination li,
body.page-template-page-all-posts .page-numbers li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    float: none !important;
    display: flex !important;
    width: auto !important;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .all-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .all-posts-main .page-title {
        font-size: 2rem;
    }
    
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .all-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-item-thumbnail {
        height: 180px;
    }
    
    .post-item-title {
        font-size: 1.2rem;
    }
    
    .post-item-excerpt {
        -webkit-line-clamp: 4;
    }
    
    .pagination-wrapper .page-numbers {
        gap: 4px;
    }
    
    .pagination-wrapper .page-numbers a,
    .pagination-wrapper .page-numbers span {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

/* 記事なしの場合 */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-dark);
}

/* Cocoonのエントリーカードスタイルを無効化 */
body.page-template-page-all-posts .entry-card-wrap,
body.page-template-page-all-posts .entry-card {
    all: unset;
}

/* 固定ページのデフォルトマージンを調整 */
body.page-template-page-all-posts .page .entry-content {
    margin: 0;
    max-width: 100%;
}

