/* ============================================
   하이드리온 수소수기 - Custom Styles
   Hybrid Architecture - Separate CSS File
   ============================================ */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ============================================
   Hero Section Styles
   ============================================ */
.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: heroPatternMove 20s ease-in-out infinite;
}

@keyframes heroPatternMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

.hero-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    animation: fadeInUp 1.4s ease-out;
    transform-origin: center;
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card {
    animation: fadeInUp 1.6s ease-out;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   3D Content Presentation
   ============================================ */
.product-card {
    perspective: 1000px;
    animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(2deg); }
}

.product-card:hover {
    animation: none;
    transform: translateY(-15px) rotateY(5deg) scale(1.05);
}

.payment-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.payment-card:hover {
    transform: translateY(-10px) scale(1.05) rotateZ(2deg);
}

/* ============================================
   Timeline Styles (53 Years History)
   ============================================ */
.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 40px;
    animation: timelineFadeIn 0.8s ease-out backwards;
}

.timeline-item:nth-child(n) {
    animation-delay: calc(0.1s * var(--i));
}

@keyframes timelineFadeIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: -40px;
    width: 2px;
    background: linear-gradient(to bottom, #8b5cf6, #7c3aed);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 5px;
    width: 18px;
    height: 18px;
    background: #fbbf24;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.1);
    }
}

.timeline-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Certification Grid
   ============================================ */
.certification-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border: 2px solid #e9d5ff;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: certFadeIn 0.6s ease-out backwards;
}

.certification-card:nth-child(n) {
    animation-delay: calc(0.05s * var(--i));
}

@keyframes certFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.certification-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.3);
    border-color: #7c3aed;
}

/* ============================================
   Prohibited Words Grid
   ============================================ */
.prohibited-word {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: #991b1b;
    text-align: center;
    transition: all 0.2s ease;
    animation: wordPop 0.5s ease-out backwards;
}

.prohibited-word:nth-child(n) {
    animation-delay: calc(0.02s * var(--i));
}

@keyframes wordPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.prohibited-word:hover {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
    color: #7f1d1d;
    transform: scale(1.05);
}

/* ============================================
   Commission Tiers
   ============================================ */
.commission-tier {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 30px;
    border-radius: 20px;
    transition: all 0.4s ease;
    animation: tierSlideIn 0.8s ease-out backwards;
}

.commission-tier:nth-child(1) { animation-delay: 0.1s; }
.commission-tier:nth-child(2) { animation-delay: 0.2s; }
.commission-tier:nth-child(3) { animation-delay: 0.3s; }

@keyframes tierSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.commission-tier:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(251, 191, 36, 0.8);
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FAQ Accordion
   ============================================ */
.faq-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: faqSlideIn 0.6s ease-out backwards;
}

.faq-item:nth-child(n) {
    animation-delay: calc(0.05s * var(--i));
}

@keyframes faqSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.faq-item.active {
    border-color: #7c3aed;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    font-weight: 700;
    color: #1f2937;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(to right, #f5f3ff, #ffffff);
    color: #7c3aed;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: #7c3aed;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #f9fafb;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px;
}

/* ============================================
   Usage Steps
   ============================================ */
.usage-step {
    display: flex;
    align-items: start;
    gap: 20px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border: 2px solid #e9d5ff;
    padding: 30px;
    border-radius: 20px;
    transition: all 0.4s ease;
    animation: stepFadeIn 0.8s ease-out backwards;
}

.usage-step:nth-child(n) {
    animation-delay: calc(0.1s * var(--i));
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.usage-step:hover {
    border-color: #7c3aed;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.25);
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* ============================================
   Navigation Styles
   ============================================ */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #fbbf24;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-link:hover {
    padding-left: 20px;
}

/* ============================================
   Chatbot Styles
   ============================================ */
#chatbot-container {
    animation: chatbotSlideUp 0.3s ease-out;
}

@keyframes chatbotSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-btn {
    animation: chatbotPulse 2s ease-in-out infinite;
}

@keyframes chatbotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(124, 58, 237, 0);
    }
}

.message-bot {
    background: #7c3aed;
    color: white;
    border-radius: 18px;
    border-top-left-radius: 4px;
    padding: 12px 16px;
    max-width: 75%;
    animation: messageSlideIn 0.3s ease-out;
}

.message-user {
    background: #e5e7eb;
    color: #1f2937;
    border-radius: 18px;
    border-top-right-radius: 4px;
    padding: 12px 16px;
    max-width: 75%;
    margin-left: auto;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Loading Animation
   ============================================ */
#loading-overlay {
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Scrollbar Styles
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #7c3aed, #8b5cf6);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #6d28d9, #7c3aed);
}

/* ============================================
   Google Translate Customization
   ============================================ */
#google_translate_element {
    animation: translateFadeIn 0.5s ease-out;
}

@keyframes translateFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* ============================================
   Mobile Menu Animation
   ============================================ */
#main-nav.open {
    transform: translateX(0);
}

#mobile-menu-btn {
    animation: btnBounce 1s ease-in-out infinite;
}

@keyframes btnBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    #main-nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    #main-nav.open {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    #chatbot-container {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
}

@media (max-width: 640px) {
    #google_translate_element {
        top: 2px;
        right: 2px;
        font-size: 12px;
    }
    
    #mobile-menu-btn {
        top: 60px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #main-nav,
    #mobile-menu-btn,
    #chatbot-btn,
    #chatbot-container,
    #google_translate_element {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .product-card,
    .payment-card,
    .feature-card {
        break-inside: avoid;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 2px;
}

/* ============================================
   Performance Optimizations
   ============================================ */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Hardware acceleration */
.product-card,
.payment-card,
.feature-card,
.commission-tier {
    transform: translateZ(0);
    backface-visibility: hidden;
}
