/* Blog detay sayfasına özel stiller (Views/Home/Blog.cshtml). */

/* Breadcrumb, layout içinde .bl-detail dışında bulunur. */
@media (max-width: 991.98px) {
    ol.breadcrumb {
        flex-wrap: nowrap;
        align-items: center;
        min-width: 0;
        max-width: 100%;
        padding: .5rem .75rem;
    }

    ol.breadcrumb > .breadcrumb-item {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 14px;
        line-height: 1.5;
    }

    ol.breadcrumb > .breadcrumb-item > a {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
    }

    ol.breadcrumb > .breadcrumb-item + .breadcrumb-item::before {
        flex: 0 0 auto;
        padding-left: 0;
        padding-right: .5rem;
    }

    ol.breadcrumb > .breadcrumb-item.active:last-child {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        overflow: hidden;
    }

    /* Ayırıcıyı korumak için yalnızca başlık metnini kırp. */
    ol.breadcrumb > .breadcrumb-item.active:last-child > span[itemprop="name"] {
        display: block;
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.bl-detail {
    --bl-primary: var(--bw-primary, #2563EB);
    --bl-dark: var(--bw-dark, #0F172A);
    --bl-gray: var(--bw-gray, #64748B);
    --bl-border: var(--bw-border, #E2E8F0);
    --bl-bg: var(--bw-bg, #F8FAFC);
    --bl-brand: #015f89;
    --bl-text: #334155;
    padding-top: 8px;
    padding-bottom: 48px;
    overflow-wrap: break-word;
}

/* ---------- Başlık alanı ---------- */
.bl-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1454;
    background: var(--bw-primary, #2563EB);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .1s linear;
    pointer-events: none;
}
.bl-progress[hidden], .bl-mobile-cta[hidden] { display: none !important; }
.bl-toc-list a.is-active {
    color: var(--bl-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bl-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    /* Tawk chat: reserve the bottom-right corner. */
    right: calc(96px + env(safe-area-inset-right, 0px));
    z-index: 1040;
    display: flex;
    align-items: flex-start;
    /* safe-area-inset-bottom: viewport-fit=cover eklenirse etkinleşir. */
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
    border-radius: 12px 12px 0 0;
    background: var(--bl-brand);
    color: #fff;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .15);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
}
.bl-mobile-cta.bl-is-visible { transform: translateY(0); visibility: visible; }
.bl-mobile-cta-content { flex: 1; min-width: 0; }
.bl-mobile-cta p { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.bl-mobile-cta .bl-cta-btn { padding: 8px 12px; font-size: 14px; }
.bl-mobile-cta-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.bl-mobile-cta-close:focus { outline: 2px solid #fff; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
    .bl-progress, .bl-mobile-cta { transition: none; }
}

.bl-head {
    max-width: 960px;
    margin: 0 auto 32px;
}

.bl-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #E8F0FE;
    color: var(--bl-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

a.bl-badge:hover,
a.bl-badge:focus {
    background: var(--bl-primary);
    color: #fff;
    text-decoration: none;
}

.bl-badge-sm {
    font-size: 12px;
    padding: 2px 10px;
}

.bl-title {
    margin: 14px 0 12px;
    color: var(--bl-dark);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.bl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: var(--bl-gray);
    font-size: 14px;
}

.bl-meta-sep {
    margin: 0 8px;
}

.bl-cover {
    margin: 24px 0 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bl-bg);
    aspect-ratio: 16 / 9;
}

.bl-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .bl-title {
        font-size: 38px;
    }
}

/* ---------- Makale gövdesi ---------- */
.bl-article {
    max-width: 720px;
    color: var(--bl-text);
    font-size: 17px;
    line-height: 1.75;
}

.bl-article[tabindex="-1"]:focus { outline: none; }

@media (min-width: 768px) {
    .bl-article {
        font-size: 18px;
    }
}

.bl-article > :first-child {
    margin-top: 0;
}

.bl-article p {
    margin: 0 0 1.25em;
}

.bl-article h2,
.bl-article h3,
.bl-article h4 {
    color: var(--bl-dark);
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 75px;
}

.bl-article h2 {
    margin: 2em 0 .75em;
    font-size: 1.5em;
}

.bl-article h3 {
    margin: 1.6em 0 .6em;
    font-size: 1.25em;
}

.bl-article h4 {
    margin: 1.4em 0 .5em;
    font-size: 1.1em;
}

.bl-article a {
    color: var(--bl-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bl-article a:hover {
    color: var(--bl-brand);
}

.bl-article ul,
.bl-article ol {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
}

.bl-article li {
    margin-bottom: .4em;
}

.bl-article blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    border-left: 4px solid var(--bl-primary);
    background: var(--bl-bg);
    border-radius: 0 8px 8px 0;
    color: var(--bl-dark);
    font-style: italic;
}

.bl-article blockquote p:last-child {
    margin-bottom: 0;
}

.bl-article img {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
}

.bl-article figure {
    margin: 1.5em 0;
}

.bl-article table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: .9em;
    -webkit-overflow-scrolling: touch;
}

.bl-article th,
.bl-article td {
    padding: 8px 12px;
    border: 1px solid var(--bl-border);
    vertical-align: top;
}

.bl-article th {
    background: var(--bl-bg);
    color: var(--bl-dark);
    font-weight: 700;
}

.bl-article pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--bl-bg);
    font-size: .85em;
}

.bl-article iframe,
.bl-article video {
    max-width: 100%;
}

/* ---------- İçindekiler ---------- */
.bl-toc[hidden] {
    display: none !important;
}

.bl-toc {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
}

.bl-toc-mobile {
    max-width: 720px;
    margin-bottom: 24px;
    padding: 12px 16px;
}

.bl-toc-mobile summary {
    cursor: pointer;
    color: var(--bl-dark);
    font-weight: 700;
}

.bl-toc-mobile[open] summary {
    margin-bottom: 8px;
}

.bl-toc-desktop {
    padding: 16px 20px;
    margin-bottom: 20px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
}

.bl-toc-title {
    margin: 0 0 8px;
    color: var(--bl-dark);
    font-weight: 700;
}

.bl-toc-list {
    margin: 0;
    padding-left: 1.2em;
}

.bl-toc-list li {
    margin: 4px 0;
    line-height: 1.4;
}

.bl-toc-list li.bl-toc-sub {
    margin-left: 1em;
    list-style: circle;
    font-size: 14px;
}

.bl-toc-list a {
    color: var(--bl-text);
    text-decoration: none;
}

.bl-toc-list a:hover {
    color: var(--bl-primary);
    text-decoration: underline;
}

/* ---------- Sidebar ---------- */
.bl-sidebar {
    position: sticky;
    top: 100px;
}

/* ---------- İlgili eğitimler (BlogRelatedCourses) ---------- */
.bl-rc {
    margin: 32px 0 0;
    padding: 16px 20px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.bl-sidebar .bl-rc {
    margin: 0 0 16px;
}

.bl-rc-title {
    margin: 0 0 8px;
    color: var(--bl-dark);
    font-size: 16px;
    font-weight: 700;
}

.bl-rc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl-rc-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-top: 1px solid var(--bl-border);
}

.bl-rc-item:first-child {
    border-top: 0;
    padding-top: 4px;
}

.bl-rc-name {
    color: var(--bl-dark);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.bl-rc-name:hover,
.bl-rc-name:focus {
    color: var(--bl-primary);
    text-decoration: underline;
}

.bl-rc-meta {
    margin-top: 4px;
    color: var(--bl-gray);
    font-size: 13px;
}

.bl-rc-more {
    margin-top: 6px;
    color: var(--bl-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.bl-rc-more:hover {
    color: var(--bl-brand);
    text-decoration: underline;
}

/* ---------- CTA ---------- */
.bl-cta {
    margin: 32px 0 0;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bl-brand), var(--bl-primary));
    color: #fff;
}

.bl-sidebar .bl-cta {
    margin-top: 0;
}

.bl-cta-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.bl-cta-text {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    opacity: .92;
}

.bl-cta-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    background: #fff;
    color: var(--bl-brand);
    font-weight: 700;
    text-decoration: none;
}

.bl-cta-btn:hover,
.bl-cta-btn:focus {
    background: var(--bl-dark);
    color: #fff;
    text-decoration: none;
}

.bl-cta-link {
    display: inline-block;
    margin-left: 12px;
    color: #fff;
    text-decoration: underline;
}

.bl-cta-link:hover {
    color: #fff;
}

/* ---------- Kategoriler ve paylaşım ---------- */
.bl-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 720px;
    margin-top: 32px;
}

.bl-tags > * {
    margin: 0 8px 8px 0;
}

.bl-tags-label {
    color: var(--bl-gray);
    font-size: 14px;
}

.bl-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 720px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--bl-border);
}

.bl-share > * {
    margin: 0 8px 8px 0;
}

.bl-share-label {
    color: var(--bl-dark);
    font-weight: 700;
}

.bl-share-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--bl-border);
    border-radius: 999px;
    background: #fff;
    color: var(--bl-dark);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.bl-share-btn[hidden] {
    display: none;
}

.bl-share-btn svg {
    margin-right: 6px;
    flex-shrink: 0;
}

.bl-share-btn:hover,
.bl-share-btn:focus {
    border-color: var(--bl-primary);
    color: var(--bl-primary);
    text-decoration: none;
}

/* ---------- İlgili yazılar ---------- */
.bl-related {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--bl-border);
}

.bl-related-title {
    margin: 0 0 24px;
    color: var(--bl-dark);
    font-size: 24px;
    font-weight: 700;
}

.bl-col {
    display: flex;
    margin-bottom: 24px;
}

.bl-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.bl-card:hover,
.bl-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
    color: inherit;
    text-decoration: none;
}

.bl-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bl-bg);
    overflow: hidden;
}

.bl-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    padding: 16px;
}

.bl-card-title {
    display: block;
    margin: 8px 0;
    color: var(--bl-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.bl-card:hover .bl-card-title {
    color: var(--bl-brand);
}

.bl-card-date {
    margin-top: auto;
    color: var(--bl-gray);
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .bl-card {
        transition: none;
    }

    .bl-card:hover {
        transform: none;
    }
}
