<?php
$pageTitle = 'Privacy Policy - MeeVakeel | How We Protect Your Data';
$metaDescription = 'Read MeeVakeel\'s Privacy Policy to understand how we collect, use, and protect your personal information on our legal consultation platform.';
require_once '../includes/config.php';
require_once '../includes/header.php';
$lastUpdated = 'January 1, 2025';
?>

<!-- Page Hero -->
<section class="page-hero">
    <div class="container">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb mb-3">
                <li class="breadcrumb-item"><a href="/">Home</a></li>
                <li class="breadcrumb-item active">Privacy Policy</li>
            </ol>
        </nav>
        <h1 class="mb-2">Privacy <span style="color:var(--gold);">Policy</span></h1>
        <p style="color:rgba(255,255,255,0.75);">Last Updated: <?= $lastUpdated ?> &nbsp;|&nbsp; Effective: <?= $lastUpdated ?></p>
    </div>
</section>

<!-- ── INTRO BANNER ── -->
<div style="background:rgba(212,175,55,0.06);border-bottom:1px solid rgba(212,175,55,0.2);padding:18px 0;">
    <div class="container">
        <div style="display:flex;align-items:center;gap:14px;max-width:760px;margin:0 auto;">
            <div style="width:44px;height:44px;min-width:44px;background:var(--gold);border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:1.1rem;"><i class="fas fa-shield-alt"></i></div>
            <p style="margin:0;font-size:0.88rem;color:var(--text);line-height:1.7;">
                At MeeVakeel, your privacy is our highest priority. This policy explains exactly how we collect, use, and protect your personal information. We are committed to complete transparency — no surprises.
            </p>
        </div>
    </div>
</div>

<!-- ── MAIN CONTENT ── -->
<section class="section">
    <div class="container">
        <div class="row g-5">

            <!-- Sticky TOC Sidebar -->
            <div class="col-lg-3">
                <div style="position:sticky;top:100px;">
                    <h6 style="font-size:0.78rem;text-transform:uppercase;letter-spacing:0.08em;color:var(--text-light);font-weight:700;margin-bottom:14px;">Contents</h6>
                    <?php
                    $sections = [
                        ['id'=>'s1',  'title'=>'Information We Collect'],
                        ['id'=>'s2',  'title'=>'How We Use Your Information'],
                        ['id'=>'s3',  'title'=>'Information Sharing'],
                        ['id'=>'s4',  'title'=>'Cookies & Tracking'],
                        ['id'=>'s5',  'title'=>'Data Security'],
                        ['id'=>'s6',  'title'=>'Data Retention'],
                        ['id'=>'s7',  'title'=>'Your Rights'],
                        ['id'=>'s8',  'title'=>'Third-Party Services'],
                        ['id'=>'s9',  'title'=>'Children\'s Privacy'],
                        ['id'=>'s10', 'title'=>'Legal Basis (PDPB)'],
                        ['id'=>'s11', 'title'=>'Changes to This Policy'],
                        ['id'=>'s12', 'title'=>'Contact Us'],
                    ];
                    foreach($sections as $i => $s): ?>
                    <a href="#<?= $s['id'] ?>"
                       style="display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:8px;color:var(--text-light);font-size:0.82rem;text-decoration:none;border-left:3px solid transparent;transition:var(--transition);margin-bottom:2px;"
                       class="toc-link"
                       onmouseover="this.style.background='var(--off-white)';this.style.color='var(--primary)';this.style.borderLeftColor='var(--gold)'"
                       onmouseout="this.style.background='';this.style.color='var(--text-light)';this.style.borderLeftColor='transparent'">
                        <span style="font-size:0.7rem;font-weight:700;color:var(--gold);min-width:18px;"><?= $i+1 ?>.</span>
                        <?= $s['title'] ?>
                    </a>
                    <?php endforeach; ?>

                    <div style="margin-top:24px;background:var(--primary);border-radius:14px;padding:20px;text-align:center;">
                        <i class="fas fa-envelope" style="color:var(--gold);font-size:1.4rem;margin-bottom:10px;display:block;"></i>
                        <p style="color:rgba(255,255,255,0.75);font-size:0.78rem;margin-bottom:12px;">Privacy questions?</p>
                        <a href="mailto:privacy@meevakeel.in" style="color:var(--gold);font-size:0.8rem;font-weight:600;text-decoration:none;">privacy@meevakeel.in</a>
                    </div>
                </div>
            </div>

            <!-- Policy Body -->
            <div class="col-lg-9">
                <div style="background:white;border-radius:20px;padding:44px;box-shadow:var(--shadow);border:1px solid var(--border);">

<?php
$policyContent = [
    ['id'=>'s1','title'=>'1. Information We Collect','icon'=>'fas fa-database','content'=>'
        <p>We collect information to provide you with the best possible legal consultation experience. The information we collect falls into three main categories:</p>
        <h6 style="color:var(--primary);margin:18px 0 10px;font-size:0.95rem;">1.1 Information You Provide Directly</h6>
        <ul>
            <li><strong>Account Registration:</strong> Name, email address, mobile number, and password when you create an account.</li>
            <li><strong>Profile Information:</strong> City, state, address, and profile photo (optional for clients).</li>
            <li><strong>Lawyer Registration:</strong> Bar Council enrollment number, enrollment card documents, years of experience, practice areas, court districts, and availability preferences.</li>
            <li><strong>Consultation Details:</strong> Legal issue description, uploaded documents (FIR copies, property papers, contracts, etc.) shared with lawyers.</li>
            <li><strong>Payment Information:</strong> We do not store card numbers. Payment details are processed securely by Razorpay. We store only transaction IDs and payment status.</li>
            <li><strong>Communications:</strong> Chat messages between clients and lawyers, contact form submissions, and support queries.</li>
        </ul>
        <h6 style="color:var(--primary);margin:18px 0 10px;font-size:0.95rem;">1.2 Information Collected Automatically</h6>
        <ul>
            <li><strong>Device & Browser:</strong> IP address, browser type, operating system, device type.</li>
            <li><strong>Usage Data:</strong> Pages visited, search queries, time spent on platform, clicks and interactions.</li>
            <li><strong>Location Data:</strong> Approximate location based on IP address (we do not track GPS location without explicit permission).</li>
            <li><strong>Cookies:</strong> Session cookies, preference cookies, and analytics cookies (see Section 4).</li>
        </ul>
        <h6 style="color:var(--primary);margin:18px 0 10px;font-size:0.95rem;">1.3 Information from Third Parties</h6>
        <ul>
            <li>Payment verification data from Razorpay.</li>
            <li>Analytics data from Google Analytics.</li>
            <li>Bar Council verification data (for lawyer profiles).</li>
        </ul>
    '],
    ['id'=>'s2','title'=>'2. How We Use Your Information','icon'=>'fas fa-cogs','content'=>'
        <p>We use the information we collect for the following purposes:</p>
        <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0;">
            '.implode('', array_map(fn($u) => '<div style="background:var(--off-white);border-radius:10px;padding:14px;border-left:3px solid var(--primary);"><strong style="font-size:0.85rem;color:var(--primary);">'.$u[0].'</strong><p style="font-size:0.8rem;color:var(--text-light);margin:4px 0 0;line-height:1.6;">'.$u[1].'</p></div>', [
                ['Platform Services','To create and manage your account, facilitate consultations, and process payments.'],
                ['Verification','To verify lawyer credentials, Bar Council enrollment, and platform security.'],
                ['Communication','To send booking confirmations, OTPs, payment receipts, and support responses.'],
                ['Improvement','To analyse usage patterns, fix bugs, and improve platform features.'],
                ['Legal Compliance','To comply with Indian laws, court orders, and regulatory requirements.'],
                ['Safety','To detect fraud, prevent abuse, and maintain platform integrity.'],
            ])).'
        </div>
        <p><strong>We do NOT use your information for:</strong> selling to advertisers, profiling for political purposes, or any purpose not listed above.</p>
    '],
    ['id'=>'s3','title'=>'3. Information Sharing & Disclosure','icon'=>'fas fa-share-alt','content'=>'
        <p>We never sell your personal information. We share information only in these limited circumstances:</p>
        <ul>
            <li><strong>With Lawyers (Clients):</strong> When you book a consultation, your name, query description, and uploaded documents are shared with the lawyer you selected.</li>
            <li><strong>With Clients (Lawyers):</strong> Your professional profile information (name, experience, expertise, location) is displayed to clients searching for lawyers.</li>
            <li><strong>Service Providers:</strong> We share data with trusted third-party services — Razorpay (payments), Google Analytics (analytics), MSG91 (SMS) — only as necessary for their services.</li>
            <li><strong>Legal Requirements:</strong> We may disclose information if required by law, court order, or government authority under Indian law (IT Act 2000 and rules thereunder).</li>
            <li><strong>Business Transfers:</strong> In the event of a merger or acquisition, user data may be transferred to the new entity, subject to the same privacy protections.</li>
            <li><strong>With Your Consent:</strong> Any other sharing will only occur with your explicit consent.</li>
        </ul>
    '],
    ['id'=>'s4','title'=>'4. Cookies & Tracking Technologies','icon'=>'fas fa-cookie-bite','content'=>'
        <p>We use cookies and similar technologies to enhance your experience:</p>
        <table style="width:100%;border-collapse:collapse;font-size:0.85rem;margin:16px 0;">
            <thead><tr style="background:var(--primary);color:white;"><th style="padding:10px 14px;text-align:left;">Cookie Type</th><th style="padding:10px 14px;">Purpose</th><th style="padding:10px 14px;">Duration</th></tr></thead>
            <tbody>
                <tr style="border-bottom:1px solid var(--border);"><td style="padding:10px 14px;font-weight:600;">Session Cookies</td><td style="padding:10px 14px;color:var(--text-light);">Keep you logged in during your visit</td><td style="padding:10px 14px;color:var(--text-light);">Session</td></tr>
                <tr style="border-bottom:1px solid var(--border);background:var(--off-white);"><td style="padding:10px 14px;font-weight:600;">Preference Cookies</td><td style="padding:10px 14px;color:var(--text-light);">Remember your language and display preferences</td><td style="padding:10px 14px;color:var(--text-light);">1 Year</td></tr>
                <tr style="border-bottom:1px solid var(--border);"><td style="padding:10px 14px;font-weight:600;">Analytics Cookies</td><td style="padding:10px 14px;color:var(--text-light);">Google Analytics — understand how visitors use our platform</td><td style="padding:10px 14px;color:var(--text-light);">2 Years</td></tr>
                <tr style="background:var(--off-white);"><td style="padding:10px 14px;font-weight:600;">Security Cookies</td><td style="padding:10px 14px;color:var(--text-light);">CSRF protection, fraud detection</td><td style="padding:10px 14px;color:var(--text-light);">Session</td></tr>
            </tbody>
        </table>
        <p>You can control cookies through your browser settings. Note that disabling certain cookies may affect platform functionality.</p>
    '],
    ['id'=>'s5','title'=>'5. Data Security','icon'=>'fas fa-lock','content'=>'
        <p>We implement industry-standard security measures to protect your data:</p>
        <ul>
            <li><strong>SSL/TLS Encryption:</strong> All data transmitted between your browser and our servers is encrypted using 256-bit SSL.</li>
            <li><strong>Password Security:</strong> Passwords are hashed using bcrypt with a cost factor of 12 — never stored in plain text.</li>
            <li><strong>Secure File Storage:</strong> Uploaded documents are stored in access-controlled cloud storage with restricted access.</li>
            <li><strong>CSRF Protection:</strong> All forms include CSRF tokens to prevent cross-site request forgery attacks.</li>
            <li><strong>SQL Injection Prevention:</strong> We use prepared statements and parameterised queries exclusively.</li>
            <li><strong>Regular Security Audits:</strong> Our platform undergoes regular security reviews and penetration testing.</li>
            <li><strong>OTP Verification:</strong> All account actions use two-factor OTP verification via SMS and email.</li>
        </ul>
        <div style="background:rgba(212,175,55,0.08);border:1px solid rgba(212,175,55,0.3);border-radius:10px;padding:14px 18px;margin-top:14px;">
            <strong style="color:var(--primary);font-size:0.88rem;"><i class="fas fa-exclamation-triangle me-2" style="color:var(--gold);"></i>Security Incident Reporting:</strong>
            <p style="font-size:0.82rem;color:var(--text-light);margin:6px 0 0;">If you discover a security vulnerability, please report it immediately to <a href="mailto:security@meevakeel.in">security@meevakeel.in</a>. We take all reports seriously.</p>
        </div>
    '],
    ['id'=>'s6','title'=>'6. Data Retention','icon'=>'fas fa-clock','content'=>'
        <p>We retain your data only for as long as necessary:</p>
        <ul>
            <li><strong>Active Account Data:</strong> Retained as long as your account is active.</li>
            <li><strong>Consultation Records:</strong> Retained for 7 years for legal compliance (Indian limitation period requirements).</li>
            <li><strong>Payment Records:</strong> Retained for 8 years as required under the Income Tax Act.</li>
            <li><strong>Chat Logs:</strong> Retained for 2 years after consultation completion, then anonymised.</li>
            <li><strong>Uploaded Documents:</strong> Retained for 1 year after consultation, unless you request deletion.</li>
            <li><strong>Deleted Accounts:</strong> Personal data is anonymised within 30 days of account deletion. Payment and legal records are retained as required by law.</li>
        </ul>
    '],
    ['id'=>'s7','title'=>'7. Your Rights','icon'=>'fas fa-user-shield','content'=>'
        <p>You have the following rights regarding your personal data:</p>
        <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0;">
            '.implode('', array_map(fn($r) => '<div style="background:var(--off-white);border-radius:10px;padding:16px;display:flex;gap:12px;align-items:flex-start;"><i class="'.$r[0].'" style="color:var(--primary);margin-top:3px;width:16px;"></i><div><strong style="font-size:0.87rem;color:var(--primary);display:block;margin-bottom:4px;">'.$r[1].'</strong><p style="font-size:0.8rem;color:var(--text-light);margin:0;line-height:1.6;">'.$r[2].'</p></div></div>', [
                ['fas fa-eye',           'Right to Access',     'Request a copy of all personal data we hold about you.'],
                ['fas fa-edit',          'Right to Rectify',    'Correct any inaccurate or incomplete personal data.'],
                ['fas fa-trash-alt',     'Right to Erasure',    'Request deletion of your personal data (subject to legal obligations).'],
                ['fas fa-ban',           'Right to Object',     'Object to certain processing of your personal data.'],
                ['fas fa-download',      'Right to Portability','Receive your data in a machine-readable format.'],
                ['fas fa-pause-circle',  'Right to Restrict',   'Request restriction of processing in certain circumstances.'],
            ])).'
        </div>
        <p>To exercise any of these rights, email us at <a href="mailto:privacy@meevakeel.in" style="color:var(--primary);font-weight:600;">privacy@meevakeel.in</a> with your registered email address. We will respond within 30 days.</p>
    '],
    ['id'=>'s8','title'=>'8. Third-Party Services','icon'=>'fas fa-link','content'=>'
        <p>Our platform integrates with the following third-party services. Each has its own privacy policy:</p>
        <ul>
            <li><strong>Razorpay</strong> (Payment Processing) — <a href="https://razorpay.com/privacy/" target="_blank" style="color:var(--primary);">Privacy Policy</a></li>
            <li><strong>Google Analytics</strong> (Website Analytics) — <a href="https://policies.google.com/privacy" target="_blank" style="color:var(--primary);">Privacy Policy</a></li>
            <li><strong>MSG91</strong> (SMS Notifications) — <a href="https://msg91.com/privacy" target="_blank" style="color:var(--primary);">Privacy Policy</a></li>
            <li><strong>Google Maps</strong> (Location Display) — <a href="https://policies.google.com/privacy" target="_blank" style="color:var(--primary);">Privacy Policy</a></li>
        </ul>
        <p>We are not responsible for the privacy practices of these third-party services. We recommend reviewing their policies directly.</p>
        <p>Our platform may contain links to external websites. Clicking these links will take you outside MeeVakeel, and we are not responsible for those sites\' privacy practices.</p>
    '],
    ['id'=>'s9','title'=>'9. Children\'s Privacy','icon'=>'fas fa-child','content'=>'
        <p>MeeVakeel is not intended for children under the age of 18. We do not knowingly collect personal information from minors.</p>
        <p>If you are a parent or guardian and believe your child has provided us with personal information, please contact us immediately at <a href="mailto:privacy@meevakeel.in" style="color:var(--primary);">privacy@meevakeel.in</a> and we will delete that information promptly.</p>
    '],
    ['id'=>'s10','title'=>'10. Legal Basis — India\'s PDPB','icon'=>'fas fa-gavel','content'=>'
        <p>We process your personal data in accordance with the Information Technology Act, 2000, the IT (Amendment) Act 2008, the IT (Reasonable Security Practices and Procedures and Sensitive Personal Data or Information) Rules, 2011, and India\'s upcoming Personal Data Protection Bill (PDPB).</p>
        <p>Our legal bases for processing include:</p>
        <ul>
            <li><strong>Contractual Necessity:</strong> Processing required to provide the consultation services you have requested.</li>
            <li><strong>Legitimate Interest:</strong> Platform security, fraud prevention, and service improvement.</li>
            <li><strong>Legal Obligation:</strong> Compliance with Indian tax laws, court orders, and regulatory requirements.</li>
            <li><strong>Consent:</strong> For marketing communications and optional features — with the right to withdraw at any time.</li>
        </ul>
    '],
    ['id'=>'s11','title'=>'11. Changes to This Privacy Policy','icon'=>'fas fa-sync','content'=>'
        <p>We may update this Privacy Policy from time to time to reflect changes in our practices, technology, or legal requirements.</p>
        <p>When we make significant changes, we will:</p>
        <ul>
            <li>Update the "Last Updated" date at the top of this page.</li>
            <li>Send you an email notification if you have an active account.</li>
            <li>Display a prominent notice on our platform for 30 days.</li>
        </ul>
        <p>Your continued use of MeeVakeel after the effective date of changes constitutes your acceptance of the updated policy.</p>
    '],
    ['id'=>'s12','title'=>'12. Contact Us — Privacy Queries','icon'=>'fas fa-envelope','content'=>'
        <p>If you have any questions, concerns, or requests regarding this Privacy Policy or our data practices, please contact our Data Protection Officer:</p>
        <div style="background:var(--off-white);border-radius:14px;padding:24px;margin-top:12px;">
            <div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;">
                <div><strong style="font-size:0.85rem;color:var(--primary);display:block;margin-bottom:4px;">Privacy Officer</strong><span style="font-size:0.85rem;color:var(--text-light);">Data Protection Team, MeeVakeel</span></div>
                <div><strong style="font-size:0.85rem;color:var(--primary);display:block;margin-bottom:4px;">Email</strong><a href="mailto:privacy@meevakeel.in" style="color:var(--primary);font-size:0.85rem;">privacy@meevakeel.in</a></div>
                <div><strong style="font-size:0.85rem;color:var(--primary);display:block;margin-bottom:4px;">Phone</strong><span style="font-size:0.85rem;color:var(--text-light);">+91 9876543210</span></div>
                <div><strong style="font-size:0.85rem;color:var(--primary);display:block;margin-bottom:4px;">Response Time</strong><span style="font-size:0.85rem;color:var(--text-light);">Within 30 days</span></div>
            </div>
        </div>
        <p style="margin-top:16px;font-size:0.88rem;color:var(--text-light);">Address: MeeVakeel Technologies Pvt. Ltd., Hyderabad, Telangana – 500001, India.</p>
    '],
];

foreach ($policyContent as $sec): ?>
                    <div id="<?= $sec['id'] ?>" style="margin-bottom:44px;padding-bottom:44px;border-bottom:1px solid var(--border);">
                        <div style="display:flex;align-items:center;gap:14px;margin-bottom:20px;">
                            <div style="width:44px;height:44px;min-width:44px;background:linear-gradient(135deg,var(--primary),#1a3a6b);border-radius:12px;display:flex;align-items:center;justify-content:center;color:var(--gold);font-size:1rem;">
                                <i class="<?= $sec['icon'] ?>"></i>
                            </div>
                            <h2 style="font-size:1.15rem;margin:0;"><?= $sec['title'] ?></h2>
                        </div>
                        <div style="font-size:0.9rem;color:var(--text);line-height:1.85;">
                            <?= $sec['content'] ?>
                        </div>
                    </div>
<?php endforeach; ?>

                    <!-- Final note -->
                    <div style="background:linear-gradient(135deg,var(--primary),#1a3a6b);border-radius:16px;padding:28px;text-align:center;color:white;">
                        <i class="fas fa-shield-alt" style="font-size:2rem;color:var(--gold);margin-bottom:12px;display:block;"></i>
                        <h5 style="color:white;margin-bottom:8px;">Your Trust is Our Foundation</h5>
                        <p style="color:rgba(255,255,255,0.7);font-size:0.88rem;margin:0;">We are committed to protecting your privacy. If anything in this policy is unclear, please reach out to us at <a href="mailto:privacy@meevakeel.in" style="color:var(--gold);">privacy@meevakeel.in</a>.</p>
                    </div>

                </div><!-- /card -->
            </div><!-- /col -->
        </div>
    </div>
</section>

<script>
// Smooth scroll TOC
document.querySelectorAll('.toc-link').forEach(link => {
    link.addEventListener('click', function(e) {
        e.preventDefault();
        const t = document.querySelector(this.getAttribute('href'));
        if (t) t.scrollIntoView({ behavior: 'smooth', block: 'start' });
    });
});
</script>

<?php require_once '../includes/footer.php'; ?>