/**
 * Blog Sistemi CSS
 * Modern ve responsive tasarım
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --secondary-color: #2563eb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --link-color: #2563eb;
    --link-hover: #1a365d;
    --max-width: 1200px;
    --spacing: 1rem;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 70px; /* Navbar için padding */
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Blog sayfaları için daha geniş container */
body.blog-page .container {
    max-width: 1400px;
    padding: 0 calc(var(--spacing) * 2);
}

@media (max-width: 768px) {
    body.blog-page .container {
        padding: 0 var(--spacing);
    }
}

/* Header - Artık ana sayfadaki navbar kullanılıyor */

/* Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    margin: 3rem 0;
    padding: 0;
    align-items: start;
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
}

/* Page Title */
.page-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

/* Posts Grid - Artık blog-posts-grid-modern kullanılıyor */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (min-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
}

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

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

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

.post-placeholder-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.post-placeholder-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

.post-placeholder-image img {
    position: relative;
    z-index: 1;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.post-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-category a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.post-category a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

.post-category:hover a {
    color: white;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--link-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.read-more {
    display: inline-block;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--link-hover);
}

/* Post Detail */
.post-detail {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .post-detail {
        padding: 1.5rem;
    }
}

.post-detail .post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-featured-image {
    width: 100%;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 400px;
    background: var(--bg-light);
}

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

.post-featured-image.post-placeholder-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.post-featured-image.post-placeholder-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

.post-featured-image.post-placeholder-image img {
    position: relative;
    z-index: 1;
}

.post-detail .post-excerpt {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 300;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-top: 2rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-content a {
    color: var(--link-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--link-hover);
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--link-hover);
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.related-post-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.related-post-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-card h3 a:hover {
    color: var(--link-color);
}

.related-post-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .blog-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

.sidebar-widget {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--link-color);
}

.post-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    font-weight: 500;
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--link-hover);
}

/* Footer */
.blog-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {

    .post-detail {
        padding: 1rem;
    }

    .post-detail .post-title {
        font-size: 1.75rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .error-page h1 {
        font-size: 4rem;
    }
}


