"use client"; import { motion, AnimatePresence, useScroll, useTransform } from "framer-motion"; import { useState, useEffect, useRef } from "react"; import type { DemoData } from "@/data/demos"; import AnimatedCounter from "@/components/ui/AnimatedCounter"; const E_SMOOTH = [0.25, 0.46, 0.45, 0.94] as [number, number, number, number]; const E_DRAMATIC = [0.16, 1, 0.3, 1 ] as [number, number, number, number]; const fadeUp = { hidden: { opacity: 0, y: 48 }, show: { opacity: 1, y: 0, transition: { duration: 0.8, ease: E_SMOOTH } }, }; const fadeIn = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { duration: 0.6, ease: E_SMOOTH } }, }; const fadeLeft = { hidden: { opacity: 0, x: 40 }, show: { opacity: 1, x: 0, transition: { duration: 0.8, ease: E_SMOOTH } }, }; const stagger = { hidden: {}, show: { transition: { staggerChildren: 0.11 } }, }; const staggerFast = { hidden: {}, show: { transition: { staggerChildren: 0.065 } }, }; function ServiceIcon({ ikon, color }: { ikon: string; color: string }) { const p = { className: "w-6 h-6 fill-none", viewBox: "0 0 24 24", strokeWidth: "1.7", stroke: color }; if (ikon === "surgery" || ikon.includes("Cerrahi")) return ; if (ikon === "orthopedics" || ikon.includes("Ortopedi")) return ; if (ikon === "pediatrics" || ikon.includes("Çocuk")) return ; if (ikon === "gynecology" || ikon.includes("Kadın")) return ; if (ikon === "neurology" || ikon.includes("Nöroloji")) return ; if (ikon === "laboratory" || ikon.includes("Laboratuvar")) return ; if (ikon === "radiology" || ikon.includes("Radyoloji")) return ; if (ikon === "gastro" || ikon.includes("Gastro")) return ; if (ikon === "dietitian" || ikon.includes("Beslenme")) return ; return ; } const MARQUEE_A = ["SGK Anlaşmalı", "7/24 Acil Servis", "Uluslararası Hasta", "Modern Ameliyathane", "MR & Tomografi", "Online Randevu", "Engelli Erişimi"]; const MARQUEE_B = ["Genel Cerrahi", "Ortopedi", "Nöroloji", "Radyoloji", "Çocuk Sağlığı", "Beslenme & Diyet", "GETAT Birimi"]; const POLYCLINICS_TR = [ { name: "Ortopedi ve Travmatoloji", desc: "Menüsküs yırtığı, kırık tedavisi, eklem cerrahisi ve sportif yaralanmalar için uzman yaklaşım." }, { name: "Çocuk Sağlığı ve Hastalıkları", desc: "Pediatri, büyüme-gelişme takibi, aşı programları ve çocuk enfeksiyon hastalıkları." }, { name: "Kadın Hastalıkları ve Doğum", desc: "Jinekoloji, gebelik takibi ve kadın sağlığına özel poliklinik hizmetleri." }, { name: "Genel Cerrahi", desc: "Elektif ve acil cerrahi operasyonlar, ameliyathane ve yatan hasta servisi." }, { name: "Nöroloji", desc: "Baş ağrısı, migren, epilepsi ve nörolojik hastalıkların tam tanı-tedavi süreci." }, { name: "Beslenme ve Diyet", desc: "Uzman diyetisyen eşliğinde kişiye özel beslenme programı ve sağlıklı yaşam takibi." }, { name: "Acil Servis", desc: "7/24 kesintisiz acil tıbbi hizmet, tüm yaş gruplarına anında müdahale kapasitesi." }, { name: "GETAT Birimi", desc: "Proloterapi, akupunktur, posturoloji ve geleneksel tamamlayıcı tıp uygulamaları." }, ]; const POLYCLINICS_EN = [ { name: "Orthopedics & Traumatology", desc: "Meniscus tears, fractures, joint surgery and sports injuries treated by specialists." }, { name: "Pediatrics", desc: "Child health and development monitoring, vaccination programs and pediatric diseases." }, { name: "Gynecology & Obstetrics", desc: "Gynecology, pregnancy monitoring and women's health polyclinic services." }, { name: "General Surgery", desc: "Elective and emergency surgical operations, operating room and inpatient ward." }, { name: "Neurology", desc: "Headache, migraine, epilepsy and neurological disease diagnosis and treatment." }, { name: "Nutrition & Dietetics", desc: "Personalized nutrition programs under expert dietitian guidance and lifestyle coaching." }, { name: "Emergency Service", desc: "24/7 emergency medical service with immediate response capacity for all age groups." }, { name: "CAIM Unit", desc: "Prolotherapy, acupuncture, posturology and traditional complementary medicine applications." }, ]; const TRANSLATIONS = { tr: { badge: "ÖZEL TIP MERKEZİ · BODRUM", heroT1: "Bodrum'un", heroT2: "Sağlığa Adanmış", heroT3: "Öncü Merkezi", heroDesc: "İleri cerrahi teknolojisi, 12 uzman hekim ve hasta odaklı yaklaşımla; SGK anlaşmalı, 7/24 acil, uluslararası hasta hizmetiyle güvende olun.", ctaBook: "Online Randevu Al", ctaServices: "Hizmetlerimiz", navServices: "Hizmetler", navDoctors: "Doktorlar", navPoly: "Poliklinikler", navContact: "İletişim", navBook: "Randevu Al", floatDoctors: "Uzman Hekim", floatIntl: "Uluslararası Hasta Departmanı", workTitle: "Çalışma Saatleri", wkdays: "Hafta İçi: 08:30–17:30", saturday: "Cumartesi: 08:30–13:00", sunday: "Pazar: Acil Servis", statsSection: "Sayılarla Bodrum Cerrahi", srvTitle: "Tıbbi Birimlerimiz", srvHeader: "UZMANLAŞMIŞ SAĞLIK HİZMETLERİ", srvDesc: "Ameliyathane, tıbbi laboratuvar, radyoloji birimi ve branş uzmanlarımızla kapsamlı sağlık çözümleri sunuyoruz.", drTitle: "Uzman Kadromuz", drHeader: "ALANINDA UZMAN HEKİMLER", drDesc: "Deneyimli cerrahlar, uzman hekimler ve yardımcı sağlık personeliyle profesyonel tedavi.", drYil: "Yıl", drHasta: "Hasta", polyTitle: "Poliklinikler", polyHeader: "TIP MERKEZİMİZ BRANŞLARI", rvwTitle: "Hasta Yorumları", rvwHeader: "HASTALARIMIZ NE DÜŞÜNÜYOR?", bookTitle: "Online Randevu", bookHeader: "RANDEVUNUZU PLANLAYALIM", bookDesc: "Formu doldurun, randevu koordinatörümüz sizi 15 dakika içinde arasın ve gününüzü kesinleştirsin.", fName: "Ad Soyad", fPhone: "Telefon", fEmail: "E-Posta", fDept: "Bölüm", fDate: "Tercih Tarihi", fSubmit: "RANDEVU TALEP ET", contactTitle: "İrtibat Bilgileri", callCenter: "Danışma Hattı", adresLabel: "Adres", mailLabel: "E-Posta", emergency: "Acil: 112 · 7/24 Hizmet", footerDesc: "SGK anlaşmalı, uluslararası hasta hizmetleri sunan Bodrum'un öncü özel tıp merkezi.", privacy: "Gizlilik Sözleşmesi", terms: "Kullanım Şartları", deptOptions: ["Genel Cerrahi", "Ortopedi ve Travmatoloji", "Çocuk Sağlığı", "Kadın Hastalıkları", "Nöroloji", "Radyoloji", "Laboratuvar", "Gastroenteroloji", "Beslenme ve Diyet"], demoBanner: "Bu site demo amaçlıdır — demo.ayristech.com", }, en: { badge: "PRIVATE MEDICAL CENTER · BODRUM", heroT1: "Bodrum's", heroT2: "Dedicated", heroT3: "Healthcare Leader", heroDesc: "Advanced surgical technology, 12 specialist physicians, patient-first care — SGK approved, 24/7 emergency and international patient services.", ctaBook: "Book Appointment", ctaServices: "Our Services", navServices: "Services", navDoctors: "Doctors", navPoly: "Polyclinics", navContact: "Contact", navBook: "Book Now", floatDoctors: "Expert Physicians", floatIntl: "International Patient Dept.", workTitle: "Working Hours", wkdays: "Weekdays: 08:30 – 17:30", saturday: "Saturday: 08:30 – 13:00", sunday: "Sunday: Emergency Only", statsSection: "Bodrum Cerrahi in Numbers", srvTitle: "Our Departments", srvHeader: "SPECIALIZED HEALTHCARE SERVICES", srvDesc: "Surgery, medical laboratory, radiology and specialist physicians offering comprehensive healthcare solutions.", drTitle: "Our Specialists", drHeader: "EXPERT PHYSICIANS", drDesc: "Experienced surgeons, specialist physicians and support staff delivering professional treatment.", drYil: "Yrs", drHasta: "Patients", polyTitle: "Polyclinics", polyHeader: "MEDICAL CENTER SPECIALTIES", rvwTitle: "Patient Reviews", rvwHeader: "WHAT OUR PATIENTS SAY", bookTitle: "Appointment", bookHeader: "SCHEDULE YOUR VISIT", bookDesc: "Fill in the form and our appointment coordinator will call you within 15 minutes to confirm your slot.", fName: "Full Name", fPhone: "Phone", fEmail: "Email", fDept: "Department", fDate: "Preferred Date", fSubmit: "REQUEST APPOINTMENT", contactTitle: "Contact Details", callCenter: "Consultation Line", adresLabel: "Address", mailLabel: "Email", emergency: "Emergency: 112 · 24/7 Service", footerDesc: "Bodrum's leading private medical center with SGK approval, 24/7 emergency and international patient services.", privacy: "Privacy Policy", terms: "Terms of Service", deptOptions: ["General Surgery", "Orthopedics", "Pediatrics", "Gynecology", "Neurology", "Radiology", "Laboratory", "Gastroenterology", "Nutrition & Dietetics"], demoBanner: "This website is a demo — demo.ayristech.com", }, }; export default function BodrumCerrahiTemplate({ data }: { data: DemoData }) { const { firma, istatistikler = [], hizmetler = [], doktorlar = [], yorumlar = [] } = data; const [preloader, setPreloader] = useState(true); const [lang, setLang] = useState<"tr" | "en">("tr"); const [showBooking, setShowBooking] = useState(false); const [activeReview, setActiveReview] = useState(0); const [openPoly, setOpenPoly] = useState(0); const t = TRANSLATIONS[lang]; const polyclinics = lang === "tr" ? POLYCLINICS_TR : POLYCLINICS_EN; const heroRef = useRef(null); const { scrollYProgress } = useScroll({ target: heroRef, offset: ["start start", "end start"] }); const heroImgY = useTransform(scrollYProgress, [0, 1], ["0%", "28%"]); const heroTextY = useTransform(scrollYProgress, [0, 1], ["0%", "-18%"]); useEffect(() => { let lenis: any; import("@studio-freight/lenis").then(({ default: Lenis }) => { lenis = new Lenis({ duration: 1.2, easing: (x: number) => Math.min(1, 1.001 - Math.pow(2, -10 * x)) }); function raf(time: number) { lenis.raf(time); requestAnimationFrame(raf); } requestAnimationFrame(raf); }); return () => lenis?.destroy(); }, []); useEffect(() => { const t = setTimeout(() => setPreloader(false), 2400); return () => clearTimeout(t); }, []); useEffect(() => { if (yorumlar.length === 0) return; const iv = setInterval(() => setActiveReview(p => (p + 1) % yorumlar.length), 4800); return () => clearInterval(iv); }, [yorumlar.length]); const css = ` @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap'); :root { --deep: #071629; --mid: #0F2240; --accent: #1B6FA8; --bright: #00B4D8; --sand: #F4F8FC; --white: #FFFFFF; } .font-cormorant { font-family: 'Cormorant Garamond', serif; } .font-dm { font-family: 'DM Sans', sans-serif; } .hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(52px, 7.5vw, 108px); line-height: 0.92; letter-spacing: -0.02em; } .section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(38px, 5vw, 72px); line-height: 0.95; letter-spacing: -0.015em; } .card-glow:hover { box-shadow: 0 0 0 1px rgba(27,111,168,0.25), 0 24px 48px rgba(27,111,168,0.12); } .dr-scroll::-webkit-scrollbar { display: none; } .dr-scroll { -ms-overflow-style: none; scrollbar-width: none; } `; return ( <> {/* ── GRAIN OVERLAY ── */}
{/* ── DEMO BANNER ── */}
{t.demoBanner}
{/* ── PRELOADER — Medical cross SVG draw + curtain lift ── */} {preloader && ( {/* SVG medical cross drawing */}
{/* Loading bar */}
{firma.adi}
)}
{/* ══════════════════════════════════════════════════════════════ NAVBAR ══════════════════════════════════════════════════════════════ */}
{/* Logo */}
{firma.adi}
{/* Nav links */} {/* Right actions */}
{(["tr", "en"] as const).map(l => ( ))}
setShowBooking(true)} className="text-[10px] font-bold tracking-[2px] uppercase text-white px-5 py-3 rounded-xl cursor-pointer hidden sm:block" style={{ background: "linear-gradient(135deg, #1B6FA8, #00B4D8)" }} whileHover={{ scale: 1.03 }} whileTap={{ scale: 0.97 }} > {t.navBook}
{/* ══════════════════════════════════════════════════════════════ HERO ══════════════════════════════════════════════════════════════ */}
{/* Ambient orbs */}
{/* Left: Headline */} {t.badge} {t.heroT1}
{t.heroT2}
{t.heroT3}
{t.heroDesc} {/* Stats row */} {istatistikler.map((s, i) => (

{s.deger}

{s.etiket}

))}
{/* CTAs */} setShowBooking(true)} className="flex items-center gap-2.5 px-8 py-4 rounded-xl text-white text-[10px] font-bold tracking-[2px] uppercase cursor-pointer shadow-lg" style={{ background: "linear-gradient(135deg, #1B6FA8, #00B4D8)", boxShadow: "0 8px 24px rgba(27,111,168,0.35)" }} whileHover={{ scale: 1.03, boxShadow: "0 12px 32px rgba(27,111,168,0.5)" }} whileTap={{ scale: 0.97 }} > {t.ctaBook} {t.ctaServices} {/* Working hours pill */}

{t.workTitle}

{[t.wkdays, t.saturday, t.sunday].map((line, i) => (

{line}

))}
{/* Right: Photography + floating cards */}
{/* Main image */}
Bodrum Cerrahi Tıp Merkezi
{/* Floating card — doctors */}

{doktorlar.length}+

{t.floatDoctors}

{/* Floating card — international */}

{t.floatIntl}

{/* Emergency badge */}

{t.emergency}

{/* Bottom fade */}
{/* ══════════════════════════════════════════════════════════════ MARQUEE BAND ══════════════════════════════════════════════════════════════ */}
{/* Row A — left */}
{[...MARQUEE_A, ...MARQUEE_A].map((item, i) => ( {item} ))}
{/* Row B — right */}
{[...MARQUEE_B, ...MARQUEE_B].map((item, i) => ( {item} ))}
{/* ══════════════════════════════════════════════════════════════ STATS ══════════════════════════════════════════════════════════════ */}
{t.statsSection} {istatistikler.map((s, i) => { const numericValue = parseInt(s.deger.replace(/\D/g, ""), 10); const suffix = s.deger.replace(/[\d]/g, "").trim(); return (

{!isNaN(numericValue) ? ( <> ) : ( s.deger )}

{s.etiket}

); })}
{/* ══════════════════════════════════════════════════════════════ HİZMETLER ══════════════════════════════════════════════════════════════ */}
{t.srvTitle} {t.srvHeader.split(" ").slice(0, 2).join(" ")}
{t.srvHeader.split(" ").slice(2).join(" ")}
{t.srvDesc}
{hizmetler.map((h, i) => (

{h.baslik}

{h.aciklama}

))}
{/* ══════════════════════════════════════════════════════════════ DOKTORLAR (dark section, horizontal scroll) ══════════════════════════════════════════════════════════════ */}
{t.drTitle} {t.drHeader} {t.drDesc}
{/* Horizontal scroll cards */}
{doktorlar.map((doc, i) => ( {/* Avatar area */}
{doc.emoji} {/* Rating badge */}
{doc.puan}

{doc.ad}

{doc.uzmanlik}

{doc.yil} {t.drYil} {doc.hasta}+ {t.drHasta}
))}
{/* ══════════════════════════════════════════════════════════════ POLİKLİNİKLER (accordion) ══════════════════════════════════════════════════════════════ */}
{t.polyTitle} {t.polyHeader} {polyclinics.map((poly, i) => ( {openPoly === i && (

{poly.desc}

)}
))}
{/* ══════════════════════════════════════════════════════════════ YORUMLAR ══════════════════════════════════════════════════════════════ */}
{t.rvwTitle} {t.rvwHeader}
{/* Stars */}
{[...Array(yorumlar[activeReview]?.puan ?? 5)].map((_, i) => ( ))}
{/* Quote mark */}

{yorumlar[activeReview]?.yorum}

{yorumlar[activeReview]?.yazar.charAt(0)}

{yorumlar[activeReview]?.yazar}

{yorumlar[activeReview]?.tarih}

{/* Dots */}
{yorumlar.map((_, i) => ( setActiveReview(i)} className="rounded-full cursor-pointer transition-all" style={{ width: i === activeReview ? 24 : 8, height: 8, background: i === activeReview ? "#1B6FA8" : "rgba(7,22,41,0.15)", }} whileHover={{ scale: 1.2 }} /> ))}
{/* ══════════════════════════════════════════════════════════════ RANDEVU CTA (full-bleed image) ══════════════════════════════════════════════════════════════ */}
{/* Background image */}
{/* Left: Contact info */} {t.bookTitle} {t.bookHeader} {t.bookDesc} {[ { icon: "📞", label: t.callCenter, value: firma.telefon }, { icon: "📍", label: t.adresLabel, value: firma.adres }, { icon: "✉️", label: t.mailLabel, value: firma.email }, ].map(item => (
{item.icon}

{item.label}

{item.value}

))}
{/* Certifications */} {["SGK Anlaşmalı", "Bodrum Belediyesi", "Muğla Tabip Odası"].map(cert => ( {cert} ))}
{/* Right: Appointment form */}

{t.bookTitle}

{[ { label: t.fName, placeholder: lang === "tr" ? "Ad Soyad" : "Full Name", type: "text", full: false }, { label: t.fPhone, placeholder: "0252 xxx xx xx", type: "tel", full: false }, { label: t.fEmail, placeholder: "info@mail.com", type: "email", full: false }, { label: t.fDept, placeholder: "", type: "select", full: false }, { label: t.fDate, placeholder: "", type: "date", full: false }, ].map((field, i) => (
{field.type === "select" ? ( ) : ( )}
))}
setShowBooking(true)} className="mt-5 w-full py-4 rounded-xl text-white font-bold text-[10px] tracking-[2.5px] uppercase cursor-pointer shadow-lg" style={{ background: "linear-gradient(135deg, #1B6FA8, #00B4D8)" }} whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > 📅 {t.fSubmit}
{/* ══════════════════════════════════════════════════════════════ FOOTER ══════════════════════════════════════════════════════════════ */}
{/* Brand */}
{firma.adi}

{t.footerDesc}

📍 {firma.adres}

📞 {firma.telefon}

✉️ {firma.email}

{/* Services */}

{t.navServices}

{hizmetler.slice(0, 5).map((h, i) => ( {h.baslik} ))}
{/* Navigation */}

{lang === "tr" ? "Kurumsal" : "Corporate"}

{[t.navServices, t.navDoctors, t.navPoly, t.navContact].map(item => ( {item} ))}

© 2026 {firma.adi}. {lang === "tr" ? "Tüm hakları saklıdır." : "All rights reserved."}

{/* ══════════════════════════════════════════════════════════════ BOOKING MODAL ══════════════════════════════════════════════════════════════ */} {showBooking && ( setShowBooking(false)} > e.stopPropagation()} >

{t.bookTitle}

{lang === "tr" ? "Koordinatörümüz sizi arayacak." : "Our coordinator will call you back."}

setShowBooking(false)} > {lang === "tr" ? "Gönder" : "Submit"}
)}
); }