/* ============================================
   InfoAllTec Channels – Directory Styles
   ============================================ */

/* ---------- الحاوية العامة للدليل ---------- */
.iatc-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
    box-sizing: border-box;
}

/* ---------- الفلاتر – نفس ستايل الملف القديم ---------- */
.iatc-filters-wrapper {
    margin-bottom: 24px;
}

.iatc-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

/* يمكن تجاهل iatc-filters-row لو غير موجود في الـ HTML، فهو لن يضر */
.iatc-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.iatc-filter-item {
    flex: 1 1 160px;
    min-width: 0;
}

.iatc-filter-search input,
.iatc-filter-country input,
.iatc-filter-sort select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

.iatc-filter-submit button {
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 0;
    background: #1e73be;
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

.iatc-filter-submit button:hover {
    background: #155186;
}

/* ---------- شبكة البطاقات ---------- */
.iatc-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

/* ---------- البطاقة العامة ---------- */
.iatc-card {
    background-color: #ffffff;
    border: 1px solid #e8ebef;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

.iatc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

.iatc-card-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ---------- الهيدر: صورة – عنوان – توثيق ---------- */
.iatc-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.iatc-card-thumb {
    flex: 0 0 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iatc-card-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iatc-card-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.iatc-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- البادجات ---------- */
.iatc-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.iatc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

/* التوثيق – دائرة بها SVG */
.iatc-badge-verified {
    background-color: #e0f7ff;
    padding: 4px;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* مميز */
.iatc-badge-featured {
    border-color: #f39c12;
    color: #f39c12;
    background: rgba(243, 156, 18, .06);
}

/* سبونسرد */
.iatc-badge-paid {
    border-color: #9b59b6;
    color: #9b59b6;
    background: rgba(155, 89, 182, .06);
}

/* ---------- الوصف ---------- */
.iatc-card-body {
    margin-bottom: 12px;
}

.iatc-card-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

/* ---------- الميتا: الدولة – المتابعين – التصنيف ---------- */
.iatc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.iatc-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #f3f4f6;
    color: #555;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iatc-chip-country {
    background: #e8f3ff;
    color: #1953a7;
}

.iatc-chip-followers {
    background: #fdf3e5;
    color: #9c6b1c;
}

.iatc-chip-category {
    background: #f4f0ff;
    color: #5b3aa4;
}

/* ---------- الفوتر – زر الانضمام – الزيارات ---------- */
.iatc-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.iatc-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    background: #10b981;
    color: #fff;
    white-space: nowrap;
    transition: background .15s ease, transform .1s ease;
}

.iatc-card-button:hover {
    background: #059669;
    transform: translateY(-1px);
}

.iatc-card-visits {
    font-size: 11px;
    color: #777;
    white-space: nowrap;
}

/* ---------- رسالة لا توجد نتائج ---------- */
.iatc-directory-empty,
.iatc-no-results {
    padding: 24px;
    border-radius: 12px;
    border: 1px dashed #ddd;
    background: #fafafa;
    font-size: 14px;
    text-align: center;
    color: #555;
}

/* ---------- استجابة للموبايل ---------- */
@media (max-width: 768px) {
    .iatc-directory {
        padding: 24px 12px;
    }

    .iatc-filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .iatc-filter-item {
        flex: 1 1 auto;
    }

    .iatc-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .iatc-card-button {
        width: 100%;
    }
}

/* Pagination (light version) */
.iatc-pagination ul.page-numbers {
    display: flex;
    gap: 6px;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.iatc-pagination ul.page-numbers li a,
.iatc-pagination ul.page-numbers li span {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #d3d5d8;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

.iatc-pagination ul.page-numbers li span.current {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}