/* ================================================================
   S.M PRO | Dashboard CSS
   ================================================================ */

/* ============ إصلاح ظهور الفوتر بدون سحب ============ */
html, body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    flex-shrink: 0;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#hero-view,
#dashboard-view {
    flex: 1 0 auto;
    width: 100%;
}

footer {
    flex-shrink: 0;
    margin-top: 0 !important;
}

/* ============ تأثير تصغير الهيدر عند التمرير ============ */
header {
    height: 88px;
    padding: 0 5%;
    overflow: visible !important;
    transition: height .35s ease, background-color .35s ease,
                box-shadow .35s ease, backdrop-filter .35s ease;
}

.brand-header-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
    height: auto !important;
    overflow: visible !important;
}
.logo-container {
    overflow: visible !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.logo-container img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    transition: height .35s ease, width .35s ease, opacity .3s ease;
    flex-shrink: 0;
    display: block;
}

.brand-title-text {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: baseline;
    gap: 6px;
    font-size: 1.6rem;
    letter-spacing: 1.5px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: visible !important;
    height: auto !important;
    max-width: none !important;
    transition: font-size .35s ease, letter-spacing .35s ease;
}
.brand-title-text .brand-subtitle {
    display: inline !important;
    font-size: 0.62em;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.75;
    color: var(--text-muted, #a0a0b0);
    transition: font-size .35s ease, opacity .35s ease;
}

body.scrolled header {
    height: 58px;
    background-color: rgba(11, 15, 23, 0.98);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

body.scrolled .logo-container img {
    height: 32px;
    width: 32px;
}
body.scrolled .brand-title-text { font-size: 1.05rem; letter-spacing: 1px; }
body.scrolled .brand-title-text .brand-subtitle { font-size: 0.58em; opacity: 0.7; }

/* ============ شريط التنقل / المستخدم ============ */
.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-inline-start: auto;
}
.header-nav a {
    margin-right: 0;
    font-size: 0.9rem;
}
.header-nav a:hover { color: var(--accent-color); }

#auth-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #1f1f1f;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    white-space: nowrap;
}
.btn-google:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.4);
}
.btn-google-lg {
    padding: 14px 30px;
    font-size: 1rem;
    margin-top: 24px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px 14px 4px 5px;
    font-size: 0.82rem;
    color: var(--text-main);
    max-width: 240px;
}
.user-chip img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    object-fit: cover;
    background: #070a10;
}
.user-chip .user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}
.btn-outline:hover {
    border-color: var(--accent-color);
    color: #fff;
    background: rgba(168, 85, 247, 0.08);
}

/* ============ Hero ============ */
.hero-view {
    min-height: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.hero-view::before {
    content: '';
    position: absolute;
    top: -280px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(168,85,247,0.22), transparent 65%);
    pointer-events: none;
}
.hero-view::after {
    content: '';
    position: absolute;
    bottom: -300px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0,210,255,0.12), transparent 70%);
    pointer-events: none;
}
.hero-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.35);
    color: #c084fc;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.hero-view h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    line-height: 1.25;
}
.hero-view p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 620px;
    position: relative;
    z-index: 1;
}
.hero-note {
    font-size: 0.78rem !important;
    margin-top: 18px;
    opacity: 0.6;
}
#hero-signin { position: relative; z-index: 1; }

/* ============ أيقونة Hero ============ */
.hero-icon-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    flex-shrink: 0;
}
.hero-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    display: block;
    margin: 0 auto;
}
.hero-icon-guard {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent;
    cursor: default;
}

/* ============ Dashboard ============ */
.dashboard-view {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 5% 60px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(0,210,255,0.05));
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(168,85,247,0.5);
    object-fit: cover;
    background: #070a10;
}
.profile-info { flex: 1; min-width: 180px; }
.profile-info h2 {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 4px;
}
.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.profile-stats {
    display: flex;
    gap: 24px;
}
.profile-stats .stat {
    text-align: center;
    min-width: 80px;
}
.profile-stats .stat span {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-stats .stat label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 36px;
    font-size: 0.88rem;
    color: var(--text-main);
}
.info-banner .info-icon { font-size: 1.3rem; line-height: 1; }
.info-banner code {
    display: inline-block;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.8rem;
    color: #67e8f9;
    margin: 4px 0;
    word-break: break-all;
    direction: ltr;
}

/* ===== زر "شرح بالفيديو" ===== */
.video-tutorial-wrapper {
    margin-top: 16px;
}
.video-tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 4px 14px rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 60, 60, 0.4);
}
.video-tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 0, 0, 0.55);
    color: #ffffff;
}
.video-tutorial-btn:active { transform: translateY(0); }
.video-tutorial-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

/* رأس القسم */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 14px;
}
.section-head h2 {
    font-size: 1.7rem;
    position: relative;
    padding-bottom: 10px;
}
.section-head h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* الأزرار */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 6px 20px rgba(168,85,247,0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(168,85,247,0.5);
}
.plus-icon { font-size: 1.15rem; line-height: 1; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    padding: 12px 22px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all .25s;
}
.btn-secondary:hover { border-color: var(--accent-color); color: #fff; }

.btn-ghost {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .2s;
}
.btn-ghost:hover { border-color: var(--accent-color); color: #fff; }

.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* شبكة المشاريع */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity .3s;
}
.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168,85,247,0.5);
    box-shadow: 0 14px 34px rgba(168,85,247,0.18);
}
.project-card:hover::before { opacity: 1; }

.project-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.project-card-head h3 {
    font-size: 1.15rem;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
}

.badge-mandatory {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    white-space: nowrap;
}
.badge-optional {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.35) !important;
    white-space: nowrap;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.meta-label { color: var(--text-muted); font-size: 0.78rem; }
.meta-value { color: #fff; font-weight: 600; }

.project-id-row,
.project-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 0.8rem;
    overflow: hidden;
}
.project-id {
    color: #67e8f9;
    font-family: 'Consolas', monospace;
    direction: ltr;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: .5px;
}
.url-text {
    color: var(--text-muted);
    font-size: 0.78rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.copy-btn {
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.35);
    color: #c084fc;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.copy-btn:hover { background: rgba(168,85,247,0.25); color: #fff; }

.project-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}
.project-actions button { flex: 1; }

.empty-state {
    text-align: center;
    padding: 70px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 18px;
    background: rgba(255,255,255,0.01);
}
.empty-illustration {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.7;
}
.empty-state h3 { color: #fff; margin-bottom: 8px; font-size: 1.2rem; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ============ Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, 0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn .2s ease;
}
.modal-content {
    background: linear-gradient(180deg, #141b28, #0f1420);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 70px rgba(0,0,0,0.75);
    animation: slideUp .28s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { transform: translateY(22px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
}
.modal-close:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5;
}
.modal-title {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.form-group input[type="text"],
.form-group input[type="url"] {
    width: 100%;
    background: #0b1018;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color .25s, box-shadow .25s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.radio-group { display: flex; gap: 10px; }
.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0b1018;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 11px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all .2s;
    color: var(--text-muted);
}
.radio-option input { accent-color: var(--accent-color); }
.radio-option:has(input:checked) {
    border-color: var(--accent-color);
    background: rgba(168,85,247,0.1);
    color: #fff;
}

.id-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0b1018;
    border: 1px dashed rgba(0,210,255,0.4);
    border-radius: 10px;
    padding: 12px 15px;
}
.id-preview-row code {
    flex: 1;
    color: #67e8f9;
    font-family: 'Consolas', monospace;
    font-size: 0.92rem;
    direction: ltr;
    letter-spacing: 1px;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}
.modal-actions button { flex: 1; }

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #141b28;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 26px;
    color: #fff;
    font-size: 0.88rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    z-index: 2000;
    transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .35s;
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success { border-color: rgba(34,197,94,0.5); }
.toast.error   { border-color: rgba(239,68,68,0.5); }

/* ============ روابط التواصل / زر العودة ============ */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 18px;
    margin-bottom: 14px;
}
.social-links a {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--card-bg);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.social-links a:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168,85,247,0.35);
}

footer p { text-align: center; margin: 6px 0; }

/* =========================================================
   ============ المشاكل الشائعة (Accordion) ===============
   ========================================================= */

.faq-section {
    margin-top: 48px;
    padding: 32px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

/* شريط علوي متدرج متحرك */
.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff, #a855f7, #00d2ff);
    background-size: 200% 100%;
    animation: faqSlide 4s linear infinite;
}

@keyframes faqSlide {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.faq-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.12), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.15);
}

.faq-header-text h2 {
    font-size: 1.35rem;
    color: #fff;
    margin: 0 0 4px;
    font-weight: 700;
}

.faq-header-text p {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.faq-item.open {
    border-color: rgba(0, 229, 255, 0.5);
    background: rgba(0, 210, 255, 0.04);
    box-shadow: 0 8px 24px rgba(0, 210, 255, 0.1);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: right;
    font-family: inherit;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.faq-q-text {
    flex: 1;
    line-height: 1.6;
}

.faq-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.28);
    color: #67e8f9;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
    background: rgba(0, 210, 255, 0.2);
    color: #a5f3fc;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.faq-item.open .faq-answer {
    max-height: 3000px;
    padding: 0 20px 20px;
}

.faq-answer-inner {
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.85;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.faq-answer-inner p {
    margin-bottom: 12px;
}

.faq-answer-inner p:last-child {
    margin-bottom: 0;
}

.faq-answer-inner strong {
    color: var(--text-main);
    font-weight: 700;
}

.faq-answer-inner em {
    color: #94a3b8;
    font-style: normal;
    font-size: 0.82rem;
}

.faq-answer-inner u {
    color: #a5f3fc;
    text-decoration: underline;
    text-decoration-color: rgba(0, 210, 255, 0.5);
    text-underline-offset: 3px;
}

.faq-answer-inner code {
    display: inline-block;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1px 7px;
    font-family: 'Consolas', monospace;
    font-size: 0.78rem;
    color: #67e8f9;
    direction: ltr;
    letter-spacing: 0.2px;
}

/* صندوق المقارنة (الرقمين) */
.faq-compare {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.faq-compare-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.faq-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* صندوق القاعدة الذهبية */
.faq-rule {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(0, 210, 255, 0.06));
    border-right: 3px solid #a855f7;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 16px 0;
    color: var(--text-main);
    font-size: 0.85rem;
    line-height: 1.9;
}

.faq-rule strong {
    display: block;
    margin-bottom: 8px;
    color: #c084fc;
    font-size: 0.9rem;
}

/* قائمة الأمثلة */
.faq-example-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-example-list li {
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid rgba(168, 85, 247, 0.5);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.83rem;
    line-height: 1.7;
}

/* قائمة التحقق */
.faq-checklist {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-checklist li {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 8px;
    padding: 9px 14px 9px 40px;
    font-size: 0.83rem;
    position: relative;
    color: var(--text-main);
    line-height: 1.6;
}

.faq-checklist li::before {
    content: '✓';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    font-weight: 800;
    font-size: 0.9rem;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* قائمة الخطوات المرقمة */
.faq-steps {
    list-style: none;
    padding: 0;
    margin: 12px 0 16px;
    counter-reset: faq-step;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-steps li {
    counter-increment: faq-step;
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    padding: 10px 14px 10px 42px;
    font-size: 0.83rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-main);
}

.faq-steps li::before {
    content: counter(faq-step);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d2ff, #a855f7);
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    border-radius: 50%;
}

/* نصيحة أخيرة */
.faq-tip {
    background: rgba(251, 191, 36, 0.06);
    border-right: 3px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px !important;
    color: #fcd34d;
    font-size: 0.83rem;
    line-height: 1.8;
}

.faq-tip strong {
    color: #fde68a;
}

/* ===== صندوق التواصل ===== */
.faq-contact {
    margin-top: 24px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(0, 210, 255, 0.06));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}

.faq-contact-icon {
    font-size: 1.15rem;
}

.faq-contact a {
    color: #67e8f9;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    direction: ltr;
    font-family: 'Consolas', monospace;
    letter-spacing: 0.3px;
    font-size: 0.84rem;
}

.faq-contact a:hover {
    color: #fff;
    background: rgba(0, 210, 255, 0.18);
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.35);
    transform: translateY(-1px);
}

/* ============ Responsive ============ */
@media (max-width: 720px) {
    header { height: 68px; }
    .logo-container img {
        height: 38px;
        width: 38px;
    }
    .brand-title-text { font-size: 1rem; letter-spacing: 1px; }
    .brand-title-text .brand-subtitle { display: none; }
    .header-nav a { display: none; }
    body.scrolled header { height: 54px; }
    body.scrolled .logo-container img {
        height: 28px;
        width: 28px;
    }
    body.scrolled .brand-title-text { font-size: 0.85rem; }

    .hero-icon-wrap {
        width: 120px;
        height: 120px;
        margin-bottom: 12px;
    }

    .dashboard-view { padding: 30px 4% 50px; }
    .profile-card { padding: 18px; }
    .profile-stats { width: 100%; justify-content: flex-start; }
    .form-row { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 24px 20px; }
    .user-chip .user-name { display: none; }

    .video-tutorial-btn {
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    /* FAQ Responsive */
    .faq-section { padding: 22px 16px; margin-top: 32px; }
    .faq-icon-wrap { width: 44px; height: 44px; font-size: 1.3rem; }
    .faq-header-text h2 { font-size: 1.15rem; }
    .faq-question { font-size: 0.85rem; padding: 14px 15px; gap: 10px; }
    .faq-answer { padding: 0 15px; }
    .faq-item.open .faq-answer { padding: 0 15px 16px; }
    .faq-compare-item,
    .faq-checklist li,
    .faq-steps li,
    .faq-example-list li { font-size: 0.79rem; padding: 9px 12px 9px 36px; }
    .faq-compare-item { padding: 9px 12px; }
    .faq-contact { flex-direction: column; gap: 8px; font-size: 0.82rem; }
    .faq-contact a { font-size: 0.78rem; }
}

/* على الشاشات المتوسطة – نصغر العنوان قليلاً */
@media (max-width: 960px) and (min-width: 721px) {
    .brand-title-text { font-size: 1.25rem; }
    .brand-title-text .brand-subtitle { font-size: 0.55em; }
}
/* ===== نص توضيحي أسفل الحقول ===== */
.field-hint {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.6;
}