/**
 * Branches Cards - Dark Navy Style
 */

/* ========== الحاوية العامة ========== */
.branches-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    direction: rtl;
}

/* ========== البحث والفلترة ========== */
.branches-search-section {
    margin-bottom: 50px;
    background: #27318b;
    padding: 28px 30px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(39, 49, 139, 0.3);
}

.search-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.branches-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 160px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    background: white;
    color: #333;
}

.search-input:focus {
    outline: 2px solid #e31b24;
}

.filter-select {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    background: white;
    color: #333;
    cursor: pointer;
}

.search-btn {
    padding: 12px 26px;
    background: #e31b24;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #c01520;
}

/* ========== رأس القسم ========== */
.branches-section {
    margin-bottom: 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 35px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #27318b;
    margin: 0 0 8px 0;
}

.section-desc {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* ========== شبكة الكروت ========== */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width: 991px) {
    .branches-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .branches-grid { grid-template-columns: 1fr; }
}

/* ========== كارت الفرع ========== */
.branch-card {
    background: #1e2d8a;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 6px 20px rgba(30, 45, 138, 0.35);
    transition: transform 0.25s, box-shadow 0.25s;
    direction: rtl;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(30, 45, 138, 0.45);
}

.bc-outside {
    background: #1e2d8a;
}

/* ========== صف (row) داخل الكارت ========== */
.bc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.bc-row:last-child {
    border-bottom: none;
}

/* صف العنوان الرئيسي */
.bc-title-row {
    padding-top: 0;
    align-items: flex-start;
}

/* ========== أيقونة الدائرة الحمرا ========== */
.bc-icon-circle {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: #e31b24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

/* ========== اسم الفرع ========== */
.bc-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.35;
    flex: 1;
}

/* ========== العنوان التفصيلي ========== */
.bc-address {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    padding: 10px 0 14px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* ========== صف الهاتف ========== */
.bc-row-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-row-label {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.bc-phones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bc-phone-num {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.bc-phone-num:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ========== صف الخريطة (link) ========== */
.bc-row-link {
    cursor: pointer;
    padding-bottom: 0;
}

.bc-row-link .bc-row-label {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.bc-row-link:hover .bc-row-label {
    text-decoration: underline;
}

/* ========== عدم العثور ========== */
.no-branches-found {
    text-align: center;
    padding: 60px 20px;
    background: #f5f6ff;
    border-radius: 14px;
}

.no-branches-found p {
    font-size: 18px;
    color: #888;
    margin: 0;
}

/* ========== Pagination ========== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination-wrapper .page-numbers {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-wrapper a {
    background: white;
    color: #27318b;
    border: 2px solid #ddd;
}

.pagination-wrapper a:hover {
    background: #27318b;
    color: white;
    border-color: #27318b;
}

.pagination-wrapper .current {
    background: #e31b24;
    color: white;
    border: none;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .branches-container { padding: 25px 14px; }
    .branches-search-section { padding: 18px; }
    .branches-search-form { flex-direction: column; }
    .search-input, .filter-select, .search-btn { width: 100%; }
    .section-header h2 { font-size: 22px; }
    .bc-title { font-size: 17px; }
    .bc-icon-circle { width: 44px; height: 44px; min-width: 44px; font-size: 17px; }
}

@media (max-width: 480px) {
    .bc-title { font-size: 16px; }
    .bc-phone-num { font-size: 14px; }
}
