/* Custom Styles for 商智雲股份有限公司 */

/* Font Face */
body {
    font-family: 'Noto Sans TC', sans-serif;
}

/* Custom Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Service Card Animations */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Fade In Animation */
.animate-fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

/* Navigation Styles */
nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #2563eb;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Section Enhancements */
#home {
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="white" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
}

#home .text-center {
    position: relative;
    z-index: 1;
}

/* Button Enhancements */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

/* Section Headers */
section h2 {
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Service Icons Animation */
.service-card .w-16 {
    transition: all 0.3s ease;
}

.service-card:hover .w-16 {
    transform: scale(1.1) rotate(5deg);
}

/* List Styling */
.service-card ul li {
    position: relative;
    padding-left: 0;
}

.service-card ul li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    margin-right: 8px;
}

/* Tutorial and Event Cards */
.bg-white {
    transition: all 0.3s ease;
}

.bg-white:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* About Section Styling */
#about .bg-white {
    border-left: 4px solid #3b82f6;
}

/* Footer Styling */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

footer h3,
footer h4 {
    color: #f9fafb;
}

footer ul li {
    transition: color 0.3s ease;
}

footer ul li:hover {
    color: #60a5fa;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-3xl {
        font-size: 1.875rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 640px) {
    .grid {
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .text-center h1 {
        font-size: 2rem;
    }
    
    .text-center h2 {
        font-size: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* 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;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus States for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Keyboard Navigation Styling */
.keyboard-navigation button:focus,
.keyboard-navigation a:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Card Hover Effects */
.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Transition Classes */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Animation Delays for Staggered Effects */
.animate-fade-in:nth-child(1) {
    animation-delay: 0s;
}

.animate-fade-in:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-fade-in:nth-child(3) {
    animation-delay: 0.2s;
}

.animate-fade-in:nth-child(4) {
    animation-delay: 0.3s;
}

.animate-fade-in:nth-child(5) {
    animation-delay: 0.4s;
}

.animate-fade-in:nth-child(6) {
    animation-delay: 0.5s;
}

/* Text Selection */
::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}

/* Image Styling */
img {
    max-width: 100%;
    height: auto;
}

/* Form Elements */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Logo Animation */
.text-blue-600 {
    transition: all 0.3s ease;
}

.text-blue-600:hover {
    transform: scale(1.05);
}

/* Section Padding Adjustments */
@media (min-width: 1024px) {
    .py-20 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Print Styles */
@media print {
    .fixed {
        position: static;
    }
    
    .shadow-lg,
    .shadow-xl {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .gradient-bg {
        background: #3b82f6 !important;
        color: white !important;
    }
    
    nav {
        background: white !important;
        color: black !important;
    }
    
    .text-white {
        color: black !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in {
        animation: none;
    }
    
    .service-card {
        transition: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .nav-link::after {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}