/* Responsive CSS for Persian UI Template */

/* Mobile Responsiveness */
@media (max-width: 576px) {
    /* General */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Sidebar */
    .sidebar {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        right: -100%;
        transition: all 0.3s ease;
        z-index: 1050;
    }
    
    .sidebar.show {
        right: 0;
    }
    
    /* Main Content */
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-control, .form-select, .btn {
        font-size: 0.9rem;
        padding: 0.375rem 0.5rem;
    }
    
    /* Dashboard Stats */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Customer List */
    .customer-list .customer-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .customer-list .customer-actions {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Messaging */
    .message-preview {
        padding: 0.75rem;
    }
    
    /* Login/Register */
    .auth-card {
        padding: 1.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Features */
    .feature-card {
        margin-bottom: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .feature-title {
        font-size: 1.25rem;
    }
    
    /* Pricing */
    .pricing-card {
        margin-bottom: 1.5rem;
    }
    
    .pricing-header {
        padding: 1.5rem;
    }
    
    .pricing-price {
        font-size: 2.25rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    /* Footer */
    footer h5 {
        margin-top: 1.5rem;
    }
}

/* Tablet Responsiveness */
@media (min-width: 577px) and (max-width: 991px) {
    /* Sidebar */
    .sidebar {
        width: 250px;
        right: -250px;
    }
    
    .sidebar.show {
        right: 0;
    }
    
    /* Main Content */
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    /* Dashboard Stats */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Features */
    .feature-card {
        margin-bottom: 2rem;
    }
    
    /* Pricing */
    .pricing-card {
        margin-bottom: 2rem;
    }
}

/* Touch Support */
@media (hover: none) {
    /* Make buttons and links more touch-friendly */
    .btn, .nav-link, .sidebar-nav-item, a {
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Increase form control touch areas */
    .form-control, .form-select {
        min-height: 44px;
    }
    
    /* Increase checkbox and radio size */
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    /* Adjust dropdown menus for touch */
    .dropdown-item {
        padding: 0.5rem 1rem;
        min-height: 44px;
    }
    
    /* Make table rows more touch-friendly */
    .table td, .table th {
        padding: 0.75rem;
    }
    
    /* Adjust card actions for touch */
    .card-actions .btn {
        margin: 0.25rem;
    }
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 {
        font-size: 18pt;
    }
    
    h2 {
        font-size: 16pt;
    }
    
    h3 {
        font-size: 14pt;
    }
}

/* RTL-specific responsive adjustments */
@media (max-width: 576px) {
    .dropdown-menu {
        right: auto;
        left: 0;
    }
    
    .me-2, .me-3, .me-4 {
        margin-right: 0 !important;
    }
    
    .ms-2, .ms-3, .ms-4 {
        margin-left: 0 !important;
    }
}

/* Fix for RTL Bootstrap issues on mobile */
@media (max-width: 576px) {
    .row {
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, 
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, 
    .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, 
    .col-sm-10, .col-sm-11, .col-sm-12 {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 991px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .auth-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
