/* 웰파트너스 - Custom Styles */

/* Root Variables */
:root {
    --primary-color: #8B5CF6;
    --secondary-color: #10b981;
    --accent-color: #7c3aed;
    --text-light: #6b7280;
    --text-dark: #1f2937;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
.dark {
    --text-light: #9ca3af;
    --text-dark: #f3f4f6;
    --bg-light: #1f2937;
    --bg-dark: #030712;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    transition: var(--transition);
    padding-bottom: 2px;
}

.dark .nav-link {
    color: #d1d5db;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B5CF6 0%, #3B82F6 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.mobile-nav-link:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.dark .mobile-nav-link:hover {
    background: #374151;
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Card Hover Effects */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
}

/* Smooth Scroll Padding */
section {
    scroll-margin-top: 80px;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Button Hover Effects */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Slide In Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Scroll to Top Button */
#scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

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

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

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B5CF6 0%, #3B82F6 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed 0%, #2563eb 100%);
}

/* Section Dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #8B5CF6, transparent);
    margin: 4rem 0;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(12px)) {
    .backdrop-blur-lg {
        backdrop-filter: blur(12px);
    }
}

/* Text Shadow for Better Readability */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
    }
}

/* Service Card Hover Effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.service-card:hover::before {
    top: -50%;
    left: -50%;
}

/* Contact Form Validation */
input:invalid:not(:focus),
textarea:invalid:not(:focus) {
    border-color: #ef4444;
}

input:valid:not(:focus),
textarea:valid:not(:focus) {
    border-color: #10b981;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #8B5CF6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.dark .toast {
    background: #1f2937;
    color: white;
}

/* Image Lazy Loading */
.lazy-image {
    filter: blur(5px);
    transition: filter 0.3s;
}

.lazy-image.loaded {
    filter: blur(0);
}

/* Accessibility Focus Styles */
*:focus-visible {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #scroll-to-top,
    #contact-form {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

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

.hardware-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Custom Selection Colors */
::selection {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

::-moz-selection {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

/* Responsive Utilities */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 1536px) {
    .max-w-7xl {
        max-width: 1400px;
    }
}