<!-- Hero Section -->
<section class="relative bg-gradient-to-br from-blue-900 via-purple-900 to-indigo-900 min-h-screen flex items-center">
    <div class="absolute inset-0 bg-black opacity-50"></div>
    <div class="absolute inset-0 bg-gradient-to-r from-blue-600/20 to-purple-600/20"></div>
    
    <!-- Animated Background Elements -->
    <div class="absolute inset-0 overflow-hidden">
        <div class="absolute -top-40 -right-32 w-80 h-80 bg-purple-500 rounded-full mix-blend-multiply filter blur-xl opacity-70 animate-blob"></div>
        <div class="absolute -bottom-40 -left-32 w-80 h-80 bg-blue-500 rounded-full mix-blend-multiply filter blur-xl opacity-70 animate-blob animation-delay-2000"></div>
        <div class="absolute top-40 left-40 w-80 h-80 bg-indigo-500 rounded-full mix-blend-multiply filter blur-xl opacity-70 animate-blob animation-delay-4000"></div>
    </div>
    
    <div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24">
        <div class="text-center">
            <h1 class="text-5xl md:text-7xl font-bold text-white mb-6 leading-tight" data-aos="fade-up">
                Smart Technology
                <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400">Solutions</span>
            </h1>
            <p class="text-xl md:text-2xl text-gray-300 mb-8 max-w-3xl mx-auto" data-aos="fade-up" data-aos-delay="200">
                혁신적인 웹 개발, 모바일 앱, UI/UX 디자인으로 비즈니스의 디지털 전환을 이끌어갑니다
            </p>
            <div class="flex flex-col sm:flex-row gap-4 justify-center items-center" data-aos="fade-up" data-aos-delay="400">
                <a href="/contact" class="bg-gradient-to-r from-blue-500 to-purple-600 text-white px-8 py-4 rounded-full text-lg font-semibold hover:from-blue-600 hover:to-purple-700 transition-all duration-300 transform hover:scale-105 shadow-lg">
                    프로젝트 시작하기
                </a>
                <a href="/portfolio" class="border-2 border-white text-white px-8 py-4 rounded-full text-lg font-semibold hover:bg-white hover:text-gray-900 transition-all duration-300 transform hover:scale-105">
                    포트폴리오 보기
                </a>
            </div>
        </div>
        
        <!-- Scroll indicator -->
        <div class="absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce">
            <svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>
            </svg>
        </div>
    </div>
</section>

<!-- Services Section -->
<section class="py-20 bg-white">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="text-center mb-16" data-aos="fade-up">
            <h2 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">
                Our <span class="text-blue-600">Services</span>
            </h2>
            <p class="text-xl text-gray-600 max-w-3xl mx-auto">
                최신 기술과 창의적인 아이디어로 완성하는 디지털 솔루션
            </p>
        </div>
        
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
            <% if (featuredServices && featuredServices.length > 0) { %>
                <% featuredServices.forEach((service, index) => { %>
                <div class="group p-8 bg-gray-50 rounded-2xl hover:bg-white hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up" data-aos-delay="<%= index * 100 %>">
                    <div class="text-blue-600 mb-4 group-hover:scale-110 transition-transform duration-300">
                        <i class="<%= service.icon %> text-4xl"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-900 mb-3"><%= service.name %></h3>
                    <p class="text-gray-600 mb-4"><%= service.shortDescription %></p>
                    <div class="text-blue-600 font-semibold">
                        ₩<%= service.pricing.basePrice.toLocaleString() %>~
                    </div>
                </div>
                <% }) %>
            <% } else { %>
                <!-- Default services if none in database -->
                <div class="group p-8 bg-gray-50 rounded-2xl hover:bg-white hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up">
                    <div class="text-blue-600 mb-4 group-hover:scale-110 transition-transform duration-300">
                        <i class="fas fa-code text-4xl"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-900 mb-3">웹 개발</h3>
                    <p class="text-gray-600 mb-4">현대적이고 반응형 웹사이트 및 웹 애플리케이션 개발</p>
                    <div class="text-blue-600 font-semibold">₩500,000~</div>
                </div>
                
                <div class="group p-8 bg-gray-50 rounded-2xl hover:bg-white hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up" data-aos-delay="100">
                    <div class="text-blue-600 mb-4 group-hover:scale-110 transition-transform duration-300">
                        <i class="fas fa-mobile-alt text-4xl"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-900 mb-3">모바일 앱</h3>
                    <p class="text-gray-600 mb-4">iOS와 Android를 위한 네이티브 및 크로스플랫폼 앱</p>
                    <div class="text-blue-600 font-semibold">₩800,000~</div>
                </div>
                
                <div class="group p-8 bg-gray-50 rounded-2xl hover:bg-white hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up" data-aos-delay="200">
                    <div class="text-blue-600 mb-4 group-hover:scale-110 transition-transform duration-300">
                        <i class="fas fa-palette text-4xl"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-900 mb-3">UI/UX 디자인</h3>
                    <p class="text-gray-600 mb-4">사용자 중심의 직관적이고 아름다운 인터페이스 디자인</p>
                    <div class="text-blue-600 font-semibold">₩300,000~</div>
                </div>
                
                <div class="group p-8 bg-gray-50 rounded-2xl hover:bg-white hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up" data-aos-delay="300">
                    <div class="text-blue-600 mb-4 group-hover:scale-110 transition-transform duration-300">
                        <i class="fas fa-chart-line text-4xl"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-900 mb-3">디지털 마케팅</h3>
                    <p class="text-gray-600 mb-4">SEO, 소셜미디어, 온라인 광고를 통한 디지털 마케팅</p>
                    <div class="text-blue-600 font-semibold">₩200,000~</div>
                </div>
            <% } %>
        </div>
        
        <div class="text-center mt-12" data-aos="fade-up">
            <a href="/services" class="inline-flex items-center px-6 py-3 border border-blue-600 text-blue-600 font-semibold rounded-lg hover:bg-blue-600 hover:text-white transition-colors">
                모든 서비스 보기
                <svg class="ml-2 w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
                </svg>
            </a>
        </div>
    </div>
</section>

<!-- Portfolio Section -->
<section class="py-20 bg-gray-50">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="text-center mb-16" data-aos="fade-up">
            <h2 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">
                Recent <span class="text-purple-600">Projects</span>
            </h2>
            <p class="text-xl text-gray-600 max-w-3xl mx-auto">
                고객의 성공을 위해 완성한 프로젝트들을 확인해보세요
            </p>
        </div>
        
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
            <% if (featuredPortfolio && featuredPortfolio.length > 0) { %>
                <% featuredPortfolio.forEach((project, index) => { %>
                <div class="group bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2" data-aos="fade-up" data-aos-delay="<%= index * 100 %>">
                    <div class="relative overflow-hidden">
                        <% if (project.primaryImage) { %>
                        <img src="<%= project.primaryImage.url %>" alt="<%= project.primaryImage.alt || project.title %>" class="w-full h-48 object-cover group-hover:scale-110 transition-transform duration-500">
                        <% } else { %>
                        <div class="w-full h-48 bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center">
                            <span class="text-white text-2xl font-bold"><%= project.title.charAt(0) %></span>
                        </div>
                        <% } %>
                        <div class="absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
                        <div class="absolute bottom-4 left-4 right-4 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300 opacity-0 group-hover:opacity-100">
                            <div class="flex flex-wrap gap-2">
                                <% project.technologies.slice(0, 3).forEach(tech => { %>
                                <span class="px-2 py-1 bg-white/20 backdrop-blur-sm text-white text-xs rounded-full"><%= tech %></span>
                                <% }) %>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <div class="flex items-center justify-between mb-2">
                            <span class="px-3 py-1 bg-blue-100 text-blue-600 text-sm rounded-full font-medium"><%= project.category %></span>
                            <span class="text-gray-500 text-sm">
                                <i class="fas fa-eye mr-1"></i><%= project.viewCount %>
                            </span>
                        </div>
                        <h3 class="text-xl font-bold text-gray-900 mb-2 group-hover:text-blue-600 transition-colors"><%= project.title %></h3>
                        <p class="text-gray-600 mb-4"><%= project.shortDescription %></p>
                        <a href="/portfolio/<%= project._id %>" class="inline-flex items-center text-blue-600 font-semibold hover:text-blue-700 transition-colors">
                            자세히 보기
                            <svg class="ml-1 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
                            </svg>
                        </a>
                    </div>
                </div>
                <% }) %>
            <% } %>
        </div>
        
        <div class="text-center mt-12" data-aos="fade-up">
            <a href="/portfolio" class="inline-flex items-center px-6 py-3 bg-purple-600 text-white font-semibold rounded-lg hover:bg-purple-700 transition-colors">
                전체 포트폴리오 보기
                <svg class="ml-2 w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
                </svg>
            </a>
        </div>
    </div>
</section>

<!-- Calculator CTA Section -->
<section class="py-20 bg-gradient-to-r from-blue-600 to-purple-600">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
        <div data-aos="fade-up">
            <h2 class="text-4xl md:text-5xl font-bold text-white mb-6">
                프로젝트 견적을 확인해보세요
            </h2>
            <p class="text-xl text-blue-100 mb-8 max-w-3xl mx-auto">
                원하는 서비스와 요구사항을 선택하면 실시간으로 견적을 계산해드립니다
            </p>
            <a href="/calculator" class="inline-flex items-center px-8 py-4 bg-white text-blue-600 font-bold rounded-full text-lg hover:bg-gray-100 transition-colors transform hover:scale-105">
                <i class="fas fa-calculator mr-3"></i>
                견적 계산기 사용하기
            </a>
        </div>
    </div>
</section>

<!-- Contact Section -->
<section class="py-20 bg-white">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
            <div data-aos="fade-right">
                <h2 class="text-4xl md:text-5xl font-bold text-gray-900 mb-6">
                    프로젝트를 <span class="text-blue-600">시작</span>할 준비가 되셨나요?
                </h2>
                <p class="text-xl text-gray-600 mb-8">
                    아이디어를 현실로 만들어보세요. 전문가들이 최고의 솔루션을 제공합니다.
                </p>
                <div class="space-y-4">
                    <div class="flex items-center">
                        <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-phone text-blue-600"></i>
                        </div>
                        <div>
                            <div class="font-semibold text-gray-900">전화 상담</div>
                            <div class="text-gray-600"><%= settings && settings.contact ? settings.contact.phone : '+82-10-0000-0000' %></div>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-envelope text-purple-600"></i>
                        </div>
                        <div>
                            <div class="font-semibold text-gray-900">이메일 문의</div>
                            <div class="text-gray-600"><%= settings && settings.contact ? settings.contact.email : 'info@smartsoltech.kr' %></div>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mr-4">
                            <i class="fab fa-telegram text-green-600"></i>
                        </div>
                        <div>
                            <div class="font-semibold text-gray-900">텔레그램 채팅</div>
                            <div class="text-gray-600">즉시 답변 가능</div>
                        </div>
                    </div>
                </div>
            </div>
            <div data-aos="fade-left">
                <div class="bg-gray-50 p-8 rounded-2xl">
                    <h3 class="text-2xl font-bold text-gray-900 mb-6">무료 상담 신청</h3>
                    <form id="quick-contact-form" class="space-y-4">
                        <div>
                            <input type="text" name="name" placeholder="이름" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                        <div>
                            <input type="email" name="email" placeholder="이메일" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                        <div>
                            <input type="tel" name="phone" placeholder="연락처" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        </div>
                        <div>
                            <select name="serviceInterest" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                                <option value="">관심 서비스 선택</option>
                                <option value="web-development">웹 개발</option>
                                <option value="mobile-app">모바일 앱</option>
                                <option value="ui-ux-design">UI/UX 디자인</option>
                                <option value="branding">브랜딩</option>
                                <option value="consulting">컨설팅</option>
                                <option value="other">기타</option>
                            </select>
                        </div>
                        <div>
                            <textarea name="message" rows="4" placeholder="프로젝트에 대해 간단히 설명해주세요" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none"></textarea>
                        </div>
                        <button type="submit" class="w-full bg-gradient-to-r from-blue-600 to-purple-600 text-white font-semibold py-3 rounded-lg hover:from-blue-700 hover:to-purple-700 transition-all duration-300 transform hover:scale-105">
                            상담 신청하기
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}
</style>