backend:
  name: github
  repo: lucaiolienrico/yoga-bari
  branch: main
  base_url: https://yoga-bari-oauth.lucaiolienrico.workers.dev
  auth_endpoint: /auth

site_url: https://yoga-bari.pages.dev
display_url: https://yoga-bari.pages.dev

media_folder: "assets/img"
public_folder: "/assets/img"

# Ridimensiona/comprime automaticamente ogni immagine caricata dal cliente,
# per qualsiasi campo "widget: image" del sito. Verificato leggendo il
# sorgente di @sveltia/cms 0.220.0 (src/lib/services/config/parser/
# media-libraries.js) — la documentazione online non era raggiungibile
# per la verifica, il comportamento è confermato dal codice.
media_library:
  name: default
  config:
    transformations:
      raster_image:
        format: webp
        quality: 82
        width: 1920
        height: 1920
        fit: scale-down   # riduce solo se più grande del box, non ingrandisce né ritaglia

locale: it

collections:

  # ─────────────────────────────────────────
  # 1. IMPOSTAZIONI GENERALI
  # ─────────────────────────────────────────
  - name: "impostazioni"
    label: "⚙️ Impostazioni Studio"
    files:

      - name: "generale"
        label: "Info Generali"
        file: "generale.json"
        fields:
          - { label: "Nome Studio", name: "nome_studio", widget: "string", default: "Il Fenicottero ASD", hint: "Scrivilo sempre identico (es. Il Fenicottero ASD, con le stesse maiuscole ovunque): Google e le AI riconoscono meglio il brand se il nome è coerente" }
          - { label: "Slogan / Sottotitolo", name: "slogan", widget: "string" }
          - { label: "URL Sito", name: "url_sito", widget: "string", required: false }
          - { label: "📞 Numero WhatsApp", name: "whatsapp", widget: "string", hint: "Formato internazionale senza +: es. 393401234567" }
          - { label: "📧 Email", name: "email", widget: "string" }
          - { label: "📍 Indirizzo", name: "indirizzo", widget: "string" }
          - { label: "🗺️ Latitudine (opzionale)", name: "latitudine", widget: "number", value_type: "float", required: false, hint: "Per la SEO locale. Su Google Maps: tasto destro sul punto esatto della sede → il primo numero è la latitudine (es. 41.1171)" }
          - { label: "🗺️ Longitudine (opzionale)", name: "longitudine", widget: "number", value_type: "float", required: false, hint: "Su Google Maps: tasto destro sul punto esatto della sede → il secondo numero è la longitudine (es. 16.8719)" }
          - { label: "🕐 Orari di apertura", name: "orari_apertura", widget: "string" }
          - { label: "P.IVA", name: "piva", widget: "string" }
          - { label: "Link Facebook", name: "social_fb", widget: "string", required: false }
          - { label: "Link Instagram", name: "social_ig", widget: "string", required: false }
          - { label: "Link YouTube", name: "social_yt", widget: "string", required: false }
          - { label: "🧭 Menu — La Scuola", name: "nav_scuola", widget: "string", default: "La Scuola" }
          - { label: "🧭 Menu — Corsi", name: "nav_corsi", widget: "string", default: "Corsi" }
          - { label: "🧭 Menu — Orari", name: "nav_orari", widget: "string", default: "Orari" }
          - { label: "🧭 Menu — Galleria", name: "nav_galleria", widget: "string", default: "Galleria" }
          - { label: "🧭 Menu — Contatti", name: "nav_contatti", widget: "string", default: "Contatti" }

  # ─────────────────────────────────────────
  # 2. SEZIONE HERO
  # ─────────────────────────────────────────
  - name: "hero"
    label: "🖼️ Hero (Prima Schermata)"
    files:
      - name: "hero"
        label: "Contenuto Hero"
        file: "hero.json"
        fields:
          - { label: "Titolo riga 1", name: "titolo1", widget: "string", default: "Iyengar" }
          - { label: "Titolo riga 2", name: "titolo2", widget: "string", default: "Yoga Bari" }
          - { label: "Sottotitolo in grassetto", name: "sub", widget: "string" }
          - { label: "Testo descrittivo", name: "descrizione", widget: "text" }
          - { label: "Citazione in fondo", name: "citazione", widget: "string", required: false }
          - { label: "Testo bottone principale", name: "btn_testo", widget: "string", default: "Scopri di più →" }
          - label: "📸 Foto Hero (lato destro)"
            name: foto_hero
            widget: image
            hint: "Immagine verticale consigliata. Dimensioni consigliate: 800x1000px. Il sito comprime automaticamente ogni foto caricata, nessun limite di peso da rispettare"
          - { label: "Testo alternativo foto", name: "foto_hero_alt", widget: "string", default: "Yoga Bari" }

  # ─────────────────────────────────────────
  # 3. SEZIONE INTRO
  # ─────────────────────────────────────────
  - name: "intro"
    label: "🌿 Sezione Intro"
    files:
      - name: "intro"
        label: "Ritrova la tua pace interiore"
        file: "intro.json"
        fields:
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "Ritrova la tua" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "pace interiore" }
          - { label: "Paragrafo 1", name: "para1", widget: "text" }
          - { label: "Paragrafo 2", name: "para2", widget: "text", required: false }
          - { label: "Testo bottone WhatsApp", name: "btn_wa", widget: "string", default: "Prenota la tua prima lezione" }
          - { label: "Nota sotto il bottone", name: "nota", widget: "string", default: "Prima lezione gratuita" }
          - label: "📸 Foto Disciplina"
            name: foto_disciplina
            widget: image
            hint: "Foto verticale 4:5. Es: posa yoga, classe, insegnante. Il sito comprime automaticamente ogni foto caricata"

  # ─────────────────────────────────────────
  # 4. CORSI
  # ─────────────────────────────────────────
  - name: "corsi"
    label: "🧘 Corsi"
    files:
      - name: "corsi"
        label: "Le 6 Discipline"
        file: "corsi.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Etichetta sopra il titolo", name: "sec_label", widget: "string", default: "Le Nostre Discipline" }
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "Scegli il tuo" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "percorso" }
          - label: "Corsi"
            name: "lista"
            widget: "list"
            max: 6
            fields:
              - { label: "Emoji", name: "emoji", widget: "string", default: "🌿" }
              - { label: "Nome corso", name: "nome", widget: "string" }
              - label: "Livello"
                name: livello
                widget: select
                options: ["Tutti i livelli", "Principiante", "Intermedio", "Avanzato"]
              - { label: "Durata", name: "durata", widget: "string", default: "60 min" }
              - { label: "Max partecipanti", name: "max", widget: "string", default: "12" }
              - { label: "Descrizione", name: "descrizione", widget: "text" }

  # ─────────────────────────────────────────
  # 5. ORARI
  # ─────────────────────────────────────────
  - name: "orari"
    label: "📅 Orari Settimanali"
    files:
      - name: "orari"
        label: "Programmazione Settimanale"
        file: "orari.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Etichetta sopra il titolo", name: "sec_label", widget: "string", default: "Programmazione Settimanale" }
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "I tuoi" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "orari" }
          - label: "Lezioni"
            name: "lista"
            widget: "list"
            fields:
              - label: "Giorno"
                name: giorno
                widget: select
                options: ["Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"]
              - { label: "Orario (es. 07:30)", name: "ora", widget: "string" }
              - { label: "Nome Corso", name: "corso", widget: "string" }
              - { label: "Insegnante", name: "insegnante", widget: "string" }
              - label: "Colore slot"
                name: colore
                widget: select
                options:
                  - { label: "Verde salvia", value: "sage" }
                  - { label: "Lavanda", value: "lav" }
                  - { label: "Rosa", value: "rose" }
                  - { label: "Beige", value: "beige" }

  # ─────────────────────────────────────────
  # 6. GALLERIA
  # ─────────────────────────────────────────
  - name: "galleria"
    label: "📷 Galleria"
    files:
      - name: "galleria"
        label: "Foto e Video"
        file: "galleria.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Etichetta sopra il titolo", name: "sec_label", widget: "string", default: "Galleria" }
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "Vivi l'" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "atmosfera" }
          - label: "Foto"
            name: "foto"
            widget: "list"
            fields:
              - label: "Foto"
                name: src
                widget: image
                hint: "Il sito comprime automaticamente ogni foto caricata, nessun limite di peso da rispettare"
              - { label: "Didascalia", name: "label", widget: "string", required: false }
              - label: "Dimensione"
                name: size
                widget: select
                options:
                  - { label: "Normale", value: "normal" }
                  - { label: "Larga (2 colonne)", value: "wide" }
                  - { label: "Alta (2 righe)", value: "tall" }
          - label: "Video (YouTube/Vimeo)"
            name: "video"
            widget: "list"
            fields:
              - { label: "URL video", name: "url", widget: "string", hint: "es. https://youtube.com/watch?v=XXXXX" }
              - { label: "Titolo", name: "titolo", widget: "string" }

  # ─────────────────────────────────────────
  # 7. TESTIMONIANZE
  # ─────────────────────────────────────────
  - name: "testimonianze"
    label: "⭐ Testimonianze"
    files:
      - name: "testimonianze"
        label: "Recensioni Allievi"
        file: "testimonianze.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Etichetta sopra il titolo", name: "sec_label", widget: "string", default: "Cosa dicono di noi" }
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "Voci dei" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "nostri allievi" }
          - label: "Testimonianze"
            name: "lista"
            widget: "list"
            fields:
              - { label: "Nome", name: "nome", widget: "string" }
              - { label: "Ruolo / Periodo", name: "ruolo", widget: "string" }
              - { label: "Iniziali (avatar)", name: "iniziali", widget: "string" }
              - label: "Stelle"
                name: stelle
                widget: select
                options: ["5","4","3","2","1"]
                default: "5"
              - { label: "Testo recensione", name: "testo", widget: "text" }

  # ─────────────────────────────────────────
  # 8. RATING PORTALI
  # ─────────────────────────────────────────
  - name: "rating"
    label: "🏅 Rating Portali"
    files:
      - name: "rating"
        label: "Punteggi Google, Facebook ecc."
        file: "rating.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Testo introduttivo", name: "testo", widget: "string", default: "Riconosciuti e apprezzati sui principali portali" }
          - label: "Portali"
            name: "lista"
            widget: "list"
            fields:
              - { label: "Nome portale", name: "portale", widget: "string" }
              - { label: "Sottotitolo", name: "sub", widget: "string" }
              - { label: "Punteggio (es. 4.9)", name: "punteggio", widget: "string" }
              - { label: "Numero recensioni", name: "recensioni", widget: "string" }

  # ─────────────────────────────────────────
  # 9. CONTATTI
  # ─────────────────────────────────────────
  - name: "contatti"
    label: "✉️ Contatti"
    files:
      - name: "contatti"
        label: "Testi Sezione Contatti"
        file: "contatti.json"
        fields:
          - { label: "👁️ Mostra sezione sul sito", name: "visibile", widget: "boolean", default: true }
          - { label: "Etichetta sopra il titolo", name: "sec_label", widget: "string", default: "Contattaci" }
          - { label: "Titolo (riga 1)", name: "titolo1", widget: "string", default: "Inizia il tuo" }
          - { label: "Titolo (riga 2, corsivo)", name: "titolo2", widget: "string", default: "viaggio" }
          - { label: "Testo descrittivo", name: "testo", widget: "text", default: "Hai domande o vuoi provare una lezione? Scrivici — risponderemo entro poche ore." }
