/* Custom styles for World Hope Chinese School */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* Hero floating cards */
.card-float-1 {
    animation: float1 6s ease-in-out infinite;
}
.card-float-2 {
    animation: float2 5s ease-in-out infinite;
}
.card-float-3 {
    animation: float3 7s ease-in-out infinite;
}
.card-float-4 {
    animation: float4 4s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes float4 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

/* Scroll indicator line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Program card hover effects */
.program-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}
.program-card:hover {
    transform: translateY(-4px);
}

/* Approach card hover */
.approach-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.approach-card:hover {
    transform: translateY(-6px);
}

/* Testimonial card hover */
.testimonial-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* About image */
.about-image {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.about-image:hover {
    transform: scale(1.01);
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B2C6F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

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

/* Selection color */
::selection {
    background: #e9d5ff;
    color: #3b1764;
}

/* Focus visible for keyboard users */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth transitions for navbar */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Custom underline animation for nav links */
nav a {
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f59e0b;
    transition: width 0.3s ease;
}
nav a:hover::after {
    width: 100%;
}

/* Mobile menu animation */
#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu lines animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}
