@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Cairo', sans-serif; }

body {
    background-color: #f4f7fa;
    /* السماح بالتمرير (Scroll) */
    overflow-y: auto; 
    min-height: 100vh;
}

/* --- 1. الهيدر الثابت والبارز --- */
.main-header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100px;
    z-index: 1000; /* ليبقى فوق كل شيء */
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center center;
    border-bottom: 4px solid #f39c12; /* الخط البرتقالي البارز */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* ظل عميق للبروز */
}

/* --- 2. منطقة المحتوى (البودي المتحرك) --- */
.main-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* يبدأ من الأعلى */
    padding: 20px;
    position: relative;
    
    /* حيلة الثبات: إزاحة البودي لتبدأ بعد الهيدر وتنتهي قبل الفوتر */
    padding-top: 130px;    /* مساحة الهيدر (100) + فجوة (30) */
    padding-bottom: 120px; /* مساحة الفوتر لكي لا يغطي النتائج */
    
    background-image: url('Main Content.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* الخلفية تبقى ثابتة والنص يتحرك فوقها (Parallax) */
    min-height: 100vh;
}

/* طبقة تعتيم البودي */
.main-body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 40, 80, 0.55);
    z-index: 1;
}

/* بطاقة البحث الأنيقة */
.search-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    width: 95%;
    max-width: 420px;
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    text-align: center;
    border-top: 6px solid #004a99;
}

h1 { color: #004a99; font-size: 24px; margin-bottom: 8px; }
p { color: #555; font-size: 15px; margin-bottom: 25px; }

.input-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e7ee;
    border-radius: 12px;
    font-size: 17px;
    text-align: center;
    margin-bottom: 15px;
}

.search-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 19px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
}

.card-list-link {
    display: inline-block;
    color: #004a99;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #004a99;
    padding: 10px 20px;
    border-radius: 10px;
}

/* --- النتائج والتحميل --- */
.loader, .result-display, .error-text { display: none; }

.result-display {
    margin-top: 20px;
    padding: 18px;
    background: #f0f6ff;
    border-radius: 15px;
    text-align: right;
    border-right: 6px solid #004a99;
}

.res-item { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 16px; border-bottom: 1px solid #dce4ed; padding-bottom: 5px; }

.go-map-btn {
    display: block;
    margin-top: 10px;
    padding: 14px;
    background: #004a99;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
}

/* --- 3. الفوتر الثابت (Fixed Footer) --- */
.main-footer {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: #252a30;
    z-index: 1000;
    padding: 15px 10px;
    text-align: center;
    border-top: 3px solid #f39c12;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3); /* ظل للأعلى للبروز */
}

/* طلب تلوين النص بالأبيض وتكبيره h4 */
.main-footer p {
    color: #ffffff !important; 
    font-size: 1.0rem; /* يوازي h4 تقريباً */
    font-weight: bold;
    margin-bottom: 4px;
}

.loader { color: #ffffff; font-weight: bold; margin-top: 15px; position: relative; z-index: 10; }
.error-text { color: #ff4d4d; margin-top: 15px; font-weight: bold; position: relative; z-index: 10; }