@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');

:root {
    --primary-color: #00C853; --primary-hover: #00A550; --primary-light: rgba(0, 200, 83, 0.12); --bg-color: #F5F5F5;
    --surface-color: #FFFFFF; --text-color: #1A1A1A; --danger-color: #ff3b30;
    --border-color: #e0e0e0; --input-bg: #FFFFFF; --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1); --radius: 10px; --radius-lg: 20px;
    --text-muted: #666;
}

body.dark-mode {
    --bg-color: #121212; --text-color: #e0e0e0; --surface-color: #1e1e1e; --primary-light: rgba(0, 200, 83, 0.18);
    --border-color: #333; --input-bg: #2c2c2c; --shadow: 0 4px 12px rgba(0, 0, 0, 0.4); --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
    --text-muted: #aaa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
body { background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 5%; background-color: color-mix(in srgb, var(--surface-color) 90%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.logo-link { text-decoration: none; }
.logo { font-size: 1.5rem; font-weight: 900; color: var(--text-color); display: flex; align-items: center; gap: 8px; }
.logo::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); box-shadow: 0 0 0 4px var(--primary-light); }
.logo span { color: var(--primary-color); }
.theme-btn { background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: 50%; width: 42px; height: 42px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.25s; color: var(--text-color); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn:hover { background-color: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); transform: scale(1.08) rotate(8deg); }

.btn { padding: 0.85rem 1.4rem; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; transition: 0.2s ease-in-out; }
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #fff; box-shadow: 0 4px 14px rgba(0, 200, 83, 0.3); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 200, 83, 0.38); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline { border: 2px solid var(--primary-color); color: var(--primary-color); background: transparent; }
.btn-outline:hover { background-color: var(--primary-color); color: #fff; transform: translateY(-2px); }
.btn-whatsapp { background: linear-gradient(135deg, #25D366, #1DA851); color: #fff; box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); }
.btn-whatsapp:hover { filter: brightness(1.06); transform: translateY(-2px); }
.w-100 { width: 100%; }
.mt-3 { margin-top: 1.5rem; }

.page { display: none; padding: 3rem 5%; animation: fadeIn 0.45s ease-in-out; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.container-narrow { max-width: 640px; margin: 0 auto; }

#intro-section { position: relative; overflow: hidden; }
#intro-section::before, #intro-section::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; }
#intro-section::before { width: 380px; height: 380px; background: var(--primary-color); top: -120px; inset-inline-end: -100px; opacity: 0.15; }
#intro-section::after { width: 300px; height: 300px; background: var(--primary-hover); bottom: -100px; inset-inline-start: -80px; opacity: 0.12; }

.hero-section { position: relative; z-index: 1; text-align: center; max-width: 640px; margin: 2vh auto 3rem; }
.badge-pill { display: inline-block; background: var(--primary-light); color: var(--primary-hover); font-weight: 700; font-size: 0.85rem; padding: 0.4rem 1rem; border-radius: 50px; margin-bottom: 1rem; }
.hero-section h1 { font-size: 2.2rem; font-weight: 900; color: var(--text-color); line-height: 1.3; }
.hero-section h1 span { color: var(--primary-color); }
.hero-section p { font-size: 1.1rem; margin-top: 1rem; color: var(--text-muted); }

.upload-card { position: relative; z-index: 1; background: var(--surface-color); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); }
.upload-card textarea, .upload-card input[type="text"] { width: 100%; padding: 1rem; border: 1.5px solid var(--border-color); border-radius: var(--radius); background-color: var(--input-bg); color: var(--text-color); outline: none; font-size: 0.97rem; font-family: 'Tajawal', sans-serif; margin-bottom: 1rem; resize: vertical; }
.upload-card textarea:focus, .upload-card input[type="text"]:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px var(--primary-light); }

.dropzone { border: 2px dashed var(--border-color); border-radius: var(--radius); padding: 1.8rem 1rem; text-align: center; margin-bottom: 1.2rem; transition: 0.2s; }
.dropzone.dragover { border-color: var(--primary-color); background: var(--primary-light); }
.dropzone-icon { font-size: 2.2rem; margin-bottom: 0.4rem; }
.dropzone-title { font-weight: 700; margin-bottom: 0.2rem; }
.dropzone-sub { color: #888; font-size: 0.85rem; margin-bottom: 1rem; }
.file-chosen { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 1rem; background: var(--primary-light); color: var(--primary-hover); padding: 0.6rem 1rem; border-radius: var(--radius); font-weight: 700; font-size: 0.9rem; }
.file-chosen button { background: rgba(0,0,0,0.08); border: none; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; font-size: 1rem; line-height: 1; }
.file-chosen button:hover { background: var(--danger-color); color: #fff; }
.or-divider { text-align: center; color: #888; font-size: 0.9rem; margin-bottom: 1rem; position: relative; }
.or-divider::before, .or-divider::after { content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--border-color); }
.or-divider::before { inset-inline-start: 0; }
.or-divider::after { inset-inline-end: 0; }

#toast-container { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { background: var(--text-color); color: var(--surface-color); padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-weight: 500; opacity: 0; transform: translateX(50px); animation: slideIn 0.3s forwards; }
.toast.error { background: var(--danger-color); color: #fff; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

.loader-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(255,255,255,0.7); z-index: 10000; display: flex; justify-content: center; align-items: center; }
body.dark-mode .loader-overlay { background: rgba(0,0,0,0.7); }
.spinner { width: 46px; height: 46px; border: 4px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== SEO Content Sections ===== */
.seo-content { position: relative; z-index: 1; margin-top: 4rem; }

.edu-section { margin-bottom: 3rem; }
.edu-section h2 { font-size: 1.6rem; font-weight: 900; color: var(--text-color); margin-bottom: 1rem; text-align: center; }
.edu-section > p { color: var(--text-muted); text-align: center; margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.8; }

.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.feature-item { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.feature-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.feature-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-color); }
.feature-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

.steps-list { display: flex; flex-direction: column; gap: 1.2rem; }
.step-item { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.step-num { min-width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #fff; font-weight: 900; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text-color); }
.step-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* Trust Section (HR) */
.trust-card { background: var(--surface-color); border: 2px solid var(--primary-color); border-radius: var(--radius-lg); padding: 1.8rem; text-align: center; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.trust-icon { font-size: 2.5rem; margin-bottom: 0.6rem; }
.trust-card h3 { font-size: 1.2rem; font-weight: 900; color: var(--primary-hover); margin-bottom: 0.6rem; }
.trust-card p { color: var(--text-muted); font-size: 1rem; line-height: 1.8; }

.trust-points { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 0.5rem; }
.trust-point { display: flex; gap: 0.8rem; align-items: flex-start; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.trust-check { color: var(--primary-color); font-weight: 900; font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.trust-point p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }
.trust-point strong { color: var(--text-color); }

/* Mid CTA */
.mid-cta { background: linear-gradient(135deg, var(--primary-light), rgba(0,200,83,0.03)); border: 2px solid var(--primary-color); border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-bottom: 3rem; }
.mid-cta h2 { font-size: 1.4rem; font-weight: 900; color: var(--text-color); margin-bottom: 0.5rem; }
.mid-cta p { color: var(--text-muted); margin-bottom: 1.2rem; }
.mid-cta-buttons { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* FAQ */
.faq-section { margin-bottom: 2rem; }
.faq-item { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 0.8rem; overflow: hidden; box-shadow: var(--shadow); }
.faq-item summary { padding: 1rem 1.3rem; font-weight: 700; font-size: 1rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--text-color); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--primary-color); transition: transform 0.2s; flex-shrink: 0; margin-inline-start: 1rem; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.8; }
.faq-item a { color: var(--primary-color); text-decoration: underline; }

/* ===== Report ===== */
.report-header { text-align: center; margin-bottom: 2rem; }
.report-header h2 { font-size: 1.8rem; font-weight: 900; color: var(--primary-color); }
.report-date { color: #888; font-size: 0.9rem; margin-top: 0.3rem; }

.score-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 2rem; text-align: center; margin-bottom: 1.5rem; }
.score-circle { width: 120px; height: 120px; border-radius: 50%; background: var(--primary-light); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.score-circle span { font-size: 2.4rem; font-weight: 900; color: var(--primary-color); line-height: 1; }
.score-circle small { color: var(--primary-hover); font-weight: 700; }
.verdict-pill { display: inline-block; background: var(--bg-color); border: 1px solid var(--border-color); font-weight: 700; padding: 0.4rem 1rem; border-radius: 50px; margin-bottom: 0.6rem; }
.verdict-note { color: var(--text-muted); }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.category-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.category-card .cat-name { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-color); }
.category-card .cat-bar-track { background: var(--bg-color); border-radius: 20px; height: 8px; overflow: hidden; margin-bottom: 0.4rem; }
.category-card .cat-bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--primary-color), var(--primary-hover)); }
.category-card .cat-score { font-weight: 900; color: var(--primary-hover); font-size: 0.95rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.feedback-card { border-radius: var(--radius-lg); padding: 1.3rem; }
.feedback-card.working { background: rgba(0, 200, 83, 0.08); border: 1px solid rgba(0, 200, 83, 0.25); }
.feedback-card.fixing { background: rgba(255, 59, 48, 0.08); border: 1px solid rgba(255, 59, 48, 0.25); }
.feedback-card h3 { margin-bottom: 0.7rem; font-size: 1rem; }
.feedback-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.feedback-card li { font-size: 0.92rem; padding-inline-start: 1.1rem; position: relative; }
.feedback-card.working li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--primary-color); font-weight: 900; }
.feedback-card.fixing li::before { content: '!'; position: absolute; inset-inline-start: 0; color: var(--danger-color); font-weight: 900; }

.quick-wins-box { background: linear-gradient(135deg, #14202b, #1c2e3d); color: #fff; border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.quick-wins-box h3 { margin-bottom: 1rem; color: #ffcf5c; }
.quick-wins-box ol { list-style: none; counter-reset: qw; display: flex; flex-direction: column; gap: 0.9rem; }
.quick-wins-box li { counter-increment: qw; position: relative; padding-inline-start: 2.2rem; font-size: 0.95rem; }
.quick-wins-box li::before { content: counter(qw); position: absolute; inset-inline-start: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: #ffcf5c; color: #14202b; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }

/* CTA Products (post-report) */
.cta-box { background: linear-gradient(135deg, var(--primary-light), rgba(0,200,83,0.03)); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.cta-box h3 { margin-bottom: 0.4rem; }
.cta-box p { color: var(--text-muted); margin-bottom: 1rem; }

.cta-products-grid { display: flex; flex-direction: column; gap: 0.7rem; }
.cta-product-link { display: block; padding: 0.9rem 1.2rem; border: 1px solid var(--border-color); border-radius: var(--radius); text-decoration: none; color: var(--text-color); background: var(--surface-color); transition: 0.2s; text-align: center; }
.cta-product-link:hover { border-color: var(--primary-color); transform: translateY(-2px); box-shadow: var(--shadow); }
.cta-product-link strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.cta-product-link span { font-size: 0.85rem; color: var(--text-muted); }
.cta-product-link.highlight { border-color: var(--primary-color); background: var(--primary-light); }
.cta-product-link.highlight strong { color: var(--primary-hover); }

/* ===== Footer ===== */
.site-footer { background: var(--surface-color); border-top: 1px solid var(--border-color); padding: 2.5rem 5% 1rem; margin-top: 2rem; }
.footer-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.8rem; line-height: 1.7; }
.footer-links h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-color); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .hero-section h1 { font-size: 1.6rem; }
    .two-col { grid-template-columns: 1fr; }
    .score-circle { width: 100px; height: 100px; }
    .score-circle span { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .mid-cta-buttons { flex-direction: column; }
    .mid-cta-buttons .btn { width: 100%; }
}
