/* Custom CSS for BNI Episode Chapter K-Culture Website */

/* Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(107, 70, 193, 0.6);
        transform: scale(1.02);
    }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #0F0F23 0%, #1F2937 50%, #0F0F23 100%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1F2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6B46C1, #EC4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7C3AED, #F472B6);
}

/* Navigation Enhancements */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
}

/* Hero Section Animations */
.hero-title {
    animation: slide-up 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: slide-up 1s ease-out 0.4s both;
}

.hero-description {
    animation: slide-up 1s ease-out 0.6s both;
}

.hero-buttons {
    animation: slide-up 1s ease-out 0.8s both;
}

/* Floating Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
}

/* Button Enhancements */
.btn-primary {
    background: linear-gradient(135deg, #6B46C1, #EC4899);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    background: transparent;
    border: 2px solid #6B46C1;
    color: #6B46C1;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #6B46C1, #EC4899);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: white;
    border-color: transparent;
}

/* Card Animations and Styles */
.value-chain-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(15, 15, 35, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 70, 193, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-chain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6B46C1, #EC4899, #3B82F6, #F59E0B);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-chain-card:hover::before {
    opacity: 1;
}

.value-chain-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(107, 70, 193, 0.2);
    border-color: rgba(107, 70, 193, 0.4);
}

.value-chain-card .card-icon {
    background: linear-gradient(135deg, #6B46C1, #EC4899);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.value-chain-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(107, 70, 193, 0.4);
}

/* Form Styles */
.form-input {
    background: rgba(15, 15, 35, 0.7);
    border: 1px solid rgba(107, 70, 193, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #6B46C1;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
    background: rgba(15, 15, 35, 0.9);
}

.form-input::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(135deg, #6B46C1, #EC4899, #3B82F6, #F59E0B);
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section Transitions */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Intersection Observer Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #6B46C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(21, 128, 61, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #10B981;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-20px);
    animation: slide-up 0.5s ease forwards;
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.2));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-20px);
    animation: slide-up 0.5s ease forwards;
}

/* Info Message */
.info-message {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60A5FA;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-20px);
    animation: slide-up 0.5s ease forwards;
}

/* Mobile Menu Animations */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 300px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .value-chain-card {
        margin-bottom: 16px;
    }
    
    .floating-element {
        display: none;
    }
    
    .gradient-text {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .gradient-text {
        font-size: 1.75rem;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Focus States for Accessibility */
.focus-visible:focus {
    outline: 2px solid #6B46C1;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .value-chain-card {
        border-color: #6B46C1;
    }
    
    .gradient-text {
        background: #6B46C1;
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-element {
        animation: none;
    }
}

/* Print Styles */
@media print {
    nav,
    .floating-element,
    #apply {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .gradient-text {
        -webkit-text-fill-color: black !important;
        background: none !important;
    }
}