import { Button } from "@/components/ui/button"
import { ArrowLeft } from "lucide-react"
import Link from "next/link"

export default function GalleryPage() {
  const photos = [
    {
      src: "/images/20220830-104828.jpg",
      alt: "Overhead view of unconference discussion circle",
      caption: "Unconference discussion circles at CCG",
    },
    {
      src: "/images/20220505-113225.jpg",
      alt: "CCG 2022 community group photo with Austrian Alps",
      caption: "The CCG 2022 community gathered at Commons Hub",
    },
    {
      src: "/images/20220907-135022.jpg",
      alt: "Serene river surrounded by forest in the Austrian Alps",
      caption: "Natural swimming spots near the Commons Hub",
    },
    {
      src: "/images/20210827-202412.jpg",
      alt: "Evening bonfire celebration with community circle",
      caption: "Evening bonfire gathering with the community",
    },
    {
      src: "/images/20220906-143605.jpg",
      alt: "Hiker exploring mountain trails in the Austrian Alps",
      caption: "Hiking and exploring the alpine trails around the venue",
    },
    {
      src: "/images/20220901-085249.jpg",
      alt: "Historic bridge with mountain views in Reichenau an der Rax",
      caption: "Scenic views around Reichenau an der Rax",
    },
    {
      src: "/images/20210826-150353.jpg",
      alt: "Participant working on creative projects at Commons Hub",
      caption: "Creative activities and hands-on projects at CCG",
    },
    {
      src: "/images/20220502-103036.jpg",
      alt: "Mobile garden project with van at Commons Hub",
      caption: "Community gardening and sustainability projects",
    },
    {
      src: "/images/20210825-170346.jpg",
      alt: "Mushroom foraging in the Austrian Alps",
      caption: "Foraging for wild mushrooms in the surrounding forests",
    },
    {
      src: "/images/20220831-095041.jpg",
      alt: "Mindfulness meditation circle at Commons Hub courtyard",
      caption: "Morning meditation and mindfulness sessions",
    },
    {
      src: "/images/20220430-170329.jpg",
      alt: "Outdoor discussions by the river",
      caption: "Group discussions and activities by the river",
    },
    {
      src: "/images/20220828-115317.jpg",
      alt: "Creative community activity on train tracks",
      caption: "Spontaneous creative moments and community bonding",
    },
    {
      src: "/images/20220430-112350.jpg",
      alt: "Workshop presentation at Commons Hub",
      caption: "Workshops and knowledge sharing sessions",
    },
    {
      src: "/images/20220828-125652.jpg",
      alt: "Exploring the town of Payerbach with scenic mountain views",
      caption: "Exploring nearby alpine towns and scenic spots",
    },
  ]

  return (
    <div className="min-h-screen">
      {/* Header */}
      <section className="py-16 px-4 bg-muted/30">
        <div className="container mx-auto max-w-6xl">
          <Button variant="ghost" className="mb-8" asChild>
            <Link href="/">
              <ArrowLeft className="w-4 h-4 mr-2" />
              Back to Home
            </Link>
          </Button>

          <h1 className="text-4xl md:text-5xl font-bold mb-4 text-balance">Gallery</h1>
          <p className="text-lg text-muted-foreground max-w-2xl">
            Explore moments from past Crypto Commons Gatherings - from unconference sessions in the Austrian Alps to
            community building and lifelong friendships.
          </p>
        </div>
      </section>

      {/* Photo Grid */}
      <section className="py-16 px-4">
        <div className="container mx-auto max-w-7xl">
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {photos.map((photo, index) => (
              <div key={index} className="group relative overflow-hidden rounded-lg bg-card border border-border">
                <div className="aspect-[4/3] overflow-hidden">
                  <img
                    src={photo.src || "/placeholder.svg"}
                    alt={photo.alt}
                    className="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"
                  />
                </div>
                <div className="p-4">
                  <p className="text-sm text-muted-foreground">{photo.caption}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* CTA Section */}
      <section className="py-16 px-4 bg-muted/30">
        <div className="container mx-auto max-w-3xl text-center">
          <h2 className="text-3xl font-bold mb-4">Join Us in 2026</h2>
          <p className="text-muted-foreground mb-8">
            Be part of the next chapter of Crypto Commons Gathering and create new memories in the Austrian Alps.
          </p>
          <Button size="lg" asChild>
            <Link href="/register">Register for CCG 2026</Link>
          </Button>
        </div>
      </section>

      {/* Footer */}
      <footer className="py-12 px-4 border-t border-border">
        <div className="container mx-auto max-w-6xl">
          <div className="grid sm:grid-cols-2 md:grid-cols-4 gap-8 mb-8">
            <div>
              <h3 className="font-bold mb-4">CCG 2026</h3>
              <p className="text-sm text-muted-foreground">
                Crypto Commons Gathering
                <br />
                August 16-22, 2026
              </p>
            </div>

            <div>
              <h3 className="font-semibold mb-4 text-sm">Links</h3>
              <ul className="space-y-2 text-sm">
                <li>
                  <Link href="/gallery" className="text-muted-foreground hover:text-foreground transition-colors">
                    Gallery
                  </Link>
                </li>
                <li>
                  <Link href="/about" className="text-muted-foreground hover:text-foreground transition-colors">
                    About CCG 2026
                  </Link>
                </li>
                <li>
                  <Link href="/directions" className="text-muted-foreground hover:text-foreground transition-colors">
                    Directions
                  </Link>
                </li>
                <li>
                  <Link href="/transparency" className="text-muted-foreground hover:text-foreground transition-colors">
                    Financial Transparency
                  </Link>
                </li>
              </ul>
            </div>

            <div>
              <h3 className="font-semibold mb-4 text-sm">Community</h3>
              <ul className="space-y-2 text-sm">
                <li>
                  <span className="text-muted-foreground">Join the CCG26 Telegram (Coming Soon)</span>
                </li>
                <li>
                  <Link
                    href="https://t.me/+gZjhNaDswIc0ZDg0"
                    className="text-muted-foreground hover:text-foreground transition-colors"
                    target="_blank"
                    rel="noopener noreferrer"
                  >
                    Join the Crypto Commons Association Telegram
                  </Link>
                </li>
              </ul>
            </div>

            <div>
              <h3 className="font-semibold mb-4 text-sm">Partners</h3>
              <ul className="space-y-2 text-sm">
                <li>
                  <Link
                    href="https://www.commons-hub.at/"
                    className="text-muted-foreground hover:text-foreground transition-colors"
                    target="_blank"
                    rel="noopener noreferrer"
                  >
                    Commons Hub
                  </Link>
                </li>
                <li>
                  <Link
                    href="https://crypto-commons.org"
                    className="text-muted-foreground hover:text-foreground transition-colors"
                    target="_blank"
                    rel="noopener noreferrer"
                  >
                    Crypto Commons Association
                  </Link>
                </li>
                <li>
                  <Link href="/sponsorships" className="text-muted-foreground hover:text-foreground transition-colors">
                    Sponsorships
                  </Link>
                </li>
              </ul>
            </div>
          </div>

          <div className="pt-8 border-t border-border text-center text-sm text-muted-foreground">
            <p>This website is under Creative Commons license. Built with solidarity for the commons.</p>
          </div>
        </div>
      </footer>
    </div>
  )
}
