/* sections-hero.jsx — 풀폭 캐러셀 Hero (5장 자동 회전) */
const { useState: useStateH, useEffect: useEffectH, useRef: useRefH } = React;
const SLIDES = [
{
id: "main",
eyebrow: "INTRO · 울산 입시 명문 · 20년+",
title: <>잊지 않게 가르치고,
매일 부모님께
보고합니다.>,
sub: "1·3·7·30일 자동 복습 · 3회 연속 정답 시 ‘정복’ · 매일 18시 학부모 알림.",
cta1: { label: "상담 예약하기", href: "consultation.php" },
cta2: { label: "학원 실적 보기", href: "results.php" },
imagePlaceholder: "학원 풍경 · 책상 위 책 · 형광펜",
imageSlotId: "hero-slide-main",
imageSrc: "landing/photos/sweetlouise-books-5991410_1920.jpg",
accent: "var(--primary)",
tag: "01 / 05",
},
{
id: "results",
eyebrow: "RESULTS · 2025 학년도",
title: (() => {
const c = (typeof window !== 'undefined' && window.DAHIM_DATA && window.DAHIM_DATA.counts) || {};
const topRank = c.top_rank_count || 16;
const grade1 = c.grade1_count || 37;
return <>전교 1등 {topRank}명,
1등급 릴레이 {grade1}명>;
})(),
sub: "대현고 1·2학년 전교 1등 · 약사고 전교 1등 · 대현고 2학년 1학기 전교 10등 內 4명 동시 배출.",
cta1: { label: "성과 보러가기", href: "results.php" },
cta2: (() => {
const c = (typeof window !== 'undefined' && window.DAHIM_DATA && window.DAHIM_DATA.counts) || {};
const adm = c.admissions_count || 25;
return { label: `합격 명단 ${adm}건`, href: "results.php" };
})(),
imagePlaceholder: "전교 1등 시상 / 학생들 책상",
imageSlotId: "hero-slide-results",
imageSrc: "landing/photos/student_highschool.jpg",
accent: "var(--accent)",
tag: "02 / 05",
},
{
id: "diagnose",
eyebrow: "DIAGNOSE · 입학 시 정밀 진단",
title: <>같은 교실,
다른 출발점>,
sub: "48분 정밀 진단으로 어휘·독해·문법·문학·비문학·메타인지의 강약을 분리해 ‘개별 첫 회차’를 설계합니다.",
cta1: { label: "정밀 진단 살펴보기", href: "ai_system.php" },
cta2: { label: "AI 시스템 보기", href: "ai_system.php" },
imagePlaceholder: "학생이 문제집 푸는 손 · 책상 위",
imageSlotId: "hero-slide-diagnose",
imageSrc: "landing/photos/student_elementary.jpg",
accent: "var(--primary)",
tag: "03 / 05",
},
{
id: "bank",
eyebrow: (() => { const c = (typeof window !== 'undefined' && window.DAHIM_DATA && window.DAHIM_DATA.counts) || {}; const t = (c.ebs_questions || 33624) + (c.neasin_questions || 27985); const v = c.videos || 3112; return 'QUESTION BANK · ' + Math.round(t/10000) + '만 문제 + ' + v.toLocaleString() + '강'; })(),
title: (() => { const c = (typeof window !== 'undefined' && window.DAHIM_DATA && window.DAHIM_DATA.counts) || {}; const t = (c.ebs_questions || 33624) + (c.neasin_questions || 27985); const v = c.videos || 3112; return <>문제은행 {t.toLocaleString()}제,
동영상 강의 {v.toLocaleString()}강>; })(),
sub: "동영상 학습 · 요점 정리 · 문제 풀이까지 한 시스템에. 출판사·학년·학교 단위로 정밀 매칭됩니다.",
cta1: { label: "시스템 보러가기", href: "curriculum.php" },
cta2: { label: "커리큘럼 보기", href: "curriculum.php" },
imagePlaceholder: "도서관 책장 · 책 무더기",
imageSlotId: "hero-slide-bank",
imageSrc: "landing/photos/chalkboard_hand.jpg",
accent: "var(--accent)",
tag: "04 / 05",
},
{
id: "admission",
eyebrow: "ADMISSION · 수시·정시·학종",
title: <>수시·정시·학종,
한 사람이 책임집니다.>,
sub: "원장 직강 20년+. 생기부 분석부터 목표 대학·최저등급·면접까지 1:1로. AI가 출제하고, 원장이 검수합니다.",
cta1: { label: "원장 직강 소개", href: "greetings.php" },
cta2: { label: "입시 컨설팅 상담", href: "consultation.php" },
imagePlaceholder: "원장 / 칠판 / 강의실",
imageSlotId: "hero-slide-admission",
imageSrc: "landing/photos/classroom_purple.jpg",
accent: "var(--primary)",
tag: "05 / 05",
},
];
const AUTO_INTERVAL = 6500;
const HeroCarousel = () => {
const [idx, setIdx] = useStateH(0);
const [paused, setPaused] = useStateH(false);
const total = SLIDES.length;
useEffectH(() => {
if (paused) return;
const t = setTimeout(() => setIdx((i) => (i + 1) % total), AUTO_INTERVAL);
return () => clearTimeout(t);
}, [idx, paused, total]);
const go = (n) => setIdx((n + total) % total);
return (