<?php
// Start session for user login if needed
session_start();

// Database connection
$host = 'localhost';
$user = 'vdztuske_katshadebank';
$pass = 'Monica1988N#$%';
$db   = 'vdztuske_motortrader';

$conn = new mysqli($host, $user, $pass, $db);

// Check connection
if ($conn->connect_error) {
    $db_connected = false;
} else {
    $db_connected = true;
}

// Page specific variables
$page_title = "Privacy Policy - MotorTrader Uganda";
$page_description = "MotorTrader Uganda's privacy policy explains how we collect, use, and protect your personal information in compliance with Ugandan data protection laws.";
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes, viewport-fit=cover">
    <title><?php echo $page_title; ?></title>
    <meta name="description" content="<?php echo $page_description; ?>">
    <meta name="keywords" content="privacy policy Uganda, data protection Uganda, MotorTrader privacy, personal information Uganda, Data Protection and Privacy Act">
    
    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.4.0/css/all.css">
    <!-- Fallback for Font Awesome 5 -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
    
    <!-- Google Fonts (as fallback) -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    
    <style>
        /* Font Awesome fallback */
        @font-face {
            font-family: 'Font Awesome 6 Free';
            font-style: normal;
            font-weight: 900;
            src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2'),
                 url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.ttf') format('truetype');
        }
        
        @font-face {
            font-family: 'Font Awesome 6 Free';
            font-style: normal;
            font-weight: 400;
            src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2') format('woff2'),
                 url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.ttf') format('truetype');
        }
        
        @font-face {
            font-family: 'Font Awesome 6 Brands';
            font-style: normal;
            font-weight: 400;
            src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2'),
                 url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.ttf') format('truetype');
        }

        /* IMPORTANT: Force Fabriga font with highest specificity */
        @font-face {
            font-family: 'Fabriga';
            src: url('../fonts/Fabriga.woff2') format('woff2'),
                 url('../fonts/Fabriga.woff') format('woff'),
                 url('../fonts/Fabriga.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Fabriga';
            src: url('../fonts/Fabriga.woff2') format('woff2'),
                 url('../fonts/Fabriga.woff') format('woff'),
                 url('../fonts/Fabriga.ttf') format('truetype');
            font-weight: bold;
            font-style: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Fabriga';
            src: url('../fonts/Fabriga.woff2') format('woff2'),
                 url('../fonts/Fabriga.woff') format('woff'),
                 url('../fonts/Fabriga.ttf') format('truetype');
            font-weight: 800;
            font-style: normal;
            font-display: swap;
        }

        /* Force Fabriga on everything with !important */
        * {
            font-family: 'Fabriga', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
        }

        /* Icons should use Font Awesome, not Fabriga */
        .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, 
        i[class*="fa-"], span[class*="fa-"], .policy-icon i, 
        .notice-icon i, .breadcrumb i, .contact-icon i {
            font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Brands', 'FontAwesome' !important;
            font-weight: 900 !important;
        }
        
        .far {
            font-weight: 400 !important;
        }
        
        .fab, .fa-brands {
            font-family: 'Font Awesome 6 Brands', 'Font Awesome 5 Brands', 'FontAwesome' !important;
            font-weight: 400 !important;
        }

        :root {
            --primary-color: #3e48dd;
            --primary-dark: #000000;
            --secondary-color: #FFD700;
            --accent-color: #198754;
            --light-color: #f8f9fa;
            --dark-color: #343a40;
            --text-color: #333;
            --text-light: #6c757d;
            --border-color: #dee2e6;
            --shadow: 0 5px 15px rgba(0,0,0,0.1);
            --transition: all 0.3s ease;
        }
        
        body {
            margin: 0;
            padding: 0;
            background-color: #ffffff;
            color: var(--text-color);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* Main Content Container - 1300px width */
        .privacy-container {
            max-width: 1300px;
            margin: 0 auto;
            padding: 40px 20px;
            width: 100%;
            flex: 1;
            box-sizing: border-box;
        }
        
        /* Breadcrumb Styles */
        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 30px;
            padding: 15px 0;
            border-bottom: 1px solid var(--border-color);
            flex-wrap: wrap;
        }
        
        .breadcrumb a {
            color: var(--text-light);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: var(--transition);
        }
        
        .breadcrumb a:hover {
            color: var(--primary-color);
        }
        
        .breadcrumb i {
            color: var(--text-light);
            font-size: 12px;
        }
        
        .breadcrumb span {
            color: var(--primary-color);
            font-size: 14px;
            font-weight: 600;
        }
        
        /* Typography */
        h1 {
            font-size: 42px;
            font-weight: 800 !important;
            color: var(--primary-dark);
            margin-bottom: 20px;
            line-height: 1.2;
        }
        
        h2 {
            font-size: 28px;
            font-weight: 700 !important;
            color: var(--primary-dark);
            margin-top: 40px;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 10px;
        }
        
        h2:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background: var(--primary-color);
            border-radius: 2px;
        }
        
        h3 {
            font-size: 22px;
            font-weight: 600 !important;
            color: var(--primary-dark);
            margin: 30px 0 15px;
        }
        
        h4 {
            font-size: 18px;
            font-weight: 600 !important;
            color: var(--primary-dark);
            margin: 20px 0 10px;
        }
        
        p {
            font-size: 16px;
            color: var(--text-color);
            margin-bottom: 20px;
            line-height: 1.8;
        }
        
        /* Hero Section */
        .privacy-hero {
            background: linear-gradient(135deg, var(--primary-color), #2a34b0);
            border-radius: 20px;
            padding: 60px 50px;
            margin-bottom: 40px;
            color: white;
            position: relative;
            overflow: hidden;
        }
        
        .privacy-hero:before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }
        
        .privacy-hero:after {
            content: '';
            position: absolute;
            bottom: -50px;
            left: -50px;
            width: 300px;
            height: 300px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
        }
        
        .privacy-hero h1 {
            color: white;
            position: relative;
            z-index: 2;
        }
        
        .privacy-hero .lead-text {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.9);
            max-width: 800px;
            position: relative;
            z-index: 2;
        }
        
        .last-updated {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 20px;
            border-radius: 30px;
            font-size: 14px;
            margin-top: 20px;
            position: relative;
            z-index: 2;
        }
        
        /* Notice Box */
        .notice-box {
            background: #fff3cd;
            border: 1px solid #ffeeba;
            color: #856404;
            padding: 25px;
            border-radius: 16px;
            margin: 30px 0;
            display: flex;
            gap: 20px;
            align-items: flex-start;
        }
        
        .notice-icon {
            font-size: 30px;
            color: #856404;
            flex-shrink: 0;
        }
        
        .notice-content h3 {
            color: #856404;
            margin-top: 0;
            margin-bottom: 10px;
        }
        
        .notice-content p {
            color: #856404;
            margin-bottom: 0;
        }
        
        /* Policy Sections */
        .policy-section {
            background: white;
            border-radius: 16px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
        }
        
        .policy-section:hover {
            border-color: var(--primary-color);
            box-shadow: 0 10px 25px rgba(62, 72, 221, 0.1);
        }
        
        .policy-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .policy-icon {
            width: 50px;
            height: 50px;
            background: rgba(62, 72, 221, 0.1);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .policy-icon i {
            font-size: 24px;
            color: var(--primary-color);
        }
        
        .policy-header h2 {
            margin: 0;
            padding-bottom: 0;
        }
        
        .policy-header h2:after {
            display: none;
        }
        
        /* List Styles */
        ul, ol {
            margin: 15px 0 20px 25px;
        }
        
        li {
            margin-bottom: 10px;
            color: var(--text-color);
        }
        
        .bullet-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .bullet-list li {
            position: relative;
            padding-left: 25px;
            margin-bottom: 12px;
        }
        
        .bullet-list li:before {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 0;
            color: var(--primary-color);
        }
        
        /* Table Styles */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        .data-table th {
            background: rgba(62, 72, 221, 0.1);
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            border: 1px solid var(--border-color);
        }
        
        .data-table td {
            padding: 12px 15px;
            border: 1px solid var(--border-color);
        }
        
        .data-table tr:hover {
            background: rgba(62, 72, 221, 0.02);
        }
        
        /* Contact Card */
        .contact-card {
            background: white;
            border-radius: 16px;
            padding: 30px;
            margin: 40px 0;
            border: 2px dashed var(--primary-color);
            text-align: center;
        }
        
        .contact-icon-large {
            width: 80px;
            height: 80px;
            background: rgba(62, 72, 221, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
        }
        
        .contact-icon-large i {
            font-size: 36px;
            color: var(--primary-color);
        }
        
        .contact-details {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin: 25px 0;
            flex-wrap: wrap;
        }
        
        .contact-detail {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .contact-detail i {
            color: var(--primary-color);
        }
        
        .contact-detail a {
            color: var(--text-color);
            text-decoration: none;
            font-weight: 500;
        }
        
        .contact-detail a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }
        
        /* Quick Links */
        .quick-links {
            background: var(--light-color);
            border-radius: 16px;
            padding: 25px;
            margin: 30px 0;
            position: sticky;
            top: 100px;
        }
        
        .quick-links h4 {
            margin-top: 0;
            margin-bottom: 15px;
        }
        
        .quick-links ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .quick-links li {
            margin-bottom: 10px;
        }
        
        .quick-links a {
            color: var(--text-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border-radius: 8px;
            transition: var(--transition);
        }
        
        .quick-links a:hover {
            background: white;
            color: var(--primary-color);
            transform: translateX(5px);
        }
        
        .quick-links a i {
            color: var(--primary-color);
            font-size: 14px;
        }
        
        /* Layout */
        .policy-layout {
            display: grid;
            grid-template-columns: 280px 1fr;
            gap: 40px;
            margin-top: 30px;
        }
        
        /* Responsive Design */
        @media (max-width: 992px) {
            h1 { font-size: 36px; }
            h2 { font-size: 24px; }
            
            .policy-layout {
                grid-template-columns: 1fr;
            }
            
            .quick-links {
                position: static;
                margin-bottom: 30px;
            }
            
            .privacy-hero {
                padding: 40px 30px;
            }
        }
        
        @media (max-width: 768px) {
            .privacy-container {
                padding: 20px 15px;
            }
            
            h1 { font-size: 30px; }
            h2 { font-size: 22px; }
            
            .privacy-hero {
                padding: 30px 20px;
            }
            
            .notice-box {
                flex-direction: column;
                text-align: center;
            }
            
            .policy-header {
                flex-direction: column;
                text-align: center;
            }
            
            .contact-details {
                flex-direction: column;
                gap: 15px;
            }
            
            .data-table {
                display: block;
                overflow-x: auto;
            }
        }
        
        /* Utility Classes */
        .text-muted {
            color: var(--text-light);
        }
        
        .text-primary {
            color: var(--primary-color);
        }
        
        .mt-4 {
            margin-top: 40px;
        }
        
        .mb-4 {
            margin-bottom: 40px;
        }
        
        .highlight {
            background: rgba(62, 72, 221, 0.1);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 500;
        }
        
        /* Ensure header and footer maintain Fabriga font */
        header *, footer * {
            font-family: 'Fabriga', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
        }
        
        /* Fix for header icons */
        header i, footer i {
            font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Brands', 'FontAwesome' !important;
        }
    </style>
</head>
<body>
    <!-- Include Header from root folder -->
    <?php include '../header.php'; ?>
    
    <!-- Main Content - 1300px Container -->
    <div class="privacy-container">
        <!-- Breadcrumb -->
        <div class="breadcrumb">
            <a href="/">Home</a>
            <i class="fas fa-chevron-right"></i>
            <a href="/legal">Legal</a>
            <i class="fas fa-chevron-right"></i>
            <span>Privacy Policy</span>
        </div>
        
        <!-- Hero Section -->
        <section class="privacy-hero">
            <h1>Privacy Policy</h1>
            <p class="lead-text">Your privacy is important to us. This policy explains how MotorTrader Uganda collects, uses, and protects your personal information in compliance with Ugandan data protection laws.</p>
            <div class="last-updated">
                <i class="fas fa-calendar-alt"></i> Last Updated: 23 February 2026
            </div>
        </section>
        
        <!-- Notice Box -->
        <div class="notice-box">
            <div class="notice-icon">
                <i class="fas fa-shield-alt"></i>
            </div>
            <div class="notice-content">
                <h3>Your Rights Under Ugandan Law</h3>
                <p>MotorTrader Uganda complies with the Data Protection and Privacy Act, 2019 of Uganda. You have the right to access, correct, and request deletion of your personal data. This policy outlines how we exercise these rights.</p>
            </div>
        </div>
        
        <!-- Policy Layout with Quick Links -->
        <div class="policy-layout">
            <!-- Quick Links Sidebar -->
            <div class="quick-links">
                <h4><i class="fas fa-list"></i> Quick Navigation</h4>
                <ul>
                    <li><a href="#introduction"><i class="fas fa-chevron-right"></i> Introduction</a></li>
                    <li><a href="#information-collect"><i class="fas fa-chevron-right"></i> Information We Collect</a></li>
                    <li><a href="#how-we-use"><i class="fas fa-chevron-right"></i> How We Use Information</a></li>
                    <li><a href="#legal-basis"><i class="fas fa-chevron-right"></i> Legal Basis for Processing</a></li>
                    <li><a href="#information-sharing"><i class="fas fa-chevron-right"></i> Information Sharing</a></li>
                    <li><a href="#data-security"><i class="fas fa-chevron-right"></i> Data Security</a></li>
                    <li><a href="#data-retention"><i class="fas fa-chevron-right"></i> Data Retention</a></li>
                    <li><a href="#your-rights"><i class="fas fa-chevron-right"></i> Your Rights</a></li>
                    <li><a href="#cookies"><i class="fas fa-chevron-right"></i> Cookies & Tracking</a></li>
                    <li><a href="#third-party"><i class="fas fa-chevron-right"></i> Third-Party Links</a></li>
                    <li><a href="#children"><i class="fas fa-chevron-right"></i> Children's Privacy</a></li>
                    <li><a href="#international"><i class="fas fa-chevron-right"></i> International Transfers</a></li>
                    <li><a href="#policy-changes"><i class="fas fa-chevron-right"></i> Policy Changes</a></li>
                    <li><a href="#contact"><i class="fas fa-chevron-right"></i> Contact Us</a></li>
                </ul>
            </div>
            
            <!-- Main Policy Content -->
            <div class="policy-content">
                <!-- Introduction -->
                <section id="introduction" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-info-circle"></i>
                        </div>
                        <h2>1. Introduction</h2>
                    </div>
                    <p>MotorTrader Uganda ("we," "our," or "us") is committed to protecting your privacy and ensuring the security of your personal information. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website motortrader.co.ug, use our mobile application, or engage with our services.</p>
                    
                    <p>MotorTrader Uganda is a premier product of the Katsha Group, with our headquarters at <strong>Plot 45, Acacia Avenue, Kololo, Kampala, Uganda</strong>. We are registered with the Uganda Registration Services Bureau (URSB) and comply with all applicable Ugandan laws, including the <span class="highlight">Data Protection and Privacy Act, 2019</span> and the <span class="highlight">Computer Misuse Act, 2011</span>.</p>
                    
                    <p>By using our platform, you consent to the practices described in this Privacy Policy. If you do not agree with this policy, please do not use our services.</p>
                </section>
                
                <!-- Information We Collect -->
                <section id="information-collect" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-database"></i>
                        </div>
                        <h2>2. Information We Collect</h2>
                    </div>
                    
                    <h3>2.1 Information You Provide Directly</h3>
                    <p>We collect information you voluntarily provide when you:</p>
                    <ul class="bullet-list">
                        <li>Create an account or register on our platform</li>
                        <li>List a vehicle for sale</li>
                        <li>Contact a seller or express interest in a vehicle</li>
                        <li>Subscribe to our newsletters or marketing communications</li>
                        <li>Complete a form or survey</li>
                        <li>Contact our customer support team</li>
                        <li>Submit feedback, ideas, or reviews</li>
                    </ul>
                    
                    <p>This information may include:</p>
                    <table class="data-table">
                        <tr>
                            <th>Information Type</th>
                            <th>Examples</th>
                        </tr>
                        <tr>
                            <td>Identity Information</td>
                            <td>Full name, username, profile picture</td>
                        </tr>
                        <tr>
                            <td>Contact Information</td>
                            <td>Email address, phone number, physical address</td>
                        </tr>
                        <tr>
                            <td>Vehicle Information</td>
                            <td>Vehicle details, photos, price, location</td>
                        </tr>
                        <tr>
                            <td>Financial Information</td>
                            <td>Payment details (processed securely by third-party providers)</td>
                        </tr>
                        <tr>
                            <td>Communication Data</td>
                            <td>Messages sent through our platform, emails, chat logs</td>
                        </tr>
                    </table>
                    
                    <h3>2.2 Information Collected Automatically</h3>
                    <p>When you visit our platform, we automatically collect certain information, including:</p>
                    <ul class="bullet-list">
                        <li><strong>Device Information:</strong> IP address, browser type, operating system, device identifiers</li>
                        <li><strong>Usage Information:</strong> Pages visited, time spent, clicks, searches, referral source</li>
                        <li><strong>Location Information:</strong> Approximate location based on IP address</li>
                        <li><strong>Cookies and Tracking Technologies:</strong> See our Cookies section below</li>
                    </ul>
                    
                    <h3>2.3 Information from Third Parties</h3>
                    <p>We may receive information about you from third parties, including:</p>
                    <ul class="bullet-list">
                        <li>Social media platforms (if you connect your account)</li>
                        <li>Payment processors (transaction confirmations)</li>
                        <li>Partner dealerships and advertisers</li>
                        <li>Credit reference agencies (for financing options)</li>
                    </ul>
                </section>
                
                <!-- How We Use Information -->
                <section id="how-we-use" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-cogs"></i>
                        </div>
                        <h2>3. How We Use Your Information</h2>
                    </div>
                    
                    <p>We use your information for the following purposes:</p>
                    
                    <table class="data-table">
                        <tr>
                            <th>Purpose</th>
                            <th>Description</th>
                        </tr>
                        <tr>
                            <td>Provide Services</td>
                            <td>To operate and maintain your account, process vehicle listings, facilitate communication between buyers and sellers</td>
                        </tr>
                        <tr>
                            <td>Improve Platform</td>
                            <td>To analyze usage patterns, enhance user experience, develop new features</td>
                        </tr>
                        <tr>
                            <td>Communications</td>
                            <td>To send service notifications, respond to inquiries, provide customer support</td>
                        </tr>
                        <tr>
                            <td>Marketing</td>
                            <td>To send promotional materials (with your consent), show relevant advertisements</td>
                        </tr>
                        <tr>
                            <td>Security</td>
                            <td>To detect and prevent fraud, unauthorized access, and other illegal activities</td>
                        </tr>
                        <tr>
                            <td>Legal Compliance</td>
                            <td>To comply with Ugandan laws and regulatory requirements</td>
                        </tr>
                    </table>
                </section>
                
                <!-- Legal Basis for Processing -->
                <section id="legal-basis" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-gavel"></i>
                        </div>
                        <h2>4. Legal Basis for Processing (Uganda)</h2>
                    </div>
                    
                    <p>Under the Data Protection and Privacy Act, 2019 of Uganda, we process your personal information based on the following legal grounds:</p>
                    
                    <ul class="bullet-list">
                        <li><strong>Consent:</strong> You have given clear consent for us to process your personal data for specific purposes (e.g., marketing emails)</li>
                        <li><strong>Contract:</strong> Processing is necessary for a contract you have with us (e.g., listing your vehicle)</li>
                        <li><strong>Legal Obligation:</strong> Processing is necessary to comply with the law (e.g., retaining transaction records)</li>
                        <li><strong>Legitimate Interests:</strong> Processing is necessary for our legitimate interests, provided your rights do not override these interests</li>
                    </ul>
                    
                    <p>We have appointed a Data Protection Officer as required by Ugandan law. You can contact our DPO at <a href="mailto:dpo@motortrader.co.ug">dpo@motortrader.co.ug</a>.</p>
                </section>
                
                <!-- Information Sharing -->
                <section id="information-sharing" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-share-alt"></i>
                        </div>
                        <h2>5. Information Sharing and Disclosure</h2>
                    </div>
                    
                    <p>We may share your information in the following circumstances:</p>
                    
                    <h3>5.1 With Other Users</h3>
                    <p>When you list a vehicle or contact a seller, certain information (name, contact details) is visible to other users to facilitate transactions.</p>
                    
                    <h3>5.2 With Service Providers</h3>
                    <p>We share information with third-party service providers who help us operate our business, including:</p>
                    <ul class="bullet-list">
                        <li>Payment processors (MTN MoMo, Airtel Money, Stanbic Bank)</li>
                        <li>Cloud hosting providers</li>
                        <li>Analytics providers (Google Analytics)</li>
                        <li>Customer support tools</li>
                        <li>Marketing and advertising partners</li>
                    </ul>
                    
                    <h3>5.3 With Katsha Group Companies</h3>
                    <p>As part of the Katsha Group, we may share information with our parent company and sister companies (including WorldHost, DomainsUG, Katsha International Colleges) for internal business purposes, always in compliance with Ugandan data protection laws.</p>
                    
                    <h3>5.4 For Legal Reasons</h3>
                    <p>We may disclose your information if required by law, such as to comply with a subpoena or similar legal process, or to protect the rights, property, or safety of MotorTrader Uganda, our users, or others.</p>
                    
                    <h3>5.5 Business Transfers</h3>
                    <p>If MotorTrader Uganda or the Katsha Group is involved in a merger, acquisition, or sale of assets, your information may be transferred as part of that transaction.</p>
                </section>
                
                <!-- Data Security -->
                <section id="data-security" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-lock"></i>
                        </div>
                        <h2>6. Data Security</h2>
                    </div>
                    
                    <p>We implement appropriate technical and organizational measures to protect your personal information, including:</p>
                    
                    <ul class="bullet-list">
                        <li>SSL/TLS encryption for all data transmitted between your browser and our servers</li>
                        <li>Secure data centers located in South Africa and Europe</li>
                        <li>Regular security audits and penetration testing</li>
                        <li>Access controls and authentication requirements for employees</li>
                        <li>Staff training on data protection and privacy</li>
                    </ul>
                    
                    <p>While we strive to protect your information, no method of transmission over the Internet or electronic storage is 100% secure. We cannot guarantee absolute security, but we continuously work to improve our security practices.</p>
                </section>
                
                <!-- Data Retention -->
                <section id="data-retention" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-clock"></i>
                        </div>
                        <h2>7. Data Retention</h2>
                    </div>
                    
                    <p>We retain your personal information only as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required or permitted by law.</p>
                    
                    <table class="data-table">
                        <tr>
                            <th>Data Type</th>
                            <th>Retention Period</th>
                        </tr>
                        <tr>
                            <td>Account Information</td>
                            <td>Until account deletion + 30 days backup</td>
                        </tr>
                        <tr>
                            <td>Vehicle Listings</td>
                            <td>Duration of listing + 90 days for record-keeping</td>
                        </tr>
                        <tr>
                            <td>Transaction Records</td>
                            <td>7 years (to comply with tax laws)</td>
                        </tr>
                        <tr>
                            <td>Communications</td>
                            <td>2 years</td>
                        </tr>
                        <tr>
                            <td>Marketing Data</td>
                            <td>Until consent withdrawal</td>
                        </tr>
                    </table>
                </section>
                
                <!-- Your Rights -->
                <section id="your-rights" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-user-check"></i>
                        </div>
                        <h2>8. Your Rights Under Ugandan Law</h2>
                    </div>
                    
                    <p>Under the Data Protection and Privacy Act, 2019 of Uganda, you have the following rights:</p>
                    
                    <ul class="bullet-list">
                        <li><strong>Right to Access:</strong> Request a copy of your personal information we hold</li>
                        <li><strong>Right to Rectification:</strong> Request correction of inaccurate or incomplete information</li>
                        <li><strong>Right to Erasure:</strong> Request deletion of your personal information (subject to legal obligations)</li>
                        <li><strong>Right to Restriction:</strong> Request restriction of processing in certain circumstances</li>
                        <li><strong>Right to Data Portability:</strong> Request transfer of your data to another service provider</li>
                        <li><strong>Right to Object:</strong> Object to processing based on legitimate interests or direct marketing</li>
                        <li><strong>Right to Withdraw Consent:</strong> Withdraw consent at any time where processing is based on consent</li>
                    </ul>
                    
                    <p>To exercise these rights, please contact us at <a href="mailto:privacy@motortrader.co.ug">privacy@motortrader.co.ug</a>. We will respond within 30 days as required by Ugandan law.</p>
                    
                    <p>You also have the right to lodge a complaint with the <span class="highlight">Personal Data Protection Office (PDPO) of Uganda</span> if you believe your data protection rights have been violated.</p>
                </section>
                
                <!-- Cookies -->
                <section id="cookies" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-cookie-bite"></i>
                        </div>
                        <h2>9. Cookies and Tracking Technologies</h2>
                    </div>
                    
                    <p>We use cookies and similar tracking technologies to enhance your experience on our platform. Cookies are small text files stored on your device.</p>
                    
                    <h3>Types of Cookies We Use:</h3>
                    <ul class="bullet-list">
                        <li><strong>Essential Cookies:</strong> Required for platform functionality (login, security)</li>
                        <li><strong>Analytical Cookies:</strong> Help us understand how users interact with our platform</li>
                        <li><strong>Functional Cookies:</strong> Remember your preferences and settings</li>
                        <li><strong>Marketing Cookies:</strong> Track your activity for targeted advertising</li>
                    </ul>
                    
                    <p>You can manage cookie preferences through your browser settings. However, disabling certain cookies may affect platform functionality.</p>
                    
                    <p>We also use Google Analytics to analyze usage patterns. Google's privacy policy is available at <a href="https://policies.google.com/privacy" target="_blank">https://policies.google.com/privacy</a>.</p>
                </section>
                
                <!-- Third-Party Links -->
                <section id="third-party" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-external-link-alt"></i>
                        </div>
                        <h2>10. Third-Party Links</h2>
                    </div>
                    
                    <p>Our platform may contain links to third-party websites, including:</p>
                    <ul class="bullet-list">
                        <li>Partner dealerships and advertisers</li>
                        <li>Financial institutions (for financing options)</li>
                        <li>Social media platforms</li>
                        <li>Payment processors</li>
                    </ul>
                    
                    <p>We are not responsible for the privacy practices or content of these third-party sites. We encourage you to review their privacy policies before providing any information.</p>
                </section>
                
                <!-- Children's Privacy -->
                <section id="children" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-child"></i>
                        </div>
                        <h2>11. Children's Privacy</h2>
                    </div>
                    
                    <p>Our services are not intended for individuals under the age of 18. We do not knowingly collect personal information from children under 18. If you become aware that a child has provided us with personal information, please contact us immediately.</p>
                    
                    <p>In Uganda, the legal age of majority is 18 years. Anyone under this age is not permitted to use our services without parental consent.</p>
                </section>
                
                <!-- International Transfers -->
                <section id="international" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-globe-africa"></i>
                        </div>
                        <h2>12. International Data Transfers</h2>
                    </div>
                    
                    <p>Your information may be transferred to and processed in countries other than Uganda, including South Africa (where our parent company Katsha Group has offices) and other jurisdictions where our service providers operate.</p>
                    
                    <p>When we transfer data internationally, we ensure appropriate safeguards are in place, including:</p>
                    <ul class="bullet-list">
                        <li>Standard contractual clauses approved by the Uganda PDPO</li>
                        <li>Binding corporate rules within the Katsha Group</li>
                        <li>Transfer to countries with adequate data protection laws</li>
                    </ul>
                </section>
                
                <!-- Policy Changes -->
                <section id="policy-changes" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-history"></i>
                        </div>
                        <h2>13. Changes to This Privacy Policy</h2>
                    </div>
                    
                    <p>We may update this Privacy Policy from time to time to reflect changes in our practices, legal requirements, or operational needs. We will notify you of material changes by:</p>
                    
                    <ul class="bullet-list">
                        <li>Posting the new policy on this page with an updated effective date</li>
                        <li>Sending an email notification (for significant changes)</li>
                        <li>Displaying a notice on our platform</li>
                    </ul>
                    
                    <p>We encourage you to review this Privacy Policy periodically. Your continued use of our platform after changes constitutes acceptance of the revised policy.</p>
                </section>
                
                <!-- Contact Us -->
                <section id="contact" class="policy-section">
                    <div class="policy-header">
                        <div class="policy-icon">
                            <i class="fas fa-envelope"></i>
                        </div>
                        <h2>14. Contact Us</h2>
                    </div>
                    
                    <p>If you have questions, concerns, or requests regarding this Privacy Policy or our data practices, please contact us:</p>
                    
                    <div style="margin: 25px 0;">
                        <p><strong>MotorTrader Uganda</strong><br>
                        Plot 45, Acacia Avenue<br>
                        Kololo, Kampala<br>
                        Uganda</p>
                        
                        <p><strong>Data Protection Officer:</strong> <a href="mailto:dpo@motortrader.co.ug">dpo@motortrader.co.ug</a></p>
                        <p><strong>Privacy Inquiries:</strong> <a href="mailto:privacy@motortrader.co.ug">privacy@motortrader.co.ug</a></p>
                        <p><strong>Phone:</strong> <a href="tel:+256312123456">+256 312 123 456</a></p>
                    </div>
                    
                    <p>You may also contact the Ugandan Personal Data Protection Office:</p>
                    <p><strong>Personal Data Protection Office (PDPO)</strong><br>
                    Plot 3-5, George Street, Kampala<br>
                    Email: <a href="mailto:info@pdpo.go.ug">info@pdpo.go.ug</a><br>
                    Website: <a href="https://www.pdpo.go.ug" target="_blank">www.pdpo.go.ug</a></p>
                </section>
            </div>
        </div>
        
        <!-- Additional Contact Card -->
        <div class="contact-card">
            <div class="contact-icon-large">
                <i class="fas fa-shield-heart"></i>
            </div>
            <h3>Your Privacy Matters to Us</h3>
            <p>If you have any concerns about how we handle your personal information, please don't hesitate to reach out to our Data Protection Officer.</p>
            
            <div class="contact-details">
                <div class="contact-detail">
                    <i class="fas fa-envelope"></i>
                    <a href="mailto:privacy@motortrader.co.ug">privacy@motortrader.co.ug</a>
                </div>
                <div class="contact-detail">
                    <i class="fas fa-phone-alt"></i>
                    <a href="tel:+256312123456">+256 312 123 456</a>
                </div>
                <div class="contact-detail">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>Kololo, Kampala</span>
                </div>
            </div>
            
            <p style="font-size: 14px; color: var(--text-light); margin-bottom: 0;">
                <i class="fas fa-clock"></i> Response time: Within 5 business days
            </p>
        </div>
        
        <!-- Download Section -->
        <div style="background: var(--light-color); border-radius: 16px; padding: 30px; margin: 40px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;">
            <div>
                <h4 style="margin: 0 0 5px 0;"><i class="fas fa-download"></i> Download Our Privacy Policy</h4>
                <p style="margin: 0; color: var(--text-light);">Get a PDF copy of our privacy policy for your records.</p>
            </div>
            <a href="#" style="background: var(--primary-color); color: white; padding: 12px 25px; border-radius: 50px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 10px;">
                <i class="fas fa-file-pdf"></i> Download PDF
            </a>
        </div>
    </div>
    
    <!-- Include Footer from root folder -->
    <?php include '../footer.php'; ?>
    
    <script>
        // Smooth scrolling for anchor links
        document.querySelectorAll('.quick-links a').forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                const targetId = this.getAttribute('href');
                const targetElement = document.querySelector(targetId);
                
                if (targetElement) {
                    targetElement.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                    
                    // Highlight the section briefly
                    targetElement.style.transition = 'background-color 0.5s';
                    targetElement.style.backgroundColor = 'rgba(62, 72, 221, 0.05)';
                    setTimeout(() => {
                        targetElement.style.backgroundColor = '';
                    }, 1000);
                }
            });
        });
        
        // Highlight current section in quick links
        window.addEventListener('scroll', function() {
            const sections = document.querySelectorAll('.policy-section');
            const navLinks = document.querySelectorAll('.quick-links a');
            
            let currentSection = '';
            
            sections.forEach(section => {
                const sectionTop = section.offsetTop - 150;
                const sectionBottom = sectionTop + section.offsetHeight;
                
                if (window.scrollY >= sectionTop && window.scrollY < sectionBottom) {
                    currentSection = '#' + section.getAttribute('id');
                }
            });
            
            navLinks.forEach(link => {
                link.style.fontWeight = '400';
                link.style.color = '';
                if (link.getAttribute('href') === currentSection) {
                    link.style.fontWeight = '700';
                    link.style.color = 'var(--primary-color)';
                }
            });
        });
    </script>
</body>
</html>

<?php
// Close database connection
if (isset($conn) && $db_connected) {
    $conn->close();
}
?>