/* Custom Styles for Huanyan Vivian Li Real Estate */

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

/* Selection Color */
::selection {
    background-color: #1a3a2a;
    color: #faf8f5;
}

/* Navbar Transition */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 248, 245, 0.97);
    box-shadow: 0 1px 20px rgba(26, 58, 42, 0.08);
    backdrop-filter: blur(10px);
}

#navbar.scrolled .nav-link {
    color: #1a3a2a;
}

#navbar.scrolled .nav-link:hover {
    color: #2a5c3d;
}

#navbar.scrolled .menu-line {
    background-color: #1a3a2a;
}

/* Nav Link Hover Effect */
.nav-link {
    position: relative;
    color: #faf8f5;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c9a84c;
    transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link::after {
    background-color: #1a3a2a;
}

/* Mobile Menu Animation */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Link Animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    border-color: #2a5c3d;
    box-shadow: 0 0 0 3px rgba(42, 92, 61, 0.1);
}

/* Image Hover Effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2a5c3d;
}

/* Button Focus Visible */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .font-serif {
        font-family: 'Playfair Display', Georgia, serif;
    }
}

/* Large Screens */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
