/**
 * Temajet - Tekil Haber & Kategori Sayfaları Kesintisiz Sticky Sağ Sütun Stilleri
 * 0 CLS, Sıfır Dış API, Pure CSS Sticky (.temajet-sticky-layout & .temajet-sidebar)
 */

/* ==========================================================================
   1. Ana Şablon Düzeni ve Sonsuz Akış Sticky Yapısı (Flex Layout)
   ========================================================================== */
.temajet-sticky-layout,
.single-content-wrapper,
body.single #jet-home-area > .row,
body.category #jet-home-area > .row,
body.archive #jet-home-area > .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 24px;
}

body.single,
body.category,
body.archive,
body.single #page,
body.category #page,
body.archive #page,
body.single #primary,
body.category #primary,
body.archive #primary,
body.single article,
body.single #jet-home-area,
body.category #jet-home-area,
body.archive #jet-home-area {
    overflow: visible !important;
}

/* Masaüstü Ekranlarda (min-width: 1025px) Kesintisiz Sabit Kalan Sağ Sütun */
@media screen and (min-width: 1025px) {
    .temajet-sidebar,
    .single-sidebar,
    body.single .jet-sidebar,
    body.single-post .jet-sidebar,
    body.category .jet-sidebar,
    body.archive .jet-sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 90px !important;
        height: fit-content !important;
        flex: 0 0 320px !important;
        max-width: 320px !important;
        width: 320px !important;
        align-self: flex-start !important;
        z-index: 99;
    }

    .temajet-sticky-layout > #jet-home-main,
    .single-content-wrapper > #jet-home-main,
    .single-content-wrapper > .jet-single-area {
        flex: 1 1 calc(100% - 344px) !important;
        max-width: calc(100% - 344px) !important;
        min-width: 0;
    }

    .single-sidebar-inner,
    body.single .jet-single-sticky-wrapper,
    body.single-post .jet-single-sticky-wrapper,
    body.category .jet-single-sticky-wrapper,
    body.archive .jet-single-sticky-wrapper {
        max-height: calc(100vh - 105px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 2px;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
    }

    .single-sidebar-inner::-webkit-scrollbar,
    body.single .jet-single-sticky-wrapper::-webkit-scrollbar,
    body.category .jet-single-sticky-wrapper::-webkit-scrollbar {
        width: 4px;
    }

    .single-sidebar-inner::-webkit-scrollbar-track,
    body.single .jet-single-sticky-wrapper::-webkit-scrollbar-track,
    body.category .jet-single-sticky-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .single-sidebar-inner::-webkit-scrollbar-thumb,
    body.single .jet-single-sticky-wrapper::-webkit-scrollbar-thumb,
    body.category .jet-single-sticky-wrapper::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.3);
        border-radius: 4px;
    }

    .single-sidebar-inner::-webkit-scrollbar-thumb:hover,
    body.single .jet-single-sticky-wrapper::-webkit-scrollbar-thumb:hover {
        background: rgba(148, 163, 184, 0.6);
    }
}

/* Mobil ve Tablet Uyumu (max-width: 1024px): Ekranı yormamak için gizle */
@media screen and (max-width: 1024px) {
    .temajet-sidebar,
    .single-sidebar,
    body.single .jet-single-sidebar,
    body.single-post .jet-single-sidebar,
    body.category .jet-single-sidebar,
    body.archive .jet-single-sidebar {
        display: none !important;
    }

    .temajet-sticky-layout > #jet-home-main,
    .single-content-wrapper > #jet-home-main {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* ==========================================================================
   2. Modül Kapsayıcısı ve Kurumsal Kart Yapısı (UI/UX)
   ========================================================================== */
.jet-sidebar-news-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.jet-sidebar-news-block {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jet-sidebar-news-block:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   3. Blok Başlıkları (Header)
   ========================================================================== */
.jet-sidebar-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 2px solid #f1f5f9;
}

.jet-sidebar-block-header.header-editor {
    border-bottom-color: var(--main-color, #e11d48);
}

.jet-sidebar-block-header.header-trend {
    border-bottom-color: #ea580c;
}

.jet-sidebar-block-header.header-stream {
    border-bottom-color: #dc2626;
}

.jet-sidebar-block-header .header-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.jet-sidebar-block-header .header-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.jet-sidebar-block-header .header-icon.icon-editor {
    background: rgba(225, 29, 72, 0.1);
    color: var(--main-color, #e11d48);
}

.jet-sidebar-block-header .header-icon.icon-trend {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
}

.jet-sidebar-block-header .header-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.jet-sidebar-block-header .header-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.jet-sidebar-block-header .header-tag.tag-editor {
    background: #fff1f2;
    color: var(--main-color, #e11d48);
}

.jet-sidebar-block-header .header-tag.tag-trend {
    background: #fff7ed;
    color: #ea580c;
}

.jet-sidebar-block-header .header-tag.tag-stream {
    background: #fef2f2;
    color: #dc2626;
}

/* Canlı Akış Nabız Noktası (Live Pulse Dot) */
.stream-live-pulse {
    position: relative;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-live-pulse .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    z-index: 2;
}

.stream-live-pulse .pulse-ring {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.4);
    animation: jetStreamPulse 1.6s infinite ease-out;
    z-index: 1;
}

@keyframes jetStreamPulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ==========================================================================
   4. Modül 1 & Modül 2 Haber Listesi ve Kart Detayları
   ========================================================================== */
.jet-sidebar-news-list {
    display: flex;
    flex-direction: column;
}

.jet-sidebar-news-item {
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.jet-sidebar-news-item:last-child {
    border-bottom: none;
}

.jet-sidebar-news-item .item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    text-decoration: none;
    color: inherit;
}

.jet-sidebar-news-item:hover .item-link {
    background-color: #f8fafc;
}

/* Görsel Kutusu (Canlı Kontrast & 0 CLS) */
.jet-sidebar-news-item .item-thumb-box {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f1f5f9;
}

.jet-sidebar-news-item.editor-item .item-thumb-box {
    width: 95px;
    height: 65px;
}

.jet-sidebar-news-item.trend-item .item-thumb-box {
    width: 85px;
    height: 60px;
}

.jet-sidebar-news-item .item-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(105%);
    display: block;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.jet-sidebar-news-item:hover .item-thumb-box img {
    transform: scale(1.05);
    filter: contrast(110%);
}

/* İçerik Kutusu */
.jet-sidebar-news-item .item-content-box {
    flex: 1;
    min-width: 0;
}

.jet-sidebar-news-item .item-cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--main-color, #e11d48);
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.jet-sidebar-news-item .item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.jet-sidebar-news-item:hover .item-title {
    color: var(--main-color, #e11d48);
}

.jet-sidebar-news-item .item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: #94a3b8;
}

.jet-sidebar-news-item .item-meta i {
    font-size: 10.5px;
    margin-right: 3px;
}

.jet-sidebar-news-item .item-meta .views-meta {
    color: #ea580c;
    font-weight: 600;
}

/* ==========================================================================
   5. Modül 2: 1, 2, 3, 4, 5 Kiremit Kırmızısı Rozetler
   ========================================================================== */
.jet-sidebar-news-item.trend-item .item-rank-num {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.jet-sidebar-news-item.trend-item .item-rank-num.rank-1 {
    background: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

.jet-sidebar-news-item.trend-item .item-rank-num.rank-2 {
    background: #e11d48;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
}

.jet-sidebar-news-item.trend-item .item-rank-num.rank-3 {
    background: #ea580c;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
}

.jet-sidebar-news-item.trend-item .item-rank-num.rank-4 {
    background: #f97316;
}

.jet-sidebar-news-item.trend-item .item-rank-num.rank-5 {
    background: #64748b;
}

/* ==========================================================================
   6. Modül 3: Dakika Dakika / Son Akış (Zaman Akışı ve Saat Rozetleri)
   ========================================================================== */
.jet-sidebar-stream-list {
    display: flex;
    flex-direction: column;
}

.jet-stream-item {
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.jet-stream-item:last-child {
    border-bottom: none;
}

.jet-stream-item .stream-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
}

.jet-stream-item:hover .stream-link {
    background-color: #f8fafc;
}

/* Canlı Saat Rozeti ("14:20", "13:05" vb.) */
.jet-stream-item .stream-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.jet-stream-item .stream-time-badge .stream-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
    flex-shrink: 0;
}

.jet-stream-item .stream-time-badge .stream-time {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

.jet-stream-item .stream-content {
    flex: 1;
    min-width: 0;
}

.jet-stream-item .stream-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.jet-stream-item:hover .stream-title {
    color: var(--main-color, #e11d48);
}

/* ==========================================================================
   7. Koyu Mod (Dark Theme) Desteği
   ========================================================================== */
body.dark-theme .jet-sidebar-news-block {
    background: #11141c;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.dark-theme .jet-sidebar-block-header {
    background: #151922;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .jet-sidebar-block-header .header-title {
    color: #f1f5f9;
}

body.dark-theme .jet-sidebar-news-item,
body.dark-theme .jet-stream-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .jet-sidebar-news-item:hover .item-link,
body.dark-theme .jet-stream-item:hover .stream-link {
    background-color: #1e2532;
}

body.dark-theme .jet-sidebar-news-item .item-title,
body.dark-theme .jet-stream-item .stream-title {
    color: #cbd5e1;
}

body.dark-theme .jet-sidebar-news-item:hover .item-title,
body.dark-theme .jet-stream-item:hover .stream-title {
    color: #f1f5f9;
}

body.dark-theme .jet-stream-item .stream-time-badge {
    background: #151922;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .jet-stream-item .stream-time-badge .stream-time {
    color: #e2e8f0;
}
