/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Arabic', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    direction: rtl;
    text-align: right;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Trust Section */
.trust-section {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.trust-content h2 {
    text-align: center;
    color: #1e40af;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trust-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(30, 64, 175, 0.15);
    border-color: #3b82f6;
}

.trust-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.trust-item h3 {
    color: #1e40af;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.trust-item p {
    color: #64748b;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Form Section */
.form-section {
    flex: 1;
    margin-bottom: 3rem;
}

.form-container {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.form-container h2 {
    color: #1e40af;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.form-description {
    text-align: center;
    color: #64748b;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Form Styles */
.complaint-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
    direction: rtl;
    text-align: right;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
}

/* Error Messages */
.error-message {
    display: block;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    text-align: center;
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.success-icon {
    font-size: 3rem;
    color: #22c55e;
    margin-bottom: 1rem;
}

.success-message h3 {
    color: #166534;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-message p {
    color: #166534;
    font-size: 1.1rem;
}

/* Content Section (for policy pages) */
.content-section {
    flex: 1;
    margin-bottom: 3rem;
}

.content-container {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    max-width: 800px;
    margin: 0 auto;
}

.content-container h1 {
    color: #1e40af;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #64748b;
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.policy-content h2 {
    color: #1e40af;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-top: 1rem;
}

.policy-content p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.policy-content ul {
    margin: 1rem 0;
    padding-right: 2rem;
}

.policy-content li {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    border-radius: 20px 20px 0 0;
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

.separator {
    color: #6b7280;
    margin: 0 0.5rem;
}

.footer-text p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .trust-section,
    .form-container,
    .content-container {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .trust-content h2,
    .form-container h2,
    .content-container h1 {
        font-size: 1.8rem;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trust-item {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
    }
    
    .submit-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 0.5rem 0.5rem;
    }
    
    .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .trust-section,
    .form-container,
    .content-container {
        padding: 1.5rem 1rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .trust-content h2,
    .form-container h2 {
        font-size: 1.5rem;
    }
    
    .content-container h1 {
        font-size: 2rem;
    }
    
    .trust-icon {
        font-size: 2.5rem;
    }
    
    .trust-item h3 {
        font-size: 1.2rem;
    }
    
    .policy-content h2 {
        font-size: 1.3rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .submit-btn {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .trust-section,
    .form-container,
    .content-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .trust-item {
        border: 2px solid #000;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 2px solid #000;
    }
    
    .submit-btn {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .trust-item:hover {
        transform: none;
    }
    
    .submit-btn:hover {
        transform: none;
    }
}