/* ==========================================================================
   Blog Sayfası - Modüler Sayfa Stilleri
   ========================================================================== */

/* CSS Değişkenleri (Kurum teması JS/PHP üzerinden override edilir) */
:root {
    --forum-primary:      #4f46e5;
    --forum-primary-hover:#4338ca;
    --forum-bg-light:     #f8fafc;
    --forum-border-color: #e2e8f0;
    --forum-text-dark:    #0f172a;
}

/* Kompakt Blog Hero Kartı (Kompakt İnce Görünüm) */
.gd-blog-hero-compact {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 14px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.gd-blog-hero-compact .gd-page-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-blog-hero-compact .gd-page-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.gd-blog-hero-compact .gd-page-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ── Ana Sarmalayıcı — site.css .gd-page-body ana omurgasına bağlı ── */

.gd-blog-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Sayfa Başlık Alanı ─────────────────────────────────────────────────── */
.gd-blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.gd-blog-header__title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.gd-blog-header__subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 6px 0 0 0;
}

.gd-blog-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--forum-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.gd-blog-new-btn:hover {
    background: var(--forum-primary-hover);
    color: #fff;
}

/* ── Etiket Filtre Bildirimi ─────────────────────────────────────────────── */
.gd-blog-tag-filter {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a8a;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.gd-blog-tag-filter__label {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gd-blog-tag-filter__clear {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

/* ── Branş / Alt Kategori Filtresi ──────────────────────────────────────── */
.gd-blog-branch-filter {
    margin-bottom: 20px;
}

.gd-blog-branch-filter__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--forum-text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gd-blog-branch-filter__list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-blog-branch-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid var(--forum-border-color);
    background: #ffffff;
    color: var(--forum-text-dark);
}

.gd-blog-branch-btn:hover,
.gd-blog-branch-btn--active {
    background: var(--forum-primary);
    color: #ffffff;
    border-color: var(--forum-primary);
}

/* ── Bölüm Başlığı ─────────────────────────────────────────────────────── */
.gd-blog-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Yazı Kartları Listesi ───────────────────────────────────────────────── */
.gd-blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gd-blog-post-card {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.gd-blog-post-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.gd-blog-post-card--pinned {
    background: #fffbeb;
}

.gd-blog-post-icon {
    width: 52px;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0;
}

.gd-blog-post-info {
    flex: 1;
    padding: 14px 16px 14px 0;
    min-width: 0;
}

.gd-blog-post-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-blog-post-meta {
    font-size: 12px;
    color: #64748b;
}

.gd-blog-post-meta .gd-blog-cat-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    margin: 0 2px;
}

.gd-blog-post-meta .gd-blog-branch-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    margin: 0 2px;
}

.gd-blog-post-meta .gd-blog-inst-badge {
    font-weight: 600;
    color: #475569;
}

.gd-blog-post-date {
    min-width: 72px;
    text-align: right;
    padding: 14px 16px 14px 8px;
    flex-shrink: 0;
}

.gd-blog-post-date strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.gd-blog-post-date span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.gd-blog-badge-pin {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gd-blog-empty {
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
}

.gd-blog-empty__text {
    font-weight: 600;
    margin: 0;
    color: #64748b;
}

.gd-blog-empty__icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.35;
    display: block;
}

/* ── Kategoriler Başlığı ────────────────────────────────────────────────── */
.gd-blog-cats-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 40px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Kategoriler Grid (Yan Yana Kutular Yapısı) ────────────────────────── */
.gd-blog-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 14px;
}

.gd-blog-cat-card {
    border-left: 4px solid var(--cat-color, var(--forum-primary));
    border-top: 1px solid var(--forum-border-color);
    border-right: 1px solid var(--forum-border-color);
    border-bottom: 1px solid var(--forum-border-color);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    background: #ffffff;
    padding: 18px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    height: 100%;
    box-sizing: border-box;
}

.gd-blog-cat-card:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--cat-color, var(--forum-primary));
}

.gd-blog-cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gd-blog-cat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.gd-blog-cat-small-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-blog-cat-info__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-blog-cat-info__name a {
    color: inherit;
    text-decoration: none;
}

.gd-blog-cat-logo-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--forum-border-color);
    padding: 3px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.gd-blog-cat-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.gd-blog-cat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.gd-blog-cat-info__name {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.gd-blog-cat-info__name a {
    color: inherit;
    text-decoration: none;
}

.gd-blog-cat-info__desc {
    margin: 0 0 10px 0;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-blog-subcat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.gd-blog-subcat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 9px;
    text-decoration: none;
    color: #475569;
    transition: all 0.15s ease;
}

.gd-blog-subcat-badge:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-1px);
}

.gd-blog-subcat-badge__count {
    color: #94a3b8;
    font-weight: 500;
    font-size: 11px;
}

.gd-blog-cat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
}

.gd-blog-cat-replies-count {
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gd-blog-cat-action-btn {
    font-weight: 700;
    color: var(--cat-color, #4f46e5);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .gd-blog-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .gd-blog-post-card {
        border-radius: 8px;
    }

    .gd-blog-cats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gd-blog-branch-filter__list {
        gap: 6px;
    }
}
