/* NightUO Rev6 - sistemler liste ve detay scroll duzeltmesi */
html,
body,
body.sistemler-page-body,
body.sistem-detay-body {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.sistemler-page-body,
body.sistem-detay-body {
    background: #121212 !important;
    color: #eee !important;
    position: static !important;
}

body.sistemler-page-body .container,
body.sistem-detay-body .container,
body.sistemler-page-body .main-content,
body.sistem-detay-body .main-content,
body.sistemler-page-body .sistemler-layout,
body.sistem-detay-body .sistem-detail-card,
body.sistemler-page-body .sistemler-grid {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

body.sistemler-page-body .container,
body.sistem-detay-body .container {
    display: flex !important;
    align-items: stretch !important;
    min-height: 100vh !important;
}

body.sistemler-page-body .main-content,
body.sistem-detay-body .main-content {
    flex: 1 1 auto !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 20px 20px 90px !important;
}

body.sistemler-page-body #slider-container,
body.sistemler-page-body .slider-container,
body.sistemler-page-body .slider,
body.sistem-detay-body #slider-container,
body.sistem-detay-body .slider-container,
body.sistem-detay-body .slider {
    display: none !important;
}

.sistemler-layout {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

.sistemler-header {
    text-align: center !important;
    margin: 8px 0 14px !important;
}

.sistemler-header h1 {
    display: inline-block !important;
    margin: 0 !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid #4caf50 !important;
    color: #f5f5f5 !important;
    font-size: 32px !important;
    line-height: 1.2 !important;
}

.sistemler-filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 10px 0 24px !important;
}

.sistemler-filter {
    appearance: none !important;
    border: 1px solid rgba(76, 175, 80, 0.55) !important;
    background: #1f1f1f !important;
    color: #eee !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    cursor: pointer !important;
    font-weight: 800 !important;
    font-size: 14px !important;
}

.sistemler-filter:hover,
.sistemler-filter.active {
    background: #4caf50 !important;
    color: #121212 !important;
    border-color: #76ff03 !important;
}

.sistemler-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 60px !important;
}

.sistemler-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 420px !important;
    height: auto !important;
    max-height: none !important;
    background: #1f1f1f !important;
    color: #fff !important;
    border: 1px solid rgba(76, 175, 80, 0.22) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7) !important;
}

.sistemler-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 0 18px rgba(76, 175, 80, 0.55) !important;
}

.sistemler-card.is-hidden {
    display: none !important;
}

.sistemler-image {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 180px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background: #111 !important;
    text-decoration: none !important;
}

.sistemler-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.sistemler-image span {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    max-width: calc(100% - 20px) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    background: #4caf50 !important;
    color: #121212 !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sistemler-card-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    gap: 12px !important;
    padding: 16px !important;
    background: rgba(0, 0, 0, 0.18) !important;
}

.sistemler-card-body h2 {
    margin: 0 !important;
    min-height: 54px !important;
    color: #a5d6a7 !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

.sistemler-card-body h2 a {
    color: #a5d6a7 !important;
    text-decoration: none !important;
}

.sistemler-card-body p {
    margin: 0 !important;
    color: #d9d9d9 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    flex: 1 1 auto !important;
}

.sistemler-stats {
    margin-top: auto !important;
}

.sistemler-detail-btn,
.btn-return {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    background: #4caf50 !important;
    color: #121212 !important;
    border: 1px solid rgba(118, 255, 3, 0.45) !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    padding: 10px 14px !important;
}

.sistemler-detail-btn {
    width: 100% !important;
}

.sistem-detail-card {
    width: min(980px, calc(100% - 30px)) !important;
    max-width: 980px !important;
    margin: 20px auto 70px !important;
    background: #222 !important;
    color: #eee !important;
    border-radius: 16px !important;
    padding: 26px !important;
    box-sizing: border-box !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.75) !important;
    overflow: visible !important;
}

.sistem-detail-card h1 {
    margin: 0 0 14px !important;
    color: #76ff03 !important;
    font-size: 2rem !important;
}

.sistem-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
}

.sistem-meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border-radius: 999px !important;
    color: #d9d9d9 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.sistem-category-pill {
    background: #4caf50 !important;
    color: #101010 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}

.sistem-detail-image {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 14px !important;
    background: #111 !important;
    margin-bottom: 24px !important;
}

.sistem-detail-image img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 420px !important;
    object-fit: contain !important;
    background: #111 !important;
    border-radius: 14px !important;
    margin: 0 auto !important;
}

.sistem-content-full {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    font-size: 1.08rem !important;
    line-height: 1.75 !important;
    color: #e4e4e4 !important;
    overflow-wrap: anywhere !important;
}

.sistem-content-full img,
.sistem-content-full iframe,
.sistem-content-full video,
.sistem-content-full table {
    max-width: 100% !important;
}

/* Eski sistemler.php / sistem_detay.php hala kullanilirsa da scroll bozulmasin */
.kb-container,
.kb-main,
.kb-grid,
.kb-detay,
.kb-icerik {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.kb-container {
    min-height: 100vh !important;
}

.kb-main {
    padding-bottom: 90px !important;
}

@media (max-width: 1200px) {
    .sistemler-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .sistemler-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    body.sistemler-page-body .container,
    body.sistem-detay-body .container,
    .kb-container {
        flex-direction: column !important;
    }

    body.sistemler-page-body .main-content,
    body.sistem-detay-body .main-content,
    .kb-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px 10px 70px !important;
    }

    .sistem-detail-card {
        width: 100% !important;
        margin: 15px 0 60px !important;
        padding: 18px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 600px) {
    .sistemler-grid {
        grid-template-columns: 1fr !important;
    }

    .sistemler-filter {
        flex: 1 1 100% !important;
    }
}
