/* =========================================
   تنسيقات صفحة اتصل بنا
========================================= */

.contact-page {
    padding: 40px 0 60px;
}

/* العنوان */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 34px;
    font-weight: 900;
    border-bottom: 5px solid #7dd3fc;
    display: inline-block;
    padding-bottom: 5px;
}

/* الشبكة الرئيسية */
.contact-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 35px;
    align-items: flex-start; /* مهم */
}

/* الفورم */
.contact-form-wrapper {
    background: #fff;
    border: 3px solid #259bea;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(37, 155, 234, 0.1);
    height: fit-content; /* مهم */
}

.contact-form-wrapper h3 {
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Cairo', sans-serif;
}

.btn-send {
    width: 100%;
    background: #259bea;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 800;
    border: none;
    cursor: pointer;
}

/* العمود الأيسر */
.contact-sidebar {
    display: flex;
    flex-direction: column;
}

/* معلومات الاتصال */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #eee;
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ✅ الصورة (التعديل الحقيقي هنا) */
.contact-image-container {
    width: 100%;
    max-height: 260px;          /* الكادر */
    border-radius: 15px;
    overflow: hidden;           /* يمنع الخروج */
    border: 1px solid #eee;
    transition: all 0.4s ease;
    background: #f5f5f5;        /* في حال الصورة صغيرة */
}

.contact-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* يضبط تلقائياً مهما كان المقاس */
    object-position: center;    /* يوسّط الصورة */
    display: block;
    transition: transform 0.5s ease;
}

/* Hover effect للصورة */
.contact-image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(37, 155, 234, 0.3);
}

.contact-image-container:hover img {
    transform: scale(1.05);
}

/* Hover effect لبطاقات المعلومات */
.info-card {
    transition: all 0.35s ease;
    backdrop-filter: blur(0px);
}

.info-card:hover {
    /* أضفنا خلفية بيضاء شفافة جداً للسماح للضبابية بالظهور */
    background: rgba(255, 255, 255, 0.6); 
    border-color: #259bea;
    transform: translateY(-5px);
    /* زيادة قوة الظل ليعطي إيحاء بأن البطاقة ارتفعت فعلياً */
    box-shadow: 0 15px 35px rgba(37, 155, 234, 0.2);
    /* تفعيل التأثير الزجاجي */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* لضمان العمل على متصفح Safari */
}

/* اتجاه الكتابة داخل الفورم */
.contact-form input,
.contact-form textarea {
    direction: rtl;
    text-align: right;
}

/* placeholder */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    direction: rtl;
    text-align: right;
}

/* لون أيقونات الاتصال */
.contact-info .icon-box i {
    color: #259bea;
}

/* =========================================
   وضع الهاتف – تحسين التجربة فقط
========================================= */
@media (max-width: 768px) {

    /* الشبكة */
    .contact-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    /* الفورم */
    .contact-form-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 20px 16px;
        margin: 0;
        border-radius: 16px;
        box-sizing: border-box;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 15px;
        padding: 11px;
    }

    .btn-send {
        font-size: 16px;
        padding: 14px;
        border-radius: 10px;
    }

    /* إخفاء الصورة (كما كان) */
    .contact-image-container {
        display: none;
    }

    /* جهات الاتصال */
    .contact-sidebar {
        width: 100%;
    }

    .contact-info {
        gap: 14px;
        margin-bottom: 0;
    }

    .info-card {
        padding: 14px;
        gap: 10px;
        border-radius: 10px;
    }

    .info-text h3 {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .info-text p,
    .info-text a {
        font-size: 14px;
        line-height: 1.4;
    }

    .icon-box i {
        font-size: 16px;
    }
}

/* =========================================
   خريطة الجزائر SVG
   ========================================= */
#svg-map-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    padding: 10px;
}

#svg-map-container svg {
    display: block;
    margin: 0 auto;
}

#svg-map-container svg path {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#svg-map-container svg path:hover {
    filter: brightness(0.85);
}

/* Tooltip الخريطة */
.map-tooltip-box {
    display: none;
    position: absolute;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    pointer-events: none;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    white-space: nowrap;
    direction: rtl;
}

.map-tooltip-box strong {
    font-size: 15px;
    font-weight: 800;
    color: #38bdf8;
}

/* مفتاح الألوان */
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.heatmap-legend span {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.08);
}

/* ملخص الولايات */
.map-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.map-stat {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    transition: all 0.2s;
}

.map-stat:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    transform: translateY(-1px);
}

.map-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 4px;
}

.map-stat-label {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

/* أشرطة الولايات */
.map-wilaya-bar {
    margin-bottom: 14px;
}

.map-wilaya-bar:last-child {
    margin-bottom: 0;
}

.map-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.map-bar-name {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.map-bar-count {
    font-size: 13px;
    font-weight: 800;
    color: #259bea;
}

.map-bar-track {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.map-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

/* تجاوب الخريطة */
@media (max-width: 1100px) {
    .dashboard-row[style*="350px"] {
        grid-template-columns: 1fr !important;
    }
}
