<?php
$page_title = "Cookie Policy";
require_once '../config/config.php';
require_once '../includes/user_auth.php';
require_once '../includes/functions.php';

if (!isset($auth)) {
    $auth = new Auth();
}

require_once '../includes/header_user.php';
?>

<div class="container mx-auto px-4 py-8">
    <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-lg p-8">
        <h1 class="text-3xl font-bold text-gray-800 mb-6">Cookie Policy</h1>
        <p class="text-gray-600 mb-4">Last updated: <?php echo date('F d, Y'); ?></p>

        <div class="prose max-w-none text-gray-700 space-y-6">
            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">1. What Are Cookies</h2>
                <p>Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">2. How We Use Cookies</h2>
                <p>When you use and access the Service, we may place a number of cookies files in your web browser. We use cookies for the following purposes:</p>
                <ul class="list-disc pl-5 mt-2 space-y-1">
                    <li>To enable certain functions of the Service.</li>
                    <li>To provide analytics.</li>
                    <li>To store your preferences.</li>
                    <li>To enable advertisements delivery, including behavioral advertising.</li>
                </ul>
            </section>

            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">3. Types of Cookies We Use</h2>
                <ul class="list-disc pl-5 mt-2 space-y-1">
                    <li><strong>Essential Cookies:</strong> We may use essential cookies to authenticate users and prevent fraudulent use of user accounts.</li>
                    <li><strong>Preferences Cookies:</strong> We may use these cookies to remember information that changes the way the Service behaves or looks, such as the "remember me" functionality of a registered user or a user's language preference.</li>
                    <li><strong>Analytics Cookies:</strong> We may use analytics cookies to track information how the Service is used so that we can make improvements.</li>
                </ul>
            </section>

            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">4. Third-Party Cookies</h2>
                <p>In addition to our own cookies, we may also use various third-parties cookies to report usage statistics of the Service, deliver advertisements on and through the Service, and so on.</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">5. What Are Your Choices Regarding Cookies</h2>
                <p>If you'd like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser.</p>
                <p class="mt-2">Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features we offer, you may not be able to store your preferences, and some of our pages might not display properly.</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold text-gray-800 mb-3">6. More Information</h2>
                <p>For more information about cookies, you can visit the following third-party websites:</p>
                <ul class="list-disc pl-5 mt-2 space-y-1">
                    <li><a href="http://www.allaboutcookies.org/" target="_blank" class="text-blue-600 hover:underline">AllAboutCookies</a></li>
                    <li><a href="http://www.networkadvertising.org/" target="_blank" class="text-blue-600 hover:underline">Network Advertising Initiative</a></li>
                </ul>
            </section>
        </div>
    </div>
</div>

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