@using Microsoft.Extensions.Localization
@inject IStringLocalizer<QRRapidoApp.Resources.SharedResource> Localizer

@{
    ViewData["Title"] = Localizer["PrivacyPolicyTitle"];
    ViewData["Description"] = Localizer["PrivacyPolicyDescription"];
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="container my-5">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="card shadow">
                <div class="card-body">
                    <h1 class="h2 mb-4 text-primary">
                        <i class="fas fa-shield-alt me-2"></i>
                        @Localizer["PrivacyPolicyTitle"]
                    </h1>
                    
                    <div class="alert alert-info">
                        <i class="fas fa-info-circle me-2"></i>
                        <strong>@Localizer["PrivacyPolicyLastUpdated"]:</strong> @DateTime.Now.ToString("dd/MM/yyyy")
                    </div>
                    
                    <div class="privacy-content">
                        <p class="lead">@Localizer["PrivacyPolicyIntroduction"]</p>
                        
                        <hr class="my-4">
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyDataCollection"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyDataCollectionContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyDataUsage"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyDataUsageContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyDataProtection"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyDataProtectionContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyDataSharing"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyDataSharingContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyUserRights"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyUserRightsContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyCookies"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyCookiesContent"].Value.Replace("\n", "<br>"))
                        </div>
                        
                        <h3 class="h4 text-primary mt-4 mb-3">@Localizer["PrivacyContact"]</h3>
                        <div class="privacy-section">
                            @Html.Raw(Localizer["PrivacyContactContent"].Value.Replace("\n", "<br>"))
                        </div>
                    </div>
                    
                    <hr class="my-4">
                    
                    <div class="text-center">
                        <a href="@Url.Action("Index", "Home")" class="btn btn-primary btn-lg">
                            <i class="fas fa-arrow-left me-2"></i>
                            @Localizer["BackToHome"]
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@if (ViewBag.ShowAds == true)
{
    <div class="container mt-4">
        <div class="row justify-content-center">
            <div class="col-12 col-md-8">
                <div class="alert alert-warning text-center">
                    <h5><i class="fas fa-star me-2"></i>@Localizer["SpecialOffer"]</h5>
                    <p class="mb-2">@Localizer["UpgradePremiumRemoveAds"]</p>
                    <a href="@Url.Action("Upgrade", "Premium")" class="btn btn-success">
                        @Localizer["UpgradeNowButton"]
                    </a>
                </div>
            </div>
        </div>
    </div>
}

<style>
    .privacy-content {
        line-height: 1.6;
    }
    
    .privacy-section {
        margin-bottom: 1.5rem;
        padding: 1rem;
        background-color: #f8f9fa;
        border-radius: 0.375rem;
        border-left: 4px solid var(--bs-primary);
    }
    
    .privacy-section ul {
        margin-bottom: 0;
        padding-left: 1.5rem;
    }
    
    .card {
        border: none;
        border-radius: 1rem;
    }
    
    .card-body {
        padding: 2rem;
    }
    
    @@media (max-width: 768px) {
        .card-body {
            padding: 1rem;
        }
        
        .privacy-section {
            padding: 0.75rem;
        }
    }
</style>