/* Blog Card Link Wrapper (legacy, sadece mevcut kullanımlar için) */
a.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Cover link — kartın tamamını kaplayan görünmez link */
.blog-card-cover-link {
    inset: 0;
    position: absolute;
    z-index: 1;
}

/* Blog Card */
.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #EBE7EB;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.3s, transform 0.3s;
}

.blog-card:hover {
    box-shadow: 0 12px 32px rgba(116, 46, 218, 0.12);
    transform: translateY(-4px);
}

.blog-card .blog-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.blog-card .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.blog-card .blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.blog-card .blog-category {
    color: #742EDA;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.blog-card .blog-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #030A18;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s;
}

.blog-card:hover .blog-title {
    color: #742EDA;
}

.blog-card .blog-description {
    color: #59647A;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #F1EAFB;
    color: #742EDA;
    text-decoration: none;
    transition: background 0.15s ease;
}

a.blog-tag:hover {
    background: #e6d9f8;
}

/* Tag'ler cover-link'in üzerinde kalmalı (clickable) */
.blog-card .blog-tags {
    position: relative;
    z-index: 2;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card .blog-category,
    .blog-card .blog-tags {
        display: none;
    }

    .blog-view-toggle {
        display: none;
    }
}

/* Blog Page Layout */
.blog-layout {
    display: flex;
    gap: 48px;
}

@media (max-width: 1024px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 100% !important;
    }
}

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

/* Blog Sidebar */
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-sidebar-section {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #EBE7EB;
}

.blog-sidebar-title {
    font-weight: 700;
    color: #030A18;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

/* Search Input */
.blog-search-wrapper {
    position: relative;
}

.blog-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: #F6F6F9;
    border: 1px solid #EBE7EB;
    border-radius: 12px;
    outline: none;
    font-size: 0.875rem;
    color: #030A18;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.blog-search-input:focus {
    border-color: #742EDA;
}

.blog-search-icon {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #59647A;
    width: 20px;
    height: 20px;
}

/* Sidebar select (categories + popular tags) */
.blog-sidebar-select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border-radius: 8px;
    border: 1px solid #EBE7EB;
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2359647A'><path fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    color: #2F3044;
    cursor: pointer;
    font-size: 0.875rem;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-sidebar-select:hover {
    border-color: #d1c4f1;
}

.blog-sidebar-select:focus {
    outline: none;
    border-color: #742EDA;
    box-shadow: 0 0 0 3px rgba(116, 46, 218, 0.15);
}

/* Load More */
.blog-load-more {
    margin-top: 40px;
    margin-bottom: 60px;
    text-align: center;
}

.blog-load-more-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 9999px;
    background: #742EDA;
    color: #fff;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.blog-load-more-btn:hover {
    background: #5610bc;
}

.blog-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Blog Page Header */
.blog-page-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #030A18;
    margin-bottom: 16px;
}

.blog-page-description {
    color: #59647A;
    font-size: 1.125rem;
    max-width: 672px;
    margin: 0 auto;
}

/* Blog Detail Page */
.blog-detail-wrapper {
    padding-top: 32px;
    padding-bottom: 48px;
}

@media (min-width: 1024px) {
    .blog-detail-wrapper {
        padding-top: 48px;
        padding-bottom: 80px;
    }
}

/* Breadcrumb */
.blog-breadcrumb {
    margin-bottom: 32px;
    font-size: 0.875rem;
    color: #59647A;
}

.blog-breadcrumb ol {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.blog-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-breadcrumb a {
    color: #59647A;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: #742EDA;
}

.blog-breadcrumb-separator {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.blog-breadcrumb-current {
    color: #030A18;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    display: inline-block;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .blog-breadcrumb-current {
        max-width: none;
    }
}

/* Detail Layout */
.blog-detail-layout {
    display: flex;
    gap: 48px;
}

@media (max-width: 1024px) {
    .blog-detail-layout {
        flex-direction: column;
    }
}

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

/* Article */
.blog-detail-article {
    background: #fff;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #EBE7EB;
}

@media (min-width: 768px) {
    .blog-detail-article {
        padding: 40px;
    }
}

/* Header */
.blog-detail-header {
    margin-bottom: 32px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.blog-detail-category {
    color: #742EDA;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-detail-dot {
    color: #EBE7EB;
    font-size: 0;
}

.blog-detail-dot::before {
    content: "\2022";
    font-size: 0.875rem;
}

.blog-detail-date,
.blog-detail-reading-time {
    color: #59647A;
    font-size: 0.875rem;
}

.blog-detail-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #030A18;
    margin-bottom: 24px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .blog-detail-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .blog-detail-title {
        font-size: 3rem;
    }
}

/* Author */
.blog-detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.blog-detail-author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-detail-author-name {
    font-weight: 700;
    color: #030A18;
    font-size: 0.875rem;
}

.blog-detail-author-title {
    color: #59647A;
    font-size: 0.75rem;
}

/* Hero Image */
.blog-detail-hero {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

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

/* CMS content styles moved to blog-content.css so the same rules can also be
   loaded inside the shadow root that isolates blog detail content from site
   CSS (see blog-content-isolation.js). */

/* Tags at bottom */
.blog-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #EBE7EB;
}

/* Share section */
.blog-detail-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #EBE7EB;
}

.blog-detail-share-label {
    font-weight: 700;
    color: #030A18;
    font-size: 0.95rem;
}

.blog-detail-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #EBE7EB;
    background: #fff;
    color: #59647A;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    text-decoration: none;
    padding: 0;
    position: relative;
}

.blog-share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.blog-share-btn--twitter:hover   { background: #000000; border-color: #000000; }
.blog-share-btn--facebook:hover  { background: #1877F2; border-color: #1877F2; }
.blog-share-btn--linkedin:hover  { background: #0A66C2; border-color: #0A66C2; }
.blog-share-btn--whatsapp:hover  { background: #25D366; border-color: #25D366; }
.blog-share-btn--telegram:hover  { background: #229ED9; border-color: #229ED9; }
.blog-share-btn--copy:hover      { background: #742EDA; border-color: #742EDA; }

.blog-share-btn--copy .blog-share-icon-success,
.blog-share-btn--copy .blog-share-copied-text {
    display: none;
}

.blog-share-btn--copy.is-copied {
    width: auto;
    padding: 0 14px;
    border-radius: 999px;
    background: #16A34A;
    border-color: #16A34A;
    color: #fff;
    gap: 6px;
}

.blog-share-btn--copy.is-copied .blog-share-icon-default {
    display: none;
}

.blog-share-btn--copy.is-copied .blog-share-icon-success,
.blog-share-btn--copy.is-copied .blog-share-copied-text {
    display: inline-flex;
    align-items: center;
}

.blog-share-copied-text {
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .blog-detail-share {
        gap: 12px;
    }
    .blog-share-btn {
        width: 38px;
        height: 38px;
    }
}

/* Related Articles */
.blog-related {
    margin-top: 24px;
}

.blog-related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #030A18;
    margin-bottom: 24px;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar category/tag links for detail page */
.blog-sidebar-category-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #59647A;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.blog-sidebar-category-link:hover {
    background: #f3f4f6;
    color: #742EDA;
}

.blog-sidebar-tag-link {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    border: 1px solid #EBE7EB;
    color: #59647A;
    text-decoration: none;
    background: #fff;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}

.blog-sidebar-tag-link:hover {
    border-color: #742EDA;
    color: #742EDA;
}

/* Blog card meta: tarih + okuma süresi */
.blog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 8px;
}

.blog-card-date,
.blog-card-reading {
    color: #8d94a4;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-card-sep {
    color: #c5cbd6;
    font-size: 0.75rem;
}

/* Blog detail title küçültme */
@media (min-width: 1024px) {
    .blog-detail-title {
        font-size: 2rem;
    }
}

/* Yazar linki — sadece içerik kadar genişlik */
a.blog-detail-author {
    align-self: flex-start;
    border-radius: 12px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    padding: 8px 12px;
    margin: -8px -12px;
    text-decoration: none;
    transition: background 0.15s ease;
    width: auto;
}

a.blog-detail-author:hover {
    background: #f6f1fe;
}

a.blog-detail-author .blog-detail-author-name {
    color: #742eda;
}

/* Author Articles bölümü */
.blog-author-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid #f0edf2;
}

.blog-author-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f6f1fe;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.blog-author-card-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-author-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #071739;
}

.blog-author-card-title {
    font-size: 0.875rem;
    color: #59647a;
    margin-top: 2px;
}

/* Mobil search */
.blog-mobile-search {
    display: none;
    margin-bottom: 20px;
}

/* Mobile-only filter row: category + tag selects side by side, sits right under the
   mobile search bar. Hidden on desktop where the sidebar carries the same controls. */
.blog-mobile-filters {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .blog-mobile-search {
        display: block;
    }

    .blog-sidebar-search-desktop {
        display: none;
    }
}

@media (max-width: 1024px) {
    .blog-mobile-filters {
        display: grid;
    }

    /* The two filter sections in the sidebar would otherwise drop below the grid on
       mobile — hide them; the mobile filter row above replaces them. The sidebar's
       remaining sections (e.g. desktop search) keep their own visibility rules. */
    .blog-sidebar-section:has(> [data-blog-category]),
    .blog-sidebar-section:has(> [data-blog-tag]) {
        display: none;
    }
}

/* Author profile page */
.blog-author-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f6f1fe;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 40px;
}

.blog-author-profile-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-author-profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #071739;
    margin: 0 0 4px;
}

.blog-author-profile-title {
    font-size: 0.9375rem;
    color: #59647a;
    margin: 0 0 4px;
}

.blog-author-profile-count {
    font-size: 0.8125rem;
    color: #9b8fc4;
    font-weight: 600;
    margin: 0;
}

/* Home Page Blog Section - 3 column grid */
.blog-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .blog-grid-home {
        grid-template-columns: 1fr;
    }
}

.blog-empty-state {
    align-items: center;
    background: #fff;
    border: 1px solid #ebe7eb;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 20px;
    text-align: center;
}

.blog-empty-icon {
    color: #b9aee0;
    height: 56px;
    width: 56px;
    margin-bottom: 16px;
}

.blog-empty-state p {
    color: #8d94a4;
    font-size: 15px;
    margin: 0;
}
