/* Blaxn pazarlama blog — liste + detay */

/* Kiracı site (site.php): blog.css --primary bekler; ziyaretçi teması --site-primary tanımlar */
.tenant-blog-page {
    --primary: var(--site-primary, #f24405);
    --primary-dark: var(--site-primary-hover, #d93d04);
}

.blog-breadcrumb {
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--primary);
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.blog-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.blog-breadcrumb a:hover,
.blog-breadcrumb a:focus-visible {
    text-decoration: none;
    opacity: 0.88;
}

/* Blog içinde link hover alt-çizgisi istemiyoruz */
.tenant-blog-page a,
.tenant-blog-page a:hover,
.tenant-blog-page a:focus,
.tenant-blog-page a:focus-visible {
    text-decoration: none !important;
    text-underline-offset: initial;
}

.blog-breadcrumb__sep {
    display: inline-block;
    padding: 0 0.5em;
    opacity: 0.75;
    font-weight: 500;
}

.blog-breadcrumb__current {
    color: var(--primary);
    font-weight: 500;
}

.blog-page-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.blog-page-sub {
    color: #5c5c5c;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Yeni sistem: container-fluid + 3 kolon (lg: 2 / 5 / 5) */
.container-fluid-inner.blx-blog-system {
    max-width: 100%;
    margin: 0 auto;
}

.blx-blog-layout {
    margin-top: 2rem;
}

/* Üst 3 blok aynı hizada dursun; detay sayfasında sütun içeriği dikey aksın (flex varsayılanı row olmasın) */
.blx-blog-layout > [class*="col-"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}
.blx-blog-layout > [class*="col-"] > .blog-sidebar-card {
    width: 100%;
}

/* Tema sistemi (light/dark); site teması html[data-theme] ile uyumlu */
.blx-blog-system {
    --blx-bg: #ffffff;
    --blx-surface: #f8f9fa;
    --blx-card: #ffffff;
    --blx-text: #1a1a1a;
    --blx-muted: #5c5c5c;
    --blx-border: #e9ecef;
    --blx-border-2: #dee2e6;
    --blx-shadow: 0 8px 24px rgba(0,0,0,0.06);
    --blx-radius: var(--radius-sm, 10px);
}

.blx-blog-system[data-blog-theme="dark"] {
    --blx-bg: #0f1216;
    --blx-surface: #141922;
    --blx-card: #11161d;
    --blx-text: #f2f4f7;
    --blx-muted: #a8b0bb;
    --blx-border: #263041;
    --blx-border-2: #2f3a4d;
    --blx-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

/* otomatik dark: html[data-theme="dark"] varsa */
html[data-theme="dark"] .blx-blog-system:not([data-blog-theme="light"]) {
    --blx-bg: #0f1216;
    --blx-surface: #141922;
    --blx-card: #11161d;
    --blx-text: #f2f4f7;
    --blx-muted: #a8b0bb;
    --blx-border: #263041;
    --blx-border-2: #2f3a4d;
    --blx-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.blog-sidebar-card {
    background: var(--blx-surface);
    border-radius: var(--blx-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--blx-border);
}

.blog-sidebar-card h2 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
    color: var(--blx-text);
}

.blog-search-form {
    display: flex;
    gap: 0;
    border: 1px solid var(--blx-border-2);
    border-radius: var(--blx-radius);
    overflow: hidden;
    background: var(--blx-card);
}

.blog-search-form input[type="search"] {
    flex: 1;
    border: none;
    padding: 0.6rem 0.85rem;
    font-size: 0.9375rem;
}

.blog-search-form input[type="search"]::placeholder {
    color: #9aa0a6;
}

.blog-search-form input[type="search"]:focus {
    outline: none;
    box-shadow: none;
}

.blog-search-form button {
    border: none;
    background: #343a40;
    color: #fff;
    padding: 0 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 3.25rem;
}

.blog-search-form button:hover {
    background: #23272b;
}

.blog-search-btn-label {
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.blog-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-cat-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.blog-cat-list a:hover,
.blog-cat-list a:focus-visible {
    text-decoration: none;
    color: var(--primary-dark, #d93d04);
    background: color-mix(in srgb, var(--primary, #f24405) 8%, #fff);
    border-color: color-mix(in srgb, var(--primary, #f24405) 25%, #dee2e6);
}

.blog-cat-list a[aria-current="page"] {
    color: #111;
    font-weight: 650;
    background: color-mix(in srgb, var(--primary, #f24405) 12%, #fff);
    border-color: color-mix(in srgb, var(--primary, #f24405) 35%, #dee2e6);
}

.blog-cat-list .count {
    color: #6c757d;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.blog-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--blx-border-2);
    margin-bottom: 1rem;
}

.blog-tabs button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: color-mix(in srgb, var(--blx-muted) 85%, var(--blx-text));
    cursor: pointer;
}

.blog-tabs button.active {
    color: var(--primary);
    box-shadow: inset 0 -2px 0 var(--primary);
    margin-bottom: -2px;
}

.blog-tab-panel {
    display: none;
}

.blog-tab-panel.active {
    display: block;
}

.blog-mini-post {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.blog-mini-post:last-child {
    margin-bottom: 0;
}

.blog-mini-post img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.blog-mini-post a.title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.35;
}

.blog-mini-post a.title:hover,
.blog-mini-post a.title:focus-visible {
    text-decoration: none;
    color: var(--primary-dark, #d93d04);
}

.blog-mini-post .date {
    font-size: 0.75rem;
    color: var(--blx-muted);
    margin-top: 0.2rem;
}

/* Kart kolonları: Bootstrap row/col ile; mobilde tek kolona düşer */
.blog-columns .blog-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    background: var(--blx-card);
    border: 1px solid var(--blx-border);
    border-radius: var(--blx-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.blog-card:hover {
    box-shadow: var(--blx-shadow);
}

.blog-card-img {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
    object-position: center;
    background: #e9ecef;
    display: block;
}

.blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
}

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

.blog-card-title a:hover,
.blog-card-title a:focus-visible {
    text-decoration: none;
    color: var(--primary-dark, #d93d04);
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: color-mix(in srgb, var(--blx-text) 80%, var(--blx-muted));
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.5rem;
}

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

.blog-card-excerpt__toggle {
    flex-shrink: 0;
    border: 1px solid var(--blx-border-2);
    background: var(--blx-card);
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    line-height: 1;
    cursor: pointer;
    color: color-mix(in srgb, var(--blx-text) 75%, var(--blx-muted));
}

.blog-card-excerpt__toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.blog-card-meta {
    font-size: 0.8125rem;
    color: var(--blx-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.15rem;
    margin-bottom: 1rem;
    align-items: center;
}

.blog-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.blog-meta-item i {
    flex-shrink: 0;
    opacity: 0.88;
    font-size: 1.05em;
}

.blog-meta-item--comments,
.blog-detail-meta .blog-meta-item--comments {
    color: var(--primary);
    font-weight: 500;
}

.blog-detail-meta .blog-meta-item--comments i {
    opacity: 1;
}

.blog-read-more {
    display: inline-block;
    align-self: flex-start;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--blx-border-2);
    border-radius: 4px;
    color: color-mix(in srgb, var(--blx-text) 90%, var(--blx-muted));
    text-decoration: none;
}

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

.blog-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.65rem;
    border-radius: 6px;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid var(--blx-border-2);
    color: color-mix(in srgb, var(--blx-text) 90%, var(--blx-muted));
}

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

.blog-pagination span.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Detay — öne çıkan görsel: standart 16:9 kutu, taşan kısım kırpılır (mobil uyumlu) */
.blog-detail-hero-img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm, 8px);
    margin: 0 auto 2rem;
}

.blog-detail-head {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.blog-date-badge {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.blog-date-badge .d {
    font-size: 1.5rem;
    font-weight: 700;
}

.blog-date-badge .m {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.blog-detail-title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

.blog-detail-meta {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}

.blog-detail-meta .blog-meta-item {
    gap: 0.5rem;
}

.blog-detail-meta a.blog-meta-item {
    color: var(--primary);
    text-decoration: none;
}

.blog-detail-meta a.blog-meta-item:hover,
.blog-detail-meta a.blog-meta-item:focus-visible {
    text-decoration: none;
    opacity: 0.9;
}

.blog-detail-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #3d3d3d;
}

.blog-detail-body h2,
.blog-detail-body h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.blog-detail-body p {
    margin-bottom: 1rem;
}

.blog-detail-body a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.blog-detail-body a:hover {
    color: var(--primary-dark, #d93d04);
    text-decoration: none;
}

.blog-detail-body a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    color: var(--primary-dark, #d93d04);
}

/* İçerikteki görseller (TinyMCE): aynı standart kırpma; inline boyutları ezip taşmayı engeller */
.blog-detail-body img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm, 8px);
    margin: 1.25rem auto;
    box-sizing: border-box;
}

.blog-detail-body figure {
    margin: 1.25rem 0;
    max-width: 100%;
}

.blog-detail-body figure img {
    margin-top: 0;
    margin-bottom: 0;
}

.blog-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.blog-share h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-share-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-share-btns a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #343a40;
    text-decoration: none;
    font-size: 1.1rem;
}

.blog-share-btns a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.blog-author-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--radius-sm, 8px);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.blog-author-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.blog-author-box .avatar {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #dee2e6;
}

.blog-author-box .name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.blog-comments {
    margin-top: 2.5rem;
}

.blog-comments h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.blog-comment {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.blog-comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    flex-shrink: 0;
}

.blog-comment-bubble {
    flex: 1;
    background: #f1f3f5;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    position: relative;
}

.blog-comment-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 14px;
    border: 8px solid transparent;
    border-right-color: #f1f3f5;
}

.blog-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.blog-comment-head strong {
    color: #495057;
    font-size: 0.9375rem;
}

.blog-comment-head a,
.blog-comment-reply {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-comment-head a:hover,
.blog-comment-reply:hover,
.blog-comment-head a:focus-visible,
.blog-comment-reply:focus-visible {
    text-decoration: none;
    opacity: 0.9;
}

.blog-comment-body {
    font-size: 0.9375rem;
    color: #495057;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.blog-comment-time {
    font-size: 0.75rem;
    color: #868e96;
    text-align: right;
    margin-top: 0.65rem;
}

.blog-comment-form-wrap {
    margin-top: 2.5rem;
}

.blog-comment-form-wrap > h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-comment-form {
    background: #f1f3f5;
    border-radius: var(--radius-sm, 8px);
    padding: 1.5rem;
}

.blog-comment-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin-bottom: 1rem;
}

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

.blog-comment-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.blog-comment-form__field--full {
    margin-bottom: 1rem;
}

.blog-comment-form__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

.tenant-blog-page .blog-comment-form__label {
    color: var(--site-text-dark, #343a40);
}

.blog-comment-form__req {
    color: #dc3545;
    font-weight: 700;
}

.blog-comment-form__input,
.blog-comment-form__textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-comment-form__input {
    min-height: 2.75rem;
}

.blog-comment-form__textarea {
    min-height: 140px;
    resize: vertical;
}

.blog-comment-form__input:hover,
.blog-comment-form__textarea:hover {
    border-color: #adb5bd;
}

.blog-comment-form__input:focus,
.blog-comment-form__textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(242, 68, 5, 0.2);
}

html[data-theme="dark"] .tenant-blog-page .blog-comment-form__input,
html[data-theme="dark"] .tenant-blog-page .blog-comment-form__textarea {
    background: var(--site-bg-card, #1a1a1a);
    border-color: var(--site-border, #333);
    color: var(--site-text-dark, #f5f5f5);
}

.blog-comment-form__submit,
.blog-comment-form .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff !important;
    background: var(--primary) !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-comment-form__submit:hover,
.blog-comment-form .btn-submit:hover {
    background: var(--primary-dark) !important;
    color: #fff !important;
}

.blog-comment-form__submit:focus-visible,
.blog-comment-form .btn-submit:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.blog-comment-form-wrap .small a {
    color: var(--primary);
    text-decoration: none;
}

.blog-comment-form-wrap .small a:hover {
    text-decoration: none;
    color: var(--primary-dark);
    opacity: 0.95;
}

.tenant-blog-page .btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff !important;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.tenant-blog-page .btn-brand:hover,
.tenant-blog-page .btn-brand:focus-visible {
    background: var(--primary-dark);
    color: #fff !important;
    text-decoration: none !important;
}

.blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.blog-detail-container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.blog-related-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
    color: var(--blx-text);
}

/* Kiracı blog: gövde içi HTML (float / geniş tablo) taşmasını sınırla */
.tenant-blog-page .blog-detail-body {
    clear: both;
    overflow-x: auto;
}

.tenant-blog-page .blog-detail-body img,
.tenant-blog-page .blog-detail-body video,
.tenant-blog-page .blog-detail-body iframe {
    max-width: 100%;
    height: auto;
}

.tenant-blog-page .blog-detail-body table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

html[data-theme="dark"] .tenant-blog-page .blog-detail-body {
    color: var(--site-text-dark, #e5e7eb);
}

html[data-theme="dark"] .tenant-blog-page .blog-detail-body h2,
html[data-theme="dark"] .tenant-blog-page .blog-detail-body h3 {
    color: var(--site-text-dark, #f5f5f5);
}
