// Lightweight localization for the static landing page.
// English is the source copy; localized routes translate text after React renders.

const SW_NORMALIZED_PATH = window.location.pathname
  .replace(/\/index\.html$/, "")
  .replace(/\/+$/, "");
const SW_LANG = SW_NORMALIZED_PATH.endsWith("/pt-br")
  ? "pt-br"
  : SW_NORMALIZED_PATH.endsWith("/hu")
  ? "hu"
  : "en";

const SW_META = {
  en: {
    htmlLang: "en",
    title: "StayWise Pet Care",
    description:
      "StayWise helps pet owners find trusted care and helps pet sitters and pet hotels manage bookings, pets, check-ins, and client communication.",
  },
  hu: {
    htmlLang: "hu",
    title: "StayWise Pet Care",
    description:
      "A StayWise segít a gazdiknak megbízható gondozót találni, a szittereknek és kisállatpanzióknak pedig átláthatóan kezelni a foglalásokat, kisállatokat és ügyfeleket.",
  },
  "pt-br": {
    htmlLang: "pt-BR",
    title: "StayWise Pet Care",
    description:
      "A StayWise ajuda tutores a encontrar cuidados de confiança e ajuda pet sitters e hotéis para pets a gerenciar reservas, pets, check-ins e comunicação com clientes.",
  },
};

const SW_HU_TEXT = {
  "How it works": "Hogyan működik",
  "Preview": "Előnézet",
  "Platform preview": "Platform előnézet",
  "Features": "Funkciók",
  "Contact": "Kapcsolat",
  "For Pets": "Gazdiknak",
  "Find a sitter or hotel": "Keress szittert vagy panziót",
  "For Sitters": "Szolgáltatóknak",
  "Run your business": "Kezeld a vállalkozásod",
  "For pet owners": "Gazdiknak",
  "Switch language to English": "Váltás angolra",
  "Switch language to Hungarian": "Váltás magyarra",
  "Switch language to Brazilian Portuguese": "Váltás brazil portugálra",
  "Select language": "Nyelv kiválasztása",
  "Find pet care": "Találj megbízható",
  "you can trust": "állatgondozást",
  "Find verified pet sitters and pet hotels with clear profiles, real photos, care details, reviews, and a simple way to ask questions before you book.":
    "Keress ellenőrzött szittereket és kisállatpanziókat átlátható profillal, valódi fotókkal, gondozási részletekkel, értékelésekkel és egyszerű üzenetküldéssel foglalás előtt.",
  "See how it works": "Nézd meg, hogyan működik",
  "For sitters & pet hotels": "Szittereknek és kisállatpanzióknak",
  "For sitters &amp; pet hotels": "Szittereknek és kisállatpanzióknak",
  "Run your pet care business": "Kezeld a kisállatgondozást",
  "like a pro": "magabiztosan",
  "StayWise helps pet sitters and pet hotels present a trusted profile, receive clearer requests, and manage bookings, pets, check-ins, and payments with less admin stress.":
    "A StayWise segít a szittereknek és kisállatpanzióknak megbízható profilt mutatni, pontosabb kéréseket kapni, és kevesebb adminisztrációval kezelni a foglalásokat, kisállatokat, check-int és fizetéseket.",
  "Talk to the team": "Beszélj velünk",

  "Create your pet profile": "Hozd létre a kedvenced profilját",
  "Save Luna's size, age, vaccines, and care needs once. Hosts see the important details before they reply.":
    "Egyszer add meg Luna méretét, korát, oltásait és gondozási igényeit. A szolgáltatók válasz előtt látják a fontos részleteket.",
  "Search by real care needs": "Keress valódi gondozási igények alapján",
  "Look for medication support, fenced gardens, accepted sizes, daily updates, and other details that matter for your pet.":
    "Keress gyógyszeradás, kerített kert, elfogadott méret, napi frissítések és más, a kedvencednek fontos szempontok alapján.",
  "Compare trusted providers": "Hasonlíts össze megbízható szolgáltatókat",
  "Review profiles with photos, ratings, response times, care policies, and verification signals in one calm view.":
    "Nézd meg egy helyen a fotókat, értékeléseket, válaszidőt, gondozási szabályokat és ellenőrzési jelzéseket.",
  "Request a quote · message the host": "Kérj ajánlatot és írj a szolgáltatónak",
  "Send one clear request, ask questions, and agree the details directly with the sitter or hotel before you confirm.":
    "Küldj egy egyértelmű kérést, tegyél fel kérdéseket, és egyeztesd a részleteket közvetlenül a szitterrel vagy panzióval.",
  "From profile to peace of mind — in four steps.": "A profiltól a nyugodt döntésig, négy lépésben.",
  "Save your pet's needs once, then use them to find care that feels right. Every request gives the host the details they need to answer with confidence.":
    "Egyszer mentsd el a kedvenced igényeit, majd használd őket olyan gondozás kereséséhez, amelyben megbízol. Minden kérés tartalmazza a szolgáltató számára fontos részleteket.",

  "Name · Luna": "Név · Luna",
  "Species · Dog": "Faj · kutya",
  "Size · Medium": "Méret · közepes",
  "Special needs · Oral medication": "Különleges igény · szájon át adott gyógyszer",
  "Verified": "Ellenőrzött",
  "Oral medication": "Gyógyszeradás",
  "Fenced yard": "Kerített udvar",
  "Instant quote": "Gyors ajánlat",

  "See it in action": "Így néz ki működés közben",
  "What pet owners can do on StayWise.": "Mit tudnak a gazdik a StayWise-on.",
  "A guided preview of the owner journey: create a pet profile, search trusted care, compare details, ask questions, and request a quote.":
    "Vezetett előnézet a gazdik útjáról: kisállatprofil, megbízható gondozás keresése, részletek összehasonlítása, kérdések és ajánlatkérés.",
  "Search": "Keresés",
  "Results + filters": "Találatok és szűrők",
  "Listing detail": "Adatlap",
  "Pet profile": "Kisállatprofil",
  "Quote wizard": "Ajánlatkérés",
  "Reservations": "Foglalások",
  "Auto preview": "Automatikus előnézet",
  "Where does your pet need care?": "Hol van szüksége gondozásra a kedvencednek?",
  "Start with the basics. StayWise helps owners explain what their pet needs before they contact a host.":
    "Kezdd az alapokkal. A StayWise segít a gazdiknak már kapcsolatfelvétel előtt megmutatni, mire van szüksége a kedvencüknek.",
  "Location": "Helyszín",
  "Dates": "Dátumok",
  "Pets": "Kisállatok",
  "1 dog · Medium": "1 kutya · közepes",
  "Popular cities": "Népszerű városok",
  "Verified hosts only": "Csak ellenőrzött szolgáltatók",
  "ID + first-aid checked.": "Személyazonosság és elsősegély ellenőrizve.",
  "Care needs first": "Először a gondozási igények",
  "Medication, yard, size.": "Gyógyszer, kert, méret.",
  "Talk before booking": "Beszélj foglalás előtt",
  "Ask questions first.": "Előbb kérdezz nyugodtan.",
  "Filters": "Szűrők",
  "Clear": "Törlés",
  "Price (per night)": "Ár éjszakánként",
  "up to €71": "€71-ig",
  "Rating": "Értékelés",
  "Quick filters": "Gyors szűrők",
  "Verified only": "Csak ellenőrzött",
  "Superhost": "Kiemelt szolgáltató",
  "Camera access": "Kamera hozzáférés",
  "Accepts puppies": "Kölyköket is fogad",
  "Speaks English": "Beszél angolul",
  "91 stays": "91 lehetőség",
  "in Amsterdam": "Amszterdamban",
  "Recommended": "Ajánlott",
  "photos": "fotók",
  "Verified address": "Ellenőrzött cím",
  "Pet first aid": "Kisállat elsősegély",
  "Fast responder": "Gyors válaszadó",
  "Indoor playroom": "Beltéri játszótér",
  "Puppy care": "Kölyökgondozás",
  "Cats accepted": "Macskákat is fogad",
  "Medication support": "Gyógyszeradás",
  "Daily updates": "Napi frissítések",
  "drag · zoom": "mozgatás · nagyítás",

  "Backyard · 1 of 5": "Kert · 1 / 5",
  "Nearby park · dogs welcome": "Közeli park · kutyabarát",
  "Sleeping area": "Alvóhely",
  "Pets welcome": "Kisállatbarát",
  "Dog playground": "Kutyajátszótér",
  "Verified host": "Ellenőrzött szolgáltató",
  "Amsterdam, Netherlands · fenced 200m² garden": "Amszterdam, Hollandia · kerített 200 m²-es kert",
  "4.9 (38 reviews) · responds in 2h": "4,9 (38 értékelés) · kb. 2 órán belül válaszol",
  "Free cancel · 7d": "Ingyenes lemondás · 7 nap",
  "Hosted by Anna · 4 yrs on StayWise": "Házigazda: Anna · 4 éve a StayWise-on",
  "Speaks English, Dutch · vet 10 min away": "Angolul és hollandul beszél · állatorvos 10 percre",
  "Message": "Üzenet",
  "What this host offers": "Amit ez a szolgáltató kínál",
  "Fenced 200m² yard": "Kerített 200 m²-es udvar",
  "Daily photo updates": "Napi fotós frissítések",
  "2 walks / day": "Napi 2 séta",
  "Up to medium size": "Közepes méretig",
  "Cat-free home": "Macskamentes otthon",
  "Request a quote": "Ajánlatkérés",
  "Free to ask — host replies in ~2h": "A kérdés ingyenes, a szolgáltató kb. 2 órán belül válaszol",

  "Beagle · F · 3 yrs": "Beagle · nőstény · 3 éves",
  "Vaccines OK": "Oltások rendben",
  "Daily meds": "Napi gyógyszer",
  "Size": "Méret",
  "Microchip": "Mikrochip",
  "Vet": "Állatorvos",
  "Special": "Különleges igény",
  "Medium · 12kg": "Közepes · 12 kg",
  "Oral medication 2× / day": "Szájon át adott gyógyszer napi 2x",
  "Care needs": "Gondozási igények",
  "Saved · used on every quote": "Mentve · minden ajánlatkéréshez használható",
  "Needs fenced yard": "Kerített kert szükséges",
  "OK with other dogs": "Más kutyákkal jól kijön",
  "No cats": "Macskák nélkül",
  "Quiet at night": "Éjjel nyugodt",
  "Vaccinations": "Oltások",
  "Rabies": "Veszettség",
  "Heartworm protection": "Szívférgesség elleni védelem",
  "Monthly · last dose 01 May 2025": "Havonta · utolsó adag: 2025. máj. 1.",
  "Your profile is complete — quote requests show everything the host needs to say yes.":
    "A profilod teljes. Az ajánlatkérések mindent megmutatnak, amire a szolgáltatónak szüksége van a magabiztos válaszhoz.",

  "Pet": "Kisállat",
  "Services": "Szolgáltatások",
  "Review": "Ellenőrzés",
  "Check-in": "Érkezés",
  "Check-out": "Távozás",
  "Nights": "Éjszakák",
  "Thu 12 Jun · 14:00": "Jún. 12., csütörtök · 14:00",
  "Thu 19 Jun · 11:00": "Jún. 19., csütörtök · 11:00",
  "Luna · Beagle": "Luna · beagle",
  "Add-on services": "Kiegészítő szolgáltatások",
  "Extra daily walk": "Extra napi séta",
  "Daily photo report": "Napi fotós beszámoló",
  "Included": "Benne van",
  "Late check-out 18:00": "Késői távozás 18:00-kor",
  "Message to host": "Üzenet a szolgáltatónak",
  "Hi Anna — Luna takes 5mg of oral medication at 8h & 20h. She gets along with other dogs but is scared of cats. Looking forward to hearing from you!":
    "Szia Anna, Luna 5 mg gyógyszert kap reggel 8-kor és este 8-kor. Más kutyákkal jól kijön, de a macskáktól fél. Várom a válaszod!",
  "Amsterdam · 7 nights": "Amszterdam · 7 éjszaka",
  "€32 × 7 nights": "€32 x 7 éjszaka",
  "Extra walks (7×)": "Extra séták (7x)",
  "Service fee": "Szolgáltatási díj",
  "Total": "Összesen",
  "Send quote request": "Ajánlatkérés küldése",
  "No charge yet — host confirms first": "Még nincs fizetés, előbb a szolgáltató visszaigazol",
  "Confirmed": "Visszaigazolva",
  "Awaiting host": "Válaszra vár",
  "Quote sent": "Ajánlat elküldve",
  "Quote sent to Tom B. — €420": "Ajánlat elküldve Tom B.-nek — €420",
  "Pet: Luna": "Kisállat: Luna",
  "Pet: Mochi": "Kisállat: Mochi",
  "total": "összesen",
  "Active now · replies in 2h": "Most aktív · kb. 2 órán belül válaszol",
  "Hi! Yes we can give Luna her meds — happy to have her.": "Szia! Igen, tudjuk adni Luna gyógyszerét, szívesen fogadjuk.",
  "Amazing. She's a bit anxious on day 1, OK to send a photo?": "Szuper. Az első napon kicsit izgul, küldenél majd fotót?",
  "Of course — we send daily updates 🌿": "Természetesen, naponta küldünk frissítést.",
  "Perfect, confirming the dates.": "Tökéletes, akkor visszaigazolom a dátumokat.",
  "Message Anna…": "Üzenet Annának...",

  "Everything pet sitters and hotels need to build trust.": "Minden, amire a szittereknek és panzióknak szükségük van a bizalomépítéshez.",
  "Show a professional profile, receive clearer requests, keep every pet record close, and manage the daily work in one calm place.":
    "Mutass professzionális profilt, kapj pontosabb kéréseket, tartsd kéznél minden kisállat adatait, és kezeld a napi munkát egy átlátható helyen.",
  "Smart Booking Management": "Okos foglaláskezelés",
  "Manage the full booking journey, from first enquiry to check-out, with clear statuses and a shared history for every client.":
    "Kezeld a teljes foglalási utat az első érdeklődéstől a távozásig, egyértelmű státuszokkal és ügyféltörténettel.",
  "Customer & Pet Profiles": "Ügyfél- és kisállatprofilok",
  "Keep contact details, breed, weight, vaccinations, behaviour notes, microchip numbers, and special needs in one trusted record.":
    "Tartsd egy megbízható adatlapban az elérhetőségeket, fajtát, súlyt, oltásokat, viselkedési jegyzeteket, mikrochipet és speciális igényeket.",
  "Check-In & Check-Out with Photos": "Check-in és check-out fotókkal",
  "Document arrival and departure with photos, belongings, and behaviour notes, so owners feel informed and your team has a clear record.":
    "Dokumentáld az érkezést és távozást fotókkal, felszerelésekkel és viselkedési jegyzetekkel, hogy a gazdik tájékozottak legyenek, a csapatod pedig pontos adatokat lásson.",
  "Quotations & Payment Tracking": "Ajánlatok és fizetések követése",
  "Create clear quotes and record off-platform payments, outstanding balances, and refunds without losing track.":
    "Készíts átlátható ajánlatokat, és kövesd a platformon kívüli fizetéseket, tartozásokat és visszatérítéseket.",
  "Capacity Calendar": "Kapacitásnaptár",
  "See availability, daily limits, rooms, services, and busy days at a glance, so you can avoid overbooking.":
    "Lásd egy pillantásra az elérhetőséget, napi limiteket, szobákat, szolgáltatásokat és zsúfolt napokat, hogy elkerüld a túlfoglalást.",
  "Dashboard & KPIs": "Dashboard és mutatók",
  "Start each day with arrivals, departures, occupancy, open quotes, and the tasks your team should not miss.":
    "Kezdd a napot érkezésekkel, távozásokkal, kihasználtsággal, nyitott ajánlatokkal és a fontos feladatokkal.",
  "Veterinary Records": "Állatorvosi adatok",
  "Keep vet contacts and health notes close, especially for pets with medication or special care needs.":
    "Tartsd kéznél az állatorvosi elérhetőségeket és egészségügyi jegyzeteket, különösen gyógyszeres vagy speciális igényű kisállatoknál.",
  "iOS App for Your Team": "iOS app a csapatodnak",
  "Give staff a mobile view for check-ins, bookings, pet records, and updates while they are moving around the property.":
    "Adj a csapatnak mobil nézetet check-inhez, foglalásokhoz, kisállatadatokhoz és frissítésekhez munka közben.",

  "Set up a profile owners can trust.": "Építs profilt, amelyben a gazdik megbíznak.",
  "Add services, pet policies, photos, rates, availability, and team details. Owners can understand how you care before they ask for a quote.":
    "Add meg a szolgáltatásokat, szabályokat, fotókat, árakat, elérhetőséget és csapatadatokat. A gazdik már ajánlatkérés előtt megérthetik, hogyan gondoskodsz.",
  "Talk to the team →": "Beszélj velünk →",
  "Profile checklist": "Profil ellenőrzőlista",
  "5 / 7 ready": "5 / 7 kész",
  "Public profile": "Nyilvános profil",
  "Photos": "Fotók",
  "Services": "Szolgáltatások",
  "Pet policy": "Kisállat szabályok",
  "Amenities": "Felszereltség",
  "Calendar": "Naptár",
  "Ready for review": "Kész ellenőrzésre",

  "Inside the platform": "A platform belülről",
  "What sitters and hotels use to run the day.": "Amit a szitterek és panziók a napi működéshez használnak.",
  "A guided preview of the operations side: bookings, check-ins, pet records, quotes, payments, and capacity planning.":
    "Vezetett előnézet az üzemeltetési oldalról: foglalások, check-in, kisállatadatok, ajánlatok, fizetések és kapacitástervezés.",
  "Dashboard": "Vezérlőpult",
  "Bookings": "Foglalások",
  "Pet records": "Kisállatadatok",
  "Quotes & payments": "Ajánlatok és fizetések",
  "Arrival photo preview": "Érkezési fotó előnézet",
  "4 required": "4 kötelező",
  "Front": "Elölről",
  "Left side": "Bal oldal",
  "Right side": "Jobb oldal",
  "Back": "Hátulról",
  "Face, chest, paws": "Arc, mellkas, mancsok",
  "Full body profile": "Teljes test oldalról",
  "Other side profile": "Másik oldal profilból",
  "Back and tail": "Hát és farok",
  "Add photo": "Fotó hozzáadása",
  "Front, side, and back photos auto-share with Mariana when you complete check-in.":
    "Az elölről, oldalról és hátulról készült fotók automatikusan megosztásra kerülnek Marianával a check-in végén.",
  "No disputes on departure.": "Kevesebb vita távozáskor.",

  "What StayWise helps you control": "Amit a StayWise segít kézben tartani",
  "Built for calmer daily operations.": "Nyugodtabb napi működésre tervezve.",
  "Manage your pet care business with everything in one place, keeping your team aligned and your clients informed.":
    "Kezeld a kisállatgondozási vállalkozásod egy helyről, tartsd a csapatot szinkronban és az ügyfeleket tájékoztatva.",
  "Every pet has a clear record": "Minden kisállatnak tiszta adatlapja van",
  "Weight, breed, medication, vaccines, microchip, vet, and notes.": "Súly, fajta, gyógyszer, oltások, mikrochip, állatorvos és jegyzetek.",
  "Check-in and check-out are documented": "A check-in és check-out dokumentálva van",
  "Photos, belongings, and notes reduce doubts on departure.": "A fotók, holmik és jegyzetek csökkentik a vitákat távozáskor.",
  "Bookings stay organized": "A foglalások átláthatók maradnak",
  "Clear statuses, dates, rooms, payments, and communication in one place.": "Egyértelmű státuszok, dátumok, szobák, fizetések és kommunikáció egy helyen.",
  "Your team knows what to do next": "A csapatod tudja a következő lépést",
  "Arrivals, departures, tasks, and daily capacity are visible.": "Az érkezések, távozások, feladatok és a napi kapacitás jól láthatók.",

  "Get in touch": "Lépj kapcsolatba velünk",
  "Want to see StayWise in action?": "Megnéznéd működés közben a StayWise-t?",
  "Send us a note. We will answer clearly, without pressure, and help you understand whether StayWise fits what you need.":
    "Írj nekünk. Világosan, nyomás nélkül válaszolunk, és segítünk megérteni, hogy a StayWise illik-e ahhoz, amire szükséged van.",
  "Message sent": "Üzenet elküldve",
  "Thanks — we'll be in touch within 1 business day.": "Köszönjük, 1 munkanapon belül jelentkezünk.",
  "Contact form is not connected yet. Add your Formspree endpoint in src/formspree-config.js.":
    "A kapcsolatfelvételi űrlap még nincs bekötve. Add meg a Formspree végpontot a src/formspree-config.js fájlban.",
  "Could not send your message. Please try again.": "Nem sikerült elküldeni az üzenetet. Próbáld újra.",
  "Name": "Név",
  "Your name": "A neved",
  "Email": "Email",
  "I am a…": "Én...",
  "Select one…": "Válassz...",
  "Pet sitter or home boarder": "Szitter vagy otthoni panzió",
  "Pet hotel or kennel": "Kisállatpanzió vagy kennel",
  "Pet owner looking for a sitter": "Gazdi, aki szittert keres",
  "Other": "Egyéb",
  "Tell us about your business, ask a question, or request a demo…":
    "Írj a vállalkozásodról, kérdezz, vagy kérj bemutatót...",
  "Send Message": "Üzenet küldése",
  "Sending...": "Küldés...",

  "Excited to find the perfect pet sitter?": "Szeretnéd megtalálni az ideális kisállatszittert?",
  "Ready to start using StayWise?": "Készen állsz a StayWise használatára?",
  "Leave your contact and we will let you know when it's ready.": "Hagyd meg az elérhetőséged, és szólunk, amint elkészül.",
  "Contact our team and get early access to the platform.": "Vedd fel velünk a kapcsolatot, és kérj korai hozzáférést a platformhoz.",
  "Good morning, Sarah": "Jó reggelt, Sarah",
  "Thursday · 12 June · Bristol": "Csütörtök · június 12. · Bristol",
  "Live": "Élő",
  "Clients": "Ügyfelek",
  "Check-ins": "Check-inek",
  "Reports": "Riportok",
  "Occupancy": "Kihasználtság",
  "Today arrivals": "Mai érkezések",
  "Departures": "Távozások",
  "Outstanding": "Nyitott összeg",
  "+6% vs last wk": "+6% az előző héthez képest",
  "2 confirmed": "2 visszaigazolva",
  "1 photo pending": "1 fotó hiányzik",
  "2 quotes open": "2 nyitott ajánlat",
  "Today's bookings": "Mai foglalások",
  "Today's activity": "Mai aktivitás",
  "7 today": "7 ma",
  "Checked-in": "Bejelentkezve",
  "Arriving 14:00": "Érkezés 14:00-kor",
  "Photo due": "Fotó esedékes",
  "Capacity this week": "Heti kapacitás",
  "Peak Friday": "Pénteki csúcs",
  "12 / 13 rooms": "12 / 13 szoba",
  "Beagle · M": "Beagle · közepes",
  "Tabby · cat": "Cirmos · macska",
  "Labrador · L": "Labrador · nagy",
  "Cat lounge": "Macskaszoba",
  "Suite 1": "1. lakosztály",
  "Suite 2": "2. lakosztály",
  "Suite 3": "3. lakosztály",
  "Suite 4": "4. lakosztály",
  "Pets & clients": "Kisállatok és ügyfelek",
  "Flexible care options": "Rugalmas gondozási lehetőségek",
  "Find the right care for your pet's routine.": "Találd meg a kedvenced rutinjához illő gondozást.",
  "Whether you need someone to stay over or just drop by, you can find a trusted local sitter.":
    "Akár ottalvós gondozásra, akár rövid látogatásra van szükség, találhatsz megbízható helyi szittert.",
  "Pet Boarding": "Kisállatpanzió",
  "Your pet stays safely at the sitter's home.": "A kedvenced biztonságban marad a szitter otthonában.",
  "House Sitting": "Otthoni felügyelet",
  "The sitter cares for your pet and your home.": "A szitter a kedvencedre és az otthonodra is figyel.",
  "Dog Walking": "Kutyasétáltatás",
  "Daily walks to keep your dog happy and healthy.": "Napi séták, hogy a kutyád boldog és egészséges maradjon.",
  "Drop-in Visits": "Rövid látogatások",
  "Quick visits for feeding, potty breaks, or medication.": "Rövid látogatások etetéshez, sétához vagy gyógyszeradáshoz.",
  "Trust & Safety": "Bizalom és biztonság",
  "Peace of mind comes standard.": "A nyugalom alapfunkció.",
  "Leaving your pet is hard. We make it easier by building a foundation of trust before you even send a message.":
    "Nehéz másra bízni a kedvencedet. Ezt azzal könnyítjük meg, hogy már az első üzenet előtt bizalmi alapot adunk.",
  "Verified Identity": "Ellenőrzött személyazonosság",
  "Every sitter passes a strict ID and background check before they can accept bookings.":
    "Minden szitter szigorú személyazonossági és háttérellenőrzésen megy át, mielőtt foglalásokat fogadhatna.",
  "Pet First Aid": "Kisállat elsősegély",
  "Look for the first-aid badge. Many of our sitters are trained to handle emergencies.":
    "Keresd az elsősegély jelvényt. Sok szitterünk képzett vészhelyzetek kezelésére.",
  "Centralized Records": "Központosított adatok",
  "Diet, medication, and vet details are shared securely. No miscommunication.":
    "Az étrend, gyógyszerek és állatorvosi adatok biztonságosan megoszthatók. Kevesebb félreértés.",
  "What pet owners say": "Amit a gazdik mondanak",
  "Connecting pets with people they can trust.": "Kisállatok összekötése megbízható emberekkel.",
  "Stories from owners who found their second home for their pets on StayWise.":
    "Történetek gazdiktól, akik a StayWise-on találtak második otthont kedvencüknek.",
  "Luna needs medication twice a day. On StayWise I found a sitter with first-aid experience, and the daily photos completely put my mind at ease.":
    "Lunának naponta kétszer gyógyszer kell. A StayWise-on elsősegélyben jártas szittert találtam, a napi fotók pedig teljesen megnyugtattak.",
  "The pet profile is genius. I only had to write out Max's allergies and routine once. Every sitter I contacted already knew exactly what to expect.":
    "A kisállatprofil zseniális. Max allergiáit és rutinját csak egyszer kellett leírnom, és minden megkeresett szitter pontosan tudta, mire számítson.",
  "It's so much more professional than finding someone on social media. The secure payment and clear check-in process make a huge difference.":
    "Sokkal professzionálisabb, mint közösségi médiában keresni valakit. A biztonságos fizetés és az egyértelmű check-in folyamat rengeteget számít.",
  "Dog Owner, Madrid": "Kutyagazdi, Madrid",
  "Cat Owner, Berlin": "Macskagazdi, Berlin",
  "Pet Owner, Amsterdam": "Gazdi, Amszterdam",
  "Daily photos": "Napi fotók",
  "Dogs in park": "Kutyák a parkban",
  "Luna takes oral meds 2× / day. OK?": "Luna naponta 2x szájon át kap gyógyszert. Rendben?",
  "Yes — pet first-aid certified ✓": "Igen, kisállat elsősegély tanúsítvánnyal ✓",

  "Ready to make pet care feel calmer and more professional?":
    "Készen állsz nyugodtabb és profibb kisállatgondozást nyújtani?",
  "StayWise helps owners feel informed and helps care providers run the day with clearer records, smoother communication, and less manual work.":
    "A StayWise segít a gazdiknak tájékozottabbnak érezni magukat, a szolgáltatóknak pedig átláthatóbb adatokkal, gördülékenyebb kommunikációval és kevesebb kézi munkával dolgozni.",
  "The trusted pet care platform for owners, sitters, and pet hotels.":
    "Megbízható kisállatgondozási platform gazdiknak, szittereknek és panzióknak.",
  "Product": "Termék",
  "Explore": "Felfedezés",
  "Operations": "Működés",
  "Company": "Cég",
  "© 2026 StayWise. All rights reserved.": "© 2026 StayWise. Minden jog fenntartva.",
  "English": "Magyar",
};

const SW_PT_BR_TEXT = {
  "How it works": "Como funciona",
  "Preview": "Prévia",
  "Platform preview": "Prévia da plataforma",
  "Features": "Recursos",
  "Contact": "Contato",
  "For Pets": "Para tutores",
  "Find a sitter or hotel": "Encontre um sitter ou hotel",
  "For Sitters": "Para prestadores",
  "Run your business": "Gerencie seu negócio",
  "For pet owners": "Para tutores",
  "Switch language to English": "Mudar idioma para inglês",
  "Switch language to Hungarian": "Mudar idioma para húngaro",
  "Switch language to Brazilian Portuguese": "Mudar idioma para português do Brasil",
  "Select language": "Selecionar idioma",
  "Find pet care": "Encontre cuidados",
  "you can trust": "de confiança",
  "Find verified pet sitters and pet hotels with clear profiles, real photos, care details, reviews, and a simple way to ask questions before you book.":
    "Encontre pet sitters e hotéis para pets verificados, com perfis claros, fotos reais, detalhes de cuidado, avaliações e uma forma simples de tirar dúvidas antes de reservar.",
  "See how it works": "Veja como funciona",
  "For sitters & pet hotels": "Para pet sitters e hotéis para pets",
  "For sitters &amp; pet hotels": "Para pet sitters e hotéis para pets",
  "Run your pet care business": "Gerencie seu negócio de cuidados pet",
  "like a pro": "como profissional",
  "StayWise helps pet sitters and pet hotels present a trusted profile, receive clearer requests, and manage bookings, pets, check-ins, and payments with less admin stress.":
    "A StayWise ajuda pet sitters e hotéis para pets a apresentar um perfil confiável, receber solicitações mais claras e gerenciar reservas, pets, check-ins e pagamentos com menos estresse administrativo.",
  "Talk to the team": "Fale com a equipe",

  "Create your pet profile": "Crie o perfil do seu pet",
  "Save Luna's size, age, vaccines, and care needs once. Hosts see the important details before they reply.":
    "Salve de uma vez o porte, a idade, as vacinas e as necessidades de cuidado da Luna. Os anfitriões veem os detalhes importantes antes de responder.",
  "Search by real care needs": "Busque por necessidades reais de cuidado",
  "Look for medication support, fenced gardens, accepted sizes, daily updates, and other details that matter for your pet.":
    "Busque suporte com medicamentos, quintais cercados, portes aceitos, atualizações diárias e outros detalhes importantes para o seu pet.",
  "Compare trusted providers": "Compare prestadores de confiança",
  "Review profiles with photos, ratings, response times, care policies, and verification signals in one calm view.":
    "Veja perfis com fotos, avaliações, tempo de resposta, políticas de cuidado e sinais de verificação em uma visualização tranquila.",
  "Request a quote · message the host": "Solicite um orçamento · envie mensagem ao anfitrião",
  "Send one clear request, ask questions, and agree the details directly with the sitter or hotel before you confirm.":
    "Envie uma solicitação clara, tire dúvidas e combine os detalhes diretamente com o sitter ou hotel antes de confirmar.",
  "From profile to peace of mind — in four steps.": "Do perfil à tranquilidade — em quatro passos.",
  "Save your pet's needs once, then use them to find care that feels right. Every request gives the host the details they need to answer with confidence.":
    "Salve as necessidades do seu pet uma vez e use-as para encontrar um cuidado que pareça certo. Cada solicitação dá ao anfitrião os detalhes necessários para responder com confiança.",

  "Name · Luna": "Nome · Luna",
  "Species · Dog": "Espécie · Cachorro",
  "Size · Medium": "Porte · Médio",
  "Special needs · Oral medication": "Necessidades especiais · Medicação oral",
  "Verified": "Verificado",
  "Oral medication": "Medicação oral",
  "Fenced yard": "Quintal cercado",
  "Instant quote": "Orçamento imediato",

  "See it in action": "Veja em ação",
  "What pet owners can do on StayWise.": "O que tutores podem fazer na StayWise.",
  "A guided preview of the owner journey: create a pet profile, search trusted care, compare details, ask questions, and request a quote.":
    "Uma prévia guiada da jornada do tutor: crie um perfil para o pet, busque cuidados confiáveis, compare detalhes, tire dúvidas e solicite um orçamento.",
  "Search": "Buscar",
  "Results + filters": "Resultados + filtros",
  "Listing detail": "Detalhe do anúncio",
  "Pet profile": "Perfil do pet",
  "Quote wizard": "Assistente de orçamento",
  "Reservations": "Reservas",
  "Auto preview": "Prévia automática",
  "Where does your pet need care?": "Onde seu pet precisa de cuidados?",
  "Start with the basics. StayWise helps owners explain what their pet needs before they contact a host.":
    "Comece pelo básico. A StayWise ajuda tutores a explicar o que o pet precisa antes de contatar um anfitrião.",
  "Location": "Localização",
  "Dates": "Datas",
  "Pets": "Pets",
  "1 dog · Medium": "1 cachorro · Médio",
  "Popular cities": "Cidades populares",
  "Verified hosts only": "Apenas anfitriões verificados",
  "ID + first-aid checked.": "Identidade + primeiros socorros verificados.",
  "Care needs first": "Necessidades de cuidado primeiro",
  "Medication, yard, size.": "Medicamentos, quintal, porte.",
  "Talk before booking": "Converse antes de reservar",
  "Ask questions first.": "Tire dúvidas primeiro.",
  "Filters": "Filtros",
  "Clear": "Limpar",
  "Price (per night)": "Preço por noite",
  "up to €71": "até €71",
  "Rating": "Avaliação",
  "Quick filters": "Filtros rápidos",
  "Verified only": "Apenas verificados",
  "Superhost": "Superhost",
  "Camera access": "Acesso à câmera",
  "Accepts puppies": "Aceita filhotes",
  "Speaks English": "Fala inglês",
  "91 stays": "91 estadias",
  "in Amsterdam": "em Amsterdã",
  "Recommended": "Recomendado",
  "photos": "fotos",
  "Verified address": "Endereço verificado",
  "Pet first aid": "Primeiros socorros pet",
  "Fast responder": "Responde rápido",
  "Indoor playroom": "Espaço interno de brincadeiras",
  "Puppy care": "Cuidados com filhotes",
  "Cats accepted": "Aceita gatos",
  "Medication support": "Suporte com medicamentos",
  "Daily updates": "Atualizações diárias",
  "drag · zoom": "arraste · zoom",

  "Backyard · 1 of 5": "Quintal · 1 de 5",
  "Nearby park · dogs welcome": "Parque próximo · cães bem-vindos",
  "Sleeping area": "Área de dormir",
  "Pets welcome": "Pets bem-vindos",
  "Dog playground": "Playground para cães",
  "Verified host": "Anfitrião verificado",
  "Amsterdam, Netherlands · fenced 200m² garden": "Amsterdã, Países Baixos · jardim cercado de 200 m²",
  "4.9 (38 reviews) · responds in 2h": "4,9 (38 avaliações) · responde em 2h",
  "Free cancel · 7d": "Cancelamento grátis · 7 dias",
  "Hosted by Anna · 4 yrs on StayWise": "Hospedado por Anna · 4 anos na StayWise",
  "Speaks English, Dutch · vet 10 min away": "Fala inglês e holandês · veterinário a 10 min",
  "Message": "Mensagem",
  "What this host offers": "O que este anfitrião oferece",
  "Fenced 200m² yard": "Quintal cercado de 200 m²",
  "Daily photo updates": "Atualizações diárias com fotos",
  "2 walks / day": "2 passeios / dia",
  "Up to medium size": "Até porte médio",
  "Cat-free home": "Casa sem gatos",
  "Request a quote": "Solicitar orçamento",
  "Free to ask — host replies in ~2h": "Perguntar é grátis — anfitrião responde em ~2h",

  "Beagle · F · 3 yrs": "Beagle · F · 3 anos",
  "Vaccines OK": "Vacinas OK",
  "Daily meds": "Medicação diária",
  "Size": "Porte",
  "Microchip": "Microchip",
  "Vet": "Veterinário",
  "Special": "Especial",
  "Medium · 12kg": "Médio · 12 kg",
  "Oral medication 2× / day": "Medicação oral 2× / dia",
  "Care needs": "Necessidades de cuidado",
  "Saved · used on every quote": "Salvo · usado em todo orçamento",
  "Needs fenced yard": "Precisa de quintal cercado",
  "OK with other dogs": "OK com outros cães",
  "No cats": "Sem gatos",
  "Quiet at night": "Calma à noite",
  "Vaccinations": "Vacinações",
  "Rabies": "Raiva",
  "Heartworm protection": "Proteção contra dirofilariose",
  "Monthly · last dose 01 May 2025": "Mensal · última dose em 01 mai. 2025",
  "Your profile is complete — quote requests show everything the host needs to say yes.":
    "Seu perfil está completo — solicitações de orçamento mostram tudo o que o anfitrião precisa para dizer sim.",

  "Pet": "Pet",
  "Services": "Serviços",
  "Review": "Revisão",
  "Check-in": "Check-in",
  "Check-out": "Check-out",
  "Nights": "Diárias",
  "Thu 12 Jun · 14:00": "Quinta, 12 jun · 14:00",
  "Thu 19 Jun · 11:00": "Quinta, 19 jun · 11:00",
  "Luna · Beagle": "Luna · Beagle",
  "Add-on services": "Serviços adicionais",
  "Extra daily walk": "Passeio diário extra",
  "Daily photo report": "Relatório diário com fotos",
  "Included": "Incluído",
  "Late check-out 18:00": "Check-out tardio às 18:00",
  "Message to host": "Mensagem ao anfitrião",
  "Hi Anna — Luna takes 5mg of oral medication at 8h & 20h. She gets along with other dogs but is scared of cats. Looking forward to hearing from you!":
    "Oi Anna — a Luna toma 5 mg de medicação oral às 8h e às 20h. Ela se dá bem com outros cães, mas tem medo de gatos. Aguardo seu retorno!",
  "Amsterdam · 7 nights": "Amsterdã · 7 diárias",
  "€32 × 7 nights": "€32 × 7 diárias",
  "Extra walks (7×)": "Passeios extras (7×)",
  "Service fee": "Taxa de serviço",
  "Total": "Total",
  "Send quote request": "Enviar solicitação de orçamento",
  "No charge yet — host confirms first": "Ainda sem cobrança — o anfitrião confirma primeiro",
  "Confirmed": "Confirmada",
  "Awaiting host": "Aguardando anfitrião",
  "Quote sent": "Orçamento enviado",
  "Quote sent to Tom B. — €420": "Orçamento enviado para Tom B. — €420",
  "Pet: Luna": "Pet: Luna",
  "Pet: Mochi": "Pet: Mochi",
  "total": "total",
  "Active now · replies in 2h": "Ativo agora · responde em 2h",
  "Hi! Yes we can give Luna her meds — happy to have her.": "Oi! Sim, conseguimos dar a medicação da Luna — será um prazer recebê-la.",
  "Amazing. She's a bit anxious on day 1, OK to send a photo?": "Ótimo. Ela fica um pouco ansiosa no primeiro dia, tudo bem enviar uma foto?",
  "Of course — we send daily updates 🌿": "Claro — enviamos atualizações diárias 🌿",
  "Perfect, confirming the dates.": "Perfeito, confirmando as datas.",
  "Message Anna…": "Mensagem para Anna...",

  "Everything pet sitters and hotels need to build trust.": "Tudo que pet sitters e hotéis precisam para gerar confiança.",
  "Show a professional profile, receive clearer requests, keep every pet record close, and manage the daily work in one calm place.":
    "Mostre um perfil profissional, receba solicitações mais claras, mantenha cada registro de pet por perto e gerencie o trabalho diário em um só lugar tranquilo.",
  "Smart Booking Management": "Gestão inteligente de reservas",
  "Manage the full booking journey, from first enquiry to check-out, with clear statuses and a shared history for every client.":
    "Gerencie toda a jornada da reserva, da primeira consulta ao check-out, com status claros e histórico compartilhado para cada cliente.",
  "Customer & Pet Profiles": "Perfis de clientes e pets",
  "Keep contact details, breed, weight, vaccinations, behaviour notes, microchip numbers, and special needs in one trusted record.":
    "Mantenha contatos, raça, peso, vacinas, observações de comportamento, microchip e necessidades especiais em um registro confiável.",
  "Check-In & Check-Out with Photos": "Check-in e check-out com fotos",
  "Document arrival and departure with photos, belongings, and behaviour notes, so owners feel informed and your team has a clear record.":
    "Documente chegada e saída com fotos, pertences e observações de comportamento, para que tutores se sintam informados e sua equipe tenha um registro claro.",
  "Quotations & Payment Tracking": "Orçamentos e controle de pagamentos",
  "Create clear quotes and record off-platform payments, outstanding balances, and refunds without losing track.":
    "Crie orçamentos claros e registre pagamentos fora da plataforma, saldos em aberto e reembolsos sem perder o controle.",
  "Capacity Calendar": "Calendário de capacidade",
  "See availability, daily limits, rooms, services, and busy days at a glance, so you can avoid overbooking.":
    "Veja disponibilidade, limites diários, quartos, serviços e dias cheios de relance para evitar overbooking.",
  "Dashboard & KPIs": "Dashboard e KPIs",
  "Start each day with arrivals, departures, occupancy, open quotes, and the tasks your team should not miss.":
    "Comece cada dia com chegadas, saídas, ocupação, orçamentos em aberto e tarefas que sua equipe não pode perder.",
  "Veterinary Records": "Registros veterinários",
  "Keep vet contacts and health notes close, especially for pets with medication or special care needs.":
    "Mantenha contatos veterinários e notas de saúde por perto, especialmente para pets com medicação ou necessidades especiais.",
  "iOS App for Your Team": "App iOS para sua equipe",
  "Give staff a mobile view for check-ins, bookings, pet records, and updates while they are moving around the property.":
    "Dê à equipe uma visão mobile de check-ins, reservas, registros de pets e atualizações enquanto circulam pela propriedade.",

  "Set up a profile owners can trust.": "Configure um perfil em que tutores possam confiar.",
  "Add services, pet policies, photos, rates, availability, and team details. Owners can understand how you care before they ask for a quote.":
    "Adicione serviços, políticas para pets, fotos, valores, disponibilidade e detalhes da equipe. Tutores conseguem entender como você cuida antes de pedir um orçamento.",
  "Talk to the team →": "Fale com a equipe →",
  "Profile checklist": "Checklist do perfil",
  "5 / 7 ready": "5 / 7 prontos",
  "Public profile": "Perfil público",
  "Photos": "Fotos",
  "Pet policy": "Política para pets",
  "Amenities": "Comodidades",
  "Calendar": "Calendário",
  "Ready for review": "Pronto para revisão",

  "Inside the platform": "Por dentro da plataforma",
  "What sitters and hotels use to run the day.": "O que sitters e hotéis usam para tocar o dia.",
  "A guided preview of the operations side: bookings, check-ins, pet records, quotes, payments, and capacity planning.":
    "Uma prévia guiada do lado operacional: reservas, check-ins, registros de pets, orçamentos, pagamentos e planejamento de capacidade.",
  "Dashboard": "Painel",
  "Bookings": "Reservas",
  "Pet records": "Registros dos pets",
  "Quotes & payments": "Orçamentos e pagamentos",
  "Arrival photo preview": "Prévia da foto de chegada",
  "4 required": "4 obrigatórias",
  "Front": "Frente",
  "Left side": "Lado esquerdo",
  "Right side": "Lado direito",
  "Back": "Traseira",
  "Face, chest, paws": "Rosto, peito, patas",
  "Full body profile": "Perfil de corpo inteiro",
  "Other side profile": "Perfil do outro lado",
  "Back and tail": "Costas e cauda",
  "Add photo": "Adicionar foto",
  "Front, side, and back photos auto-share with Mariana when you complete check-in.":
    "Fotos de frente, lado e costas são compartilhadas automaticamente com Mariana ao concluir o check-in.",
  "No disputes on departure.": "Menos dúvidas na saída.",

  "What StayWise helps you control": "O que a StayWise ajuda você a controlar",
  "Built for calmer daily operations.": "Feita para operações diárias mais tranquilas.",
  "Manage your pet care business with everything in one place, keeping your team aligned and your clients informed.":
    "Gerencie seu negócio de cuidados pet com tudo em um só lugar, mantendo sua equipe alinhada e seus clientes informados.",
  "Every pet has a clear record": "Cada pet tem um registro claro",
  "Weight, breed, medication, vaccines, microchip, vet, and notes.": "Peso, raça, medicação, vacinas, microchip, veterinário e observações.",
  "Check-in and check-out are documented": "Check-in e check-out documentados",
  "Photos, belongings, and notes reduce doubts on departure.": "Fotos, pertences e observações reduzem dúvidas na saída.",
  "Bookings stay organized": "Reservas continuam organizadas",
  "Clear statuses, dates, rooms, payments, and communication in one place.": "Status claros, datas, quartos, pagamentos e comunicação em um só lugar.",
  "Your team knows what to do next": "Sua equipe sabe o próximo passo",
  "Arrivals, departures, tasks, and daily capacity are visible.": "Chegadas, saídas, tarefas e capacidade diária ficam visíveis.",

  "Get in touch": "Entre em contato",
  "Want to see StayWise in action?": "Quer ver a StayWise em ação?",
  "Send us a note. We will answer clearly, without pressure, and help you understand whether StayWise fits what you need.":
    "Escreva para nós. Responderemos com clareza, sem pressão, e ajudaremos você a entender se a StayWise atende ao que você precisa.",
  "Message sent": "Mensagem enviada",
  "Thanks — we'll be in touch within 1 business day.": "Obrigado — entraremos em contato em até 1 dia útil.",
  "Contact form is not connected yet. Add your Formspree endpoint in src/formspree-config.js.":
    "O formulário de contato ainda não está conectado. Adicione seu endpoint do Formspree em src/formspree-config.js.",
  "Could not send your message. Please try again.": "Não foi possível enviar sua mensagem. Tente novamente.",
  "Name": "Nome",
  "Your name": "Seu nome",
  "Email": "E-mail",
  "I am a…": "Eu sou...",
  "Select one…": "Selecione uma opção...",
  "Pet sitter or home boarder": "Pet sitter ou hospedagem domiciliar",
  "Pet hotel or kennel": "Hotel para pets ou canil",
  "Pet owner looking for a sitter": "Tutor procurando um sitter",
  "Other": "Outro",
  "Tell us about your business, ask a question, or request a demo…":
    "Conte sobre seu negócio, tire uma dúvida ou peça uma demonstração...",
  "Send Message": "Enviar mensagem",
  "Sending...": "Enviando...",

  "Excited to find the perfect pet sitter?": "Quer encontrar o pet sitter ideal?",
  "Ready to start using StayWise?": "Pronto para começar a usar a StayWise?",
  "Leave your contact and we will let you know when it's ready.": "Deixe seu contato e avisaremos quando estiver pronto.",
  "Contact our team and get early access to the platform.": "Fale com nossa equipe e obtenha acesso antecipado à plataforma.",
  "Good morning, Sarah": "Bom dia, Sarah",
  "Thursday · 12 June · Bristol": "Quinta · 12 de junho · Bristol",
  "Live": "Ao vivo",
  "Clients": "Clientes",
  "Check-ins": "Check-ins",
  "Reports": "Relatórios",
  "Occupancy": "Ocupação",
  "Today arrivals": "Chegadas de hoje",
  "Departures": "Saídas",
  "Outstanding": "Em aberto",
  "+6% vs last wk": "+6% vs semana passada",
  "2 confirmed": "2 confirmadas",
  "1 photo pending": "1 foto pendente",
  "2 quotes open": "2 orçamentos abertos",
  "Today's bookings": "Reservas de hoje",
  "Today's activity": "Atividade de hoje",
  "7 today": "7 hoje",
  "Checked-in": "Check-in feito",
  "Arriving 14:00": "Chega às 14:00",
  "Photo due": "Foto pendente",
  "Capacity this week": "Capacidade esta semana",
  "Peak Friday": "Pico na sexta",
  "12 / 13 rooms": "12 / 13 quartos",
  "Beagle · M": "Beagle · M",
  "Tabby · cat": "Tigrado · gato",
  "Labrador · L": "Labrador · G",
  "Cat lounge": "Espaço dos gatos",
  "Suite 1": "Suíte 1",
  "Suite 2": "Suíte 2",
  "Suite 3": "Suíte 3",
  "Suite 4": "Suíte 4",
  "Pets & clients": "Pets e clientes",
  "Flexible care options": "Opções flexíveis de cuidado",
  "Find the right care for your pet's routine.": "Encontre o cuidado ideal para a rotina do seu pet.",
  "Whether you need someone to stay over or just drop by, you can find a trusted local sitter.":
    "Seja para alguém dormir no local ou apenas passar rapidamente, você pode encontrar um sitter local confiável.",
  "Pet Boarding": "Hospedagem pet",
  "Your pet stays safely at the sitter's home.": "Seu pet fica em segurança na casa do sitter.",
  "House Sitting": "Cuidado em domicílio",
  "The sitter cares for your pet and your home.": "O sitter cuida do seu pet e da sua casa.",
  "Dog Walking": "Passeio com cães",
  "Daily walks to keep your dog happy and healthy.": "Passeios diários para manter seu cão feliz e saudável.",
  "Drop-in Visits": "Visitas rápidas",
  "Quick visits for feeding, potty breaks, or medication.": "Visitas rápidas para alimentação, necessidades ou medicação.",
  "Trust & Safety": "Confiança e segurança",
  "Peace of mind comes standard.": "Tranquilidade como padrão.",
  "Leaving your pet is hard. We make it easier by building a foundation of trust before you even send a message.":
    "Deixar seu pet é difícil. Tornamos isso mais fácil construindo uma base de confiança antes mesmo da primeira mensagem.",
  "Verified Identity": "Identidade verificada",
  "Every sitter passes a strict ID and background check before they can accept bookings.":
    "Todo sitter passa por uma verificação rigorosa de identidade e antecedentes antes de aceitar reservas.",
  "Pet First Aid": "Primeiros socorros pet",
  "Look for the first-aid badge. Many of our sitters are trained to handle emergencies.":
    "Procure o selo de primeiros socorros. Muitos dos nossos sitters são treinados para lidar com emergências.",
  "Centralized Records": "Registros centralizados",
  "Diet, medication, and vet details are shared securely. No miscommunication.":
    "Dieta, medicação e dados veterinários são compartilhados com segurança. Sem falhas de comunicação.",
  "What pet owners say": "O que os tutores dizem",
  "Connecting pets with people they can trust.": "Conectando pets a pessoas em quem podem confiar.",
  "Stories from owners who found their second home for their pets on StayWise.":
    "Histórias de tutores que encontraram uma segunda casa para seus pets na StayWise.",
  "Luna needs medication twice a day. On StayWise I found a sitter with first-aid experience, and the daily photos completely put my mind at ease.":
    "A Luna precisa de medicação duas vezes ao dia. Na StayWise encontrei um sitter com experiência em primeiros socorros, e as fotos diárias me deixaram totalmente tranquila.",
  "The pet profile is genius. I only had to write out Max's allergies and routine once. Every sitter I contacted already knew exactly what to expect.":
    "O perfil do pet é genial. Só precisei escrever as alergias e a rotina do Max uma vez. Todo sitter que contatei já sabia exatamente o que esperar.",
  "It's so much more professional than finding someone on social media. The secure payment and clear check-in process make a huge difference.":
    "É muito mais profissional do que encontrar alguém nas redes sociais. O pagamento seguro e o processo claro de check-in fazem muita diferença.",
  "Dog Owner, Madrid": "Tutora de cachorro, Madri",
  "Cat Owner, Berlin": "Tutor de gato, Berlim",
  "Pet Owner, Amsterdam": "Tutora de pet, Amsterdã",
  "Daily photos": "Fotos diárias",
  "Dogs in park": "Cães no parque",
  "Luna takes oral meds 2× / day. OK?": "Luna toma medicação oral 2× / dia. Tudo bem?",
  "Yes — pet first-aid certified ✓": "Sim — certificado em primeiros socorros pet ✓",
  "9 events": "9 eventos",
  "Luna (Beagle) checked in": "Luna (Beagle) fez check-in",
  "Photo report sent to Mariana S.": "Relatório com fotos enviado para Mariana S.",
  "Pixel (cat) arriving at 14:00": "Pixel (gato) chega às 14:00",
  "Payment received — €224": "Pagamento recebido — €224",
  "All · 23": "Todos · 23",
  "This week · 7": "Esta semana · 7",
  "New booking": "Nova reserva",
  "Client": "Cliente",
  "Room": "Quarto",
  "Actions": "Ações",
  "Check-in · Luna": "Check-in · Luna",
  "Step 2 of 3": "Etapa 2 de 3",
  "Belongings": "Pertences",
  "Travel bag · red": "Bolsa de transporte · vermelha",
  "Food container · 1.2kg": "Pote de ração · 1,2 kg",
  "Toy · rubber bone": "Brinquedo · osso de borracha",
  "Medication · 14 pills": "Medicação · 14 comprimidos",
  "Blanket · grey": "Cobertor · cinza",
  "Leash · black harness": "Guia · peitoral preto",
  "Behavioural assessment on arrival": "Avaliação comportamental na chegada",
  "Calm": "Calma",
  "Alert": "Alerta",
  "Curious": "Curiosa",
  "Anxious": "Ansiosa",
  "Tail wagging": "Abanando o rabo",
  "Luna arrived at 14:08, ate within an hour, took her morning medication at 16:00. Settling well.":
    "Luna chegou às 14:08, comeu em até uma hora e tomou a medicação da manhã às 16:00. Está se adaptando bem.",
  "Beagle · 12kg · 3 yrs": "Beagle · 12 kg · 3 anos",
  "Stay": "Estadia",
  "Meds": "Medicamentos",
  "2× / day · 08h &amp; 20h": "2× / dia · 08h e 20h",
  "Emergency": "Emergência",
  "Complete check-in": "Concluir check-in",
  "Message owner": "Enviar mensagem ao tutor",
  "Owner: Mariana S.": "Tutora: Mariana S.",
  "Weight": "Peso",
  "Age": "Idade",
  "Veterinary record": "Registro veterinário",
  "One tap away in any situation": "A um toque em qualquer situação",
  "Amsterdam · 10 min away": "Amsterdã · a 10 min",
  "Emergency contact": "Contato de emergência",
  "Mariana S. (owner)": "Mariana S. (tutora)",
  "Leptospirosis": "Leptospirose",
  "Bordetella": "Bordetella",
  "Renewal due 22 Jul 2025": "Renovação em 22 jul. 2025",
  "Stay history": "Histórico de estadias",
  "Boarding · Suite 2": "Hospedagem · Suíte 2",
  "In progress": "Em andamento",
  "Boarding · Suite 1": "Hospedagem · Suíte 1",
  "Completed": "Concluída",
  "Daycare · 3 days": "Creche · 3 dias",
  "Build quote": "Montar orçamento",
  "Paid this month": "Pago este mês",
  "Refunded": "Reembolsado",
  "Client / Pet": "Cliente / Pet",
  "Issued": "Emitido",
  "Paid": "Pago",
  "Awaiting": "Aguardando",
  "Building quote": "Montando orçamento",
  "Shiba · 16 → 20 Jun (4 nights)": "Shiba · 16 → 20 jun (4 diárias)",
  "Boarding €32 × 4": "Hospedagem €32 × 4",
  "Daily walk €8 × 4": "Passeio diário €8 × 4",
  "Medication": "Medicação",
  "Send quote": "Enviar orçamento",
  "Capacity calendar": "Calendário de capacidade",
  "June 2025": "Junho de 2025",
  "Set limits": "Definir limites",
  "Mon": "Seg",
  "Tue": "Ter",
  "Wed": "Qua",
  "Thu": "Qui",
  "Fri": "Sex",
  "Sat": "Sáb",
  "Sun": "Dom",
  "Daily occupancy · this week": "Ocupação diária · esta semana",
  "13 rooms total": "13 quartos no total",
  "Rooms · this week": "Quartos · esta semana",

  "Ready to make pet care feel calmer and more professional?":
    "Pronto para deixar o cuidado pet mais tranquilo e profissional?",
  "StayWise helps owners feel informed and helps care providers run the day with clearer records, smoother communication, and less manual work.":
    "A StayWise ajuda tutores a se sentirem informados e ajuda prestadores a tocar o dia com registros mais claros, comunicação mais fluida e menos trabalho manual.",
  "The trusted pet care platform for owners, sitters, and pet hotels.":
    "A plataforma de cuidados pet de confiança para tutores, sitters e hotéis para pets.",
  "Product": "Produto",
  "Explore": "Explorar",
  "Operations": "Operações",
  "Company": "Empresa",
  "© 2026 StayWise. All rights reserved.": "© 2026 StayWise. Todos os direitos reservados.",
  "English": "Português",
};

const SW_TRANSLATIONS = {
  hu: SW_HU_TEXT,
  "pt-br": SW_PT_BR_TEXT,
};

const translateText = (value) => {
  if (SW_LANG === "en" || typeof value !== "string") return value;
  const dictionary = SW_TRANSLATIONS[SW_LANG] || {};
  return dictionary[value] || value;
};

const preserveWhitespace = (raw, translated) => {
  const leading = raw.match(/^\s*/)[0];
  const trailing = raw.match(/\s*$/)[0];
  return `${leading}${translated}${trailing}`;
};

const localizeNode = (node) => {
  const dictionary = SW_TRANSLATIONS[SW_LANG] || {};
  if (SW_LANG === "en" || !node) return;
  if (node.nodeType === Node.TEXT_NODE) {
    const trimmed = node.nodeValue.trim();
    if (dictionary[trimmed]) node.nodeValue = preserveWhitespace(node.nodeValue, dictionary[trimmed]);
    return;
  }
  if (node.nodeType !== Node.ELEMENT_NODE) return;
  ["placeholder", "aria-label", "title", "alt"].forEach((attr) => {
    const value = node.getAttribute(attr);
    if (value && dictionary[value]) node.setAttribute(attr, dictionary[value]);
  });
  node.childNodes.forEach(localizeNode);
};

const localizeDocument = () => {
  const meta = SW_META[SW_LANG] || SW_META.en;
  document.documentElement.lang = meta.htmlLang || SW_LANG;
  document.title = meta.title;
  const description = document.querySelector('meta[name="description"]');
  if (description) description.setAttribute("content", meta.description);
  localizeNode(document.getElementById("root"));
};

const languageUrl = (nextLang) => {
  const hash = window.location.hash || "";
  const paths = {
    en: "index.html",
    hu: "hu/index.html",
    "pt-br": "pt-br/index.html",
  };
  if (SW_LANG !== "en") {
    if (nextLang === SW_LANG) return `index.html${hash}`;
    if (nextLang === "en") return `../index.html${hash}`;
    return `../${paths[nextLang]}${hash}`;
  }
  return `${paths[nextLang] || paths.en}${hash}`;
};

const assetPath = (path) => {
  if (!path || /^(https?:|data:|\/)/.test(path)) return path;
  const clean = path.replace(/^\.\//, "");
  return SW_LANG === "en" ? clean : `../${clean}`;
};

if (document.readyState === "loading") {
  document.addEventListener("DOMContentLoaded", localizeDocument);
} else {
  localizeDocument();
}

if (SW_LANG !== "en") {
  let scheduled = false;
  const scheduleLocalize = () => {
    if (scheduled) return;
    scheduled = true;
    window.requestAnimationFrame(() => {
      scheduled = false;
      localizeDocument();
    });
  };
  const rootObserver = new MutationObserver(scheduleLocalize);
  const setupObserver = () => {
    const root = document.getElementById("root");
    if (root) rootObserver.observe(root, { childList: true, subtree: true, characterData: true, attributes: true });
    scheduleLocalize();
  };
  if (document.readyState === "loading") {
    document.addEventListener("DOMContentLoaded", setupObserver);
  } else {
    setupObserver();
  }
}

// Persists the user's active language choice.
// Called by the language switcher (manual switch) and by geo-redirect (first visit).
const setLangPref = (lang) => {
  try { localStorage.setItem("sw_lang", lang); } catch (_) {}
};

window.SW_I18N = {
  lang: SW_LANG,
  t: translateText,
  localizeDocument,
  languageUrl,
  assetPath,
  setLangPref,
};

// Geo-based language redirect — only on root EN page.
// Priority: stored preference → geo-detect → default English.
// Uses Cloudflare /cdn-cgi/trace: no external API, no rate limits, no CORS.
// In local dev /cdn-cgi/trace is unavailable → falls to catch → stores "en".
(function geoRedirect() {
  if (SW_LANG !== "en") return;

  let pref;
  try { pref = localStorage.getItem("sw_lang"); } catch (_) {}

  // Stored preference takes priority over geo (respects manual language switch).
  if (pref === "hu")    { window.location.replace("/hu/");     return; }
  if (pref === "pt-br") { window.location.replace("/pt-br/");  return; }
  if (pref === "en")    { return; }

  // No preference yet — geo-detect via Cloudflare trace.
  fetch("/cdn-cgi/trace")
    .then((r) => r.text())
    .then((text) => {
      const match = text.match(/^loc=([A-Z]{2})$/m);
      const country = match ? match[1] : null;
      if (country === "BR" || country === "PT") {
        setLangPref("pt-br");
        window.location.replace("/pt-br/");
      } else if (country === "HU") {
        setLangPref("hu");
        window.location.replace("/hu/");
      } else {
        setLangPref("en");
      }
    })
    .catch(() => {
      // /cdn-cgi/trace unavailable (local dev, non-Cloudflare) → default English.
      setLangPref("en");
    });
}());
