/* ============================================================
   ملف CSS كامل - المصرية للصرافة (النسخة النهائية)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Georgia', 'Times New Roman', 'Tahoma', serif;
}

/* ============================================================
   المتغيرات الأساسية
   ============================================================ */
:root {
    --primary: #003399;
    --primary-dark: #003399;
    --primary-light: #003399;
    --primary-bg: #c8d9f0;
    --accent: #d4a537;
    --accent-light: #e8c96e;
    --accent-dark: #b8922e;
    --primary-deep: #001f4a;
    --white: #ffffff;
    --light-bg: #eef2f8;
    --text-dark: #1a1a2e;
    --text-gray: #4a4a6a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --gradient-blue: linear-gradient(135deg, #022b6b, #011a42);
    --gradient-gold: linear-gradient(135deg, #d4a537, #b8922e);
}

body {
    background: var(--light-bg);
    color: var(--text-dark);
}

/* ============================================================
   الصفحة الرئيسية
   ============================================================ */
.main-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background-color: #003399;
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== خلفية مع نقاط ذهبية متحركة ===== */
.main-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(212, 165, 55, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(212, 165, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 30% 30%, rgba(212, 165, 55, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(212, 165, 55, 0.06) 0%, transparent 40%);
    animation: pulseBg 10s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulseBg {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ===== نجوم ذهبية متلألئة ===== */
.main-page::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(4px 4px at 10% 20%, rgba(212, 165, 55, 0.8), transparent),
        radial-gradient(3px 3px at 25% 45%, rgba(212, 165, 55, 0.6), transparent),
        radial-gradient(5px 5px at 40% 15%, rgba(212, 165, 55, 0.7), transparent),
        radial-gradient(3px 3px at 55% 70%, rgba(212, 165, 55, 0.6), transparent),
        radial-gradient(4px 4px at 70% 30%, rgba(212, 165, 55, 0.8), transparent),
        radial-gradient(3px 3px at 85% 60%, rgba(212, 165, 55, 0.6), transparent),
        radial-gradient(5px 5px at 95% 80%, rgba(212, 165, 55, 0.7), transparent),
        radial-gradient(3px 3px at 15% 75%, rgba(212, 165, 55, 0.5), transparent),
        radial-gradient(4px 4px at 45% 90%, rgba(212, 165, 55, 0.6), transparent),
        radial-gradient(3px 3px at 80% 10%, rgba(212, 165, 55, 0.5), transparent),
        radial-gradient(6px 6px at 50% 50%, rgba(212, 165, 55, 0.4), transparent),
        radial-gradient(3px 3px at 5% 5%, rgba(212, 165, 55, 0.7), transparent),
        radial-gradient(3px 3px at 95% 95%, rgba(212, 165, 55, 0.7), transparent);
    background-size: 250px 250px;
    animation: sparkleFloat 20s infinite linear;
    z-index: 1;
}

@keyframes sparkleFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -30px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.hero {
    animation: fadeInUp 1.5s ease;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 650px;
    padding: 20px;
}

/* ===== الـ Container ===== */
.logo-container {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(212, 165, 55, 0.05);
    position: relative;
    overflow: hidden;
}

.logo-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    animation: shineRotate 10s infinite linear;
}

@keyframes shineRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== عند التمرير - حدود أعرض وذهبية ===== */
.logo-container:hover {
    transform: translateY(-8px) scale(1.02);
    border: 4px solid var(--accent);
    box-shadow: 
        0 40px 90px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(212, 165, 55, 0.2),
        inset 0 0 60px rgba(212, 165, 55, 0.05);
}

/* ===== الوجو - إطار ذهبي متوهج ===== */
.main-logo {
    width: 200px;
    height: 200px;
    animation: rotateLogo 12s infinite linear;
    border-radius: 50%;
    border: 5px solid var(--accent);
    box-shadow: 
        0 0 30px rgba(212, 165, 55, 0.3),
        0 0 60px rgba(212, 165, 55, 0.2),
        0 0 90px rgba(212, 165, 55, 0.1),
        0 0 120px rgba(212, 165, 55, 0.05),
        inset 0 0 80px rgba(255, 255, 255, 0.05);
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: all 0.5s;
}

@keyframes rotateLogo {
    0% { 
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 30px rgba(212, 165, 55, 0.3), 0 0 60px rgba(212, 165, 55, 0.2);
    }
    50% { 
        transform: rotate(180deg) scale(1.05);
        box-shadow: 0 0 50px rgba(212, 165, 55, 0.4), 0 0 80px rgba(212, 165, 55, 0.3), 0 0 120px rgba(212, 165, 55, 0.15);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        box-shadow: 0 0 30px rgba(212, 165, 55, 0.3), 0 0 60px rgba(212, 165, 55, 0.2);
    }
}

.logo-container:hover .main-logo {
    animation-play-state: paused;
    border-color: var(--accent-light);
    box-shadow: 
        0 0 50px rgba(212, 165, 55, 0.5),
        0 0 80px rgba(212, 165, 55, 0.4),
        0 0 120px rgba(212, 165, 55, 0.2),
        0 0 160px rgba(212, 165, 55, 0.1),
        inset 0 0 80px rgba(255, 255, 255, 0.1);
    transform: scale(1.06);
}

/* ===== النصوص - تكبير بسيط ===== */
.company-name-ar {
    font-size: 3.8rem;
    margin-top: 20px;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

.company-name-ar::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(234, 220, 95, 0.6), transparent);
    margin: 10px auto 0;
    border-radius: 2px;
}
.logo-container:hover .company-name-ar::after {
    width: 120px;
    box-shadow: 0 0 30px rgba(212, 165, 55, 0.4);
}

.company-name-en {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 6px;
    margin-top: 8px;
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.slogan {
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 30px;
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    transition: all 0.3s ease;
}

.logo-container:hover .slogan {
    background: rgba(212, 165, 55, 0.12);
    border-color: var(--accent);
    transform: scale(1.03);
    box-shadow: 0 0 40px rgba(212, 165, 55, 0.08);
}




.branch-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 5px 0;
    letter-spacing: 3px;
    font-family: 'Amiri', 'Georgia', serif;
  font-style: italic;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 25px;
    background: rgba(212, 165, 55, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(212, 165, 55, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.branch-text::before {
    content: '✦';
    color: #d4a537;
    font-size: 1.2rem;
    font-style: normal;
}

.branch-text::after {
    content: '✦';
    color: #d4a537;
    font-size: 1.2rem;
    font-style: normal;
}

.branch-text:hover {
    background: rgba(212, 165, 55, 0.15);
    border-color: rgba(212, 165, 55, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(212, 165, 55, 0.1);
}


.establishment {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   صفحة الفروع
   ============================================================ */
.branches-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: var(--light-bg);
    min-height: 100vh;
    position: relative;
}



.branches-header {
    background-color: #003399!important;
    border-radius: 16px !important;
    padding: 12px 25px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 20px rgba(2, 43, 107, 0.12) !important;
}

.branches-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.branches-header-content .main-title {
    font-size: 2.8rem;
    color: white;
    font-family: 'Georgia', serif;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.branches-header-content .main-title span {
    color: var(--accent);
}

.branches-header-content .sub-title {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    font-family: 'Georgia', serif;
    font-style: italic;
    margin-bottom: 5px;
}



.header-logo img {
    width: 55px !important;
    height: 55px !important;
    border-radius: 50% !important;
    border: 3px solid #d4a537 !important;  /* إطار ذهبي */
    box-shadow: 
        0 0 20px rgba(212, 165, 55, 0.3),
        0 0 40px rgba(212, 165, 55, 0.15) !important;  /* توهج ذهبي */
    object-fit: cover !important;
    transition: all 0.3s ease !important;
}

/* عند التمرير - توهج أقوى */
.header-logo img:hover {
    transform: scale(1.1) !important;
    box-shadow: 
        0 0 30px rgba(212, 165, 55, 0.5),
        0 0 60px rgba(212, 165, 55, 0.25) !important;
    border-color: #e8c96e !important;  /* لون ذهبي فاتح عند التمرير */
}



.branches-header-content .divider-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 12px auto;
    border-radius: 3px;
}

.branches-header-content .description {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-family: 'Georgia', serif;
}

.branches-header-content .description i {
    color: var(--accent);
    margin-left: 8px;
}

/* ===== إحصائيات سريعة ===== */
.branches-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 25px 0 35px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 15px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    text-align: center;
    font-family: 'Georgia', serif;
    border: 1px solid rgba(2, 43, 107, 0.06);
    transition: all 0.3s ease;
    min-width: 120px;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(2, 43, 107, 0.1);
}

.stat-item .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}

.stat-item .label {
    font-size: 0.9rem;
    color: #777;
    font-weight: 500;
    margin-top: 2px;
}

.stat-item .label i {
    color: var(--accent);
    margin-left: 5px;
}

/* ===== الخريطة ===== */
.branches-map {
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 20px;
}

#branchMap {
    height: 480px;
    width: 100%;
    border: 4px solid var(--primary);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(2, 43, 107, 0.15);
    transition: all 0.3s ease;
}

#branchMap:hover {
    box-shadow: 0 20px 60px rgba(2, 43, 107, 0.2);
}

/* ============================================================
   بطاقات الفروع
   ============================================================ */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.branch-card {
    position: relative;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    border: 1px solid rgba(2, 43, 107, 0.06);
}

.branch-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.branch-card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 25px 60px rgba(2, 43, 107, 0.15);
    border-color: rgba(2, 43, 107, 0.1);
}

.branch-card.highlighted {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 0 0 4px var(--accent), 0 25px 60px rgba(212, 165, 55, 0.25);
    border-color: var(--accent);
}

/* ===== صورة الفرع ===== */
.branch-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--gradient-blue);
}

.branch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.branch-card:hover .branch-image img {
    transform: scale(1.08);
}

.branch-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, transparent 100%);
    z-index: 1;
}

/* ===== شارة المدينة ===== */
.branch-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 18px;
    border-radius: 30px;
    background: var(--accent);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(212, 165, 55, 0.3);
    font-family: 'Georgia', serif;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    z-index: 2;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.branch-badge i {
    font-size: 0.7rem;
}

/* ===== رقم الفرع ===== */
.branch-number {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    font-family: 'Georgia', serif;
    z-index: 2;
    transition: all 0.3s ease;
}

.branch-card:hover .branch-number {
    background: var(--accent);
    transform: scale(1.1);
    border-color: white;
}

/* ===== معلومات الفرع ===== */
.branch-info {
    padding: 22px 24px 24px;
    background: white;
}

.branch-info h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.branch-info h3 .branch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    background: var(--primary);
}

.branch-info h3 .branch-name-text {
    flex: 1;
}

/* ===== تفاصيل الفرع ===== */
.branch-details {
    margin: 14px 0 16px;
    background: #f8faff;
    border-radius: 14px;
    padding: 4px 6px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 14px;
    font-size: 0.92rem;
    color: var(--text-gray);
    font-family: 'Georgia', serif;
    line-height: 1.5;
    border-bottom: 1px solid rgba(2, 43, 107, 0.04);
    transition: background 0.3s ease;
    border-radius: 10px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item:hover {
    background: rgba(2, 43, 107, 0.03);
}

.detail-item i {
    width: 20px;
    margin-top: 2px;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: var(--primary);
    transition: all 0.3s ease;
}

.detail-item:hover i {
    color: var(--accent);
    transform: scale(1.1);
}

.detail-item .detail-label {
    font-weight: 600;
    color: var(--primary-dark);
    min-width: 60px;
}

.detail-item span {
    flex: 1;
    color: var(--text-dark);
}

.phone-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 0.92rem;
    display: inline-block;
}

.phone-link:hover {
    color: var(--accent);
    transform: scale(1.05);
}

/* ===== خط فاصل ===== */
.branch-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--primary), var(--accent), transparent);
    margin: 12px 0 14px;
    border-radius: 2px;
    opacity: 0.2;
}

/* ===== أزرار الإجراءات ===== */
.branch-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.branch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Georgia', serif;
    border: none;
    cursor: pointer;
    flex: 1;
    min-width: 110px;
    position: relative;
    overflow: hidden;
}

.branch-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.branch-link:hover::before {
    left: 100%;
}

.map-link {
    background-color: #003399;
    color: white;
    box-shadow: 0 4px 15px rgba(2, 43, 107, 0.25);
}

.map-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(2, 43, 107, 0.35);
    color: white;
}

.focus-btn {
    background: var(--gradient-gold);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 55, 0.25);
}

.focus-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(212, 165, 55, 0.35);
    color: white;
}

/* ============================================================
   سهم العودة للأعلى
   ============================================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(2, 43, 107, 0.35);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(212, 165, 55, 0.4);
}

.scroll-top-btn i {
    font-size: 26px;
}

/* ============================================================
   الفوتر
   ============================================================ */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 20px;
    text-align: center;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin: 8px 0;
    font-size: 0.95rem;
}

footer strong {
    color: var(--accent);
    font-weight: 700;
}

.design-credit {
    font-size: 0.85rem;
    opacity: 0.7;
}

.design-credit i {
    color: var(--accent);
}

/* ============================================================
   زر العودة للرئيسية
   ============================================================ */
.home-btn {
    display: block;
    margin: 30px auto 10px;
    padding: 16px 45px;
    background-color: #003399;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(2, 43, 107, 0.3);
    font-weight: 700;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(2, 43, 107, 0.4);
    background: var(--primary-dark);
    color: white;
}

/* ============================================================
   تحسينات الخريطة (ماركر وبوب اب)
   ============================================================ */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: 3px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.marker-pin::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid currentColor;
    opacity: 0.3;
}

.marker-pin:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* ===== Popup الخريطة ===== */
.custom-popup {
    padding: 5px 0;
    font-family: 'Georgia', serif;
    text-align: right;
    direction: rtl;
}

.popup-header h4 {
    color: var(--primary-dark);
    font-size: 17px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    font-family: 'Georgia', serif;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
}

.popup-body p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-body i {
    width: 20px;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--primary);
}

.popup-footer {
    margin-top: 12px;
    text-align: center;
}

.popup-link {
    display: inline-block;
    padding: 8px 30px;
    border-radius: 30px;
    background: var(--gradient-blue);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(2, 43, 107, 0.3);
    color: white;
}

.branch-popup .leaflet-popup-content-wrapper {
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-right: 4px solid var(--accent);
}

.branch-popup .leaflet-popup-tip {
    background: white;
}

/* ============================================================
   Spinner التحميل
   ============================================================ */
.loading-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e8edf5;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   تحسينات إضافية - مواعيد العمل
   ============================================================ */
.working-hours {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.friday-badge {
    display: inline-block;
    background: linear-gradient(135deg, #d4a537, #b8922e);
    color: white;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
    width: fit-content;
    box-shadow: 0 2px 10px rgba(212, 165, 55, 0.25);
}

.friday-badge::before {
    content: '⭐ ';
}

.detail-item .fa-clock {
    align-self: flex-start;
    margin-top: 4px;
}

/* ============================================================
   تصميم متجاوب - Responsive
   ============================================================ */

/* ===== شاشات كبيرة (لابتوب/Desktop) ===== */
@media (min-width: 1400px) {
    #branchMap {
        height: 550px;
    }
}

/* ===== شاشات متوسطة (تابلت) ===== */
@media (max-width: 992px) {
    .branches-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    #branchMap {
        height: 420px;
    }
}

/* ===== شاشات صغيرة (موبايل) ===== */
@media (max-width: 768px) {
    .branches-header {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .branches-header-content .main-title {
        font-size: 2rem;
    }
    
    .branches-header-content .sub-title {
        font-size: 1rem;
    }
    
    .branches-header-content .description {
        font-size: 0.9rem;
    }
    
    .branches-stats {
        gap: 12px;
    }
    
    .stat-item {
        padding: 10px 18px;
        min-width: 80px;
        flex: 1;
    }
    
    .stat-item .number {
        font-size: 1.5rem;
    }
    
    .stat-item .label {
        font-size: 0.8rem;
    }
    
    #branchMap {
        height: 380px;
        border-width: 3px;
    }
    
    .branches-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .branch-image {
        height: 200px;
    }
    
    .branch-info {
        padding: 18px 18px 20px;
    }
    
    .branch-info h3 {
        font-size: 1.05rem;
    }
    
    .branch-info h3 .branch-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .branch-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .branch-link {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .branch-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
        bottom: 14px;
        left: 14px;
    }
    
    .branch-badge {
        font-size: 0.7rem;
        padding: 4px 14px;
        top: 14px;
        right: 14px;
    }
    
    .detail-item {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .detail-item .detail-label {
        min-width: 50px;
        font-size: 0.8rem;
    }
    
    .branch-divider {
        margin: 10px 0 12px;
    }
    
    .home-btn {
        padding: 14px 35px;
        font-size: 1rem;
    }
    
    .scroll-top-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    /* تحسينات الصفحة الرئيسية */
    .company-name-ar {
        font-size: 3rem;
    }
    
    .company-name-en {
        font-size: 1.6rem;
        letter-spacing: 4px;
    }
    
    .main-logo {
        width: 160px;
        height: 160px;
    }
    
    .logo-container {
        padding: 30px 20px;
        border-radius: 35px;
    }
    
    .slogan {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .branch-text {
        font-size: 1.2rem;
    }
    
    .establishment {
        font-size: 1rem;
    }
}

/* ===== شاشات صغيرة جداً (موبايل صغير) ===== */
@media (max-width: 480px) {
    .branches-header {
        padding: 25px 18px;
        border-radius: 16px;
    }
    
    .branches-header-content .main-title {
        font-size: 1.6rem;
    }
    
    .branch-image {
        height: 170px;
    }
    
    .stat-item {
        padding: 8px 14px;
        min-width: 60px;
    }
    
    .stat-item .number {
        font-size: 1.2rem;
    }
    
    .stat-item .label {
        font-size: 0.7rem;
    }
    
    .branch-info {
        padding: 14px 14px 16px;
    }
    
    .branch-info h3 {
        font-size: 0.95rem;
        gap: 8px;
    }
    
    .branch-info h3 .branch-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .branch-details {
        padding: 2px 4px;
        border-radius: 10px;
    }
    
    .detail-item {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 8px;
        border-radius: 8px;
    }
    
    .detail-item i {
        width: 16px;
        font-size: 0.8rem;
    }
    
    .detail-item .detail-label {
        min-width: 40px;
        font-size: 0.75rem;
    }
    
    .branch-link {
        font-size: 0.78rem;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .branch-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
        bottom: 10px;
        left: 10px;
        border-width: 1.5px;
    }
    
    .branch-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        top: 10px;
        right: 10px;
        gap: 4px;
    }
    
    #branchMap {
        height: 320px;
        border-width: 3px;
        border-radius: 16px;
    }
    
    .scroll-top-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
    
    /* تحسينات الصفحة الرئيسية */
    .company-name-ar {
        font-size: 2.4rem;
    }
    
    .company-name-en {
        font-size: 1.3rem;
        letter-spacing: 3px;
    }
    
    .main-logo {
        width: 130px;
        height: 130px;
        border-width: 4px;
    }
    
    .logo-container {
        padding: 25px 15px;
        border-radius: 30px;
    }
    
    .slogan {
        font-size: 0.9rem;
        padding: 6px 16px;
    }
    
    .branch-text {
        font-size: 1rem;
    }
    
    .establishment {
        font-size: 0.9rem;
    }
}
/* ===== الوجو في الصفحة الرئيسية - كبير وجذاب ===== */
.main-page .main-logo {
    width: 280px;
    height: 280px;
    animation: rotateLogo 15s infinite linear;
    border-radius: 50%;
    border: 8px solid #d4a537;
    box-shadow: 
        0 0 50px rgba(212, 165, 55, 0.5),
        0 0 100px rgba(212, 165, 55, 0.3),
        0 0 150px rgba(212, 165, 55, 0.15),
        0 0 200px rgba(212, 165, 55, 0.08),
        inset 0 0 80px rgba(255, 215, 0, 0.1);
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: all 0.5s ease;
    cursor: pointer;
}

/* ===== تكبير اللوجو عند التمرير ===== */
.main-page .main-logo:hover {
    transform: scale(1.08);
    box-shadow: 
        0 0 80px rgba(212, 165, 55, 0.6),
        0 0 150px rgba(212, 165, 55, 0.4),
        0 0 200px rgba(212, 165, 55, 0.2),
        inset 0 0 100px rgba(255, 215, 0, 0.15);
}

/* ===== حركة دوران اللوجو ===== */
@keyframes rotateLogo {
    0% { 
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 50px rgba(212, 165, 55, 0.4);
    }
    50% { 
        transform: rotate(180deg) scale(1.05);
        box-shadow: 0 0 80px rgba(212, 165, 55, 0.6), 0 0 150px rgba(212, 165, 55, 0.3);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        box-shadow: 0 0 50px rgba(212, 165, 55, 0.4);
    }
}

/* ===== الـ Container بتاع اللوجو ===== */
.logo-container {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(212, 165, 55, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== عند التمرير على الـ Container ===== */
.logo-container:hover {
    transform: translateY(-5px) scale(1.02);
    border: 3px solid #d4a537;
    box-shadow: 
        0 40px 90px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(212, 165, 55, 0.15);
}

/* ===== النصوص تحت اللوجو ===== */
.company-name-ar {
    font-size: 3.5rem;
    margin-top: 25px;
    color: #ffffff;
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

.company-name-ar::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a537, transparent);
    margin: 15px auto 0;
    border-radius: 2px;
}

.company-name-en {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 8px;
    margin-top: 10px;
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.slogan {
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 35px;
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    transition: all 0.3s ease;
}

.logo-container:hover .slogan {
    background: rgba(212, 165, 55, 0.12);
    border-color: #d4a537;
    transform: scale(1.03);
    box-shadow: 0 0 50px rgba(212, 165, 55, 0.08);
}

.branch-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 8px;
    letter-spacing: 3px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

.establishment {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

/* ===== حركة دوران اللوجو ===== */
@keyframes rotateLogo {
    0% { 
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 50px rgba(212, 165, 55, 0.4);
    }
    50% { 
        transform: rotate(180deg) scale(1.05);
        box-shadow: 0 0 80px rgba(212, 165, 55, 0.6), 0 0 150px rgba(212, 165, 55, 0.3);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        box-shadow: 0 0 50px rgba(212, 165, 55, 0.4);
    }
}

/* ===== الـ Container بتاع اللوجو ===== */
.logo-container {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(212, 165, 55, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== عند التمرير على الـ Container ===== */
.logo-container:hover {
    transform: translateY(-5px) scale(1.02);
    border: 3px solid #d4a537;
    box-shadow: 
        0 40px 90px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(212, 165, 55, 0.15);
}
/* ===== النصوص تحت اللوجو ===== */
.company-name-ar {
    font-size: 3.5rem;
    margin-top: 25px;
    color: #ffffff;
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

.company-name-ar::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a537, transparent);
    margin: 15px auto 0;
    border-radius: 2px;
}

.company-name-en {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 8px;
    margin-top: 10px;
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.slogan {
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 35px;
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    transition: all 0.3s ease;
}

.logo-container:hover .slogan {
    background: rgba(212, 165, 55, 0.12);
    border-color: #d4a537;
    transform: scale(1.03);
    box-shadow: 0 0 50px rgba(212, 165, 55, 0.08);
}

.branch-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 8px;
    letter-spacing: 3px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}

.establishment {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
}



/* ===== تحسين الصفحة الرئيسية على الموبايل ===== */
@media (max-width: 768px) {
    .main-page .main-logo {
        width: 180px !important;
        height: 180px !important;
        border-width: 6px !important;
    }

    .company-name-ar {
        font-size: 2.4rem !important;
    }

    .company-name-en {
        font-size: 1.4rem !important;
        letter-spacing: 4px !important;
    }

    .slogan {
        font-size: 0.9rem !important;
        padding: 8px 18px !important;
    }

    .branch-text {
        font-size: 1.2rem !important;
    }

    .establishment {
        font-size: 1rem !important;
    }

    .logo-container {
        padding: 30px 20px !important;
        border-radius: 35px !important;
    }
}

/* ===== تحسينات إضافية للموبايل الصغير ===== */
@media (max-width: 480px) {
    .main-page .main-logo {
        width: 140px !important;
        height: 140px !important;
        border-width: 5px !important;
    }

    .company-name-ar {
        font-size: 2rem !important;
    }

    .company-name-en {
        font-size: 1.1rem !important;
        letter-spacing: 3px !important;
    }

    .slogan {
        font-size: 0.8rem !important;
        padding: 6px 14px !important;
    }

    .branch-text {
        font-size: 1rem !important;
    }

    .establishment {
        font-size: 0.85rem !important;
    }

    .logo-container {
        padding: 20px 15px !important;
        border-radius: 28px !important;
    }
}