/* Custom styles for Homesweetlanc */

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

/* Custom selection color */
::selection {
    background-color: #7B2D3B;
    color: white;
}

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

#navbar.scrolled {
    background-color: rgba(255, 251, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #7B2D3B !important;
}

/* Mobile menu animations */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* Hero animations */
.hero-label {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

h1 {
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero p {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero .flex.flex-col {
    animation: fadeInUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

.hero .flex.gap-10 {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* Service card hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D3B, #df4468);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Listing card hover */
.listing-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.12);
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, background 0.4s ease;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6b2531;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

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

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

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

/* Counter animation */
.counter {
    display: inline-block;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-label,
    h1,
    .hero p,
    .hero .flex.flex-col,
    .hero .flex.gap-10 {
        animation: none;
        opacity: 1;
    }

    .service-card::after,
    .listing-card,
    .testimonial-card {
        transition: none;
    }
}

/* Tablet adjustments */
@media (max-width: 767px) {
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
}
