/* Blog Page Styles */

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Search */
.blog-search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 2rem auto 0;
}

.blog-search-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
}

.blog-search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-search-input::placeholder {
    color: #999;
}

.blog-search-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: #f8f9fa;
    min-height: 60vh;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e7ff;
    background: white;
    color: #4a5568;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn i {
    font-size: 1rem;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-category {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #a0aec0;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-author i {
    color: #667eea;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-date i {
    color: #667eea;
}

/* Iskelet kartlar — blog.html'de statik duruyorlar, gercek kartla ayni
   yuksekligi kaplamalari sart (aksi halde veri gelince satir kayar).
   Olculer .blog-card-image (220px) ve .blog-card-content (1.5rem padding)
   ile ayni; degistirirsen ikisini birlikte degistir. */
.blog-card-skeleton {
    cursor: default;
    pointer-events: none;
}

.blog-card-skeleton:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skeleton-image {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
}

.skeleton-line {
    display: block;
    border-radius: 6px;
}

.skeleton-image,
.skeleton-line {
    background: linear-gradient(90deg, #eef0f4 25%, #e2e6ec 37%, #eef0f4 63%);
    background-size: 400% 100%;
    animation: skeleton-sheen 1.4s ease infinite;
}

/* Asagidaki yukseklikler gercek kartin karsiligindan TUREITILDI, goze gore
   secilmedi. Kaynak kurallar bu dosyada, ~195-241. satirlar:
     .blog-card-category  0.75rem font + 0.4rem*2 padding -> 1.7rem, mb 1rem
     .blog-card-title     1.5rem * 1.4 satir * 2 satir    -> 4.2rem, mb 0.75rem
     .blog-card-excerpt   0.95rem * 1.6 satir * 3 satir   -> 3 x 1.52rem, mb 1rem
     .blog-card-meta      1rem padding-top + 1px border + ~1.03rem icerik
   Kart olculerini degistirirsen buradaki karsiligini da degistir. */
.skeleton-category {
    width: 90px;
    height: 1.7rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.skeleton-title {
    width: 100%;
    height: 4.2rem;
    margin-bottom: 0.75rem;
}

/* 1rem cubuk + 0.52rem bosluk = 1.52rem, yani bir excerpt satiri */
.skeleton-text {
    width: 100%;
    height: 1rem;
    margin-bottom: 0.52rem;
}

/* Son satir excerpt'in kendi 1rem alt bosugunu da tasir */
.skeleton-text.short {
    width: 70%;
    margin-bottom: 1.52rem;
}

.skeleton-meta {
    width: 100%;
    height: 1.03rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid transparent;
}

@keyframes skeleton-sheen {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-image,
    .skeleton-line {
        animation: none;
    }
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #718096;
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem;
    color: #a0aec0;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .blog-section {
        padding: 60px 0;
    }
}

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

    .hero-description {
        font-size: 1rem;
    }

    .blog-card-title {
        font-size: 1.25rem;
    }

    .filter-btn {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        justify-content: center;
    }
}

