/* Blog Responsive CSS - Mobil Uyumlu Tasarım */

/* Mobil cihazlar için temel ayarlar */
@media (max-width: 768px) {
    /* Blog yönetim sayfası mobil uyumluluğu */
    .blog-management .card-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }
    
    .blog-management .card-header h5 {
        text-align: center;
        margin-bottom: 0;
    }
    
    .blog-management .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .blog-management .btn-group .btn {
        margin-bottom: 5px;
        border-radius: 8px !important;
    }
    
    .blog-management .table-responsive {
        font-size: 0.85rem;
    }
    
    .blog-management .table th,
    .blog-management .table td {
        padding: 8px 4px;
        vertical-align: middle;
    }
    
    .blog-management .table th:nth-child(3),
    .blog-management .table td:nth-child(3) {
        display: none; /* Görsel sütununu mobilde gizle */
    }
    
    .blog-management .table th:nth-child(6),
    .blog-management .table td:nth-child(6) {
        display: none; /* Görüntülenme sütununu mobilde gizle */
    }
    
    /* Modal mobil uyumluluğu */
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-4 {
        margin-top: 20px;
    }
    
    /* Arama ve filtre mobil uyumluluğu */
    .search-section .row {
        flex-direction: column;
    }
    
    .search-section .col-md-6,
    .search-section .col-md-3 {
        margin-bottom: 15px;
    }
    
    .search-section .d-flex {
        flex-direction: column;
    }
    
    .search-section .me-2 {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
    
    /* Blog listeleme sayfası mobil uyumluluğu */
    .blog-liste .blog-header {
        padding: 40px 0;
    }
    
    .blog-liste .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-liste .blog-header .lead {
        font-size: 1rem;
    }
    
    .blog-liste .search-section {
        padding: 20px 0;
    }
    
    .blog-liste .search-box .row {
        flex-direction: column;
    }
    
    .blog-liste .search-box .col-md-8,
    .blog-liste .search-box .col-md-4 {
        margin-bottom: 15px;
    }
    
    .blog-liste .category-filter {
        text-align: center;
    }
    
    .blog-liste .category-btn {
        font-size: 0.8rem;
        padding: 6px 15px;
        margin: 3px;
    }
    
    .blog-liste .blog-card .card-img-top {
        height: 200px;
    }
    
    .blog-liste .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .blog-liste .blog-meta span {
        font-size: 0.8rem;
    }
    
    .blog-liste .blog-tag {
        font-size: 0.75rem;
        padding: 3px 10px;
        margin-right: 5px;
        margin-bottom: 5px;
    }
    
    /* Blog detay sayfası mobil uyumluluğu */
    .blog-detay .blog-header {
        padding: 40px 0;
    }
    
    .blog-detay .blog-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .blog-detay .blog-meta .row {
        flex-direction: column;
    }
    
    .blog-detay .blog-meta .col-md-4 {
        margin-bottom: 10px;
    }
    
    .blog-detay .blog-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .blog-detay .blog-content h1,
    .blog-detay .blog-content h2,
    .blog-detay .blog-content h3 {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }
    
    .blog-detay .blog-content h4,
    .blog-detay .blog-content h5,
    .blog-detay .blog-content h6 {
        font-size: 1.2rem;
        margin-top: 1.2rem;
    }
    
    .blog-detay .blog-content img {
        margin: 1rem 0;
    }
    
    .blog-detay .blog-content blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .blog-detay .social-share {
        position: static;
        margin-top: 30px;
    }
    
    .blog-detay .social-share .btn {
        margin-bottom: 8px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .blog-detay .related-posts {
        padding: 20px;
        margin-top: 30px;
    }
    
    .blog-detay .related-post .card-img-top {
        height: 120px;
    }
    
    .blog-detay .related-post .card-title {
        font-size: 0.9rem;
    }
    
    /* Pagination mobil uyumluluğu */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Admin panel mobil uyumluluğu */
    .admin-mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 10px 15px;
    }
    
    .admin-mobile-nav .navbar-brand {
        font-weight: 600;
        color: var(--primary-color);
    }
    
    .admin-mobile-nav .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    /* Sidebar mobilde gizle */
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 70px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 0;
        padding-right: 0;
    }
    
    .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    .col-12 {
        padding: 0 !important;
    }
    
    .main-content .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .main-content .row {
        margin: 0 !important;
    }
    
    .main-content .col-12 {
        padding: 0 !important;
    }
    
    /* Admin panel header mobil uyumluluğu */
    .card-header {
        flex-direction: row;
        align-items: center !important;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .card-header h5 {
        text-align: left;
        margin-bottom: 0;
        flex: 1;
    }
    
    .card-header .btn {
        width: auto;
        white-space: nowrap;
    }
    
    /* Admin panel tablo mobil uyumluluğu */
    .table-responsive {
        font-size: 0.85rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        width: 100% !important;
        min-width: 100% !important;
        margin-bottom: 0;
        table-layout: auto;
    }
    
    .table th:nth-child(1) { width: 60px !important; }
    .table th:nth-child(2) { width: 30% !important; }
    .table th:nth-child(3) { width: 100px !important; }
    .table th:nth-child(4) { width: 120px !important; }
    .table th:nth-child(5) { width: 100px !important; }
    .table th:nth-child(6) { width: 80px !important; }
    .table th:nth-child(7) { width: 120px !important; }
    .table th:nth-child(8) { width: 120px !important; }
    
    .table th,
    .table td {
        padding: 12px 10px !important;
        vertical-align: middle;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .table th:first-child,
    .table td:first-child {
        padding-left: 20px !important;
    }
    
    .table th:last-child,
    .table td:last-child {
        padding-right: 20px !important;
    }
    
    /* Admin panel modal mobil uyumluluğu */
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-4 {
        margin-top: 20px;
    }
    
    .modal-body .form-control,
    .modal-body .form-select {
        font-size: 0.9rem;
    }
    
    /* Admin panel butonlar mobil uyumluluğu */
    .btn-group-vertical .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .btn-group-vertical .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-flex.flex-column.flex-md-row.gap-1 {
        gap: 8px !important;
    }
    
    .d-flex.flex-column.flex-md-row.gap-1 .btn {
        padding: 8px 16px !important;
        font-size: 0.85rem;
    }
    
    /* Admin panel card düzeni */
    .card {
        margin: 0;
        border: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        width: 100%;
        border-radius: 0;
    }
    
    .card-body {
        padding: 25px !important;
    }
    
    .card-header {
        padding: 20px 25px !important;
        border-bottom: 1px solid #dee2e6;
        background: #f8f9fa;
    }
    
    /* Admin panel arama bölümü */
    .search-section .row {
        margin: 0;
    }
    
    .search-section .col-lg-6,
    .search-section .col-lg-3 {
        padding: 0 15px !important;
        margin-bottom: 20px;
    }
    
    .row.g-3 > * {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Tablo mobil uyumluluğu */
    .table-responsive {
        border: none;
    }
    
    .table-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-mobile .table {
        margin-bottom: 0;
        min-width: 600px;
    }
}

/* Çok küçük ekranlar için ek optimizasyonlar */
@media (max-width: 480px) {
    .blog-liste .blog-header h1 {
        font-size: 1.5rem;
    }
    
    .blog-liste .blog-header .lead {
        font-size: 0.9rem;
    }
    
    .blog-liste .blog-card .card-title {
        font-size: 1.1rem;
    }
    
    .blog-liste .blog-card .card-text {
        font-size: 0.85rem;
    }
    
    .blog-detay .blog-header h1 {
        font-size: 1.5rem;
    }
    
    .blog-detay .blog-content {
        font-size: 0.95rem;
    }
    
    .blog-detay .blog-content h1,
    .blog-detay .blog-content h2,
    .blog-detay .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-management .modal-xl {
        max-width: 100%;
        margin: 5px;
    }
    
    .blog-management .modal-body {
        padding: 15px;
    }
    
    .blog-management .btn-group .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Tablet uyumluluğu */
@media (min-width: 769px) and (max-width: 1024px) {
    .blog-liste .blog-card .card-img-top {
        height: 220px;
    }
    
    .blog-detay .blog-content {
        font-size: 1.05rem;
    }
    
    .blog-management .modal-xl {
        max-width: 90%;
    }
}

/* Yüksek çözünürlük ekranlar için optimizasyon */
@media (min-width: 1200px) {
    .blog-liste .blog-card .card-img-top {
        height: 280px;
    }
    
    .blog-detay .blog-content {
        font-size: 1.15rem;
    }
    
    .blog-management .modal-xl {
        max-width: 80%;
    }
}

/* Print stilleri */
@media print {
    .blog-management .btn,
    .blog-liste .btn,
    .blog-detay .btn,
    .pagination,
    .social-share,
    .back-to-blog {
        display: none !important;
    }
    
    .blog-detay .blog-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .blog-detay .blog-content h1,
    .blog-detay .blog-content h2,
    .blog-detay .blog-content h3 {
        page-break-after: avoid;
    }
    
    .blog-detay .blog-content img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .related-post,
    .btn,
    .blog-management-link {
        transition: none !important;
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .blog-liste .search-section,
    .blog-detay .blog-meta,
    .blog-detay .related-posts {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .blog-liste .blog-card,
    .blog-detay .related-post {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .blog-liste .blog-card .card-title,
    .blog-detay .blog-content h1,
    .blog-detay .blog-content h2,
    .blog-detay .blog-content h3 {
        color: #e2e8f0;
    }
}
