/*
   قالب التعقيب الخليجي المتميز - ملف التنسيقات العربي الكامل (RTL & Premium Aesthetics)
   theme-rtl.css
   --------------------------------------------------------------------------
*/

/* 1. التنسيقات العامة والتخطيط (General & Layout Setup) */
.container {
    width: 100%;
    max-width: 1240px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* الأزرار الفاخرة (Premium Buttons) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -3px rgba(13, 148, 136, 0.35);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-bg-white);
    box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -3px rgba(245, 158, 11, 0.35);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.text-center {
    text-align: center;
}

/* 2. ترويسة الموقع (Header Styles) */
.top-bar {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-contact i {
    color: var(--color-accent-light);
}

.top-bar-contact .divider {
    color: rgba(255, 255, 255, 0.15);
}

.top-bar-socials {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-socials a:hover {
    color: var(--color-accent-light);
}

/* محدد لغة القالب - جماليات زجاجية حديثة */
.lang-switcher-container {
    position: relative;
    display: inline-block;
}

.lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: var(--color-bg-white, #ffffff) !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 8px 0;
    margin-top: 8px;
    min-width: 150px;
    max-height: 320px !important;
    overflow-y: auto !important;
    list-style: none;
    z-index: 10000;
}

.lang-dropdown-menu.show {
    display: block !important;
}

.lang-item-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 18px !important;
    color: var(--color-text-dark) !important;
    font-weight: 600;
    font-size: 0.88rem !important;
    text-decoration: none;
    transition: var(--transition-fast) !important;
}

.lang-item-link:hover {
    background: rgba(15, 118, 110, 0.08) !important;
    color: var(--color-primary) !important;
}

.lang-item-link.active {
    background: var(--color-primary) !important;
    color: var(--color-bg-white) !important;
}

/* ضبط الاتجاهات للغات LTR */
html[dir="ltr"] {
    direction: ltr !important;
}

html[dir="ltr"] body {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] .lang-dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

html[dir="ltr"] .logo-wrapper {
    flex-direction: row !important;
}

html[dir="ltr"] .top-bar-contact {
    gap: 15px !important;
}

.main-header {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    transition: var(--transition-fast);
}

.main-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* شعار الموقع (Branding) */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--color-primary);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(13, 148, 136, 0.05));
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 118, 110, 0.15);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1.1;
}

.logo-accent {
    color: var(--color-primary);
}

.logo-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.2px;
}

/* الروابط وقائمة التنقل */
.nav-menu-flex {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-menu-flex a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-secondary-light);
    position: relative;
    padding: 8px 0;
}

.nav-menu-flex a:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.nav-menu-flex a:hover, .nav-menu-flex a.active {
    color: var(--color-primary);
}

.nav-menu-flex a:hover:after, .nav-menu-flex a.active:after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* زر قائمة الجوال */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

/* 3. قائمة الجوال الجانبية (Mobile Drawer Nav) */
.mobile-navigation-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background-color: var(--color-bg-white);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.mobile-navigation-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-dark);
}

.drawer-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-list a {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-secondary);
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.mobile-nav-list a:hover {
    color: var(--color-primary);
    padding-right: 5px;
}

.drawer-actions {
    margin-top: 40px;
}

/* 4. قسم البطل والتصفية (Hero & Search Section) */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(15, 118, 110, 0.08) 0%, rgba(15, 23, 42, 0.03) 90%), var(--color-bg-white);
    padding: 80px 0 100px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(15, 118, 110, 0.08);
    color: var(--color-primary-dark);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-tagline i {
    color: var(--color-accent);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.hero-title span {
    background: linear-gradient(to left, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 35px;
}

/* صندوق البحث الذكي البطل */
.hero-search-wrapper {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-xl);
    display: flex;
    gap: 10px;
    border: 1px solid var(--color-border);
    max-width: 600px;
}

.hero-search-wrapper input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    padding: 10px 15px;
    color: var(--color-text-dark);
}

.hero-search-wrapper input::placeholder {
    color: var(--color-text-light);
}

.hero-search-wrapper .search-btn {
    background-color: var(--color-secondary);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: var(--transition-fast);
}

.hero-search-wrapper .search-btn:hover {
    background-color: var(--color-primary);
}

/* فلتر الدول الخليجية التفاعلي */
.country-filter-container {
    margin-top: 40px;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.country-tag {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-tag:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.country-tag.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
}

.country-tag i {
    font-size: 1.1rem;
}

/* بطاقة الهيرو اليمنى المميزة (Glassmorphism & Interactive Badge) */
.hero-visual-card {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary));
    border-radius: var(--radius-lg);
    padding: 40px;
    color: #fff;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge {
    position: absolute;
    top: -20px;
    left: -20px;
    background-color: var(--color-accent);
    color: #fff;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-accent);
    font-weight: 800;
    text-align: center;
    transform: rotate(-5deg);
}

.hero-badge .number {
    font-size: 1.8rem;
    display: block;
    line-height: 1;
}

.hero-badge .label {
    font-size: 0.72rem;
    text-transform: uppercase;
}

.hero-visual-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.hero-features-list li i {
    color: var(--color-accent-light);
    font-size: 1.2rem;
}

/* ==========================================================================
   5. البوابة التفاعلية الذكية الفائقة (Unified Smart Portal)
   ========================================================================== */
.section-smart-portal {
    padding: 90px 0;
    background-color: var(--color-bg-base);
    border-bottom: 1px solid var(--color-border);
}

.portal-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.portal-tab-btn {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 15px 25px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.portal-tab-btn i {
    margin-left: 8px;
    color: var(--color-primary-light);
    transition: var(--transition-fast);
}

.portal-tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.portal-tab-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
}

.portal-tab-btn.active i {
    color: var(--color-accent-light);
}

.portal-tab-content {
    display: none;
    animation: fadeInTab 0.5s ease-out forwards;
}

.portal-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تخطيطات الأدوات المتعددة */
.contract-generator-layout, .nitaqat-simulator-layout, .alerts-subscription-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contract-inputs, .sim-inputs {
    padding: 40px;
}

.contract-preview, .sim-results {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary));
    padding: 40px;
    color: #fff;
}

/* تنسيقات معاينة العقد المبدئي */
.contract-preview-header, .sim-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.contract-preview-header h3, .sim-results-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
}

.contract-preview-body p.empty-msg, .sim-advice-box p.empty-msg {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* تنسيقات محاكي نطاقات */
.sim-metrics-box {
    margin-bottom: 30px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
}

.metric-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent-light);
}

.nitaqat-progress-wrapper {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
}

.nitaqat-progress-bar-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
}

.nitaqat-progress-bar {
    height: 100%;
    background-color: var(--color-accent);
    transition: width 0.8s ease, background-color 0.8s ease;
}

.nitaqat-band-info {
    font-weight: 800;
    font-size: 1.2rem;
}

.sim-advice-box {
    background: #fff;
    color: #333;
    padding: 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* مدقق الملفات (Checklist Tracker) */
.checklist-tracker-layout {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.chk-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.chk-select-service-wrapper {
    flex-grow: 1;
    margin-left: 40px;
}

.chk-progress-radial-wrapper {
    text-align: center;
    width: 120px;
}

.radial-progress-bar {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 10px;
}

.radial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radial-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 8;
}

.radial-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.radial-percent-txt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--color-secondary);
}

.radial-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.interactive-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chk-item {
    padding: 15px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    transition: var(--transition-fast);
    background-color: var(--color-bg-base);
}

.chk-item:hover {
    border-color: var(--color-primary-light);
    background-color: var(--color-bg-white);
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: var(--color-border);
    border-radius: 4px;
    margin-left: 15px;
    position: relative;
    transition: var(--transition-fast);
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--color-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox input:checked ~ .chk-text {
    text-decoration: line-through;
    color: var(--color-text-light);
}

/* شبكة الأخبار والتحديثات (Updates Grid) */
.updates-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.update-news-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.update-news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.update-news-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.update-news-card .badge {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.update-news-card .badge.ksa { background: #2ecc71; }
.update-news-card .badge.uae { background: #e67e22; }
.update-news-card .badge.kuwait { background: #3498db; }

.update-news-card .date {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.update-news-card .card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.update-news-card .card-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 25px;
}

/* الاشتراك بالتنبيهات (Email Alerts) */
.alerts-visual-info {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary));
    padding: 50px 40px;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.alert-bell-glow {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--color-accent-light);
    margin-bottom: 25px;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

.alerts-visual-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.alerts-visual-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.alerts-form-container {
    padding: 50px 40px;
}

/* نوافذ المودال الزجاجية */
.portal-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.portal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.portal-modal-card {
    background: var(--color-bg-white);
    width: 90%;
    max-width: 650px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: translateY(30px) scale(0.95);
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid var(--color-border);
}

.portal-modal-overlay.active .portal-modal-card {
    transform: translateY(0) scale(1);
}

.portal-modal-close {
    position: absolute;
    top: 15px; left: 15px; /* RTL left is equivalent to LTR right conceptually, but here we place it on the left top corner */
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
}

.portal-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--color-border);
}

.portal-modal-header h3 {
    margin: 0;
    color: var(--color-secondary);
    font-size: 1.4rem;
    font-weight: 800;
}

.portal-modal-body {
    padding: 30px;
    color: var(--color-text-dark);
}

.portal-modal-footer {
    padding: 20px 30px;
    background: var(--color-bg-base);
    border-top: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

@media (max-width: 991px) {
    .contract-generator-layout, .nitaqat-simulator-layout, .alerts-subscription-layout {
        grid-template-columns: 1fr;
    }
    .chk-header-section {
        flex-direction: column-reverse;
        gap: 20px;
    }
    .chk-select-service-wrapper {
        margin-left: 0;
        width: 100%;
    }
}


.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-label {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin: 0 0 15px 0;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.calculator-card-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.calculator-inputs {
    padding: 40px;
}

.calculator-results {
    background-color: var(--color-secondary);
    color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.calculator-results:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, rgba(15, 118, 110, 0.15));
    pointer-events: none;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--color-secondary-light);
    margin-bottom: 10px;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    background-color: var(--color-bg-base);
    color: var(--color-text-dark);
    outline: none;
    transition: var(--transition-fast);
}

.form-group select:focus, .form-group input:focus {
    border-color: var(--color-primary);
    background-color: var(--color-bg-white);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.calc-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* لوحة نتائج الحاسبة */
.calc-results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--color-accent-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-results-header p {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

.fees-breakdown {
    margin: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--color-text-light);
}

.fee-row.total-row {
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.fee-row span.val {
    font-weight: 700;
    color: #fff;
}

.total-row span.val {
    color: var(--color-accent-light);
    font-size: 1.6rem;
}

.calc-meta-details {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 15px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 25px;
}

.calc-meta-details div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calc-meta-details div:last-child {
    margin-bottom: 0;
}

.calc-meta-details span.label-detail {
    color: var(--color-text-muted);
}

.calc-meta-details span.val-detail {
    font-weight: 600;
}

/* 6. شبكة الخدمات الفاخرة (Featured Services Grid) */
.section-services {
    padding: 95px 0;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
}

.services-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--color-bg-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background-color: var(--color-bg-white);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.service-card:hover:before {
    opacity: 1;
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.service-platform-badge {
    background-color: rgba(15, 118, 110, 0.08);
    color: var(--color-primary-dark);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.service-country-badge {
    background-color: rgba(15, 23, 42, 0.05);
    color: var(--color-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
}

.service-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.service-card-title a:hover {
    color: var(--color-primary);
}

.service-card-desc {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.service-card-meta {
    border-top: 1px solid var(--color-border);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.service-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.service-meta-label {
    color: var(--color-text-light);
    font-size: 0.76rem;
}

.service-meta-val {
    font-weight: 700;
    color: var(--color-secondary-light);
}

.service-meta-val.price {
    color: var(--color-primary);
}

.service-card-action {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.service-card-action .btn {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 0.88rem;
}

/* 7. أدلة المنصات والشروحات (Government Guides & Blog) */
.section-guides {
    padding: 95px 0;
    background-color: var(--color-bg-base);
    border-bottom: 1px solid var(--color-border);
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.guide-post-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.guide-post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.guide-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.guide-post-card:hover .guide-thumbnail-wrapper img {
    transform: scale(1.05);
}

.guide-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.guide-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--color-primary);
    color: #fff;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.guide-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.guide-meta-top {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.guide-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.guide-title a:hover {
    color: var(--color-primary);
}

.guide-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.guide-readmore {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guide-readmore:hover {
    color: var(--color-primary-light);
}

/* 8. تذييل الموقع (Mega Footer Styles) */
.site-footer {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-logo .logo-icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent-light);
}

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.footer-logo .logo-accent {
    color: var(--color-accent-light);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 25px 0;
    color: var(--color-text-light);
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-badge i {
    color: var(--color-accent-light);
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 25px 0;
    position: relative;
    padding-bottom: 10px;
}

.footer-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: var(--radius-full);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.92rem;
    color: var(--color-text-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.footer-links a i {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-light);
}

.footer-links a:hover i {
    color: var(--color-accent-light);
    transform: translateX(-3px);
}

.footer-contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-info li {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

.footer-contact-info li i {
    font-size: 1.1rem;
    color: var(--color-accent-light);
    margin-top: 3px;
}

.footer-contact-info li a:hover {
    color: var(--color-accent-light);
}

.footer-bottom {
    background-color: #0B1120;
    padding: 25px 0;
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
}

.copyright-text {
    margin: 0;
}

.footer-payment-icons {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   9. الميزات الماسية VIP (Dark Mode, Knowledge Bot, Animated Timeline)
   ========================================================================== */

/* --- 9.1 الوضع الداكن الذكي (Dark Mode) --- */
html[data-theme="dark"] {
    --color-bg-base: #0f172a;
    --color-bg-white: #1e293b;
    --color-text-dark: #f8fafc;
    --color-text-muted: #cbd5e1;
    --color-text-light: #94a3b8;
    --color-border: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] body {
    background-color: var(--color-bg-base);
}

html[data-theme="dark"] .portal-tab-btn,
html[data-theme="dark"] .update-news-card,
html[data-theme="dark"] .chk-item,
html[data-theme="dark"] .checklist-tracker-layout,
html[data-theme="dark"] .contract-generator-layout, 
html[data-theme="dark"] .nitaqat-simulator-layout, 
html[data-theme="dark"] .alerts-subscription-layout,
html[data-theme="dark"] .portal-modal-card {
    background-color: var(--color-bg-white);
    border-color: var(--color-border);
}

html[data-theme="dark"] .service-card,
html[data-theme="dark"] .service-info-card,
html[data-theme="dark"] .widget-action-box {
    background-color: var(--color-bg-white) !important;
    border-color: var(--color-border) !important;
}

html[data-theme="dark"] .accordion-header {
    background-color: var(--color-bg-white) !important;
}

html[data-theme="dark"] .accordion-item {
    background-color: var(--color-bg-base) !important;
}

/* --- 9.2 المساعد المعرفي العائم المطور (Premium Floating AI Assistant CSS) --- */
.knowledge-bot-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
}

/* زر الفتح المعقّم والدائري المطور */
.knowledge-bot-trigger {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-secondary, #115e59));
    color: #fff;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.45);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.knowledge-bot-trigger:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 15px 35px rgba(15, 118, 110, 0.55);
}

.knowledge-bot-trigger:active {
    transform: translateY(-2px) scale(0.98);
}

/* أيقونات زر الفتح التفاعلي */
.kb-trigger-icons {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-trigger-icons i {
    transition: all 0.3s ease;
}

/* نبض مضيء هولوجرامي */
.kb-pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-accent, #f59e0b));
    opacity: 0.4;
    z-index: -1;
    animation: kb-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes kb-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* تلميح صغير أنيق */
.kb-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    direction: rtl;
    border: 1px solid rgba(255,255,255,0.08);
}

.knowledge-bot-trigger:hover .kb-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* نافذة المحادثة الفاخرة ذات التأثير الزجاجي */
.knowledge-bot-window {
    position: absolute;
    bottom: 85px;
    left: 0;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 118, 110, 0.15);
    overflow: hidden;
    display: none;
    flex-direction: column;
    transform-origin: bottom left;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}

html[data-theme="dark"] .knowledge-bot-window {
    background: rgba(15, 23, 42, 0.93);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* رأس المحادثة الحديث */
.kb-header {
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-secondary, #115e59));
    padding: 16px 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.kb-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kb-avatar-wrapper {
    position: relative;
}

.kb-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.kb-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border: 2px solid #0f766e;
    border-radius: 50%;
}

.kb-title-details {
    display: flex;
    flex-direction: column;
}

.kb-name {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    direction: rtl;
}

.kb-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.kb-status-pulse {
    width: 6px;
    height: 6px;
    background-color: #34d399;
    border-radius: 50%;
    animation: kb-pulse-glow 1.5s infinite;
}

@keyframes kb-pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.kb-status-text {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.kb-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.kb-close-btn:hover {
    background: rgba(220, 38, 38, 0.8);
    transform: rotate(90deg);
}

/* جسم رسائل المحادثة التفاعلي */
.kb-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(248, 250, 252, 0.6);
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

html[data-theme="dark"] .kb-body {
    background: rgba(15, 23, 42, 0.5);
}

/* مظهر التمرير المخصص */
.kb-body::-webkit-scrollbar {
    width: 6px;
}
.kb-body::-webkit-scrollbar-track {
    background: transparent;
}
.kb-body::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.2);
    border-radius: 3px;
}
.kb-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 118, 110, 0.4);
}

/* بالونات الرسائل العصرية */
.kb-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    animation: kb-slide-in 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes kb-slide-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kb-msg-bot {
    background: #ffffff;
    color: #334155;
    border: 1px solid rgba(15, 118, 110, 0.08);
    border-bottom-right-radius: 4px;
    align-self: flex-start;
    direction: rtl;
}

html[data-theme="dark"] .kb-msg-bot {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.04);
}

.kb-msg-user {
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-secondary, #115e59));
    color: #fff;
    border-bottom-left-radius: 4px;
    align-self: flex-end;
    direction: rtl;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
}

/* خيارات المواضيع السريعة */
.kb-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
    width: 100%;
}

.kb-reply-btn {
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.25);
    color: var(--color-primary, #0f766e);
    padding: 10px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

html[data-theme="dark"] .kb-reply-btn {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
}

.kb-reply-btn i {
    font-size: 0.9rem;
    color: var(--color-accent, #f59e0b);
}

.kb-reply-btn:hover {
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-secondary, #115e59));
    color: #fff !important;
    border-color: transparent;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
}

.kb-reply-btn:hover i {
    color: #fff;
}

/* مدخلات الكتابة بالأسفل */
.kb-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(15, 118, 110, 0.1);
}

html[data-theme="dark"] .kb-input-area {
    background: #1e293b;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.kb-input-area input {
    flex: 1;
    border: 1px solid rgba(15, 118, 110, 0.15);
    background: #f8fafc;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.85rem;
    outline: none;
    direction: rtl;
    color: #334155;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

html[data-theme="dark"] .kb-input-area input {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.kb-input-area input:focus {
    border-color: var(--color-primary, #0f766e);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

html[data-theme="dark"] .kb-input-area input:focus {
    background: #0f172a;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

/* زر الإرسال التفاعلي */
.kb-input-area button {
    background: linear-gradient(135deg, var(--color-primary, #0f766e), var(--color-secondary, #115e59));
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    margin-right: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.2);
}

.kb-input-area button:hover {
    transform: scale(1.08) rotate(-15deg);
    background: linear-gradient(135deg, var(--color-secondary, #115e59), var(--color-primary, #0f766e));
}

.kb-input-area button:active {
    transform: scale(0.95);
}

.kb-input-area button i {
    transform: scaleX(-1); /* لتعديل اتجاه الطائرة الورقية للـ RTL */
}

/* تأثير الكتابة الآلية المتقدمة (Typing Indicator) */
.kb-typing-indicator {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.08);
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] .kb-typing-indicator {
    background: #1e293b;
    border-color: rgba(255,255,255,0.04);
}

.kb-typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary, #0f766e);
    border-radius: 50%;
    opacity: 0.4;
    animation: kb-typing-bounce 1.4s infinite ease-in-out both;
}

.kb-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.kb-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes kb-typing-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1.0); opacity: 1; }
}

/* كروت ذكية داخل المحادثة */
.kb-response-card {
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.15);
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

html[data-theme="dark"] .kb-response-card {
    background: #1e293b;
    border-color: rgba(255,255,255,0.08);
}

.kb-card-title {
    font-weight: 700;
    color: var(--color-primary, #0f766e);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-card-desc {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
}

html[data-theme="dark"] .kb-card-desc {
    color: #cbd5e1;
}

.kb-card-action {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

/* استجابة المساعد على الجوال */
@media screen and (max-width: 480px) {
    .knowledge-bot-wrapper {
        bottom: 20px;
        left: 20px;
    }
    
    .knowledge-bot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 75px;
    }
}


/* --- 9.3 مسار المعاملة المضيء (Animated Service Journey Timeline) --- */
.service-journey-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 25px;
}

.timeline-step {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 30px;
}

.timeline-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-step-num {
    width: 40px; height: 40px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
    z-index: 2;
}

.timeline-connector {
    width: 2px;
    height: calc(100% + 10px);
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    margin-top: 5px;
    border-radius: 2px;
}

.timeline-content-box {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: var(--radius-md);
    flex-grow: 1;
    box-shadow: var(--shadow-sm);
    margin-top: -5px;
}

.timeline-content-box h4 {
    margin: 0 0 10px 0;
    color: var(--color-secondary);
    font-size: 1.05rem;
}

.timeline-content-box p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 10. صفحة الخدمة المخصصة (Single Custom Post Page Components) */
.service-detail-header-section {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary-dark) 100%);
    padding: 60px 0;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-detail-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-detail-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 15px 0 10px;
}

.service-detail-badges {
    display: flex;
    gap: 12px;
}

.service-detail-badges span {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
}

.service-detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    padding: 70px 0;
}

.service-info-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.service-info-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin: 0 0 25px 0;
    border-right: 4px solid var(--color-primary);
    padding-right: 15px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--color-secondary-light);
}

.requirements-list li i {
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* الأكورديون للخطوات (Step-by-step Accordion) */
.steps-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-base);
    overflow: hidden;
}

.accordion-header {
    padding: 20px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-secondary);
    cursor: pointer;
    background-color: var(--color-bg-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background-color: var(--color-bg-base);
    color: var(--color-primary);
}

.accordion-header .step-num {
    background-color: var(--color-primary);
    color: #fff;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 10px;
}

.accordion-content {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    background-color: var(--color-bg-white);
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-header .toggle-icon {
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.accordion-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* الشريط الجانبي في صفحة المعاملة */
.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget-action-box {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.quick-stats-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-stats-list li {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.quick-stats-list li:last-child {
    border-bottom: none;
}

.quick-stats-list span.lbl {
    color: var(--color-text-muted);
}

.quick-stats-list span.val {
    font-weight: 700;
    color: var(--color-secondary-light);
}

.quick-stats-list span.val.price {
    color: var(--color-primary);
}

/* 11. التجاوب وتوافق الشاشات (Responsive Adaptations) */

@media (max-width: 1024px) {
    .services-grid-wrapper, .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 2.6rem;
    }
    
    .calculator-card-layout {
        grid-template-columns: 1fr;
    }
    
    .calculator-results:before {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        display: none;
    }
    
    .btn-header-cta {
        display: none;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .services-grid-wrapper, .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .service-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-detail-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .requirements-list {
        grid-template-columns: 1fr;
    }
    
    .top-bar-contact .divider, .top-bar-socials {
        display: none;
    }

    /* إصلاحات حصرية للجوال والـ Overlaps */
    .calculator-inputs, .calculator-results,
    .contract-inputs, .contract-preview,
    .sim-inputs, .sim-results,
    .checklist-tracker-layout,
    .alerts-form-container, .alerts-visual-info,
    .hero-visual-card {
        padding: 20px !important;
    }

    .hero-badge {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: rotate(0deg) !important;
        margin-bottom: 20px;
        display: inline-block;
    }

    .contract-generator-layout, .nitaqat-simulator-layout, .alerts-subscription-layout {
        grid-template-columns: 1fr !important;
    }

    .calc-row-two {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .chk-header-section {
        flex-direction: column-reverse;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .chk-select-service-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .radial-progress-bar {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .calc-row-two {
        grid-template-columns: 1fr;
    }
}

/* حركات الأنميشن */
@keyframes sonarPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   6. إضافات الوضع الداكن، الإكمال التلقائي، والطباعة الفاخرة
   -------------------------------------------------------------------------- */

/* تعديل حاوية البحث لدعم الموضع النسبي للاقتراحات */
.hero-search-wrapper {
    position: relative;
}

/* 1. متغيرات وتنسيقات الوضع الداكن الفخم (Premium Dark Mode) */
body.dark-theme {
    --color-bg-white: #0f172a;
    --color-bg-base: #0b0f19;
    --color-secondary: #1e293b;
    --color-secondary-light: #334155;
    --color-text-dark: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
}

body.dark-theme .logo-main {
    color: #fff;
}

body.dark-theme .service-card,
body.dark-theme .service-info-card,
body.dark-theme .widget-action-box,
body.dark-theme .calculator-card-layout,
body.dark-theme .accordion-header,
body.dark-theme .drawer-header,
body.dark-theme .mobile-navigation-drawer {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .service-card:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.25) !important;
}

body.dark-theme .accordion-item {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
}

body.dark-theme .requirements-list li {
    color: #f8fafc !important;
}

body.dark-theme .form-group select, 
body.dark-theme .form-group input,
body.dark-theme .hero-search-wrapper {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

body.dark-theme .theme-toggle-btn {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    color: var(--color-accent) !important;
}

/* 2. تنسيق قائمة الإكمال التلقائي الذكية (Autocomplete Suggestion Dropdown) */
.search-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    padding: 8px 0;
    display: none;
    text-align: right;
}

.search-autocomplete-results::-webkit-scrollbar {
    width: 6px;
}
.search-autocomplete-results::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 3px;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

body.dark-theme .search-autocomplete-item {
    border-bottom-color: rgba(255, 255, 255, 0.03);
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.focused {
    background-color: rgba(15, 118, 110, 0.08);
}

.search-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-item-icon {
    font-size: 1.1rem;
    color: var(--color-primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 118, 110, 0.1);
    border-radius: 50%;
}

.search-item-title {
    font-weight: 700;
    color: var(--color-text-dark);
    font-size: 0.95rem;
}

.search-item-platform {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    display: block;
}

.search-item-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-badge-country {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    background: var(--color-bg-base);
    color: var(--color-text-dark);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

/* 3. قواعد التصدير والطباعة كـ PDF متجاوز للعلامات المزعجة (@media print) */
@media print {
    /* إخفاء العناصر غير القابلة للطباعة */
    .top-bar,
    .main-header,
    .mobile-navigation-drawer,
    .btn-header-cta,
    #theme-toggle,
    .theme-toggle-btn,
    .site-footer,
    .btn-print-pdf,
    .knowledge-bot-wrapper,
    #btn-save-watchlist,
    a[href^="tel:"],
    .requirements-list li i.fa-regular,
    .widget-action-box .btn,
    .service-detail-header-section a.btn,
    aside.service-sidebar .widget-action-box:nth-child(2) {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* جعل التخطيط عمودياً بالكامل */
    .service-detail-grid {
        display: block !important;
    }
    
    .service-main-content,
    aside.service-sidebar {
        width: 100% !important;
        float: none !important;
    }
    
    /* تصميم ترويسة مطبوعة أنيقة بدلاً من خلفية بطل الجرافيكس */
    .service-detail-header-section {
        background: none !important;
        color: #000 !important;
        padding: 20px 0 !important;
        border-bottom: 2px double #000 !important;
        margin-bottom: 30px !important;
    }
    
    .service-detail-title {
        color: #000 !important;
        font-size: 24pt !important;
        margin: 10px 0 !important;
        text-shadow: none !important;
    }
    
    .service-detail-badges span {
        color: #000 !important;
        border: 1px solid #000 !important;
        background: none !important;
        padding: 2px 8px !important;
    }
    
    /* تنسيق الكروت لتفقد تأثيرات الزجاج وتظهر كفقرات رسمية متباعدة */
    .service-info-card,
    .widget-action-box {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 35px !important;
        page-break-inside: avoid;
    }
    
    .service-info-title,
    .widget-action-box h3 {
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 5px !important;
        font-size: 16pt !important;
    }
    
    /* تحويل قائمة الفحص لأشكال طباعة حقيقية */
    .requirements-list li {
        list-style-type: square !important;
        display: list-item !important;
        margin-right: 25px !important;
        padding: 0 !important;
        font-weight: normal !important;
        color: #000 !important;
    }
    
    /* عرض أكورديون الخطوات كخطوات مرقمة ومفتوحة بالكامل للطباعة */
    .steps-accordion {
        display: block !important;
    }
    
    .accordion-item {
        background: none !important;
        border: none !important;
        margin-bottom: 15px !important;
    }
    
    .accordion-header {
        background: none !important;
        padding: 0 !important;
        cursor: default !important;
    }
    
    .accordion-header .step-num {
        background: #000 !important;
        color: #fff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* تحويل الرسوم إلى قائمة مسردة غاية في التنسيق */
    .quick-stats-list {
        display: block !important;
        margin-bottom: 20px !important;
    }
    
    .quick-stats-list li {
        display: flex !important;
        justify-content: space-between !important;
        border-bottom: 1px solid #ddd !important;
        padding: 6px 0 !important;
    }
}
/* ==========================================================================
   قواعد الاستجابة للشاشات الجوال الكاملة (Mobile Responsive Media Queries)
   ========================================================================== */

/* --- الشاشات المتوسطة (Tablet / iPad) --- */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .hero-visual-card {
        display: none; /* إخفاء البطاقة الجانبية على التابلت */
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .service-detail-grid {
        grid-template-columns: 1fr;
    }
    .calculator-card-layout,
    .contract-generator-layout,
    .nitaqat-simulator-layout,
    .alerts-subscription-layout {
        grid-template-columns: 1fr;
    }
    .calculator-results,
    .contract-preview,
    .sim-results,
    .alerts-visual-info {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .agency-detail-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav-menu-flex {
        gap: 18px;
    }
    .nav-menu-flex a {
        font-size: 0.9rem;
    }
}

/* --- الشاشات الصغيرة (Mobile) --- */
@media screen and (max-width: 768px) {

    /* === الترويسة وشريط العلوي === */
    .top-bar {
        display: none !important;
    }

    .main-header {
        padding: 12px 0;
    }

    .main-header-flex {
        position: relative;
    }

    /* إخفاء الناف الكاملة على الجوال */
    .main-navigation {
        display: none !important;
    }

    /* إظهار زر الهامبرغر */
    .menu-toggle {
        display: flex !important;
    }

    .header-actions {
        gap: 8px;
    }

    .btn-header-cta {
        display: none !important; /* إخفاء زر "مستشارك الذكي" الكبير */
    }

    /* === قائمة الجوال الجانبية (Mobile Drawer) === */
    /* Overlay خلف الدرج */
    .mobile-navigation-drawer::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .mobile-navigation-drawer.open::before {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-navigation-drawer {
        width: 280px;
        right: -300px;
        z-index: 9999;
        overflow-y: auto;
    }

    .mobile-navigation-drawer.open {
        right: 0;
        box-shadow: -5px 0 40px rgba(0, 0, 0, 0.25);
    }

    .mobile-nav-list {
        gap: 4px !important;
    }

    .mobile-nav-list li {
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-nav-list a {
        padding: 14px 8px !important;
        font-size: 1rem !important;
        border-bottom: none !important;
    }

    .drawer-actions {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--color-border);
    }

    /* رابط حسابي في الجوال */
    .header-actions .btn-outline {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }

    /* === قسم الهيرو === */
    .hero-section {
        padding: 40px 0 60px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .hero-visual-card {
        display: none !important;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-search-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .hero-search-wrapper input {
        padding: 12px 15px;
        width: 100%;
    }

    .hero-search-wrapper .search-btn {
        width: 100%;
        padding: 12px;
        text-align: center;
    }

    /* === فلتر الدول === */
    .country-tags {
        gap: 8px;
    }

    .country-tag {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    /* === البوابة التفاعلية والتبويبات === */
    .section-smart-portal {
        padding: 50px 0;
    }

    .portal-tabs-container {
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portal-tabs-container::-webkit-scrollbar {
        display: none;
    }

    .portal-tab-btn {
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .portal-tab-btn i {
        margin-left: 5px;
    }

    /* === الحاسبة والأدوات === */
    .calculator-card-layout,
    .contract-generator-layout,
    .nitaqat-simulator-layout,
    .alerts-subscription-layout {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .calculator-inputs,
    .contract-inputs,
    .sim-inputs,
    .alerts-form-container,
    .alerts-visual-info {
        padding: 24px 20px !important;
    }

    .calculator-results,
    .contract-preview,
    .sim-results {
        padding: 24px 20px !important;
        border-radius: 0 !important;
    }

    .calc-row-two {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* === شبكة الخدمات === */
    .services-grid-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .section-services {
        padding: 50px 0;
    }

    /* === قسم دليل المكاتب === */
    .agencies-grid {
        grid-template-columns: 1fr !important;
    }

    /* === الأقسام العامة === */
    .section-header {
        text-align: center;
    }

    .section-title {
        font-size: 1.6rem !important;
    }

    /* === إحصاءات الصفحة === */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .stat-card {
        padding: 20px 15px !important;
    }

    .stat-number {
        font-size: 1.8rem !important;
    }

    /* === قسم CTA === */
    .cta-section {
        padding: 50px 0;
    }

    .cta-grid,
    .cta-content-wrapper {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .cta-title {
        font-size: 1.8rem !important;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* === الفوتر === */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .footer-bottom-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* === صفحة الخدمة التفصيلية === */
    .service-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .service-sidebar {
        order: 1; /* عرض السايدبار بعد المحتوى على الجوال لتفادي الطول الزائد */
    }

    .service-detail-header-section {
        padding: 30px 0 !important;
    }

    .service-detail-title {
        font-size: 1.5rem !important;
    }

    .quick-stats-list {
        grid-template-columns: 1fr !important;
    }

    /* === مدقق الأوراق === */
    .checklist-tracker-layout {
        padding: 20px !important;
    }

    .chk-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .chk-select-service-wrapper {
        margin-left: 0 !important;
        width: 100%;
    }

    /* === كروت الأخبار والتحديثات === */
    .updates-grid-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* === قسم الدليل والمقالات === */
    .guides-grid {
        grid-template-columns: 1fr !important;
    }

    /* === لوحة التحكم الخاصة بالأعضاء === */
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .dashboard-sidebar {
        order: 1; /* عرض السايدبار بعد المحتوى على الجوال لتفادي الطول الزائد */
    }

    .dashboard-tabs-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .dashboard-tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
    }

    /* === قسم الأسئلة الشائعة والأكورديون === */
    .accordion-header {
        padding: 15px 18px !important;
        font-size: 0.95rem !important;
    }

    .accordion-body {
        padding: 15px 18px !important;
    }

    /* === لوحة تحكم مكتب === */
    .agency-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* === مودال منبثق === */
    .portal-modal-card {
        width: 95vw !important;
        max-width: none !important;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* === المساعد الذكي (Bot Chat) === */
    .knowledge-bot-panel {
        width: 95vw !important;
        right: 2.5vw !important;
        left: 2.5vw !important;
        bottom: 80px !important;
        height: 70vh !important;
    }

    /* === تصميم طول اللغة محدد على الجوال === */
    .lang-switcher-container {
        margin-right: 8px !important;
    }

    #lang-dropdown-list {
        left: auto !important;
        right: 0 !important;
        min-width: 160px !important;
    }
}

/* --- الشاشات الصغيرة جداً (Small Mobile) --- */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.55rem;
    }

    .hero-tagline {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.4rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .country-tags {
        gap: 6px;
    }

    .country-tag {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .portal-tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .agency-stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .container {
        padding: 0 14px;
    }

    .mobile-navigation-drawer {
        width: 100vw !important;
        right: -100vw !important;
    }

    .mobile-navigation-drawer.open {
        right: 0 !important;
    }
}

/* ==========================================================================
   10. التحديثات والترقيات الفاخرة لعام 2026 (Premium VIP Upgrades)
   ========================================================================== */

/* أ. شارات الموثوقية الذهبية المتوهجة (EEAT Glowing VIP Verified Badge) */
.verified-badge-vip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    animation: goldGlowPulse 2.5s infinite ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}
.verified-badge-vip::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(30deg);
    animation: shimmerMove 3s infinite linear;
}
@keyframes goldGlowPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px rgba(245, 158, 11, 0.7);
        transform: scale(1.03);
    }
}
@keyframes shimmerMove {
    0% { left: -150%; }
    100% { left: 150%; }
}

/* ب. صندوق الإشعارات الذكي (Dashboard Notification Bell & Dropdown) */
.dash-notify-container {
    position: relative;
    margin-left: 20px;
    display: inline-block;
}
.dash-notify-btn {
    background: var(--dash-bg-card, #fff);
    border: 1px solid var(--dash-border, #e2e8f0);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--dash-secondary, #0f172a);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.dash-notify-btn:hover {
    background: var(--dash-primary-light, #f0fdfa);
    border-color: var(--dash-primary, #0f766e);
    color: var(--dash-primary, #0f766e);
    transform: translateY(-2px);
}
.dash-notify-btn.shake-active .fa-bell {
    animation: bellShake 0.6s ease-in-out;
}
.dash-notify-btn .pulse-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: redPulse 1.8s infinite;
}
@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    75% { transform: rotate(4deg); }
    85% { transform: rotate(-4deg); }
}
@keyframes redPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
    50% { transform: scale(1.15); box-shadow: 0 0 12px rgba(239, 68, 68, 0.85); }
}

.dash-notification-dropdown {
    position: absolute;
    top: 55px;
    left: 0;
    width: 320px;
    background: var(--dash-bg-card, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    border: 1px solid var(--dash-border, #e2e8f0);
    z-index: 100;
    display: none;
    direction: rtl;
    text-align: right;
    overflow: hidden;
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.dash-notify-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dash-secondary, #0f172a);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-notify-header a {
    font-size: 0.75rem;
    color: var(--dash-primary, #0f766e);
}
.dash-notify-list {
    max-height: 280px;
    overflow-y: auto;
}
.dash-notify-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
}
.dash-notify-item:hover {
    background: #f8fafc;
}
.dash-notify-item.unread {
    background: var(--dash-primary-light, #f0fdfa);
}
.dash-notify-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #475569;
    flex-shrink: 0;
}
.dash-notify-icon-box.success {
    background: #d1fae5;
    color: #10b981;
}
.dash-notify-icon-box.warning {
    background: #fffbeb;
    color: #f59e0b;
}
.dash-notify-icon-box.info {
    background: #e0f2fe;
    color: #0284c7;
}
.dash-notify-content {
    flex-grow: 1;
}
.dash-notify-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 3px;
    color: #1e293b;
}
.dash-notify-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}
.dash-notify-time {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 4px;
}
.dash-notify-footer {
    padding: 10px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.dash-notify-footer a {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dash-primary, #0f766e);
}

/* ج. الرسوم البيانية التفاعلية للوحة التحكم (Dashboard SVG Interactive Charts) */
.dash-chart-card {
    background: var(--dash-bg-card, #fff);
    border: 1px solid var(--dash-border, #e2e8f0);
    border-radius: var(--dash-radius, 16px);
    padding: 24px;
    margin-top: 30px;
    box-shadow: var(--dash-shadow);
}
.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dash-chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dash-secondary, #0f172a);
}
.dash-chart-toggles {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 2px;
}
.dash-chart-tab {
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.dash-chart-tab.active {
    background: #fff;
    color: var(--dash-primary, #0f766e);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.dash-chart-body {
    position: relative;
    width: 100%;
    height: 260px;
}
.dash-chart-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    animation: fadeInSmooth 0.35s ease;
}
.dash-chart-view.active {
    display: block;
}
@keyframes fadeInSmooth {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
.kb-chart-svg {
    width: 100%;
    height: 100%;
}
.kb-chart-bar {
    fill: url(#chart-gradient-primary);
    cursor: pointer;
    transition: fill 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom;
}
.kb-chart-bar:hover {
    fill: var(--color-accent, #f59e0b);
    transform: scaleY(1.05);
}
.kb-chart-bar-alt {
    fill: url(#chart-gradient-secondary);
}
.kb-chart-bar-alt:hover {
    fill: var(--color-primary, #0f766e);
    transform: scaleY(1.05);
}
.kb-chart-grid-line {
    stroke: #e2e8f0;
    stroke-dasharray: 4 4;
}
.kb-chart-axis {
    stroke: #cbd5e1;
    stroke-width: 1.5;
}
.kb-chart-text {
    font-size: 11px;
    fill: #64748b;
    font-weight: 600;
    font-family: inherit;
}
.kb-chart-tooltip {
    position: absolute;
    background: #0f172a;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.72rem;
    border-radius: 6px;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    z-index: 10;
    transform: translate(-50%, -100%);
    margin-top: -8px;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.kb-chart-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    margin-left: -4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #0f172a;
}

/* د. محرك البحث الذكي التفاعلي الفوري (Live AJAX Search Panel Visuals) */
.live-search-container {
    position: relative;
    width: 100%;
}
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-top: 8px;
    z-index: 1000;
    display: none;
    direction: rtl;
    text-align: right;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    animation: searchSlideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes searchSlideDown {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.live-search-results::-webkit-scrollbar {
    width: 6px;
}
.live-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.live-search-group {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.live-search-group:last-child {
    border-bottom: none;
}
.live-search-group-title {
    padding: 6px 18px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-primary, #0f766e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    margin-bottom: 4px;
}
.live-search-item {
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none !important;
}
.live-search-item:hover {
    background: var(--dash-primary-light, #f0fdfa);
}
.live-search-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.live-search-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--color-primary, #0f766e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.live-search-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}
.live-search-platform {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}
.live-search-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.live-search-country-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.live-search-country-badge.ksa { background: #d1fae5; color: #065f46; }
.live-search-country-badge.uae { background: #e0f2fe; color: #075985; }
.live-search-country-badge.kuwait { background: #fffbeb; color: #92400e; }
.live-search-country-badge.other { background: #f1f5f9; color: #475569; }

.live-search-fee {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}
.live-search-fee span {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: normal;
}
.live-search-no-results {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}
.live-search-no-results i {
    font-size: 1.8rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: block;
}

/* ==========================================================================
   11. تحسينات التجاوب مع الجوال والتخطيطات الشبكية (Mobile Responsiveness & Grid Layout Enhancements)
   ========================================================================== */

/* شبكة الإحصائيات في الصفحة الرئيسية */
.stats-grid-fp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
@media (max-width: 991px) {
    .stats-grid-fp {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 480px) {
    .stats-grid-fp {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* شبكة آراء العملاء في الصفحة الرئيسية */
.testimonials-grid-fp {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 991px) {
    .testimonials-grid-fp {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .testimonials-grid-fp {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* شبكة نموذج الاتصال والاستشارة الذكية */
.contact-grid-fp {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
}
@media (max-width: 991px) {
    .contact-grid-fp {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* شبكة نتائج البحث */
.search-grid-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}
@media (max-width: 991px) {
    .search-grid-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* شبكة إعلانات الأعضاء بلوحة التحكم */
.dashboard-ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .dashboard-ads-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

