<?php
$pageTitle = 'About Us - MeeVakeel | India\'s Trusted Online Legal Consultation Platform';
$metaDescription = 'Learn about MeeVakeel - India\'s trusted online legal consultation platform connecting clients with verified lawyers across Telangana, Andhra Pradesh and all of India.';
require_once '../includes/config.php';
require_once '../includes/header.php';

$db = getDB();
$stats = [
    'lawyers'       => $db->query("SELECT COUNT(*) FROM lawyers WHERE verification_status='approved' AND status=1")->fetchColumn() ?: 500,
    'clients'       => $db->query("SELECT COUNT(*) FROM users WHERE status=1")->fetchColumn() ?: 10000,
    'consultations' => $db->query("SELECT COUNT(*) FROM appointments WHERE status='completed'")->fetchColumn() ?: 25000,
    'cities'        => $db->query("SELECT COUNT(DISTINCT city_id) FROM lawyers WHERE status=1")->fetchColumn() ?: 50,
];
?>

<!-- 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">About Us</li>
            </ol>
        </nav>
        <h1 class="mb-2">About <span style="color:var(--gold);">MeeVakeel</span></h1>
        <p style="color:rgba(255,255,255,0.75);font-size:1.05rem;max-width:580px;">
            India's most trusted online legal consultation platform — making justice accessible, affordable and convenient for every citizen.
        </p>
    </div>
</section>

<!-- ── MISSION ── -->
<section class="section">
    <div class="container">
        <div class="row align-items-center g-5">
            <div class="col-lg-6 fade-up">
                <!-- Illustration -->
                <div style="background:linear-gradient(135deg,var(--primary),#1a3a6b);border-radius:24px;padding:48px;text-align:center;position:relative;overflow:hidden;">
                    <div style="position:absolute;top:-40px;right:-40px;width:180px;height:180px;background:rgba(212,175,55,0.08);border-radius:50%;"></div>
                    <svg viewBox="0 0 300 240" xmlns="http://www.w3.org/2000/svg" style="max-width:300px;">
                        <!-- courthouse / pillars -->
                        <rect x="30" y="180" width="240" height="16" rx="4" fill="#D4AF37" opacity="0.9"/>
                        <rect x="50" y="80" width="200" height="104" rx="0" fill="rgba(255,255,255,0.05)" stroke="rgba(212,175,55,0.3)" stroke-width="1"/>
                        <!-- pillars -->
                        <rect x="65"  y="88" width="18" height="92" rx="4" fill="rgba(212,175,55,0.55)"/>
                        <rect x="100" y="88" width="18" height="92" rx="4" fill="rgba(212,175,55,0.55)"/>
                        <rect x="135" y="88" width="18" height="92" rx="4" fill="rgba(212,175,55,0.55)"/>
                        <rect x="170" y="88" width="18" height="92" rx="4" fill="rgba(212,175,55,0.55)"/>
                        <rect x="205" y="88" width="18" height="92" rx="4" fill="rgba(212,175,55,0.55)"/>
                        <!-- pediment -->
                        <polygon points="40,84 150,30 260,84" fill="#D4AF37" opacity="0.85"/>
                        <!-- scale -->
                        <line x1="150" y1="46" x2="150" y2="74" stroke="white" stroke-width="2"/>
                        <line x1="122" y1="60" x2="178" y2="60" stroke="white" stroke-width="2"/>
                        <circle cx="122" cy="67" r="7" fill="none" stroke="white" stroke-width="1.5"/>
                        <circle cx="178" cy="67" r="7" fill="none" stroke="white" stroke-width="1.5"/>
                        <!-- door -->
                        <rect x="125" y="140" width="50" height="40" rx="4" fill="rgba(212,175,55,0.2)" stroke="rgba(212,175,55,0.5)" stroke-width="1"/>
                        <circle cx="170" cy="161" r="3" fill="#D4AF37"/>
                    </svg>
                    <div style="margin-top:24px;">
                        <div style="color:var(--gold);font-family:var(--font-heading);font-size:1.4rem;font-weight:700;">MeeVakeel</div>
                        <div style="color:rgba(255,255,255,0.6);font-size:0.85rem;margin-top:4px;">Guide to Justice</div>
                    </div>
                    <!-- floating badges -->
                    <div style="position:absolute;top:20px;left:20px;background:rgba(255,255,255,0.1);border:1px solid rgba(212,175,55,0.4);color:var(--gold);padding:8px 14px;border-radius:50px;font-size:0.75rem;font-weight:700;">
                        Est. 2024
                    </div>
                    <div style="position:absolute;bottom:24px;right:20px;background:rgba(255,255,255,0.1);border:1px solid rgba(212,175,55,0.4);color:var(--gold);padding:8px 14px;border-radius:50px;font-size:0.75rem;font-weight:700;">
                        🇮🇳 Made in India
                    </div>
                </div>
            </div>

            <div class="col-lg-6 fade-up delay-2">
                <span class="section-badge">Our Story</span>
                <h2 class="section-title mt-2">Democratising Access to <span style="color:var(--gold);">Legal Services</span> in India</h2>
                <div class="divider-gold" style="margin:16px 0 22px;"></div>
                <p class="text-muted mb-3" style="line-height:1.9;">
                    MeeVakeel was founded with a simple but powerful belief — every Indian deserves access to quality legal advice, regardless of where they live or how much they earn. We saw millions of people struggling to navigate the legal system alone, unable to find or afford a good lawyer.
                </p>
                <p class="text-muted mb-3" style="line-height:1.9;">
                    So we built a platform that bridges that gap: a secure, transparent marketplace where verified advocates across India can offer their expertise online — and clients can access legal help instantly, from the comfort of their homes.
                </p>
                <p class="text-muted mb-4" style="line-height:1.9;">
                    Starting from Telangana and Andhra Pradesh, we are rapidly expanding across India, one city at a time, ensuring that justice is never more than a click away.
                </p>
                <div class="row g-3">
                    <div class="col-6">
                        <div style="background:var(--off-white);border-radius:14px;padding:20px;border-left:4px solid var(--gold);">
                            <div style="font-size:2rem;font-weight:800;color:var(--primary);font-family:var(--font-heading);"><?= number_format($stats['lawyers']) ?>+</div>
                            <div style="font-size:0.82rem;color:var(--text-light);font-weight:600;">Verified Lawyers</div>
                        </div>
                    </div>
                    <div class="col-6">
                        <div style="background:var(--off-white);border-radius:14px;padding:20px;border-left:4px solid var(--primary);">
                            <div style="font-size:2rem;font-weight:800;color:var(--primary);font-family:var(--font-heading);"><?= number_format($stats['clients']) ?>+</div>
                            <div style="font-size:0.82rem;color:var(--text-light);font-weight:600;">Happy Clients</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- ── STATS BAR ── -->
<div style="background:linear-gradient(135deg,var(--primary),#1a3a6b);padding:48px 0;">
    <div class="container">
        <div class="row g-4 text-center text-white">
            <?php
            $statItems = [
                ['icon'=>'fas fa-user-tie',      'value'=>number_format($stats['lawyers']).'+'    , 'label'=>'Verified Lawyers'],
                ['icon'=>'fas fa-users',          'value'=>number_format($stats['clients']).'+'   , 'label'=>'Clients Served'],
                ['icon'=>'fas fa-handshake',      'value'=>number_format($stats['consultations']).'+','label'=>'Consultations Done'],
                ['icon'=>'fas fa-map-marker-alt', 'value'=>$stats['cities'].'+',                    'label'=>'Cities Covered'],
                ['icon'=>'fas fa-star',           'value'=>'4.9/5',                                 'label'=>'Average Rating'],
                ['icon'=>'fas fa-shield-alt',     'value'=>'100%',                                  'label'=>'Verified Profiles'],
            ];
            foreach($statItems as $i => $s): ?>
            <div class="col-6 col-md-4 col-lg-2 fade-up delay-<?= $i+1 ?>">
                <div style="padding:10px;">
                    <i class="<?= $s['icon'] ?>" style="font-size:1.8rem;color:var(--gold);margin-bottom:10px;display:block;"></i>
                    <div style="font-size:1.8rem;font-weight:800;color:var(--gold);font-family:var(--font-heading);"><?= $s['value'] ?></div>
                    <div style="font-size:0.8rem;color:rgba(255,255,255,0.65);margin-top:4px;"><?= $s['label'] ?></div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</div>

<!-- ── MISSION / VISION / VALUES ── -->
<section class="section section-light">
    <div class="container">
        <div class="text-center mb-5">
            <span class="section-badge">Our Foundation</span>
            <h2 class="section-title fade-up">What <span style="color:var(--gold);">Drives Us</span></h2>
            <div class="divider-gold"></div>
        </div>
        <div class="row g-4">
            <?php
            $pillars = [
                ['icon'=>'fas fa-bullseye',   'color'=>'var(--primary)', 'title'=>'Our Mission',
                 'text'=>'To democratise access to legal services in India by creating a secure, transparent and technology-driven platform where every citizen can connect with a qualified lawyer — affordably and conveniently.'],
                ['icon'=>'fas fa-eye',         'color'=>'var(--gold-dark)','title'=>'Our Vision',
                 'text'=>'To become India\'s #1 online legal marketplace — a trusted platform where the best legal minds and people who need them can find each other instantly, across every language, city and court.'],
                ['icon'=>'fas fa-heart',       'color'=>'#e74c3c',        'title'=>'Our Values',
                 'text'=>'Transparency in every fee. Integrity in every verification. Empathy for every client. Innovation in every feature. We build trust, not just technology.'],
            ];
            foreach($pillars as $i => $p): ?>
            <div class="col-md-4 fade-up delay-<?= $i+1 ?>">
                <div style="background:white;border-radius:20px;padding:36px 28px;height:100%;box-shadow:var(--shadow);border-top:4px solid <?= $p['color'] ?>;text-align:center;">
                    <div style="width:64px;height:64px;background:<?= $p['color'] ?>;border-radius:16px;display:flex;align-items:center;justify-content:center;margin:0 auto 20px;font-size:1.5rem;color:white;">
                        <i class="<?= $p['icon'] ?>"></i>
                    </div>
                    <h4 style="font-size:1.15rem;margin-bottom:14px;"><?= $p['title'] ?></h4>
                    <p style="color:var(--text-light);font-size:0.9rem;line-height:1.8;margin:0;"><?= $p['text'] ?></p>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</section>

<!-- ── HOW WE VERIFY ── -->
<section class="section">
    <div class="container">
        <div class="row align-items-center g-5">
            <div class="col-lg-6 fade-up">
                <span class="section-badge">Lawyer Verification</span>
                <h2 class="section-title mt-2">How We <span style="color:var(--gold);">Verify</span> Every Lawyer</h2>
                <div class="divider-gold" style="margin:16px 0 24px;"></div>
                <p class="text-muted mb-4" style="line-height:1.9;">
                    We have a rigorous 4-step verification process to ensure every lawyer on MeeVakeel is qualified, genuine and trustworthy. Client safety is our top priority.
                </p>
                <?php
                $steps = [
                    ['num'=>'01','title'=>'Registration & Document Upload',  'desc'=>'Lawyer submits personal details, enrollment card (front & back), and practice information.'],
                    ['num'=>'02','title'=>'Bar Council Enrollment Check',     'desc'=>'Our team verifies the enrollment number and card against the respective State Bar Council records.'],
                    ['num'=>'03','title'=>'Experience & Credentials Review',  'desc'=>'We verify years of practice, court districts and areas of expertise claimed by the lawyer.'],
                    ['num'=>'04','title'=>'Profile Approval & Activation',    'desc'=>'Approved lawyers get a Verified badge and their profile goes live within 48 hours.'],
                ];
                foreach($steps as $s): ?>
                <div style="display:flex;gap:18px;margin-bottom:22px;align-items:flex-start;">
                    <div style="min-width:44px;height:44px;background:linear-gradient(135deg,var(--gold),var(--gold-dark));border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:0.82rem;color:var(--primary);font-family:var(--font-heading);"><?= $s['num'] ?></div>
                    <div>
                        <h6 style="margin-bottom:4px;font-size:0.95rem;"><?= $s['title'] ?></h6>
                        <p style="font-size:0.85rem;color:var(--text-light);margin:0;line-height:1.7;"><?= $s['desc'] ?></p>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
            <div class="col-lg-6 fade-up delay-2">
                <div style="background:var(--off-white);border-radius:24px;padding:40px;">
                    <h5 style="color:var(--primary);margin-bottom:24px;font-size:1.05rem;">What Makes Our Lawyers Trustworthy</h5>
                    <?php
                    $trust = [
                        ['icon'=>'fas fa-id-card',      'label'=>'Bar Council Enrollment Verified'],
                        ['icon'=>'fas fa-gavel',        'label'=>'Minimum 2+ Years of Practice'],
                        ['icon'=>'fas fa-star',          'label'=>'Client Reviews & Ratings'],
                        ['icon'=>'fas fa-map-pin',       'label'=>'Practice Location Verified'],
                        ['icon'=>'fas fa-language',      'label'=>'Multi-language Capability'],
                        ['icon'=>'fas fa-shield-alt',    'label'=>'Confidentiality Agreement Signed'],
                        ['icon'=>'fas fa-chart-line',    'label'=>'Ongoing Performance Monitoring'],
                        ['icon'=>'fas fa-ban',           'label'=>'Instant Suspension for Misconduct'],
                    ];
                    foreach($trust as $t): ?>
                    <div style="display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--border);">
                        <div style="width:36px;height:36px;background:rgba(40,167,69,0.1);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--success);font-size:0.9rem;">
                            <i class="<?= $t['icon'] ?>"></i>
                        </div>
                        <span style="font-size:0.9rem;font-weight:500;color:var(--text);"><?= $t['label'] ?></span>
                        <i class="fas fa-check-circle ms-auto" style="color:var(--success);font-size:0.85rem;"></i>
                    </div>
                    <?php endforeach; ?>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- ── TEAM ── -->
<section class="section section-light">
    <div class="container">
        <div class="text-center mb-5">
            <span class="section-badge">Leadership</span>
            <h2 class="section-title fade-up">The Team Behind <span style="color:var(--gold);">MeeVakeel</span></h2>
            <div class="divider-gold"></div>
            <p class="section-subtitle">Passionate legal-tech professionals on a mission to transform legal access in India.</p>
        </div>
        <div class="row g-4 justify-content-center">
            <?php
            $team = [
                ['name'=>'Arjun Reddy',     'role'=>'Founder & CEO',                'bg'=>'#0A2342','initials'=>'AR','desc'=>'Ex-Corporate Lawyer | 12 yrs legal experience | IIT Hyderabad alumnus'],
                ['name'=>'Priya Sharma',    'role'=>'Co-Founder & Head of Legal',   'bg'=>'#b8960c','initials'=>'PS','desc'=>'Advocate, High Court of Telangana | Legal Tech Expert'],
                ['name'=>'Ravi Teja',       'role'=>'Chief Technology Officer',     'bg'=>'#1a4a8a','initials'=>'RT','desc'=>'Full-stack developer | 10 yrs in product engineering'],
                ['name'=>'Deepa Nair',      'role'=>'Head of Operations',           'bg'=>'#2d6a4f','initials'=>'DN','desc'=>'Operations expert | Scaling legal platforms across South India'],
            ];
            foreach($team as $i => $m): ?>
            <div class="col-lg-3 col-md-6 fade-up delay-<?= $i+1 ?>">
                <div style="background:white;border-radius:20px;overflow:hidden;box-shadow:var(--shadow);text-align:center;transition:var(--transition);" 
                     onmouseover="this.style.transform='translateY(-6px)';this.style.boxShadow='var(--shadow-lg)'"
                     onmouseout="this.style.transform='';this.style.boxShadow='var(--shadow)'">
                    <div style="background:<?= $m['bg'] ?>;height:100px;position:relative;">
                        <div style="position:absolute;bottom:-36px;left:50%;transform:translateX(-50%);width:72px;height:72px;background:<?= $m['bg'] ?>;border:4px solid white;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.4rem;font-weight:800;color:var(--gold);font-family:var(--font-heading);">
                            <?= $m['initials'] ?>
                        </div>
                    </div>
                    <div style="padding:48px 20px 28px;">
                        <h5 style="font-size:1rem;margin-bottom:4px;"><?= $m['name'] ?></h5>
                        <div style="font-size:0.78rem;font-weight:700;color:var(--gold-dark);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:12px;"><?= $m['role'] ?></div>
                        <p style="font-size:0.82rem;color:var(--text-light);line-height:1.6;margin:0;"><?= $m['desc'] ?></p>
                        <div style="margin-top:16px;display:flex;gap:8px;justify-content:center;">
                            <a href="#" style="width:32px;height:32px;background:var(--off-white);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:0.8rem;text-decoration:none;transition:var(--transition);"
                               onmouseover="this.style.background='var(--primary)';this.style.color='white'"
                               onmouseout="this.style.background='var(--off-white)';this.style.color='var(--primary)'"><i class="fab fa-linkedin-in"></i></a>
                            <a href="#" style="width:32px;height:32px;background:var(--off-white);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:0.8rem;text-decoration:none;transition:var(--transition);"
                               onmouseover="this.style.background='var(--primary)';this.style.color='white'"
                               onmouseout="this.style.background='var(--off-white)';this.style.color='var(--primary)'"><i class="fab fa-twitter"></i></a>
                        </div>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</section>

<!-- ── COVERAGE MAP ── -->
<section class="section">
    <div class="container">
        <div class="text-center mb-5">
            <span class="section-badge">Coverage</span>
            <h2 class="section-title fade-up">Where We <span style="color:var(--gold);">Operate</span></h2>
            <div class="divider-gold"></div>
            <p class="section-subtitle">Starting from Telangana & Andhra Pradesh — expanding to every corner of India.</p>
        </div>
        <div class="row g-3">
            <?php
            $covered = [
                'Telangana' => ['Hyderabad','Warangal','Nizamabad','Karimnagar','Khammam','Nalgonda'],
                'Andhra Pradesh' => ['Visakhapatnam','Vijayawada','Guntur','Tirupati','Kurnool','Rajahmundry'],
            ];
            $upcoming = ['Maharashtra','Karnataka','Tamil Nadu','Kerala','Delhi','Gujarat','Rajasthan','Uttar Pradesh'];
            foreach($covered as $state => $cities): ?>
            <div class="col-md-6">
                <div style="background:var(--primary);border-radius:16px;padding:28px;color:white;">
                    <div style="display:flex;align-items:center;gap:10px;margin-bottom:18px;">
                        <div style="width:36px;height:36px;background:var(--gold);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:1rem;"><i class="fas fa-map-marker-alt"></i></div>
                        <div>
                            <div style="font-weight:700;font-size:0.95rem;"><?= $state ?></div>
                            <div style="font-size:0.72rem;color:var(--gold);font-weight:600;">ACTIVE — Primary Market</div>
                        </div>
                    </div>
                    <div style="display:flex;flex-wrap:wrap;gap:8px;">
                        <?php foreach($cities as $c): ?>
                        <span style="background:rgba(212,175,55,0.15);border:1px solid rgba(212,175,55,0.3);color:rgba(255,255,255,0.9);padding:5px 14px;border-radius:50px;font-size:0.78rem;font-weight:500;"><?= $c ?></span>
                        <?php endforeach; ?>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</section>

<!-- ── BOTTOM CTA ── -->
<section style="background:linear-gradient(135deg,var(--gold-dark),var(--gold));padding:70px 0;">
    <div class="container text-center">
        <h2 style="color:var(--primary);font-size:2rem;margin-bottom:14px;">Join the MeeVakeel Family</h2>
        <p style="color:rgba(10,35,66,0.75);font-size:1rem;margin-bottom:32px;max-width:500px;margin-left:auto;margin-right:auto;">
            Whether you need legal help or want to offer your expertise — MeeVakeel is the platform for you.
        </p>
        <div class="d-flex gap-3 justify-content-center flex-wrap">
            <a href="<?= SITE_URL ?>/login.php" style="background:var(--primary);color:white;padding:14px 36px;border-radius:50px;font-weight:700;text-decoration:none;font-size:0.95rem;transition:var(--transition);"
               onmouseover="this.style.transform='translateY(-2px)'"
               onmouseout="this.style.transform=''">
                <i class="fas fa-comments me-2"></i>Talk to a Lawyer
            </a>
            <a href="<?= SITE_URL ?>/register-lawyer.php" style="background:white;color:var(--primary);padding:14px 36px;border-radius:50px;font-weight:700;text-decoration:none;font-size:0.95rem;border:2px solid var(--primary);transition:var(--transition);"
               onmouseover="this.style.transform='translateY(-2px)'"
               onmouseout="this.style.transform=''">
                <i class="fas fa-user-tie me-2"></i>Register as Lawyer
            </a>
        </div>
    </div>
</section>

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