/* ══ صفحات الاستعلام المركّزة — تصميم v4 ══ */

html.gf-focused-page body.natiga-portal {
    background: #f4f7fb;
}

.gfx-page {
    position: relative;
    padding: clamp(12px, 2.5vw, 28px) 0 clamp(36px, 5vw, 56px);
    min-height: calc(100vh - var(--np-header-h, 60px) - 24px);
    color: var(--np-text, #0f172a);
}

.gfx-page__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -5%, color-mix(in srgb, var(--gfx-accent, #1a6fb5) 18%, transparent), transparent 62%),
        linear-gradient(180deg, #eef2f7 0%, #f8fafc 28%, #fff 100%);
}

.gfx-page__inner {
    position: relative;
    z-index: 1;
    max-width: min(820px, 100%);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gfx-page--result .gfx-page__inner {
    max-width: min(960px, 100%);
}

/* ── Hero ── */
.gfx-hero {
    text-align: center;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--gfx-accent, #1a6fb5) 14%, var(--np-border, #e2e8f0));
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--gfx-accent, #1a6fb5) 6%, #fff) 0%, #fff 55%),
        #fff;
    box-shadow: 0 10px 36px color-mix(in srgb, var(--gfx-accent, #1a6fb5) 8%, transparent);
}

.gfx-hero--compact {
    padding: 16px 18px;
    text-align: right;
}

.gfx-hero--compact .gfx-hero__top {
    flex-direction: row;
    text-align: right;
}

.gfx-hero--compact .gfx-hero__chips,
.gfx-hero--compact .gfx-hero__links {
    justify-content: flex-start;
}

.gfx-hero__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.gfx-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--gfx-accent, #1a6fb5) 20%, transparent);
}

.gfx-hero__icon--fa {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, color-mix(in srgb, var(--gfx-accent, #1a6fb5) 18%, #fff), #fff);
    color: var(--gfx-accent, #1a6fb5);
    font-size: 1.35rem;
}

.gfx-hero__titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.gfx-hero--compact .gfx-hero__titles {
    align-items: flex-start;
}

.gfx-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--gfx-accent, #1a6fb5);
    background: color-mix(in srgb, var(--gfx-accent, #1a6fb5) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--gfx-accent, #1a6fb5) 22%, transparent);
}

.gfx-hero__title {
    margin: 0;
    font-size: clamp(1.15rem, 3.6vw, 1.75rem);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--np-text, #0f172a);
}

.gfx-hero__lead {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--np-muted, #64748b);
    max-width: 560px;
}

.gfx-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.gfx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
    color: var(--np-muted, #64748b);
    background: var(--np-surface-2, #f1f5f9);
    border: 1px solid var(--np-border, #e2e8f0);
}

.gfx-chip--live {
    color: #047857;
    background: color-mix(in srgb, #10b981 12%, #fff);
    border-color: color-mix(in srgb, #10b981 28%, transparent);
}

.gfx-chip--soon {
    color: #b45309;
    background: color-mix(in srgb, #f59e0b 12%, #fff);
    border-color: color-mix(in srgb, #f59e0b 28%, transparent);
}

.gfx-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.gfx-classic-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--gfx-accent, #1a6fb5);
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--gfx-accent, #1a6fb5) 22%, var(--np-border, #e2e8f0));
    transition: border-color .15s ease, box-shadow .15s ease;
}

.gfx-classic-link:hover {
    text-decoration: none;
    border-color: var(--gfx-accent, #1a6fb5);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--gfx-accent, #1a6fb5) 12%, transparent);
}

.gfx-classic-link code {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--np-surface-2, #f1f5f9);
    color: var(--np-text, #334155);
}

.gfx-classic-link--muted {
    color: var(--np-muted, #64748b);
    border-color: var(--np-border, #e2e8f0);
}

/* ── نتيجة ── */
.gfx-result-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid color-mix(in srgb, #10b981 30%, #bbf7d0);
}

.gfx-result-bar__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}

.gfx-result-bar__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 800;
    color: #047857;
}

.gfx-result-bar__q {
    font-size: .8rem;
    color: var(--np-muted, #64748b);
}

.gfx-result-bar__q em {
    font-style: normal;
    font-weight: 800;
    color: var(--np-text, #0f172a);
}

.gfx-result-bar__new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    background: var(--gfx-accent, #1a6fb5);
}

.gfx-result-bar__new:hover {
    text-decoration: none;
    filter: brightness(1.05);
}

/* ── مربع البحث ── */
.gfx-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gfx-search-card {
    padding: clamp(16px, 3vw, 22px);
    border-radius: 22px;
    border: 1px solid var(--np-border, #e2e8f0);
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}

.gfx-search-card--closed {
    text-align: center;
}

.gfx-search-card__head {
    text-align: center;
    margin-bottom: 14px;
}

.gfx-search-card__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--np-text, #0f172a);
}

.gfx-search-card__title i {
    color: var(--gfx-accent, #1a6fb5);
    margin-inline-end: 6px;
}

.gfx-search-card__hint {
    margin: 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--np-muted, #64748b);
}

.gfx-search-card__form {
    margin-top: 8px;
}

.gfx-search-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--np-border, #e2e8f0);
    font-size: .72rem;
    font-weight: 700;
    color: var(--np-muted, #64748b);
}

.gfx-search-card__slug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gfx-search-card__classic {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gfx-accent, #1a6fb5);
    text-decoration: none;
    font-weight: 800;
}

.gfx-search-card__classic:hover {
    text-decoration: underline;
}

.gfx-search-drawer {
    border: 0;
}

.gfx-search-drawer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: var(--np-surface-2, #f1f5f9);
    border: 1px solid var(--np-border, #e2e8f0);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.gfx-search-drawer__bar::-webkit-details-marker {
    display: none;
}

.gfx-search-drawer[open] .gfx-search-drawer__bar i.fa-chevron-down {
    transform: rotate(180deg);
}

.gfx-result-panel {
    animation: gfx-fade-in .35s ease;
}

@keyframes gfx-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ── روابط ذات صلة ── */
.gfx-siblings {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--np-border, #e2e8f0);
    background: var(--np-surface-2, #f8fafc);
}

.gfx-siblings__title {
    margin: 0 0 12px;
    font-size: .92rem;
    font-weight: 900;
    text-align: center;
    color: var(--np-text, #0f172a);
}

.gfx-siblings__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.gfx-siblings__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--np-text, #334155);
    background: #fff;
    border: 1px solid var(--np-border, #e2e8f0);
    transition: border-color .15s ease, color .15s ease;
}

.gfx-siblings__link:hover {
    text-decoration: none;
    color: var(--gfx-accent, #1a6fb5);
    border-color: color-mix(in srgb, var(--gfx-accent, #1a6fb5) 35%, var(--np-border, #e2e8f0));
}

/* ── قائمة كل المحافظات ── */
.gfx-gov-all {
    margin-top: 20px;
    padding: 18px 16px 20px;
    border-radius: 22px;
    border: 1px solid var(--np-border, #e2e8f0);
    background: linear-gradient(180deg, #fff 0%, var(--np-surface-2, #f8fafc) 100%);
}

.gfx-gov-all__head {
    text-align: center;
    margin-bottom: 14px;
}

.gfx-gov-all__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--gfx-accent, #1a6fb5);
    background: color-mix(in srgb, var(--gfx-accent, #1a6fb5) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--gfx-accent, #1a6fb5) 22%, transparent);
}

.gfx-gov-all__title {
    margin: 10px 0 4px;
    font-size: clamp(.95rem, 2.5vw, 1.08rem);
    font-weight: 900;
    color: var(--np-text, #0f172a);
}

.gfx-gov-all__sub {
    margin: 0;
    font-size: .78rem;
    font-weight: 700;
    color: #16a34a;
}

.gfx-gov-all__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.gfx-gov-all__row {
    margin: 0;
}

.gfx-gov-all__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid var(--np-border, #e2e8f0);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

a.gfx-gov-all__item:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 8%, transparent);
}

.gfx-gov-all__item--live {
    border-color: color-mix(in srgb, #16a34a 28%, var(--np-border, #e2e8f0));
    background: linear-gradient(135deg, color-mix(in srgb, #16a34a 4%, #fff), #fff);
}

.gfx-gov-all__item--live .gfx-gov-all__tick {
    color: #16a34a;
    background: color-mix(in srgb, #16a34a 12%, #fff);
}

a.gfx-gov-all__item--live:hover {
    border-color: color-mix(in srgb, #16a34a 45%, var(--np-border, #e2e8f0));
}

.gfx-gov-all__item--soon .gfx-gov-all__tick {
    color: #94a3b8;
    background: var(--np-surface-2, #f1f5f9);
}

.gfx-gov-all__item--current {
    border-color: color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 40%, var(--np-border, #e2e8f0));
    background: linear-gradient(135deg, color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 8%, #fff), #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 12%, transparent);
}

.gfx-gov-all__tick {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: .95rem;
}

.gfx-gov-all__label {
    flex: 1;
    min-width: 0;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: right;
    color: var(--np-text, #0f172a);
}

.gfx-gov-all__go {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: .72rem;
    color: var(--gfx-gov-accent, #1a6fb5);
    background: color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 10%, #fff);
    opacity: .85;
}

.gfx-gov-all__here {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    color: var(--gfx-gov-accent, #1a6fb5);
    background: color-mix(in srgb, var(--gfx-gov-accent, #1a6fb5) 12%, #fff);
}

.gfx-page--result .gfx-gov-all {
    margin-top: 16px;
}

@media (min-width: 720px) {
    .gfx-gov-all__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── FAQ ── */
.gfx-faq {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--np-border, #e2e8f0);
    background: #fff;
}

.gfx-faq__title {
    margin: 0 0 12px;
    font-size: .95rem;
    font-weight: 900;
    text-align: center;
}

.gfx-faq__item {
    border: 1px solid var(--np-border, #e2e8f0);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--np-surface-2, #f8fafc);
}

.gfx-faq__item summary {
    padding: 12px 14px;
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.gfx-faq__item summary::-webkit-details-marker {
    display: none;
}

.gfx-faq__item p {
    margin: 0;
    padding: 0 14px 12px;
    font-size: .8rem;
    line-height: 1.65;
    color: var(--np-muted, #64748b);
}

/* تكييف مكوّنات البحث داخل الصفحة */
.gfx-page .np-gov-status-ribbon {
    margin-bottom: 0;
}

.gfx-page .np-nezakr-search {
    margin: 0;
}

@media (max-width: 640px) {
    .gfx-hero__links {
        flex-direction: column;
        align-items: stretch;
    }
    .gfx-classic-link {
        justify-content: center;
    }
    .gfx-search-card__foot {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
