// frontend/app/[locale]/help/page.tsx
import type { Metadata } from "next";
import Link from "next/link";
import type { Locale } from "@/lib/i18n";
import { isLocale } from "@/lib/i18n";

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://newsoras.com";
const SITE_NAME = "Newsoras";

const SUPPORT_EMAIL = process.env.NEXT_PUBLIC_SUPPORT_EMAIL || "support@newsoras.com";

type FAQ = {
  q: string;
  a: string;
};

type Copy = {
  title: string;
  subtitle: string;

  metaTitle: string;
  metaDescription: string;

  quickTitle: string;
  quickCards: { title: string; desc: string; cta: string; href: string }[];

  faqTitle: string;
  faqs: FAQ[];

  policyTitle: string;
  policyP: string;
  policyCards: { title: string; desc: string; href: string }[];

  aiTitle: string;
  aiP: string;
  aiBullets: string[];

  contactTitle: string;
  contactP: string;
  contactCta: string;

  footerNote: string;
};

function getCopy(locale: Locale): Copy {
  if (locale === "es") {
    return {
      title: "Ayuda",
      subtitle: "Respuestas rápidas, correcciones y buenas prácticas editoriales.",

      metaTitle: "Ayuda — Newsoras",
      metaDescription:
        "Centro de ayuda de Newsoras: preguntas frecuentes, correcciones, uso de IA, derechos de autor y contacto. Periodismo independiente con enfoque en veracidad y contexto.",

      quickTitle: "Accesos rápidos",
      quickCards: [
        {
          title: "Reportar un error factual",
          desc: "Si encontrás un dato incorrecto (fecha, cifra, nombre), avisá con una fuente verificable.",
          cta: "Ir a correcciones",
          href: "#correcciones",
        },
        {
          title: "Sugerir un tema",
          desc: "Proponé un tema con contexto, fuentes y por qué importa ahora.",
          cta: "Ir a sugerencias",
          href: "#sugerencias",
        },
        {
          title: "Contacto",
          desc: "Para consultas, colaboraciones o reclamos de copyright.",
          cta: "Ir a contacto",
          href: `/${locale}/contact`,
        },
      ],

      faqTitle: "Preguntas frecuentes",
      faqs: [
        {
          q: "¿Qué es Newsoras?",
          a: "Un medio independiente enfocado en geopolítica, mercados y tecnología. Priorizamos claridad, contexto y verificación.",
        },
        {
          q: "¿Cómo usan IA?",
          a: "Como asistente editorial: borradores, mejoras de claridad, y chequeos básicos de consistencia. La decisión final siempre es humana.",
        },
        {
          q: "¿Cómo pido una corrección?",
          a: "Enviá el link del artículo, el párrafo y la fuente primaria (documento/comunicado/dataset). Si corresponde, corregimos y dejamos registro.",
        },
        {
          q: "¿Puedo reutilizar contenido de Newsoras?",
          a: "Podés citar extractos cortos con atribución y link. Para republicación completa o uso comercial, escribinos.",
        },
        {
          q: "¿Por qué a veces falta una fuente?",
          a: "Si un dato es incierto o no se puede confirmar con fuentes confiables, lo marcamos como hipótesis o se omite. Si falta, reportalo.",
        },
      ],

      policyTitle: "Políticas (resumen)",
      policyP:
        "Nuestro enfoque: veracidad, transparencia y respeto por derechos de autor. Este resumen no sustituye asesoría legal.",
      policyCards: [
        {
          title: "Atribución y fuentes",
          desc: "Siempre que sea posible, citamos fuentes primarias y enlazamos referencias.",
          href: "#fuentes",
        },
        {
          title: "Correcciones",
          desc: "Corregimos errores factuales y aclaramos cambios cuando corresponde.",
          href: "#correcciones",
        },
        {
          title: "Derechos de autor",
          desc: "No copiamos material de terceros sin permiso. Si sos titular de derechos, contactanos.",
          href: "#copyright",
        },
      ],

      aiTitle: "IA y transparencia",
      aiP:
        "La IA puede ayudar, pero también puede equivocarse. Por eso tenemos reglas internas para evitar errores y mantener confianza.",
      aiBullets: [
        "La IA no es fuente: las fuentes son documentos y reportes citados.",
        "No publicamos imágenes de IA como si fueran reales (si se usa IA, se indica).",
        "Chequeamos fechas, cifras, nombres y coherencia antes de publicar.",
        "Cuando un dato no está confirmado, se marca como hipótesis o se omite.",
      ],

      contactTitle: "¿Necesitás ayuda adicional?",
      contactP:
        "Si tu caso no encaja en lo anterior (reclamos, solicitudes formales, seguridad, etc.), escribinos.",
      contactCta: "Contactar soporte",

      footerNote:
        "Newsoras — S.O.R.A.S.: Source-Oriented, Real-time Analysis System. Hechos verificables + análisis con criterio.",
    };
  }

  if (locale === "zh") {
    return {
      title: "帮助",
      subtitle: "快速解答、勘误与编辑规范。",

      metaTitle: "帮助 — Newsoras",
      metaDescription:
        "Newsoras 帮助中心：常见问题、勘误、AI 使用、版权与联系方式。独立新闻，重视真实性与背景。",

      quickTitle: "快速入口",
      quickCards: [
        { title: "提交事实错误", desc: "若发现日期/数字/姓名错误，请提供可核查来源。", cta: "查看勘误", href: "#correcciones" },
        { title: "建议选题", desc: "提供背景、来源与为何重要。", cta: "查看建议", href: "#sugerencias" },
        { title: "联系", desc: "合作、咨询或版权投诉。", cta: "联系页面", href: `/${locale}/contact` },
      ],

      faqTitle: "常见问题",
      faqs: [
        { q: "Newsoras 是什么？", a: "独立新闻媒体，聚焦地缘政治、市场与科技，强调清晰、背景与核查。" },
        { q: "如何使用 AI？", a: "作为编辑助手：草稿、表达优化与一致性检查。最终发布由人类负责。" },
        { q: "如何申请更正？", a: "提供文章链接、具体段落与一手来源（文件/公告/数据）。我们会核查并必要时更正。" },
        { q: "可以转载 Newsoras 内容吗？", a: "可短引用并注明来源与链接。全文转载或商业使用请联系我们。" },
        { q: "为什么有时缺少来源？", a: "若无法可靠核实，会标注为假设或不采用。欢迎反馈。" },
      ],

      policyTitle: "政策摘要",
      policyP: "我们重视真实性、透明与版权。此摘要不构成法律意见。",
      policyCards: [
        { title: "来源与引用", desc: "尽可能引用一手资料并提供链接。", href: "#fuentes" },
        { title: "勘误", desc: "事实错误会更正，并在必要时记录变更。", href: "#correcciones" },
        { title: "版权", desc: "未经许可不复制第三方内容。权利人可联系处理。", href: "#copyright" },
      ],

      aiTitle: "AI 与透明",
      aiP: "AI 能提效，也可能犯错。因此我们有内部规则来降低风险。",
      aiBullets: [
        "AI 不是来源：来源是可引用的文件与报道。",
        "不把 AI 图像当作真实事件（使用会标注）。",
        "发布前检查日期、数字、姓名与一致性。",
        "无法确认的数据会标为假设或不使用。",
      ],

      contactTitle: "需要更多帮助？",
      contactP: "如果你的情况更复杂（版权、正式请求、安全等），请联系我们。",
      contactCta: "联系支持",

      footerNote: "Newsoras — S.O.R.A.S.: Source-Oriented, Real-time Analysis System（基于来源的实时分析体系）。",
    };
  }

  return {
    title: "Help",
    subtitle: "Quick answers, corrections, and editorial best practices.",

    metaTitle: "Help — Newsoras",
    metaDescription:
      "Newsoras Help Center: FAQs, corrections, AI usage, copyright, and contact options. Independent journalism focused on truth and context.",

    quickTitle: "Quick links",
    quickCards: [
      { title: "Report a factual error", desc: "If a date/number/name is wrong, report it with a primary source.", cta: "Go to corrections", href: "#correcciones" },
      { title: "Suggest a story", desc: "Send a topic with context, sources, and why it matters now.", cta: "Go to suggestions", href: "#sugerencias" },
      { title: "Contact", desc: "For collaborations, inquiries, or copyright claims.", cta: "Contact page", href: `/${locale}/contact` },
    ],

    faqTitle: "Frequently asked questions",
    faqs: [
      { q: "What is Newsoras?", a: "An independent outlet focused on geopolitics, markets, and tech—built for clarity, context, and verification." },
      { q: "How do you use AI?", a: "As an editorial assistant: drafts, clarity improvements, and basic consistency checks. Final responsibility is always human." },
      { q: "How do I request a correction?", a: "Send the article link, the exact paragraph, and the primary source (document/statement/dataset). If valid, we correct and record changes when appropriate." },
      { q: "Can I reuse Newsoras content?", a: "You may quote short excerpts with attribution and a link. For full republication or commercial use, contact us." },
      { q: "Why might a source be missing?", a: "If something can’t be reliably verified, we label it as hypothesis or omit it. If you spot a gap, tell us." },
    ],

    policyTitle: "Policies (summary)",
    policyP:
      "Our focus: truthfulness, transparency, and respect for copyright. This summary is not legal advice.",
    policyCards: [
      { title: "Attribution & sources", desc: "We link primary sources when possible and cite references.", href: "#fuentes" },
      { title: "Corrections", desc: "We correct factual errors and clarify updates when appropriate.", href: "#correcciones" },
      { title: "Copyright", desc: "We don’t copy third-party material without permission. Rights holders can contact us.", href: "#copyright" },
    ],

    aiTitle: "AI & transparency",
    aiP:
      "AI can help—but it can also be wrong. We use internal rules to reduce risk and maintain trust.",
    aiBullets: [
      "AI is not a source: sources are the cited documents and reports.",
      "We don’t present AI images as real events (we label AI use).",
      "We check dates, numbers, names, and consistency before publishing.",
      "Unconfirmed claims are labeled as hypotheses or omitted.",
    ],

    contactTitle: "Need more help?",
    contactP:
      "If your case is not covered (claims, formal requests, security, etc.), contact support.",
    contactCta: "Contact support",

    footerNote:
      "Newsoras — S.O.R.A.S.: Source-Oriented, Real-time Analysis System. Verifiable facts + thoughtful analysis.",
  };
}

// --- SEO: generateMetadata ---------------------------------------------------
export async function generateMetadata({
  params,
}: {
  params: Promise<{ locale: string }>;
}): Promise<Metadata> {
  const { locale: rawLocale } = await params;
  const locale: Locale = isLocale(rawLocale) ? rawLocale : "en";
  const t = getCopy(locale);

  const canonical = new URL(`/${locale}/help`, SITE_URL).toString();

  return {
    title: t.metaTitle,
    description: t.metaDescription,
    alternates: {
      canonical,
      languages: {
        en: new URL(`/en/help`, SITE_URL).toString(),
        es: new URL(`/es/help`, SITE_URL).toString(),
        zh: new URL(`/zh/help`, SITE_URL).toString(),
      },
    },
    openGraph: {
      type: "website",
      url: canonical,
      siteName: SITE_NAME,
      title: t.metaTitle,
      description: t.metaDescription,
      locale: locale === "es" ? "es_ES" : locale === "zh" ? "zh_CN" : "en_US",
      images: [
        {
          // ✅ crear: /public/og/help.png (1200x630)
          url: new URL(`/og/help.png`, SITE_URL).toString(),
          width: 1200,
          height: 630,
          alt: `${SITE_NAME} — Help`,
        },
      ],
    },
    twitter: {
      card: "summary_large_image",
      title: t.metaTitle,
      description: t.metaDescription,
      images: [new URL(`/og/help.png`, SITE_URL).toString()],
    },
    robots: {
      index: true,
      follow: true,
      googleBot: {
        index: true,
        follow: true,
        "max-image-preview": "large",
        "max-snippet": -1,
        "max-video-preview": -1,
      },
    },
  };
}

// --- JSON-LD ---------------------------------------------------------------
function jsonLdOrganization(locale: Locale) {
  const inLanguage = locale === "es" ? "es" : locale === "zh" ? "zh" : "en";

  return {
    "@context": "https://schema.org",
    "@type": "Organization",
    "@id": `${SITE_URL}#organization`,
    name: SITE_NAME,
    url: SITE_URL,
    logo: `${SITE_URL}/logo.png`,
    email: SUPPORT_EMAIL,
    inLanguage,
  };
}

function jsonLdWebsite(locale: Locale) {
  const inLanguage = locale === "es" ? "es" : locale === "zh" ? "zh" : "en";
  return {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "@id": `${SITE_URL}#website`,
    url: SITE_URL,
    name: SITE_NAME,
    publisher: { "@id": `${SITE_URL}#organization` },
    inLanguage,
  };
}

function jsonLdHelpPage(locale: Locale) {
  const inLanguage = locale === "es" ? "es" : locale === "zh" ? "zh" : "en";
  const url = `${SITE_URL}/${locale}/help`;

  return {
    "@context": "https://schema.org",
    "@type": "WebPage",
    "@id": `${url}#webpage`,
    url,
    name: `${SITE_NAME} — Help`,
    isPartOf: { "@id": `${SITE_URL}#website` },
    about: { "@id": `${SITE_URL}#organization` },
    inLanguage,
  };
}

function jsonLdFAQPage(locale: Locale, faqs: FAQ[]) {
  const inLanguage = locale === "es" ? "es" : locale === "zh" ? "zh" : "en";
  const url = `${SITE_URL}/${locale}/help#faq`;

  return {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "@id": `${url}`,
    inLanguage,
    mainEntity: faqs.map((x) => ({
      "@type": "Question",
      name: x.q,
      acceptedAnswer: {
        "@type": "Answer",
        text: x.a,
      },
    })),
  };
}

// --- Page -------------------------------------------------------------------
export default async function HelpPage({ params }: { params: Promise<{ locale: string }> }) {
  const { locale: rawLocale } = await params;
  const locale: Locale = isLocale(rawLocale) ? rawLocale : "en";
  const t = getCopy(locale);

  const orgLd = jsonLdOrganization(locale);
  const siteLd = jsonLdWebsite(locale);
  const pageLd = jsonLdHelpPage(locale);
  const faqLd = jsonLdFAQPage(locale, t.faqs);

  const subject =
    locale === "es"
      ? "Soporte — Newsoras"
      : locale === "zh"
      ? "支持 — Newsoras"
      : "Support — Newsoras";

  const mailtoHref = `mailto:${encodeURIComponent(SUPPORT_EMAIL)}?subject=${encodeURIComponent(subject)}`;

  return (
    <main className="container" style={{ paddingTop: 22, paddingBottom: 30 }}>
      {/* ✅ JSON-LD: Organization + WebSite + WebPage + FAQPage */}
      <script
        type="application/ld+json"
        // eslint-disable-next-line react/no-danger
        dangerouslySetInnerHTML={{ __html: JSON.stringify(orgLd) }}
      />
      <script
        type="application/ld+json"
        // eslint-disable-next-line react/no-danger
        dangerouslySetInnerHTML={{ __html: JSON.stringify(siteLd) }}
      />
      <script
        type="application/ld+json"
        // eslint-disable-next-line react/no-danger
        dangerouslySetInnerHTML={{ __html: JSON.stringify(pageLd) }}
      />
      <script
        type="application/ld+json"
        // eslint-disable-next-line react/no-danger
        dangerouslySetInnerHTML={{ __html: JSON.stringify(faqLd) }}
      />

      {/* Hero */}
      <section className="card" style={{ position: "relative", overflow: "hidden", padding: 22 }}>
        <div
          aria-hidden
          style={{
            position: "absolute",
            inset: -60,
            background:
              "radial-gradient(600px 220px at 20% 0%, var(--accent-glow), transparent 70%), radial-gradient(500px 220px at 80% 20%, rgba(37, 99, 235, 0.25), transparent 70%)",
            filter: "blur(8px)",
            opacity: 0.9,
          }}
        />

        <div style={{ position: "relative" }}>
          <div style={{ display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }}>
            <div
              style={{
                width: 44,
                height: 44,
                borderRadius: 12,
                background: "linear-gradient(135deg, var(--accent), #2563eb)",
                boxShadow: "0 0 18px var(--accent-glow)",
              }}
            />
            <div>
              <h1 className="h1" style={{ margin: 0 }}>
                {t.title}
              </h1>
              <p className="p" style={{ margin: "6px 0 0 0", color: "var(--text-secondary)" }}>
                {t.subtitle}
              </p>
            </div>
          </div>

          <div style={{ display: "flex", flexWrap: "wrap", gap: 8, marginTop: 14 }}>
            <span className="badge">FAQ</span>
            <span className="badge">Corrections</span>
            <span className="badge">AI</span>
            <span className="badge">Copyright</span>
          </div>
        </div>
      </section>

      {/* Quick links */}
      <section style={{ marginTop: 18, display: "grid", gridTemplateColumns: "1fr", gap: 18 }}>
        <div className="card" style={{ padding: 20 }}>
          <h2 className="h2" style={{ marginBottom: 12 }}>
            {t.quickTitle}
          </h2>

          <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))", gap: 12 }}>
            {t.quickCards.map((c) => (
              <div
                key={c.title}
                style={{
                  border: "1px solid var(--line)",
                  borderRadius: 16,
                  padding: 14,
                  background: "rgba(255,255,255,0.02)",
                }}
              >
                <div style={{ display: "flex", alignItems: "center", gap: 10, marginBottom: 8 }}>
                  <div
                    style={{
                      width: 10,
                      height: 10,
                      borderRadius: 999,
                      background: "var(--accent)",
                      boxShadow: "0 0 10px var(--accent-glow)",
                    }}
                  />
                  <h3 style={{ margin: 0, fontSize: "1rem", fontWeight: 900 }}>{c.title}</h3>
                </div>

                <p className="p" style={{ margin: "0 0 12px 0", color: "var(--text-secondary)" }}>
                  {c.desc}
                </p>

                {c.href.startsWith("/") ? (
                  <Link href={c.href} className="badge" style={{ padding: "10px 14px", borderColor: "var(--text-muted)" }}>
                    {c.cta}
                  </Link>
                ) : (
                  <a href={c.href} className="badge" style={{ padding: "10px 14px", borderColor: "var(--text-muted)" }}>
                    {c.cta}
                  </a>
                )}
              </div>
            ))}
          </div>

          <div style={{ marginTop: 14, color: "var(--text-muted)", fontSize: 12 }}>
            {t.footerNote}
          </div>
        </div>

        {/* FAQ */}
        <div className="card" style={{ padding: 20 }} id="faq">
          <h2 className="h2" style={{ marginBottom: 14 }}>
            {t.faqTitle}
          </h2>

          <div style={{ display: "grid", gridTemplateColumns: "1fr", gap: 10 }}>
            {t.faqs.map((x, idx) => (
              <details
                key={x.q}
                style={{
                  border: "1px solid var(--line)",
                  borderRadius: 16,
                  padding: 14,
                  background: "rgba(255,255,255,0.02)",
                }}
                open={idx === 0}
              >
                <summary
                  style={{
                    cursor: "pointer",
                    fontWeight: 900,
                    color: "var(--text-primary)",
                    listStyle: "none",
                  }}
                >
                  {x.q}
                </summary>
                <p className="p" style={{ marginTop: 10, color: "var(--text-secondary)" }}>
                  {x.a}
                </p>
              </details>
            ))}
          </div>
        </div>

        {/* Policies */}
        <div className="card" style={{ padding: 20 }}>
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {t.policyTitle}
          </h2>
          <p className="p" style={{ marginTop: 8, color: "var(--text-secondary)" }}>
            {t.policyP}
          </p>

          <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))", gap: 12, marginTop: 12 }}>
            {t.policyCards.map((c) => (
              <a
                key={c.title}
                href={c.href}
                className="card"
                style={{
                  borderRadius: 16,
                  padding: 14,
                  border: "1px solid var(--line)",
                  background: "rgba(255,255,255,0.02)",
                  display: "block",
                }}
              >
                <div style={{ fontWeight: 900, marginBottom: 6 }}>{c.title}</div>
                <div style={{ color: "var(--text-secondary)", fontSize: 14, lineHeight: 1.6 }}>{c.desc}</div>
              </a>
            ))}
          </div>
        </div>

        {/* AI */}
        <div className="card" style={{ padding: 20 }} id="ia">
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {t.aiTitle}
          </h2>
          <p className="p" style={{ marginTop: 8 }}>
            {t.aiP}
          </p>
          <ul style={{ marginTop: 12, paddingLeft: 18, color: "var(--text-secondary)", lineHeight: 1.75 }}>
            {t.aiBullets.map((b) => (
              <li key={b}>{b}</li>
            ))}
          </ul>
        </div>

        {/* Corrections */}
        <div className="card" style={{ padding: 20 }} id="correcciones">
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {locale === "es" ? "Correcciones" : locale === "zh" ? "勘误" : "Corrections"}
          </h2>
          <p className="p" style={{ marginTop: 8, color: "var(--text-secondary)" }}>
            {locale === "es"
              ? "Mandanos: link del artículo + párrafo exacto + la fuente primaria. Si corresponde, corregimos y dejamos registro."
              : locale === "zh"
              ? "请发送：文章链接 + 具体段落 + 一手来源。核查后我们会更正并在必要时记录变更。"
              : "Send: article link + exact paragraph + primary source. If valid, we correct and record changes when appropriate."}
          </p>

          <div style={{ display: "flex", gap: 10, flexWrap: "wrap", marginTop: 12 }}>
            <a href={mailtoHref} className="badge" style={{ padding: "10px 14px", borderColor: "var(--text-muted)" }}>
              {t.contactCta}
            </a>
            <Link href={`/${locale}/contact`} className="badge" style={{ padding: "10px 14px" }}>
              {locale === "es" ? "Ir a Contacto" : locale === "zh" ? "前往联系页" : "Go to Contact"}
            </Link>
          </div>
        </div>

        {/* Suggestions */}
        <div className="card" style={{ padding: 20 }} id="sugerencias">
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {locale === "es" ? "Sugerencias de temas" : locale === "zh" ? "选题建议" : "Story suggestions"}
          </h2>
          <p className="p" style={{ marginTop: 8, color: "var(--text-secondary)" }}>
            {locale === "es"
              ? "Para que sea accionable, mandá: qué pasó, por qué importa, fuentes, y qué te gustaría que analicemos."
              : locale === "zh"
              ? "为了便于采纳，请包含：发生了什么、为何重要、来源、你希望我们分析的点。"
              : "To make it actionable: what happened, why it matters, sources, and what angle you want analyzed."}
          </p>
        </div>

        {/* Copyright */}
        <div className="card" style={{ padding: 20 }} id="copyright">
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {locale === "es" ? "Copyright / Reclamos" : locale === "zh" ? "版权 / 投诉" : "Copyright / Claims"}
          </h2>
          <p className="p" style={{ marginTop: 8, color: "var(--text-secondary)" }}>
            {locale === "es"
              ? "Si sos titular de derechos y detectás material que te pertenece, escribinos con prueba de titularidad y el link exacto. Lo revisamos rápido."
              : locale === "zh"
              ? "若你是权利人并发现相关内容，请提供权属证明与精确链接，我们会尽快处理。"
              : "If you’re a rights holder and see material you own, email us with proof of ownership and the exact link. We’ll review quickly."}
          </p>
        </div>

        {/* Contact */}
        <div className="card" style={{ padding: 20 }}>
          <h2 className="h2" style={{ marginBottom: 8 }}>
            {t.contactTitle}
          </h2>
          <p className="p" style={{ marginTop: 8, color: "var(--text-secondary)" }}>
            {t.contactP}
          </p>

          <div style={{ display: "flex", gap: 10, flexWrap: "wrap", marginTop: 12 }}>
            <a href={mailtoHref} className="badge" style={{ padding: "10px 14px", borderColor: "var(--text-muted)" }}>
              {SUPPORT_EMAIL}
            </a>
            <Link href={`/${locale}/contact`} className="badge" style={{ padding: "10px 14px" }}>
              {locale === "es" ? "Página de contacto" : locale === "zh" ? "联系页面" : "Contact page"}
            </Link>
            <Link href={`/${locale}`} className="badge" style={{ padding: "10px 14px" }}>
              Home
            </Link>
          </div>

          <div style={{ marginTop: 14, color: "var(--text-muted)", fontSize: 12 }}>
            {t.footerNote}
          </div>
        </div>
      </section>
    </main>
  );
}

// --- Notes (files + env) ----------------------------------------------------
// 1) /public/og/help.png  (1200x630)
// 2) /public/logo.png     (512x512)
// 3) .env.local:
//    NEXT_PUBLIC_SITE_URL=https://newsoras.com
//    NEXT_PUBLIC_SUPPORT_EMAIL=support@newsoras.com
