import React from 'react';
import Link from 'next/link';

export const metadata = {
    title: 'Cookie Policy | QR Master',
    description: 'Information about how QR Master uses cookies.',
    openGraph: {
        title: 'Cookie Policy | QR Master',
        url: 'https://www.qrmaster.net/cookie-policy',
        type: 'website',
    },
};

export default function CookiePolicyPage() {
    return (
        <div className="min-h-screen bg-white py-12">
            <div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl">
                <div className="mb-8">
                    <Link href="/" className="text-primary-600 hover:text-primary-700 font-medium">
                        ← Back to Home
                    </Link>
                </div>

                <h1 className="text-4xl font-bold text-gray-900 mb-4">Cookie Policy</h1>
                <p className="text-gray-600 mb-8">Last updated: January 2025</p>

                <div className="prose prose-lg max-w-none text-gray-700">
                    <section className="mb-8">
                        <h2 className="text-2xl font-bold text-gray-900 mb-4">What Are Cookies</h2>
                        <p>
                            As is common practice with almost all professional websites, this site uses cookies, which are tiny files that are downloaded to your computer, to improve your experience.
                        </p>
                    </section>

                    <section className="mb-8">
                        <h2 className="text-2xl font-bold text-gray-900 mb-4">How We Use Cookies</h2>
                        <ul className="list-disc pl-6 space-y-2">
                            <li><strong>Essential Cookies:</strong> Required for the website to function (e.g., login, session management).</li>
                            <li><strong>Analytics Cookies (Optional):</strong> We use tools like PostHog to understand how you use the site and improve it. These are only set with your consent.</li>
                            <li><strong>Functionality Cookies:</strong> To remember your preferences.</li>
                        </ul>
                    </section>

                    <section className="mb-8">
                        <h2 className="text-2xl font-bold text-gray-900 mb-4">Disabling Cookies</h2>
                        <p>
                            You can prevent the setting of cookies by adjusting the settings on your browser. Be aware that disabling cookies will affect the functionality of this and many other websites that you visit. Disabling essential cookies will result in disabling certain functionality and features of this site (like logging in).
                        </p>
                    </section>
                </div>
            </div>
        </div>
    );
}
