/* ═══════════════════════════════════════════════════════════
   EXPLORE RESULTS & DIRECTORY — MATCHING REFERENCE DESIGN
   ═══════════════════════════════════════════════════════════ */

/* ── Hero & Breadcrumb Area (Luxury Warm Islamic Style) ── */
.ex-results-hero {
    background: #faf8f5;
    background: radial-gradient(circle at 18% 45%, rgba(245, 238, 226, 0.9) 0%, transparent 65%), linear-gradient(180deg, #fdfcf9 0%, #f9f6f0 50%, #f5efe6 100%);
    border-bottom: 1px solid #eae2d5;
    padding: 38px 0 95px;
    position: relative;
    overflow: hidden;
}
.ex-bc-capsule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #7b8a97;
    margin-bottom: 20px;
    direction: rtl;
}
.ex-bc-capsule a {
    color: #7b8a97;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ex-bc-capsule a:hover { color: #003646; }
.ex-bc-capsule .bc-sep { font-size: 13px; color: #b5c0c9; font-weight: 400; }
.ex-bc-current { color: #003646; font-weight: 850; }

.ex-hero-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.ex-hero-h1 {
    font-size: clamp(34px, 4.2vw, 46px);
    font-weight: 950;
    color: #003646;
    margin: 0;
    line-height: 1.18;
    letter-spacing: -0.5px;
    font-family: 'Tajawal', sans-serif;
}
.ex-hero-emblem {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(197,160,89,0.22));
}
.ex-hero-p {
    font-size: 15.5px;
    color: #516270;
    line-height: 1.85;
    margin: 0 0 24px;
    max-width: 620px;
    font-weight: 600;
}
.ex-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #dfd8ce;
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    color: #003646;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    text-decoration: none;
}
.ex-share-btn:hover {
    border-color: #c5a059;
    color: #c5a059;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(197,160,89,0.18);
}

/* Luxury Islamic Arch Artwork on the left */
.ex-hero-artwork-frame {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 330px;
    border-radius: 220px 220px 18px 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(175, 140, 95, 0.17), 0 4px 15px rgba(0,0,0,0.03);
    border: 3.5px solid #ffffff;
    background: #f5efe6;
}
.ex-hero-artwork-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}
.ex-hero-artwork-frame:hover img {
    transform: scale(1.03);
}

/* ── Floating Stats Cards Bar (مطابق للمرجع بدقة) ── */
.ex-stats-bar-wrapper {
    margin-top: -60px;
    position: relative;
    z-index: 20;
    margin-bottom: 30px;
}
.ex-stats-bar {
    background: #ffffff;
    border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 18px 45px rgba(20, 50, 65, 0.08);
    border: 1.5px solid #ece6dc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 6px;
    direction: rtl;
}
@media (max-width: 991px) {
    .ex-stats-bar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .ex-stats-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .ex-stats-bar { grid-template-columns: repeat(2, 1fr); }
}

.ex-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.28s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
    background: transparent;
    position: relative;
    min-width: 0;
}
.ex-stat-card:not(:last-child):not(.active) {
    border-left: 1px solid #f1ece4;
}
.ex-stat-card:hover:not(.active) {
    background: #faf7f2;
    transform: translateY(-2px);
}
.ex-stat-card.active {
    background: #003646 !important;
    border-color: #003646 !important;
    box-shadow: 0 10px 24px rgba(0, 54, 70, 0.22);
    transform: translateY(-2px);
}
.ex-stat-card .sc-icon {
    font-size: 21px;
    margin-bottom: 8px;
    color: #003646;
    transition: color 0.2s;
}
.ex-stat-card .sc-title {
    font-size: 12px;
    font-weight: 800;
    color: #4b5a68;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.ex-stat-card .sc-count {
    font-size: 25px;
    font-weight: 950;
    color: #003646;
    line-height: 1;
    font-family: 'Tajawal', sans-serif;
}
.ex-stat-card .sc-unit {
    font-size: 11px;
    font-weight: 700;
    color: #8c9ba5;
    margin-top: 3px;
}
/* Active state colors */
.ex-stat-card.active .sc-icon { color: #d4af37 !important; }
.ex-stat-card.active .sc-title { color: rgba(255,255,255,0.92) !important; }
.ex-stat-card.active .sc-count { color: #ffffff !important; }
.ex-stat-card.active .sc-unit { color: rgba(255,255,255,0.7) !important; }

/* ── Classifications & Subcategories Panel (مطابق للمرجع البصري بدقة) ── */
.classifications-section {
    background: #ffffff;
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: 0 6px 25px rgba(0, 38, 51, 0.04);
    border: 1.5px solid #ece6dc;
    margin-bottom: 25px;
    position: relative;
    direction: rtl;
}
.class-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f1ece4;
    flex-wrap: wrap;
    gap: 12px;
}
.class-section-title {
    font-size: 16.5px;
    font-weight: 900;
    color: #003646;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Tajawal', sans-serif;
}
.class-section-subtitle {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}
.class-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.class-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #eae2d5;
    color: #003646;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    flex-shrink: 0;
    z-index: 5;
}
.class-nav-btn:hover {
    background: #003646;
    color: #ffffff;
    border-color: #003646;
    transform: scale(1.08);
}
.class-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 4px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}
.class-grid::-webkit-scrollbar {
    display: none;
}
.class-card {
    flex: 0 0 135px;
    min-width: 130px;
    max-width: 155px;
    min-height: 122px;
    background: #faf7f2;
    border: 1.5px solid #eae2d5;
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}
.class-card:hover {
    border-color: #c5a059;
    background: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(197, 160, 89, 0.18);
}
.class-card.active {
    background: #003646 !important;
    border-color: #003646 !important;
    box-shadow: 0 10px 25px rgba(0, 54, 70, 0.3);
    transform: translateY(-2px);
}
.class-card.active .class-title,
.class-card.active .class-count,
.class-card.active i {
    color: #ffffff !important;
}
.class-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
    background: rgba(197, 160, 89, 0.12);
    color: #c5a059;
    transition: all 0.25s ease;
}
.class-card:hover .class-icon-wrap {
    background: #c5a059;
    color: #ffffff;
}
.class-card.active .class-icon-wrap {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #f7dfa5 !important;
}
.class-title {
    font-size: 12.5px;
    font-weight: 850;
    color: #003646;
    line-height: 1.35;
    margin-bottom: 4px;
    font-family: 'Tajawal', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}
.class-count {
    font-size: 11px;
    font-weight: 800;
    color: #c5a059;
}
    background: rgba(0,0,0,0.06);
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
}
.ex-pill-btn.active .ex-pill-count {
    background: rgba(230,165,48,0.25);
    color: #e6a530;
}

/* ── Search & Filter Bar ── */
/* ── Luxury Search & Filter Toolbar ── */
.ex-search-bar-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 8px 10px 8px 16px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 36, 49, 0.05), 0 1px 3px rgba(0,0,0,0.02);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}
.ex-search-bar-box:focus-within {
    border-color: #e6a530;
    box-shadow: 0 12px 35px rgba(0, 36, 49, 0.08), 0 0 0 3px rgba(230, 165, 48, 0.15);
}
@media (max-width: 992px) {
    .ex-search-bar-box {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        gap: 14px;
    }
}

/* Search Input Wrap */
.ex-search-input-wrap {
    flex: 1.6;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    position: relative;
}
.ex-search-icon {
    color: #94a3b8;
    font-size: 15px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}
.ex-search-bar-box:focus-within .ex-search-icon {
    color: #e6a530;
}
.ex-search-input-wrap input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    font-size: 14.5px;
    font-weight: 700;
    color: #0c3340;
    background: transparent;
    padding: 8px 0;
    font-family: 'Tajawal', sans-serif;
}
.ex-search-input-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 600;
    opacity: 1;
    font-size: 13.5px;
}
.ex-search-clear-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ex-search-clear-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.ex-search-submit-pill {
    background: linear-gradient(135deg, #003244 0%, #064c61 100%);
    color: #ffffff;
    border: 1px solid rgba(230, 165, 48, 0.3);
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 50, 68, 0.15);
}
.ex-search-submit-pill:hover {
    background: linear-gradient(135deg, #e6a530 0%, #d49320 100%);
    color: #002633;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(230, 165, 48, 0.35);
}

/* Divider */
.ex-search-divider {
    width: 1.5px;
    height: 32px;
    background: #edf2f7;
    flex-shrink: 0;
}
@media (max-width: 992px) {
    .ex-search-divider { display: none; }
}

/* Filters Group */
.ex-filters-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 992px) {
    .ex-filters-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
@media (max-width: 576px) {
    .ex-filters-group {
        grid-template-columns: 1fr;
    }
}

/* Select Wrap with Custom Modern Arrow and Prefix Icon */
.ex-filter-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.25s ease;
}
.ex-filter-select-wrap:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.ex-filter-select-wrap:focus-within {
    border-color: #e6a530 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(230, 165, 48, 0.15) !important;
}
.ex-filter-icon {
    position: absolute;
    right: 12px;
    color: #64748b;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}
.ex-filter-select-wrap:focus-within .ex-filter-icon {
    color: #e6a530;
}
.ex-chevron-icon {
    position: absolute;
    left: 11px;
    color: #94a3b8;
    font-size: 10px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s, color 0.2s;
}
.ex-filter-select-wrap:focus-within .ex-chevron-icon {
    transform: rotate(180deg);
    color: #0c3340;
}

/* Native select reset */
.ex-filter-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    font-family: 'Tajawal', sans-serif !important;
    padding: 9px 34px 9px 28px !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    width: 100% !important;
}
.ex-filter-select:focus {
    outline: none !important;
    background: transparent !important;
    color: #0f172a !important;
    box-shadow: none !important;
}
.ex-filter-select option {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 10px 14px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

/* Advanced Search Button */
.ex-adv-filter-btn {
    background: #ffffff;
    color: #003244;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: all 0.25s ease;
    font-family: 'Tajawal', sans-serif;
}
.ex-adv-filter-btn i {
    color: #e6a530;
    font-size: 13px;
    transition: transform 0.25s ease;
}
.ex-adv-filter-btn:hover {
    background: #003244;
    border-color: #003244;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 50, 68, 0.15);
}
.ex-adv-filter-btn:hover i {
    transform: rotate(90deg);
    color: #f7dfa5;
}
.ex-adv-filter-btn.has-filters {
    background: rgba(230, 165, 48, 0.12);
    border-color: #e6a530;
    color: #8f6208;
}
.ex-adv-badge {
    background: #e6a530;
    color: #003244;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── Active Filters Chips Bar ── */
.ex-active-filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 8px 16px;
    margin-top: -18px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.ex-af-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 800;
    color: #475569;
}
.ex-af-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ex-af-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0c3340;
    border-radius: 50px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.ex-af-chip a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
}
.ex-af-chip a:hover {
    color: #dc2626;
}
.ex-af-reset-all {
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(220, 38, 38, 0.08);
    transition: all 0.2s;
}
.ex-af-reset-all:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ── Luxury Advanced Filters Drawer ── */
#advanced-filters-panel {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px 30px;
    border: 1.5px solid #e2e8f0;
    border-top: 4px solid #e6a530;
    margin-bottom: 35px;
    box-shadow: 0 16px 45px rgba(0, 36, 49, 0.07);
    position: relative;
    transition: all 0.3s ease;
}

.ex-af-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1.5px solid #f1f5f9;
}
.ex-af-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ex-af-header-title {
    font-size: 16.5px;
    font-weight: 900;
    color: #003244;
    display: flex;
    align-items: center;
    gap: 9px;
}
.ex-af-header-desc {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.ex-af-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.ex-af-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Form Groups & Labels */
.ex-af-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ex-af-label {
    font-size: 13px;
    font-weight: 800;
    color: #0c3340;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0;
}
.ex-af-label i {
    font-size: 13px;
}

/* Inputs & Selects with High Contrast */
.ex-af-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ex-af-input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
    transition: color 0.2s;
}
.ex-af-input-wrap:focus-within .ex-af-input-icon {
    color: #e6a530;
}

.ex-af-control {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 38px 10px 14px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0c3340;
    outline: none;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.25s ease;
}
.ex-af-control::-webkit-input-placeholder {
    color: #64748b !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}
.ex-af-control::-moz-placeholder {
    color: #64748b !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}
.ex-af-control::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}
.ex-af-control:hover {
    border-color: #94a3b8;
    background: #ffffff;
}
.ex-af-control:focus {
    background: #ffffff;
    border-color: #e6a530;
    box-shadow: 0 0 0 3px rgba(230, 165, 48, 0.18);
    color: #002633;
}

/* Custom Select in Drawer */
.ex-af-select-wrap {
    position: relative;
    width: 100%;
}
.ex-af-select {
    width: 100%;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 38px 10px 30px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0c3340 !important;
    outline: none !important;
    cursor: pointer !important;
    font-family: 'Tajawal', sans-serif !important;
    transition: all 0.25s ease !important;
}
.ex-af-select:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}
.ex-af-select:focus {
    background: #ffffff !important;
    border-color: #e6a530 !important;
    box-shadow: 0 0 0 3px rgba(230, 165, 48, 0.18) !important;
}
.ex-af-select-chevron {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 11px;
    pointer-events: none;
}
.ex-af-select option {
    background: #ffffff;
    color: #0c3340;
    padding: 10px;
    font-weight: 700;
}

/* Drawer Action Buttons */
.ex-af-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1.5px solid #f1f5f9;
    flex-wrap: wrap;
}
.ex-af-btn-submit {
    background: linear-gradient(135deg, #003244 0%, #064c61 100%);
    color: #ffffff;
    border: 1.5px solid rgba(230, 165, 48, 0.35);
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 50, 68, 0.2);
    transition: all 0.25s ease;
    font-family: 'Tajawal', sans-serif;
}
.ex-af-btn-submit:hover {
    background: linear-gradient(135deg, #e6a530 0%, #d49320 100%);
    color: #002633;
    border-color: #e6a530;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 165, 48, 0.35);
}
.ex-af-btn-reset {
    background: #ffffff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    padding: 9px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    font-family: 'Tajawal', sans-serif;
}
.ex-af-btn-reset:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}
.ex-af-btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    font-family: 'Tajawal', sans-serif;
}
.ex-af-btn-close:hover {
    color: #0c3340;
}

/* ── Section Showcase (مختارات من كل نوع) ── */
.ex-showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.ex-showcase-title {
    font-size: 19px;
    font-weight: 900;
    color: #003244;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.ex-showcase-viewall {
    font-size: 13px;
    font-weight: 800;
    color: #0284c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}
.ex-showcase-viewall:hover { gap: 8px; color: #003244; }

/* Section Divider with ornament (مختارات من كل نوع) */
.ex-ornament-divider {
    text-align: center;
    position: relative;
    margin: 30px 0 40px;
}
.ex-ornament-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.ex-ornament-badge {
    position: relative;
    z-index: 2;
    background: #f8fafc;
    padding: 4px 22px;
    font-size: 14px;
    font-weight: 900;
    color: #003244;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Clean Book Card for Showcase ── */
.sc-card {
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #edf2f7;
    padding: 12px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.sc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,35,50,0.08);
    border-color: #cbd5e1;
}
.sc-card-cover {
    width: 100%;
    height: 190px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}
.sc-card-title {
    font-size: 13.5px;
    font-weight: 850;
    color: #003244;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}
.sc-card-author {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
}
.sc-type-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 10px;
}

/* ── Bottom Callout Banner (لم تجد ما تبحث عنه؟) ── */
.ex-help-banner {
    background: #fff;
    border: 1.5px solid #eef2f6;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.02);
    margin-top: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    direction: rtl;
}
@media (max-width: 768px) {
    .ex-help-banner { flex-direction: column; text-align: center; }
}
.ex-help-content {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ex-help-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(197,160,89,0.1);
    border: 1px solid rgba(197,160,89,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c5a059;
    font-size: 22px;
    flex-shrink: 0;
}
.ex-help-text h4 {
    font-size: 17px;
    font-weight: 900;
    color: #003244;
    margin: 0 0 4px;
}
.ex-help-text p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-weight: 600;
}
.ex-help-btn {
    background: #003244;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 900;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ex-help-btn:hover { background: #0c6277; color: #fff; }

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — شامل لكل الشاشات الصغيرة
   ═══════════════════════════════════════════════════════ */

/* md: < 992px */
@media (max-width: 991.98px) {
    .ex-results-hero {
        padding: 26px 0 70px;
    }
    .ex-hero-h1 {
        font-size: clamp(24px, 6vw, 34px);
    }
    .ex-hero-p {
        font-size: 14px;
        line-height: 1.7;
    }
    .ex-stats-bar-wrapper {
        margin-top: -50px;
    }
    #advanced-filters-panel {
        padding: 18px 16px;
    }
}

/* sm: < 768px */
@media (max-width: 767.98px) {
    .ex-results-hero {
        padding: 20px 0 80px;
    }
    .ex-hero-title-row {
        gap: 10px;
        margin-bottom: 10px;
    }
    .ex-hero-h1 {
        font-size: clamp(22px, 7vw, 30px);
    }
    .ex-hero-emblem {
        width: 40px;
        height: 40px;
    }
    .ex-hero-p {
        font-size: 13.5px;
        margin-bottom: 16px;
        line-height: 1.65;
    }
    .ex-share-btn {
        padding: 7px 16px;
        font-size: 12px;
    }
    /* Stats bar: horizontal scroll on mobile */
    .ex-stats-bar-wrapper {
        margin-top: -45px;
        overflow: visible;
    }
    .ex-stats-bar {
        display: flex !important;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap !important;
    }
    .ex-stats-bar::-webkit-scrollbar { display: none; }
    .ex-stat-card {
        min-width: 105px;
        flex-shrink: 0;
        padding: 12px 8px;
        border-radius: 12px;
    }
    .ex-stat-card:not(:last-child):not(.active) {
        border-left: none;
        border-right: 1px solid #f1ece4;
    }
    .ex-stat-card .sc-icon { font-size: 18px; margin-bottom: 6px; }
    .ex-stat-card .sc-title { font-size: 10.5px; }
    .ex-stat-card .sc-count { font-size: 20px; }
    .ex-stat-card .sc-unit { font-size: 10px; }
    /* Pills: smooth scroll */
    .ex-pills-row {
        padding-bottom: 10px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .ex-pill-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    /* Search bar */
    .ex-search-bar-box {
        padding: 12px;
        border-radius: 14px;
    }
    .ex-search-input-wrap {
        min-width: unset;
    }
    .ex-search-input-wrap input {
        font-size: 13px;
    }
    /* Advanced filter panel */
    .ex-af-header-title {
        font-size: 14px;
    }
    .ex-af-header-desc {
        font-size: 12px;
    }
    /* Help banner */
    .ex-help-banner {
        padding: 20px 16px;
    }
    .ex-help-text h4 { font-size: 15px; }
}

/* xs: < 480px */
@media (max-width: 479.98px) {
    .ex-results-hero {
        padding: 16px 0 75px;
    }
    .ex-hero-h1 {
        font-size: clamp(20px, 6.5vw, 26px);
        letter-spacing: -0.2px;
    }
    .ex-hero-emblem {
        width: 34px;
        height: 34px;
    }
    .ex-hero-p {
        font-size: 13px;
        -webkit-line-clamp: 4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 14px;
    }
    .ex-bc-capsule {
        font-size: 11px;
        gap: 5px;
        margin-bottom: 12px;
    }
    .ex-share-btn span { display: none; }
    .ex-share-btn { padding: 7px 12px; }
    /* Stats: smaller cards */
    .ex-stats-bar {
        padding: 8px;
        border-radius: 14px;
    }
    .ex-stat-card {
        min-width: 88px;
        padding: 10px 6px;
        border-radius: 10px;
    }
    .ex-stat-card .sc-icon { font-size: 16px; margin-bottom: 4px; }
    .ex-stat-card .sc-title { font-size: 9.5px; }
    .ex-stat-card .sc-count { font-size: 18px; }
    /* Pills row */
    .ex-pills-row { gap: 5px; }
    .ex-pill-btn {
        padding: 6px 11px;
        font-size: 11.5px;
        border-radius: 30px;
    }
    .ex-pill-count { padding: 1px 5px; font-size: 10px; }
    /* Search bar */
    .ex-search-bar-box {
        border-radius: 12px;
        padding: 10px;
    }
    .ex-search-submit-pill {
        padding: 6px 14px;
        font-size: 12px;
    }
    /* Filters: 2 columns grid */
    .ex-filters-group {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* Advanced panel */
    #advanced-filters-panel {
        padding: 14px 12px;
        border-radius: 14px;
    }
    .ex-af-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ex-af-btn-submit, .ex-af-btn-reset {
        width: 100%;
        justify-content: center;
    }
    /* Help banner */
    .ex-help-banner {
        padding: 16px 14px;
        gap: 14px;
    }
    .ex-help-content { gap: 12px; }
    .ex-help-icon { width: 42px; height: 42px; font-size: 18px; }
    .ex-help-text h4 { font-size: 14px; }
    .ex-help-text p { font-size: 12px; }
    .ex-help-btn { padding: 10px 20px; font-size: 12.5px; }
    /* Showcase section */
    .ex-showcase-title { font-size: 16px; }
    .ex-showcase-viewall { font-size: 12px; }
    .sc-card-cover { height: 155px; }
    .sc-card-title { font-size: 12.5px; }
}

/* ═══════════════════════════════════════════════════════
   ENGLISH LTR OVERRIDES
   ═══════════════════════════════════════════════════════ */
html[dir="rtl"] .ex-search-bar-box,
html[dir="rtl"] .ex-active-filters-bar,
html[dir="rtl"] #advanced-filters-panel {
    direction: rtl;
}

html[dir="ltr"] .ex-results-hero,
html[dir="ltr"] .ex-bc-capsule,
html[dir="ltr"] .ex-stats-bar-wrapper,
html[dir="ltr"] .ex-stats-bar,
html[dir="ltr"] .classifications-section,
html[dir="ltr"] .ex-search-bar-box,
html[dir="ltr"] .ex-search-input-wrap,
html[dir="ltr"] .ex-filters-group,
html[dir="ltr"] .ex-active-filters-bar,
html[dir="ltr"] #advanced-filters-panel,
html[dir="ltr"] .ex-applied-filters-row,
html[dir="ltr"] .ex-help-banner,
html[dir="ltr"] .ex-active-filter-tag,
html[dir="ltr"] .ex-results-controls,
html[dir="ltr"] .ex-results-body {
    direction: ltr !important;
    text-align: left !important;
}
html[dir="ltr"] .ex-hero-h1,
html[dir="ltr"] .ex-hero-p,
html[dir="ltr"] .ex-hero-title-row {
    text-align: left;
}
html[dir="ltr"] .ex-stat-card:not(:last-child):not(.active) {
    border-left: none;
    border-right: 1px solid #f1ece4;
}
html[dir="ltr"] .ex-filter-icon {
    left: 12px;
    right: auto;
}
html[dir="ltr"] .ex-chevron-icon {
    right: 11px;
    left: auto;
}
html[dir="ltr"] .ex-filter-select {
    padding: 9px 28px 9px 34px !important;
    text-align: left;
}
html[dir="ltr"] .ex-search-input-wrap input {
    text-align: left !important;
    direction: ltr !important;
    padding: 8px 8px !important;
}
html[dir="ltr"] .ex-search-icon {
    position: static !important;
}
html[dir="ltr"] .ex-af-label {
    text-align: left !important;
    justify-content: flex-start !important;
}
html[dir="ltr"] .ex-af-input-icon {
    left: 14px !important;
    right: auto !important;
}
html[dir="ltr"] .ex-af-control {
    text-align: left !important;
    direction: ltr !important;
    padding-left: 38px !important;
    padding-right: 14px !important;
}
html[dir="ltr"] .ex-af-select {
    text-align: left !important;
    direction: ltr !important;
    padding: 10px 14px 10px 38px !important;
}
html[dir="ltr"] .ex-af-select-chevron {
    right: 14px !important;
    left: auto !important;
}
html[dir="ltr"] .ex-af-header-info {
    text-align: left !important;
}
html[dir="ltr"] .ex-af-footer {
    direction: ltr !important;
}
html[dir="ltr"] .ex-help-text {
    text-align: left !important;
}
</style>
