/* =========================================
   pages.css — shared styles for static pages
   (about, services, faq, terms, privacy)
   Supports both light and dark modes
   ========================================= */

/* --- Dark mode (default) --- */
:root {
    --gold: #d4af37;
    --purple: #a78bfa;
    --bg: #0d0d14;
    --bg2: #15151f;
    --bg3: #1c1c28;
    --text: #f0f0f0;
    --text2: #9999aa;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 2px 12px rgba(0,0,0,0.35);
    --radius: 12px;
}

/* --- Light mode --- */
@media (prefers-color-scheme: light) {
    :root {
        --gold: #1a1a2e;          /* dark/near-black accent for readability in light mode */
        --purple: #5b3fbf;        /* darker purple for contrast */
        --bg: #f5f5f7;
        --bg2: #ffffff;
        --bg3: #ededf0;
        --text: #111118;
        --text2: #444455;         /* slightly darker for better contrast */
        --border: rgba(0,0,0,0.08);
        --shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.85;
    transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: var(--gold); }
a:hover { text-decoration: underline; }

/* === Header === */
.site-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.container { max-width: 940px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 900;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
    .logo-icon {
        background: linear-gradient(135deg, #334155, #1e293b);
        box-shadow: 0 4px 10px rgba(0,0,0,0.45);
    }
}
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.logo-subtitle { font-size: 0.65rem; color: var(--text2); font-weight: 400; opacity: 0.75; margin-top: 2px; }
.back-link {
    color: var(--text2);
    font-size: 0.9rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}
.back-link:hover { color: var(--gold); text-decoration: none; }

/* === Page hero === */
.page-main { padding: 3rem 0 5rem; min-height: 78vh; }
.page-hero { margin-bottom: 3rem; }
.page-tag {
    display: inline-block;
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.page-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.75rem; }
.page-title span { color: var(--gold); }
.page-desc { color: var(--text2); font-size: 1.05rem; max-width: 680px; }
.update-date { color: var(--text2); font-size: 0.88rem; margin-bottom: 1rem; }
.page-desc-box {
    color: var(--text2);
    font-size: 1rem;
    max-width: 680px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

/* === Sections === */
.section { margin-bottom: 3rem; }
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}
.section p { color: var(--text2); margin-bottom: 0.8rem; }
.section-desc { color: var(--text2); margin-bottom: 1rem; max-width: 740px; }
.section-title small { font-size: 0.8rem; color: var(--text2); font-weight: 500; margin-inline-start: 0.4rem; }

/* === Service list (catalog) === */
.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
    list-style: none;
    padding: 0;
}
.service-list li {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.95rem;
    font-size: 0.92rem;
    color: var(--text);
    position: relative;
    padding-inline-start: 1.8rem;
    transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
.service-list li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-weight: 800;
    font-size: 0.85rem;
}
.service-list li:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* Legal sections */
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.legal-section h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin: 1.25rem 0 0.5rem; }
.legal-section p { color: var(--text2); margin-bottom: 0.8rem; font-size: 0.95rem; }
.legal-section ul { color: var(--text2); padding-right: 1.5rem; margin-bottom: 0.8rem; }
.legal-section ul li { margin-bottom: 0.4rem; font-size: 0.95rem; }
.legal-section ul li::marker { color: var(--gold); }

/* === Cards (generic) === */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(212,175,55,0.35); box-shadow: var(--shadow); }
.card-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text2); margin: 0; }

/* === Values === */
.values-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.value-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1.1rem; background: var(--bg3);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.value-dot { width: 10px; height: 10px; background: var(--gold); border-radius: 50%; margin-top: 0.5rem; flex-shrink: 0; }
.value-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.value-item p { font-size: 0.85rem; color: var(--text2); margin: 0; }

/* === Service cards === */
.service-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
    transition: border-color 0.2s;
}
.service-card:hover { border-color: rgba(212,175,55,0.3); }
.service-icon {
    width: 52px; height: 52px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.service-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.service-body p { color: var(--text2); font-size: 0.95rem; margin-bottom: 0.75rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    background: rgba(167,139,250,0.1);
    color: var(--purple);
    border: 1px solid rgba(167,139,250,0.2);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
}

/* === Plans === */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.plan-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    position: relative;
}
.plan-card.featured { border-color: rgba(212,175,55,0.4); }
.plan-badge {
    position: absolute; top: -12px; right: 50%; transform: translateX(50%);
    background: linear-gradient(90deg, var(--gold), var(--purple));
    color: #fff; padding: 0.2rem 0.9rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.plan-name { font-size: 1rem; font-weight: 700; color: var(--text2); margin-bottom: 0.5rem; }
.plan-price { font-size: 2rem; font-weight: 800; color: var(--gold); margin-bottom: 0.25rem; }
.plan-price small { font-size: 0.9rem; color: var(--text2); font-weight: 400; }
.plan-desc { color: var(--text2); font-size: 0.88rem; margin-bottom: 1.25rem; }
.plan-features { list-style: none; text-align: right; }
.plan-features li {
    color: var(--text2); font-size: 0.9rem; padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0.5rem;
}
.plan-features li:last-child { border-bottom: none; }
.check { color: var(--gold); font-weight: 700; }

/* === FAQ === */
.faq-category { margin-bottom: 2.5rem; }
.cat-title {
    font-size: 1.1rem; font-weight: 700; color: var(--gold);
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0.5rem;
}
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.7rem; overflow: hidden; }
.faq-question {
    width: 100%; background: var(--bg3); border: none;
    color: var(--text); font-family: 'Tajawal', sans-serif;
    font-size: 0.97rem; font-weight: 600;
    padding: 1rem 1.25rem; text-align: right; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--bg2); }
.faq-arrow { flex-shrink: 0; transition: transform 0.3s; color: var(--text2); }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--gold); }
.faq-item.open .faq-question { color: var(--gold); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer-inner { padding: 0 1.25rem 1.1rem; color: var(--text2); font-size: 0.92rem; line-height: 1.75; }
.faq-item.open .faq-answer { max-height: 400px; }

/* === Highlight / info boxes === */
.highlight-box {
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin: 1rem 0;
}
.highlight-box p { color: var(--text); margin: 0; font-size: 0.92rem; }

/* === Privacy summary grid === */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.summary-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.summary-card .s-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.summary-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.summary-card p { font-size: 0.82rem; color: var(--text2); margin: 0; }

/* === Rights list === */
.rights-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.right-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.right-item .r-icon { font-size: 1.25rem; margin-bottom: 0.4rem; }
.right-item h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.25rem; }
.right-item p { font-size: 0.82rem; color: var(--text2); margin: 0; }

/* === Table === */
.info-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.info-table th {
    background: var(--bg3); color: var(--gold); text-align: right;
    padding: 0.7rem 1rem; font-weight: 700; border: 1px solid var(--border);
}
.info-table td { padding: 0.65rem 1rem; border: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.info-table tr:nth-child(even) td { background: rgba(128,128,128,0.04); }

/* === CTA box === */
.cta-box {
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(167,139,250,0.06));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    margin-top: 3rem;
}
.cta-box h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; }
.cta-box p { color: var(--text2); margin-bottom: 1.5rem; }
.btn-primary {
    display: inline-block;
    background: linear-gradient(90deg, var(--gold), var(--purple));
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    font-family: inherit; font-size: 1rem; font-weight: 700;
    transition: opacity 0.2s;
    text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; text-decoration: none; }
.contact-note { margin-top: 1.5rem; color: var(--text2); font-size: 0.9rem; text-align: center; }

/* === Footer === */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.25rem; margin-bottom: 0.9rem; }
.footer-links a { color: var(--text2); font-size: 0.88rem; transition: color 0.2s; text-decoration: none; }
.footer-links a:hover, .footer-links a.active { color: var(--gold); }
.footer-copy { color: var(--text2); font-size: 0.8rem; }
.footer-sep { color: var(--border); }

/* === Responsive === */
@media (max-width: 640px) {
    .page-title { font-size: 1.7rem; }
    .cards { grid-template-columns: 1fr; }
    .service-card { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
}
