/* ========================================
   Article Styles
   ======================================== */

/* ========================================
   Page Header
   ======================================== */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color-1) 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: white;
}

.page-header p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Section Layout
   ======================================== */
.section {
    padding: 60px 0;
}

/* ========================================
   Category Filter
   ======================================== */
.category-filter {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background-color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--accent-color-1);
    border-radius: 8px;
}

.category-filter h3 {
    margin: 0 0 2rem 0;
    font-size: 1.4rem;
    color: var(--heading-color);
    text-align: center;
    font-weight: 700;
    position: relative;
}

.category-filter h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color-1);
    border-radius: 2px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.category-item {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: transparent;
    color: var(--heading-color);
    text-decoration: none;
    border: 2px solid var(--heading-color);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-item:hover::before {
    left: 100%;
}

.category-item:hover {
    background: var(--heading-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-item.active {
    background: var(--heading-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-item .count {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* ========================================
   Articles Grid
   ======================================== */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 2rem 0;
}

/* ========================================
   Article Card
   ======================================== */
.article-card {
    background-color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--accent-color-1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 280px;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Article Thumbnail */
.article-thumbnail {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: linear-gradient(135deg, var(--accent-color-1) 0%, var(--primary-color) 100%);
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.08);
}

/* Article Content */
.article-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
}

.entry-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.entry-date {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.entry-date i {
    font-size: 0.7rem;
    color: var(--accent-color-1);
}



/* ========================================
   No Posts
   ======================================== */
.no-posts {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: var(--heading-color);
    font-size: 1.5rem;
}

/* ========================================
   Pagination
   ======================================== */
.wp-pagenavi {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-block;
    padding: 0.75rem 1rem;
    border: 1px solid var(--accent-color-1);
    border-radius: 6px;
    text-decoration: none;
    color: var(--heading-color);
    transition: all 0.3s ease;
    font-weight: 600;
}

.wp-pagenavi a:hover {
    background: var(--heading-color);
    color: white;
    border-color: var(--heading-color);
    transform: translateY(-2px);
}

.wp-pagenavi .current {
    background: var(--heading-color);
    color: white;
    border-color: var(--heading-color);
}

/* ========================================
   Single Article
   ======================================== */
.single-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    margin-top: 80px; /* ヘッダーの高さ分 */
}


.single-article .entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb .separator {
    color: var(--text-color);
    opacity: 0.6;
}

.breadcrumb .current-category {
    color: var(--heading-color);
    font-weight: 600;
}

.single-article .entry-meta {
    color: #666;
    font-size: 0.9rem;
}

/* Featured Image Section */
.featured-image-section {
    margin: 2rem 0;
    background-color: var(--white-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.featured-image-container {
    padding: 0;
}

.featured-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.no-image-placeholder {
    background: linear-gradient(135deg, var(--accent-color-1) 0%, var(--primary-color) 100%);
    min-height: 300px;
    width: 100%;
}

/* Article Content */
.single-article .entry-content {
    line-height: 1.8;
    color: #333;
    margin: 4rem 0;
}

.single-article .entry-content h2,
.single-article .entry-content h3 {
    color: var(--heading-color);
    margin: 2rem 0 1rem 0;
}

.single-article .entry-content h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color-1);
    padding-bottom: 0.5rem;
}

.single-article .entry-content h3 {
    font-size: 1.25rem;
}

.single-article .entry-content p {
    margin-bottom: 1rem;
}

.single-article .entry-content ul,
.single-article .entry-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.single-article .entry-content li {
    margin-bottom: 0.5rem;
}

.single-article .entry-content blockquote {
    border-left: 4px solid var(--accent-color-1);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.single-article .entry-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.single-article .entry-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

/* Back to List Button */
.back-to-list {
    text-align: center;
    margin: 2rem 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--heading-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--accent-color-1);
    color: white;
    text-decoration: none;
}

/* ========================================
   Related Articles
   ======================================== */
.related-articles {
    margin: 1rem 0 4rem 0;
    padding: 1rem 0;
}

.related-articles .related-title {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--heading-color);
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 0;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet and Desktop */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .page-header h1 {
        font-size: 3rem;
    }
    
    .entry-title {
        font-size: 1.1rem;
    }
    
    .category-list {
        gap: 1.2rem;
    }
    
    .category-item {
        padding: 1.2rem 2rem;
        font-size: 1.05rem;
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        gap: 30px;
    }
    
    .article-content {
        padding: 25px;
    }
    
    .entry-title {
        font-size: 1.1rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .category-filter {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .featured-image-section {
        margin: 2rem -1rem;
        border-radius: 0;
    }
    
    .category-list {
        gap: 0.8rem;
    }
    
    .category-item {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .articles-grid {
        gap: 20px;
    }
    
    .article-card {
        height: 250px;
    }
    
    .article-thumbnail {
        height: 160px;
    }
    
    .article-content {
        padding: 12px;
        height: 90px;
    }
    
    .entry-title {
        font-size: 1.1rem;
        -webkit-line-clamp: 2;
    }
    
    .entry-date {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .single-article .entry-title {
        font-size: 1.5rem;
    }
    
    .single-article .entry-content {
        font-size: 0.95rem;
    }
    
    .related-articles {
        margin: 1rem 0 3rem 0;
        padding: 1rem 0;
    }
    
    .related-articles .related-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .related-grid {
        gap: 20px;
    }
} 