/* ==========================================================================
   Blog Styles - Archive & Single Post
   ========================================================================== */

/* Archive Header */
.archive-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.archive-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff10" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.archive-header .container {
    position: relative;
    z-index: 1;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: bold;
    color: white;
}

.archive-label {
    font-size: 1rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 10px;
    font-weight: normal;
}

.archive-description {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Content Area Layout */
.site-main .content-area {
    max-width: 1200px;
    margin: 20px auto 60px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Blog Thumbnail */
.blog-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.05);
}

.blog-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
}

.placeholder-image {
    font-size: 3rem;
    color: #667eea50;
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Blog Content */
.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.blog-meta i {
    margin-right: 5px;
    color: #999;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
    flex: 1;
}

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

.blog-title a:hover {
    color: #667eea;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 12px;
}

/* Pagination */
.pagination {
    margin: 60px 0;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination .page-numbers:hover,
.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .dots {
    border: none;
    background: none;
    color: #999;
}

.pagination .prev,
.pagination .next {
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    flex: 0 0 350px;
}

/* Widgets */
.site-main .widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

/* Categories Widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #667eea;
}

.category-list .count {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #666;
}

/* Recent Posts Widget */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts a {
    text-decoration: none;
    display: block;
}

.recent-posts .post-date {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 5px;
}

.recent-posts .post-title {
    color: #333;
    line-height: 1.4;
    transition: color 0.3s;
}

.recent-posts a:hover .post-title {
    color: #667eea;
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-item:hover {
    background: #667eea;
    color: white;
}

/* Archive Widget */
.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.archive-list li:last-child {
    border-bottom: none;
}

.archive-list a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.archive-list a:hover {
    color: #667eea;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.no-posts-icon {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 30px;
}

.no-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.no-posts p {
    color: #666;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a6fd8;
}

/* ==========================================================================
   Single Post Styles
   ========================================================================== */

.main-content .single-post {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Single Header */
.single-header {
    margin-bottom: 30px;
}

.single-category {
    margin-bottom: 20px;
}

.single-category a {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 10px;
    transition: background 0.3s;
}

.single-category a:hover {
    background: #5a6fd8;
}

.single-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #333;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
    color: #666;
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.single-meta i {
    color: #999;
}

/* Single Thumbnail */
.single-thumbnail {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
}

.single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Table of Contents */
.toc-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.toc-title {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: transform 0.3s;
}

.toc-container.collapsed .toc-toggle {
    transform: rotate(-90deg);
}

.toc-container.collapsed .toc-content {
    display: none;
}

.toc-content ol {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.toc-content li {
    margin-bottom: 10px;
}

.toc-content li.toc-h3 {
    margin-left: 20px;
    font-size: 0.95rem;
}

.toc-content a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.toc-content a:hover {
    color: #667eea;
}

/* Single Content */
.single-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.single-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.single-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: #333;
}

.single-content p {
    margin-bottom: 20px;
}

.single-content ul,
.single-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-content li {
    margin-bottom: 10px;
}

.single-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px 25px;
    margin: 30px 0;
    font-style: italic;
}

.single-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

.single-content code {
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 3px;
    color: #e83e8c;
    font-size: 0.9em;
}

.single-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.single-content th,
.single-content td {
    padding: 12px;
    border: 1px solid #e0e0e0;
}

.single-content th {
    background: #f8f9fa;
    font-weight: bold;
}

/* Single Tags */
.single-tags {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.single-tags i {
    margin-right: 10px;
    color: #999;
}

.tag-link {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 8px 15px;
    margin: 5px 5px 5px 0;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-link:hover {
    background: #667eea;
    color: white;
}

/* Share Buttons */
.single-share {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.share-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-facebook {
    background: #1877F2;
    color: white;
}

.share-line {
    background: #00B900;
    color: white;
}

.share-hatena {
    background: #00A4DE;
    color: white;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Related Posts */
.related-posts {
    margin: 60px 0;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-thumbnail {
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.related-item:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
}

.related-content {
    padding: 20px;
}

.related-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.related-item-title {
    font-size: 1.1rem;
    margin: 0;
}

.related-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.related-item-title a:hover {
    color: #667eea;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.nav-previous,
.nav-next {
    min-height: 80px;
}

.nav-previous a,
.nav-next a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    height: 100%;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #667eea;
    color: white;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-previous a:hover .nav-label,
.nav-next a:hover .nav-label {
    color: rgba(255,255,255,0.9);
}

.nav-title {
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: white;
}

/* Profile Widget */
.profile-content {
    text-align: center;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.profile-info h4 {
    margin-bottom: 10px;
    color: #333;
}

.profile-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.profile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.profile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #666;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.profile-social a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Popular Posts Widget */
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-posts li:last-child {
    border-bottom: none;
}

.popular-posts a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.popular-posts .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popular-posts .post-title {
    color: #333;
    line-height: 1.4;
    flex: 1;
    transition: color 0.3s;
}

.popular-posts a:hover .post-title {
    color: #667eea;
}

/* Comments Section */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.comment {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-meta {
    flex: 1;
}

.comment-author-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 0.85rem;
    color: #999;
}

.comment-content {
    color: #666;
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-area {
        gap: 30px;
    }

    .sidebar {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2rem;
    }

    .content-area {
        flex-direction: column;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .single-post {
        padding: 25px;
    }

    .single-title {
        font-size: 1.8rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
