/* Custom styles for PSL Homes */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f9f5f7;
}
::-webkit-scrollbar-thumb {
    background: #a86590;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8e4a76;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(168, 101, 144, 0.1);
}

/* Service card hover */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f59e0b;
    transition: width 0.4s ease;
}
.service-card:hover::after {
    width: 100%;
}

/* Area item hover */
.area-item:hover {
    padding-left: 12px;
}

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

/* Scroll animation classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }

/* Scroll indicator animation */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}
.animate-scroll {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

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

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    .service-card::after,
    .area-item,
    .testimonial-card,
    .animate-scroll {
        transition: none;
        animation: none;
    }
    .service-card:hover::after {
        width: 0;
    }
    .area-item:hover {
        padding-left: 0;
    }
    .testimonial-card:hover {
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}
