/* Comprehensive Responsive Framework for Charity Management System */

/* Base responsive styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

/* Container improvements */
.container, .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Header improvements */
.header {
    background-color: #0d6efd;
    color: white;
    padding: 20px 0;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header .lead {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Navigation improvements */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

/* Card improvements */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Button improvements */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Form improvements */
.form-control {
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Table improvements */
.table-responsive {
    border-radius: 5px;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
}

/* Sidebar improvements */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #f8f9fa;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1rem;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0 0.5rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link:focus {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

/* Main content improvements */
main {
    transition: margin-left 0.3s ease;
}

/* Footer improvements */
footer {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Typography improvements */
.h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Image improvements */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    border-radius: 0.375rem;
}

/* Alert improvements */
.alert {
    border-radius: 0.375rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .h2 {
        font-size: 1.75rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
}

/* Medium devices (tablets, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .h2 {
        font-size: 1.6rem;
    }
    
    .header h1 {
        font-size: 2.25rem;
    }
}

/* Small devices (landscape phones, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .header .lead {
        font-size: 1rem;
    }
    
    .sidebar {
        position: static;
        height: auto;
        padding: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-bottom: 1rem;
    }
    
    .sidebar-sticky {
        height: auto;
        overflow: visible;
        padding-top: 1rem;
    }
    
    main {
        margin-left: 0;
    }
    
    .h2 {
        font-size: 1.4rem;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Extra small devices (portrait phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header .lead {
        font-size: 0.95rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .sidebar {
        position: static;
        height: auto;
        padding: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-bottom: 1rem;
    }
    
    .sidebar-sticky {
        height: auto;
        overflow: visible;
        padding-top: 1rem;
    }
    
    main {
        margin-left: 0;
    }
    
    .h2 {
        font-size: 1.3rem;
    }
    
    .h4 {
        font-size: 1.1rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
    
    .form-control {
        font-size: 0.875rem;
        padding: 0.4rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    footer {
        padding: 1rem 0;
        font-size: 0.875rem;
    }
    
    .d-flex {
        flex-direction: column;
    }
    
    .justify-content-between {
        align-items: flex-start;
    }
}

/* Extra small devices (less than 576px) */
@media (max-width: 575.98px) {
    .header h1 {
        font-size: 1.3rem;
    }
    
    .header .lead {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .h2 {
        font-size: 1.2rem;
    }
    
    .card-header h4 {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .table th, .table td {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    footer {
        font-size: 0.8rem;
        padding: 0.75rem 0;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none;
    }
    
    main {
        margin-left: 0;
    }
    
    body {
        background-color: #fff;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}