<?php
// Enhanced security headers
header('Strict-Transport-Security: max-age=31536000; includeSubDomains');

$page_title = "Cookie Policy | UK Data Services";
$page_description = "Learn about how UK Data Services uses cookies on our website to improve user experience and comply with UK privacy regulations.";
$canonical_url = "https://ukdataservices.co.uk/cookie-policy";
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($page_title); ?></title>
    <meta name="description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta name="keywords" content="cookie policy, website cookies, privacy, UK Data Services">
    <meta name="author" content="UK Data Services">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="<?php echo htmlspecialchars($canonical_url); ?>">

    <!-- Open Graph / Social Media -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta property="og:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta property="og:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta property="og:image" content="https://ukdataservices.co.uk/assets/images/ukds-main-logo.png">
    <meta property="og:locale" content="en_GB">

    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta name="twitter:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta name="twitter:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta name="twitter:image" content="https://ukdataservices.co.uk/assets/images/ukds-main-logo.png">

    <!-- Favicon -->
    <link rel="icon" type="image/svg+xml" href="assets/images/favicon.svg">
    <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=Roboto+Slab:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Lato:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="assets/css/main.css?v=20260222">
    
    <style>
        .legal-content {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 20px;
            line-height: 1.6;
        }
        
        .legal-content h1 {
            color: #144784;
            margin-bottom: 20px;
            text-align: center;
        }
        
        .legal-content h2 {
            color: #179e83;
            margin-top: 40px;
            margin-bottom: 20px;
            border-bottom: 2px solid #179e83;
            padding-bottom: 10px;
        }
        
        .legal-content h3 {
            color: #144784;
            margin-top: 30px;
            margin-bottom: 15px;
        }
        
        .legal-content p, .legal-content li {
            margin-bottom: 15px;
            color: #444;
        }
        
        .legal-content ul {
            margin-left: 20px;
        }
        
        .cookie-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        .cookie-table th,
        .cookie-table td {
            border: 1px solid #ddd;
            padding: 12px;
            text-align: left;
        }
        
        .cookie-table th {
            background-color: #179e83;
            color: white;
        }
        
        .cookie-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        
        .contact-info {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin: 30px 0;
        }
        
        .last-updated {
            text-align: center;
            font-style: italic;
            color: #666;
            margin-bottom: 30px;
        }
    </style>
</head>
<body>
    <!-- Navigation -->
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/includes/nav.php"); ?>

    <main class="legal-content">
        <h1>Cookie Policy</h1>
        <p class="last-updated">Last Updated: <?php echo date('jS F Y'); ?></p>

        <p>This Cookie Policy explains how UK Data Services ("we", "our", or "us") uses cookies and similar technologies on our website. This policy should be read alongside our <a href="privacy-policy">Privacy Policy</a>.</p>

        <h2>1. What Are Cookies?</h2>
        <p>Cookies are small text files that are placed on your device when you visit a website. They are widely used to make websites work more efficiently and to provide information to website owners about user behaviour.</p>

        <h3>Types of Cookies</h3>
        <ul>
            <li><strong>Essential Cookies:</strong> Necessary for the website to function properly</li>
            <li><strong>Performance Cookies:</strong> Help us understand how visitors interact with our website</li>
            <li><strong>Functional Cookies:</strong> Remember your preferences and personalise your experience</li>
            <li><strong>Marketing Cookies:</strong> Track visitors across websites to display relevant advertisements</li>
        </ul>

        <h2>2. How We Use Cookies</h2>
        <p>We use cookies for the following purposes:</p>
        <ul>
            <li>To ensure our website functions correctly</li>
            <li>To remember your preferences and settings</li>
            <li>To analyse website performance and user behaviour</li>
            <li>To improve user experience and website functionality</li>
            <li>To provide relevant content and services</li>
        </ul>

        <h2>3. Cookies We Use</h2>
        <table class="cookie-table">
            <thead>
                <tr>
                    <th>Cookie Name</th>
                    <th>Purpose</th>
                    <th>Type</th>
                    <th>Duration</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>_session</td>
                    <td>Maintains user session and form data</td>
                    <td>Essential</td>
                    <td>Session</td>
                </tr>
                <tr>
                    <td>_preferences</td>
                    <td>Remembers user preferences and settings</td>
                    <td>Functional</td>
                    <td>1 year</td>
                </tr>
                <tr>
                    <td>_analytics</td>
                    <td>Google Analytics for website performance</td>
                    <td>Performance</td>
                    <td>2 years</td>
                </tr>
                <tr>
                    <td>_consent</td>
                    <td>Records cookie consent preferences</td>
                    <td>Essential</td>
                    <td>1 year</td>
                </tr>
            </tbody>
        </table>

        <h2>4. Third-Party Cookies</h2>
        <p>We may use third-party services that set their own cookies:</p>
        
        <h3>Google Analytics</h3>
        <ul>
            <li>Helps us understand website usage patterns</li>
            <li>Provides insights into user behaviour and preferences</li>
            <li>Data is anonymised and aggregated</li>
            <li>More information: <a href="https://policies.google.com/privacy" target="_blank" rel="noopener">Google Privacy Policy</a></li>
        </ul>

        <h3>Google Fonts</h3>
        <ul>
            <li>Delivers web fonts for consistent design</li>
            <li>May collect basic usage statistics</li>
            <li>No personal data collected directly</li>
        </ul>

        <h2>5. Managing Your Cookie Preferences</h2>
        <h3>Browser Settings</h3>
        <p>You can control cookies through your browser settings:</p>
        <ul>
            <li><strong>Accept all cookies:</strong> Normal website functionality</li>
            <li><strong>Block all cookies:</strong> May limit website functionality</li>
            <li><strong>Block third-party cookies:</strong> Allows essential cookies only</li>
            <li><strong>Delete existing cookies:</strong> Removes previously stored cookies</li>
        </ul>

        <h3>Browser-Specific Instructions</h3>
        <ul>
            <li><strong>Chrome:</strong> Settings > Privacy and Security > Cookies and other site data</li>
            <li><strong>Firefox:</strong> Settings > Privacy & Security > Cookies and Site Data</li>
            <li><strong>Safari:</strong> Preferences > Privacy > Manage Website Data</li>
            <li><strong>Edge:</strong> Settings > Cookies and site permissions</li>
        </ul>

        <h2>6. Cookie Consent</h2>
        <h3>Your Choices</h3>
        <p>When you first visit our website, you'll see a cookie consent banner allowing you to:</p>
        <ul>
            <li>Accept all cookies</li>
            <li>Accept only essential cookies</li>
            <li>Customise your cookie preferences</li>
            <li>Learn more about our cookie usage</li>
        </ul>

        <h3>Withdrawing Consent</h3>
        <p>You can change your cookie preferences at any time by:</p>
        <ul>
            <li>Using the cookie preference centre (if available)</li>
            <li>Clearing your browser cookies</li>
            <li>Contacting us directly</li>
        </ul>

        <h2>7. Impact of Blocking Cookies</h2>
        <p>If you choose to block cookies, you may experience:</p>
        <ul>
            <li>Reduced website functionality</li>
            <li>Need to re-enter information repeatedly</li>
            <li>Inability to access certain features</li>
            <li>Less personalised experience</li>
        </ul>

        <h3>Essential Cookies</h3>
        <p>Some cookies are essential for website operation and cannot be disabled:</p>
        <ul>
            <li>Security and authentication</li>
            <li>Form submission and data processing</li>
            <li>Load balancing and performance</li>
            <li>Legal compliance tracking</li>
        </ul>

        <h2>8. Mobile Apps and Devices</h2>
        <p>This policy covers our website. Mobile apps may use similar technologies:</p>
        <ul>
            <li>Device identifiers and analytics</li>
            <li>Push notification preferences</li>
            <li>App usage and performance data</li>
            <li>Location services (if permitted)</li>
        </ul>

        <h2>9. Data Protection Rights</h2>
        <p>Under GDPR and UK data protection law, you have rights regarding cookie data:</p>
        <ul>
            <li><strong>Right to be informed:</strong> This policy provides that information</li>
            <li><strong>Right of access:</strong> Request details of cookie data we hold</li>
            <li><strong>Right to rectification:</strong> Correct inaccurate data</li>
            <li><strong>Right to erasure:</strong> Request deletion of cookie data</li>
            <li><strong>Right to object:</strong> Object to certain types of processing</li>
        </ul>

        <h2>10. Updates to This Policy</h2>
        <p>We may update this Cookie Policy to reflect:</p>
        <ul>
            <li>Changes in cookie usage</li>
            <li>New features or functionality</li>
            <li>Legal or regulatory requirements</li>
            <li>Best practice recommendations</li>
        </ul>
        <p>We'll notify you of significant changes through our website or by email.</p>

        <h2>11. Contact Us</h2>
        <div class="contact-info">
            <p>If you have questions about our use of cookies:</p>
            <p><strong>UK Data Services</strong><br>
            Email: <a href="mailto:privacy@ukdataservices.co.uk">privacy@ukdataservices.co.uk</a><br>
            Phone: <a href="tel:+441692689150">+44 1692 689150</a><br>
            Address: United Kingdom</p>
            
            <p>For data protection matters, contact our Data Protection Officer at <a href="mailto:dpo@ukdataservices.co.uk">dpo@ukdataservices.co.uk</a></p>
        </div>

        <h2>12. Useful Resources</h2>
        <p>For more information about cookies and privacy:</p>
        <ul>
            <li><a href="https://ico.org.uk/for-the-public/online/cookies/" target="_blank" rel="noopener">ICO Cookies Guidance</a></li>
            <li><a href="https://www.allaboutcookies.org/" target="_blank" rel="noopener">All About Cookies</a></li>
            <li><a href="https://support.google.com/analytics/answer/181881" target="_blank" rel="noopener">Google Analytics Cookies</a></li>
        </ul>
    </main>

    <!-- Footer -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <div class="footer-logo">
                        <img src="assets/images/logo-white.svg" alt="UK Data Services">
                    </div>
                    <p>Enterprise data intelligence solutions for modern British business. Transform your operations with accurate, actionable insights and regulatory-compliant data services.</p>
                </div>
                
                <div class="footer-section">
                    <h3>Our Services</h3>
                    <ul>
                        <li><a href="/services/competitive-intelligence">Competitive Intelligence</a></li>
                        <li><a href="/services/price-monitoring">Price Monitoring</a></li>
                        <li><a href="/services/data-cleaning">Data Cleaning</a></li>
                        <li><a href="/#services">All Services</a></li>
                    </ul>
                </div>

                <div class="footer-section">
                    <h3>Locations</h3>
                    <ul>
                        <li><a href="/locations/london">London</a></li>
                        <li><a href="/locations/manchester">Manchester</a></li>
                        <li><a href="/locations/birmingham">Birmingham</a></li>
                    </ul>
                </div>

                <div class="footer-section">
                    <h3>Resources & Insights</h3>
                    <ul>
                        <li><a href="/blog/">Data Intelligence Blog</a></li>
                        <li><a href="/case-studies/">Case Studies</a></li>
                        <li><a href="/about">About UK Data Services</a></li>
                        <li><a href="/project-types">Project Types</a></li>
                        <li><a href="/faq">FAQ</a></li>
                        <li><a href="/quote">Request Consultation</a></li>
                    </ul>
                </div>

                <div class="footer-section">
                    <h3>Legal</h3>
                    <ul>
                        <li><a href="/privacy-policy">Privacy Policy</a></li>
                        <li><a href="/terms-of-service">Terms of Service</a></li>
                        <li><a href="/cookie-policy">Cookie Policy</a></li>
                        <li><a href="/gdpr-compliance">GDPR Compliance</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="footer-bottom">
                <p>&copy; <?php echo date('Y'); ?> UK Data Services. All rights reserved.</p>
                <div class="social-links">
                    <a href="https://linkedin.com/company/uk-data-services" aria-label="LinkedIn" target="_blank" rel="noopener noreferrer"><img src="assets/images/icon-linkedin.svg" alt="LinkedIn"></a>
                    <a href="https://twitter.com/ukdataservices" aria-label="Twitter" target="_blank" rel="noopener noreferrer"><img src="assets/images/icon-twitter.svg" alt="Twitter"></a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Scripts -->
    <script src="assets/js/main.js"></script>
</body>
</html>