/* صفحة الأسئلة الشائعة.
   المشترك (الهيدر/الناف/الفوتر) في css/site.css ويُحمَّل قبل هذا الملف،
   وأنماط التبويبات في css/GEOSA_Service_Details.css المُعاد استعماله.

   الأكورديون مقيس من صفحة الأسئلة الشائعة في الهيئة العامة للعقار
   بقراءة getComputedStyle في متصفح حقيقي:
       شريط علوي #f7fdf9 حشوته 40px، وh1 30px/700 بارتفاع سطر 38px
       ← أكورديون flush: بلا حدّ ولا نصف قطر، الزر 16px/600 بحشوة
         16px 20px وفاصل سفلي inset بلون #d2d6db، والمتن 16px/24px
         بلون #384250 وحشوة 16px 20px، والأيقونة 16×16 تدور 180°.
   والتبويبات الأربع لأن أسئلة الهيئة مصنّفة أصلاً إلى أربع فئات. */

.faq-page {
    padding: 0 0 72px;
}

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

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

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

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

.faq-hero__crumb .sep {
    margin: 0 8px;
    color: #6c737f;
}

.faq-hero__crumb .current {
    color: #4b5563;
}

.faq-title {
    margin: 0 0 8px;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.27;
    color: #161616;
}

.faq-lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2a37;
}

/* ===== حقل البحث =====
   الأيقونة موضوعة داخل الحقل بالتموضع لا بخلفية صورة، كي تتبع
   لون النصّ وتبقى حادّة على الشاشات عالية الكثافة. */
.faq-search {
    position: relative;
    max-width: 420px;
    margin: 0 0 24px;
}

.faq-search__icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #6c737f;
    pointer-events: none;
}

.faq-search__icon svg {
    width: 18px;
    height: 18px;
}

.faq-search input[type="search"] {
    width: 100%;
    height: 44px;
    padding-inline: 42px 14px;
    border: 1px solid #d2d6db;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    color: #161616;
}

.faq-search input[type="search"]::placeholder {
    color: #9da4ae;
}

.faq-search input[type="search"]:focus {
    outline: none;
    border-color: #1b8354;
    box-shadow: 0 0 0 3px rgba(27, 131, 84, .15);
}

/* ===== عدّاد الأسئلة داخل التبويب ===== */
.faq-count {
    margin: 0 0 16px;
    font-size: .875rem;
    color: #6c737f;
}

/* عدد النتائج على زرّ التبويب أثناء البحث — يظهر بالسمة data-hits
   التي يضعها السكربت، فيرى المستخدم أين تقع النتائج قبل أن ينقر */
.dga-tabs__btn[data-hits]::before {
    content: attr(data-hits);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-inline-end: 6px;
    padding: 0 6px;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #384250;
    font-size: .75rem;
    font-weight: 700;
}

.dga-tabs__btn[data-hits="0"]::before {
    opacity: .5;
}

.dga-tabs__btn[data-hits]:not([data-hits="0"])::before {
    background: #1b8354;
    color: #fff;
}

/* تنبيه: النتائج في موضوع آخر */
.faq-hint {
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #d7f0e2;
    border-radius: 8px;
    background: #f7fdf9;
    font-size: .9375rem;
    color: #1f2a37;
}

.faq-hint[hidden] {
    display: none;
}

/* ===== الأكورديون =====
   flush كما في المرجع: لا حدود ولا زوايا، والفصل بين البنود خطّ
   سفلي عبر box-shadow inset فلا يضاعف سماكته عند التجاور. */
.faq-acc {
    border-top: 1px solid #d2d6db;
}

.faq-acc__item {
    background: #fff;
}

.faq-acc__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: inset 0 -1px 0 0 #d2d6db;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #161616;
    text-align: start;
    cursor: pointer;
}

.faq-acc__q:hover {
    background: #f7fdf9;
}

/* مؤشّر لوحة المفاتيح فقط — لا يظهر عند النقر بالفأرة */
.faq-acc__q:focus {
    outline: none;
}

.faq-acc__q:focus-visible {
    outline: 2px solid #1b8354;
    outline-offset: -2px;
}

.faq-acc__text {
    flex: 1 1 auto;
}

/* سهم 16×16 يدور 180° عند الفتح، كما في المرجع */
.faq-acc__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #1b8354;
    transition: transform .2s ease;
}

.faq-acc__q[aria-expanded="true"] .faq-acc__icon {
    transform: rotate(180deg);
}

.faq-acc__panel {
    padding: 16px 20px;
    box-shadow: inset 0 -1px 0 0 #d2d6db;
    font-size: 1rem;
    line-height: 1.5;
    color: #384250;
}

.faq-acc__panel[hidden] {
    display: none;
}

.faq-acc__panel > p {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.9;
    color: #384250;
    text-align: start;
}

.faq-acc__panel > p:last-child {
    margin-bottom: 0;
}

.faq-acc__panel ul,
.faq-acc__panel ol {
    margin: 0 0 12px;
    padding-inline-start: 24px;
}

.faq-acc__panel ul {
    list-style: disc;
}

.faq-acc__panel ol {
    list-style: decimal;
}

.faq-acc__panel li {
    margin-bottom: 8px;
    line-height: 1.9;
    color: #384250;
}

.faq-acc__panel li::marker {
    color: #1b8354;
}

/* الغلاف يمرّر أفقياً على الشاشات الضيقة بدل أن يدفع الصفحة كلها */
.faq-acc__table {
    margin: 0 0 12px;
    overflow-x: auto;
}

.faq-acc__table table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: .9375rem;
}

.faq-acc__table th,
.faq-acc__table td {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    text-align: start;
    line-height: 1.7;
    color: #1f2a37;
    vertical-align: top;
}

/* الترويسة وحدها تُلوَّن. كانت القاعدة تشمل tr:first-child td أيضاً،
   فيتلوّن أول صفّ بيانات مثل الترويسة ويظهر صفّان بارزان. */
.faq-acc__table th {
    background: #f3fcf6;
    font-weight: 700;
    color: #0d121c;
}

/* تظليل الصفوف الزوجية يُسهّل تتبّع الصف في الجداول العريضة */
.faq-acc__table tbody tr:nth-child(even) td {
    background: #fafafa;
}

/* ===== الشاشات الأصغر ===== */
@media (max-width: 767.98px) {
    .faq-hero {
        padding: 24px 0;
        margin-bottom: 24px;
    }

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

    .faq-acc__q {
        padding: 14px 12px;
        font-size: .9375rem;
    }

    .faq-acc__panel {
        padding: 14px 12px;
    }
}
