/* Junpei Wada's Blog - Main Stylesheet */

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', sans-serif;
    line-height: 1.6;
}

/* Index page specific */
body.index {
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Post Meta Information */
.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Post Content Styling */
.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 1000px;
    margin: 0 auto;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    max-width: 1000px;
}

.post-content .headerlink {
    display: none;
}

.post-content img {
    max-width: min(1000px, 100%);
    max-height: min(1000px, 80vh);
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 1rem auto;
    display: block;
}

/* 画像キャプション（画像の直後の斜体テキスト）のスタイル */
.post-content img + p em,
.post-content img + em {
    display: block;
    text-align: center;
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0.5rem auto 1.5rem auto;
    line-height: 1.4;
    max-width: 1000px;
}

.post-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.post-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #495057;
}

/* Tags Styling */
.tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.tag:hover {
    background-color: #dee2e6;
    color: #495057;
    text-decoration: none;
}

/* Card Styles */
.card {
    transition: transform 0.2s;
    min-height: 250px;
}

.card:hover {
    transform: translateY(-2px);
}

/* Featured Image Cards */
.card-with-image {
    color: white;
    border: none;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.card-with-image .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-with-image .badge {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.card-with-image .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.card-with-image .btn-outline-primary {
    border-color: white;
    color: white;
}

.card-with-image .btn-outline-primary:hover {
    background-color: white;
    color: #0d6efd;
}

/* Enhanced title styling for featured image cards */
.card-with-image .card-title a {
    font-weight: 700 !important;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.6),
        0 3px 12px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    background-color: #f8f9fa;
    margin-top: 3rem;
}

/* Post Navigation */
.post-navigation {
    border-top: 1px solid #dee2e6;
    padding-top: 2rem;
    margin-top: 3rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
    color: #333;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Search Functionality */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #0d6efd;
}

.search-result-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.search-result-excerpt {
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-highlight {
    background-color: #fff3cd;
    font-weight: 600;
}

/* Filter Section */
.filter-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

/* Article Container - 1000px固定幅設定 */
.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Post Header - 1000px固定幅設定 */
.post-header {
    max-width: 1000px;
    margin: 0 auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
}