/* Custom Styles for Henry Cai Realty */

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

/* Navbar Styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

#navbar.scrolled .nav-link {
    color: #243b53 !important;
}

#navbar.scrolled .font-serif.text-lg {
    color: #102a43 !important;
}

#navbar.scrolled .text-xs {
    color: #627d98 !important;
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Service Cards */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

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

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

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

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered Animation Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b8943f;
}

/* Selection Color */
::selection {
    background: #C9A84C;
    color: #102a43;
}

/* Form Focus Styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* Image Hover Zoom */
img {
    transition: transform 0.6s ease;
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Loading State */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Pulse Animation for Hero Dot */
@keyframes softPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.animate-pulse {
    animation: softPulse 2s ease-in-out infinite;
}
