/* Responsive Design Fixes */

/* Mobile First Approach */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* iOS zoom önleme */
        padding: 1rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .form-label {
        margin-bottom: 0.75rem;
        font-weight: 500;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 16px;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables */
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
    
    /* Topic/Entry Lists */
    .topic-item, .entry-item {
        padding: 1rem;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }
    
    .topic-title {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .entry-content {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* User Info */
    .user-info {
        font-size: 12px;
        margin-top: 0.5rem;
    }
    
    /* Actions */
    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .action-btn {
        font-size: 12px;
        padding: 0.25rem 0.5rem;
    }
    
    /* Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 14px;
    }
}

/* Small Tablet Portrait */
@media (min-width: 576px) and (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
    }
}

/* Tablet Portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Large Tablet / Small Desktop */
@media (min-width: 1025px) and (max-width: 1366px) {
    .container {
        max-width: 1200px;
    }
}

/* Extra Large Screens */
@media (min-width: 1920px) {
    .layout-container {
        grid-template-columns: 320px 900px 420px;
        max-width: 1800px;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .action-btn, .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 48px;
        padding: 1rem;
    }
    
    /* Tablet touch targets */
    @media (min-width: 768px) {
        .btn, .action-btn, .nav-link {
            min-height: 40px;
        }
        
        .form-control {
            min-height: 44px;
        }
    }
}



/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.btn:focus, .form-control:focus, .nav-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .card {
        border: 2px solid;
    }
}