/* iPad-specific responsive design fixes */
/* This addresses the layout issues mentioned in Apple's rejection */

/* iPad Air (5th generation) and similar devices */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* General layout improvements */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Container adjustments */
    .container {
        max-width: 95%;
        padding: 0 15px;
    }
    
    /* Header and navigation fixes */
    header {
        padding: 10px 0;
    }
    
    .top-nav {
        padding: 8px 0;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .search-bar {
        max-width: 300px;
        margin: 0 15px;
    }
    
    .search-bar input {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Navigation improvements */
    .nav-menu {
        gap: 20px;
    }
    
    .nav-menu a {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    /* Button improvements */
    .main-btn, .btn {
        font-size: 16px;
        padding: 12px 24px;
        min-height: 44px; /* Apple's recommended touch target size */
    }
    
    /* Form improvements */
    .form-control, .uk-input, .uk-textarea, .uk-select {
        font-size: 16px;
        padding: 12px 16px;
        min-height: 44px;
    }
    
    .form-label {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    /* Modal improvements for iPad */
    .modal-dialog {
        max-width: 90%;
        margin: 20px auto;
    }
    
    .modal-xl {
        max-width: 95%;
    }
    
    .modal-lg {
        max-width: 90%;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 24px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-title {
        font-size: 24px;
        font-weight: 600;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    /* Add Service Modal specific improvements */
    #addServiceModal .modal-dialog {
        max-width: 95%;
        margin: 10px auto;
    }
    
    #addServiceModal .modal-content {
        min-height: 80vh;
    }
    
    #addServiceModal .form-control,
    #addServiceModal .uk-input,
    #addServiceModal .uk-textarea,
    #addServiceModal .uk-select,
    #addServiceModal .form-select {
        font-size: 16px;
        padding: 14px 16px;
        min-height: 48px;
        border-radius: 8px;
    }
    
    #addServiceModal .form-label {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 10px;
        color: #333;
    }
    
    #addServiceModal .btn {
        font-size: 16px;
        padding: 14px 28px;
        min-height: 48px;
        border-radius: 8px;
        font-weight: 600;
    }
    

    
    #addServiceModal .preview-toggle-btn {
        font-size: 16px;
        padding: 12px 20px;
        min-height: 44px;
    }
    
    /* Preview section improvements */
    #previewSection .card {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    #previewSection .card-body {
        padding: 24px;
    }
    
    #previewSection .card-title {
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 16px;
    }
    
    #previewSection .card-text {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    /* Post and content improvements */
    .post-new {
        padding: 20px;
    }
    
    .post-new textarea {
        font-size: 16px;
        padding: 16px;
        min-height: 120px;
    }
    
    .post-new .main-btn {
        font-size: 16px;
        padding: 14px 28px;
    }
    
    /* Profile improvements */
    .profile-cover {
        height: 200px;
    }
    
    .profile-avatar {
        width: 120px;
        height: 120px;
        border: 4px solid #fff;
    }
    
    .profile-name {
        font-size: 24px;
        font-weight: 600;
    }
    
    .profile-username {
        font-size: 16px;
        color: #666;
    }
    
    /* Tab improvements */
    .nav-tabs .nav-link {
        font-size: 16px;
        padding: 12px 20px;
        min-height: 44px;
    }
    
    /* Card improvements */
    .card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    /* Dropdown improvements */
    .dropdown-menu {
        font-size: 16px;
        padding: 8px 0;
    }
    
    .dropdown-item {
        padding: 12px 20px;
        min-height: 44px;
    }
    
    /* Notification improvements */
    .notification-item {
        padding: 16px 20px;
        min-height: 60px;
    }
    
    .notification-text {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Search improvements */
    .search-results {
        font-size: 16px;
    }
    
    .search-result-item {
        padding: 16px 20px;
        min-height: 60px;
    }
    
    /* Footer improvements */
    footer {
        padding: 40px 0;
    }
    
    .footer-content {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* iPad Pro and larger tablets */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .modal-dialog {
        max-width: 85%;
    }
    
    .modal-xl {
        max-width: 90%;
    }
    
    #addServiceModal .modal-dialog {
        max-width: 90%;
    }
}

/* Landscape orientation improvements */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .modal-dialog {
        max-width: 80%;
        margin: 10px auto;
    }
    
    #addServiceModal .modal-dialog {
        max-width: 85%;
    }
    
    .modal-body {
        padding: 20px;
    }
}
