/* Companies List Frontend Styles */
.companies-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    direction: rtl;
}

/* الفلاتر */
.companies-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 250px;
}

.companies-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.companies-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.companies-search-btn {
    background: #21903f !important;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.companies-search-btn:hover {
    background: 21903f !important;
}

.filter-box {
    min-width: 200px;
}

.companies-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.companies-filter-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.companies-clear-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.companies-clear-btn:hover {
    background: #c82333;
}

/* حالة التحميل */
.companies-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* شبكة الشركات */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.companies-grid.loading {
    opacity: 0.6;
}

/* بطاقة الشركة */
.company-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.company-logo {
    text-align: center;
    margin-bottom: 20px;
}

.company-logo img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 6px;
}

.company-name {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #2c3e50;
}

.company-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.company-name a:hover {
    color: #007cba;
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    font-size: 13px;
}

.info-item .value {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.info-item.address .value {
    line-height: 1.5;
}

.info-item a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* صفحات */
.companies-pagination {
    margin-top: 40px;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.page-btn {
    background: white;
    border: 2px solid #e1e5e9;
    color: #333;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.page-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.page-btn.active:hover {
    background: #005a87;
    border-color: #005a87;
}

.page-btn.prev-btn,
.page-btn.next-btn {
    font-weight: 600;
}

.dots {
    padding: 10px 5px;
    color: #666;
    font-weight: bold;
}

/* عدم وجود نتائج */
.no-companies {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.no-companies p {
    margin: 0;
    font-style: italic;
}

/* الحالة المخفية */
.hidden {
    display: none !important;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .companies-list-container {
        padding: 15px;
    }
    
    .companies-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-box {
        min-width: auto;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .company-card {
        padding: 20px;
    }
    
    .company-name {
        font-size: 18px;
    }
    
    .pagination-wrapper {
        gap: 3px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 38px;
    }
}

@media (max-width: 480px) {
    .companies-list-container {
        padding: 10px;
    }
    
    .company-card {
        padding: 15px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-item .label {
        min-width: auto;
        font-weight: 700;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
} 