/**
 * Blog Sayfaları CSS
 * Recep Erdoğan Web Sitesi
 * Blog kategorileri ve blog yazıları için stil tanımlamaları
 */

:root {
    --blog-primary-color: #944bbb;
    --blog-secondary-color: #f5b841;
    --blog-dark-color: #14110f;
    --blog-light-color: #edf7f6;
    --blog-gray-color: #f8f9fa;
    --blog-text-color: #333;
    --blog-meta-color: #666;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* Blog Hero Bölümü */
.blog-hero {
    padding: 100px 0 60px;
    background-color: var(--blog-light-color);
    position: relative;
    text-align: center;
    margin-bottom: 60px;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160'%3E%3Cpath fill='%23ffffff' d='M0,128L80,112C160,96,320,64,480,64C640,64,800,96,960,106.7C1120,117,1280,107,1360,101.3L1440,96L1440,320L1360,320C1280,320,1120,320,960,320C800,320,640,320,480,320C320,320,160,320,80,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.blog-hero .section-title {
    color: var(--blog-dark-color);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.blog-hero .section-title strong {
    color: var(--blog-primary-color);
}

.blog-hero .section-description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
    color: var(--blog-meta-color);
}

/* Blog Kart Düzeni */
.blog-posts-section {
    padding: 60px 0;
}

.blog-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.blog-filter-item {
    padding: 8px 20px;
    margin: 0 5px 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 30px;
    color: var(--blog-text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.blog-filter-item:hover, 
.blog-filter-item.active {
    background: var(--blog-primary-color);
    color: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.blog-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--blog-meta-color);
}

.blog-date {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.blog-date::before {
    content: "\f073";
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
    color: var(--blog-primary-color);
}

.blog-category {
    display: flex;
    align-items: center;
    background: rgba(148, 75, 187, 0.1);
    color: var(--blog-primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.blog-category::before {
    content: "\f07b";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}

.blog-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--blog-dark-color);
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.blog-title a:hover {
    color: var(--blog-primary-color);
}

.blog-excerpt {
    color: var(--blog-meta-color);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-read-more {
    text-decoration: none;
    color: var(--blog-primary-color);
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    transition: var(--transition);
}

.blog-read-more::after {
    content: "\f061";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 5px;
    transition: var(--transition);
}

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

.blog-read-more:hover::after {
    transform: translateX(5px);
}

/* Sayfalama */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    background: #fff;
    color: var(--blog-text-color);
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.pagination-link:hover {
    background: var(--blog-primary-color);
    color: #fff;
}

.pagination-link.active {
    background: var(--blog-primary-color);
    color: #fff;
}

.pagination-prev, 
.pagination-next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* Blog Sidebar */
.blog-sidebar {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--blog-dark-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--blog-primary-color);
}

.sidebar-search {
    position: relative;
    margin-bottom: 20px;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    font-size: 15px;
    transition: var(--transition);
}

.sidebar-search input:focus {
    border-color: var(--blog-primary-color);
    outline: none;
}

.sidebar-search button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--blog-meta-color);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-search button:hover {
    color: var(--blog-primary-color);
}

/* Kategoriler */
.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    border-bottom: 1px solid #eee;
}

.sidebar-categories li:last-child {
    border-bottom: none;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: var(--blog-text-color);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-categories a:hover {
    color: var(--blog-primary-color);
    padding-left: 5px;
}

.sidebar-categories .cat-count {
    background: rgba(148, 75, 187, 0.1);
    color: var(--blog-primary-color);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 15px;
}

/* Blog Detay Sayfası */
.blog-detail {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 50px;
}

.blog-detail-image {
    width: 100%;
    height: 500px;
    position: relative;
}

.blog-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 30px 30px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.blog-detail-meta .blog-date,
.blog-detail-meta .blog-category,
.blog-detail-meta .blog-author,
.blog-detail-meta .blog-comments {
    margin-right: 20px;
    margin-bottom: 10px;
}

.blog-detail-meta .blog-author {
    display: flex;
    align-items: center;
}

.blog-detail-meta .blog-author::before {
    content: "\f007";
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
    color: var(--blog-primary-color);
}

.blog-detail-meta .blog-comments {
    display: flex;
    align-items: center;
}

.blog-detail-meta .blog-comments::before {
    content: "\f075";
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
    color: var(--blog-primary-color);
}

.blog-detail-content {
    padding: 30px;
}

.blog-detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--blog-dark-color);
    line-height: 1.3;
}

.blog-detail-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--blog-text-color);
    margin-bottom: 30px;
}

.blog-detail-text p {
    margin-bottom: 20px;
}

.blog-detail-text h2,
.blog-detail-text h3,
.blog-detail-text h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--blog-dark-color);
}

.blog-detail-text img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 30px 0;
}

.blog-detail-text blockquote {
    background: var(--blog-light-color);
    border-left: 4px solid var(--blog-primary-color);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    position: relative;
}

.blog-detail-text blockquote::before {
    content: '"';
    font-size: 50px;
    position: absolute;
    top: 10px;
    left: 10px;
    color: rgba(148, 75, 187, 0.2);
}

.blog-detail-text ul,
.blog-detail-text ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.blog-detail-text li {
    margin-bottom: 10px;
}

/* Blog etiketleri */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.blog-tags span {
    font-weight: 600;
    margin-right: 10px;
    color: var(--blog-dark-color);
}

.blog-tag {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 5px 5px 0;
    background: rgba(148, 75, 187, 0.1);
    color: var(--blog-primary-color);
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.blog-tag:hover {
    background: var(--blog-primary-color);
    color: #fff;
}

/* Sosyal paylaşım */
.blog-share {
    display: flex;
    align-items: center;
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.blog-share span {
    font-weight: 600;
    margin-right: 15px;
    color: var(--blog-dark-color);
}

.blog-share-links {
    display: flex;
}

.blog-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.blog-share-link.facebook {
    background: #3b5998;
}

.blog-share-link.twitter {
    background: #1da1f2;
}

.blog-share-link.linkedin {
    background: #0077b5;
}

.blog-share-link.whatsapp {
    background: #25d366;
}

.blog-share-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* İlgili yazılar */
.related-posts {
    margin-top: 50px;
}

.related-posts-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--blog-dark-color);
    position: relative;
    padding-bottom: 10px;
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--blog-primary-color);
}

/* Medya sorguları - Her zaman en sonda toplanır */
@media (max-width: 1199px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .blog-detail-image {
        height: 400px;
    }
    
    .blog-detail-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .blog-hero {
        padding: 80px 0 40px;
    }
    
    .blog-hero .section-title {
        font-size: 32px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 20px;
    }
    
    .blog-detail-image {
        height: 300px;
    }
    
    .blog-detail-title {
        font-size: 24px;
    }
    
    .blog-detail-content,
    .blog-detail-meta {
        padding: 20px;
    }
}

@media (max-width: 575px) {
    .blog-hero .section-title {
        font-size: 28px;
    }
    
    .blog-detail-image {
        height: 200px;
    }
    
    .blog-pagination .pagination-link {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
}
