/* صفحة تواصل معنا.

   العناصر هي التي كانت في الصفحة أصلاً — خمسة حقول، وكرت بيانات
   المقر الرئيسي، و«تابعنا على»، وبطاقات المقارّ — ولم يُضف شيء.
   وإنما نُقل إليها تنسيق الكود الموحّد لهيئة الحكومة الرقمية من
   النموذج الذي أرسله المستخدم:

       الشريط    خلفية #f7fdf9، حشو 40px 0 56px، ويرتفع فيه الكرت
                 عند جهة النهاية (اليسار في RTL)
       الحقل     ارتفاع 48px، زوايا 8px، خلفية #f9fafb، حدّ #e5e7eb
       التسمية   14px/600 فوق الحقل، والنجمة حمراء
       القائمة   سهمها مرسوم بالـCSS لا من النظام
       الزر      ارتفاع 48px، زوايا 6px، أخضر المشروع

   ألوان المشروع مستعملة بدل رمادي النموذج. */

.contact-page {
    padding: 0 0 64px;
}

/* ===== الشريط العلوي ===== */
.contact-hero {
    position: relative;
    background: #f7fdf9;
    padding: 40px 0 56px;
    box-shadow: 0 0 0 100vmax #f7fdf9;
    clip-path: inset(0 -100vmax);
}

.contact-hero__crumb {
    margin-bottom: 16px;
    font-size: .875rem;
    line-height: 1.5;
    color: #4b5563;
}

.contact-hero__crumb a,
.contact-hero__crumb a:link,
.contact-hero__crumb a:visited {
    color: #161616;
    text-decoration: none;
}

.contact-hero__crumb a:hover {
    text-decoration: underline;
}

.contact-hero__crumb .sep {
    margin: 0 8px;
    color: #9da4ae;
}

.contact-title {
    margin: 0 0 12px;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #161616;
}

/* UDesign يورّث text-align: justify فيتباعد الكلام في العربية */
.contact-lead {
    margin: 0;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.9;
    color: #384250;
    text-align: start;
}

/* ===== التخطيط: النموذج ثم الكرت ===== */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start;
}

/* الكرت يرتفع داخل الشريط كما في النموذج */
@media (min-width: 992px) {
    .contact-card {
        margin-top: -210px;
        position: relative;
        z-index: 2;
    }
}

/* ===== النموذج ===== */
.contact-form {
    padding-top: 32px;
}

.contact-form__rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.contact-field--full {
    grid-column: 1 / -1;
}

.contact-field label {
    display: block;
    margin-bottom: 8px;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1f2a37;
}

/* النجمة حمراء كما في النموذج، ومخفية عن قارئ الشاشة لأن
   aria-required على الحقل يبلّغ الإلزام أصلاً */
.contact-field .req {
    color: #d92d20;
    margin-inline-start: 4px;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2a37;
}

.contact-field textarea {
    height: 120px;
    min-height: 120px;
    padding: 12px 16px;
    resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #9da4ae;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: 2px solid #1b8354;
    outline-offset: 1px;
    border-color: #1b8354;
    background: #fff;
}

/* سهم القائمة: نرسمه بأنفسنا فمظهر النظام يختلف بين المتصفّحات،
   ونضعه عند جهة النهاية */
.contact-field select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c737f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 18px 18px;
    padding-inline-end: 44px;
}

.contact-field__error {
    margin: 6px 0 0;
    font-size: .8125rem;
    line-height: 1.6;
    color: #d92d20;
}

.contact-form__actions {
    margin-top: 28px;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 6px;
    background: #1b8354;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.contact-submit:hover {
    background: #166a45;
}

/* ===== كرت بيانات الاتصال ===== */
.contact-card {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 14px 0 rgba(0, 0, 0, .04);
}

.contact-card__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.contact-card__list > li:last-child .contact-row {
    margin-bottom: 0;
}

.contact-row__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: #1b8354;
}

.contact-row__icon svg {
    width: 20px;
    height: 20px;
}

.contact-row__body {
    flex: 1 1 auto;
    min-width: 0;
}

.contact-row__label {
    margin: 0 0 4px;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1f2a37;
}

.contact-row__value {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.7;
    color: #384250;
    text-align: start;
}

.contact-row__value a,
.contact-row__value a:link,
.contact-row__value a:visited {
    color: #1b8354;
    text-decoration: none;
}

.contact-row__value a:hover {
    text-decoration: underline;
}

/* ===== تابعنا على ===== */
.contact-follow {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.contact-follow__label {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #161616;
}

.contact-follow__icons {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-follow__icons a,
.contact-follow__icons a:link,
.contact-follow__icons a:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #1f2a37;
    text-decoration: none;
}

.contact-follow__icons a:hover {
    color: #1b8354;
}

.contact-follow__icons svg {
    width: 20px;
    height: 20px;
}

/* ===== مقارّ الهيئة ===== */
.contact-branches {
    /* UDesign يضع padding: 40px 0 على كل section فنصفّره */
    padding: 0;
    margin-top: 56px;
}

.contact-branches__title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: #161616;
}

.contact-branches__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.branch-card {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.branch-card__title {
    margin: 0 0 20px;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.6;
    color: #1f2a37;
}

.branch-card__map,
.branch-card__map:link,
.branch-card__map:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #d2d6db;
    border-radius: 6px;
    background: #fff;
    color: #1f2a37;
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
}

.branch-card__map:hover {
    border-color: #1b8354;
    color: #1b8354;
}

.branch-card__map svg {
    width: 18px;
    height: 18px;
}

/* ===== الشاشات الأصغر ===== */
@media (max-width: 991.98px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-hero {
        padding: 32px 0;
    }

    .contact-branches__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .contact-form__rows {
        grid-template-columns: 1fr;
    }

    .contact-title {
        font-size: 1.375rem;
    }

    .contact-branches__title {
        font-size: 1.25rem;
    }
}
