/* Mobile Overflow Fix for Blog Posts */
/* Bu dosya blog yazılarının mobilde taşmasını engellemek için oluşturulmuştur */

/* Global mobile overflow fixes */
@media (max-width: 768px) {
    /* Ana container'lar */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container,
    .blog-post,
    .post-content {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Tüm elementler için agresif word-wrap */
    .post-content,
    .post-content * {
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        -webkit-hyphens: auto !important;
        -moz-hyphens: auto !important;
        -ms-hyphens: auto !important;
        hyphens: auto !important;
    }

    /* Spesifik element düzeltmeleri */
    .post-content p,
    .post-content div,
    .post-content span,
    .post-content li,
    .post-content td,
    .post-content th {
        max-width: 100% !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    /* Uzun kelimeler ve URL'ler */
    .post-content a {
        word-break: break-all !important;
        display: inline !important;
    }

    /* Code blokları */
    .post-content pre {
        overflow-x: auto !important;
        max-width: calc(100vw - 2rem) !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }

    .post-content code {
        white-space: pre-wrap !important;
        word-break: break-all !important;
    }

    /* Tablolar */
    .post-content table {
        table-layout: fixed !important;
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important;
    }

    .post-content td,
    .post-content th {
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    /* Medya elementleri */
    .post-content img,
    .post-content video,
    .post-content iframe,
    .post-content embed,
    .post-content object {
        max-width: calc(100vw - 2rem) !important;
        height: auto !important;
    }

    /* Float edilmiş elementler */
    .post-content .float-left,
    .post-content .float-right,
    .post-content [style*="float"] {
        float: none !important;
        margin: 1rem auto !important;
        display: block !important;
        max-width: 100% !important;
    }

    /* CKEditor inline style override */
    .post-content [style*="width"],
    .post-content [style*="min-width"] {
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .post-content [style*="font-size"] {
        font-size: 1rem !important;
    }

    /* Blockquote ve diğer blok elementler */
    .post-content blockquote,
    .post-content .ql-editor blockquote {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important;
    }

    /* Liste elementleri */
    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem !important;
    }

    /* Gömülü içerikler */
    .embed-container {
        max-width: 100% !important;
    }
}

/* Daha küçük ekranlar için ekstra düzeltmeler */
@media (max-width: 576px) {
    .container,
    .blog-post,
    .post-content {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .post-content pre {
        max-width: calc(100vw - 1.5rem) !important;
        font-size: 0.75rem !important;
    }

    .post-content img,
    .post-content video,
    .post-content iframe {
        max-width: calc(100vw - 1.5rem) !important;
    }
}

/* Debug helper - taşan elementleri göster */
/* Production'da bu kısmı kaldırın */
/*
* {
    outline: 1px solid red !important;
}
*/
