/* ===========================================
   إضافات للصفحات الجديدة والتحسينات
   =========================================== */

/* Responsive Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 600px;
    font-size: var(--font-size-sm);
}

/* Active Navigation Styling */
.nav-link.active {
    color: #3b82f6 !important;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    border-radius: 1px;
}

/* Warning class for character counters */
.warning {
    color: #ef4444 !important;
    font-weight: bold;
}

/* FAQ Animations */
.faq-answer {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.faq-item.active .faq-answer {
    animation: expandFAQ 0.3s ease-out;
}

@keyframes expandFAQ {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
    }
}

/* Enhanced button hover effects */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .table-responsive table {
        min-width: 100%;
        font-size: 12px;
    }
    
    .nav-logo span {
        font-size: 14px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr !important;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
.btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Print styles */
@media print {
    .navbar,
    .nav-toggle,
    .contact-cta,
    .footer,
    .ad-container,
    .sidebar-ad-container {
        display: none !important;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 2rem 0 1rem;
        margin-top: 0 !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .main-content {
        grid-column: 1 / -1 !important;
    }
}