/* Custom styles for Stacy Gaines-Pibl Real Estate */

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

/* Selection color */
::selection {
    background-color: rgba(52, 157, 126, 0.3);
    color: #fff;
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(6, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

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

/* Hamburger animation */
.menu-line {
    transform-origin: center;
}

#mobile-menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
    margin-left: 0;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group:hover {
        transform: none;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060D1A;
}
::-webkit-scrollbar-thumb {
    background: #142D56;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #349D7E;
}

/* Form select arrow */
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='%23349D7E' 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;
    padding-right: 2.5rem;
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Subtle gradient overlay for hero image */
.hero-image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 13, 26, 0.3) 0%, transparent 40%);
    border-radius: inherit;
    pointer-events: none;
}

/* Floating card animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.floating {
    animation: float 4s ease-in-out infinite;
}

/* Glow pulse for CTA */
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(52, 157, 126, 0.2); }
    50% { box-shadow: 0 0 40px rgba(52, 157, 126, 0.4); }
}
.glow-pulse:hover {
    animation: glow-pulse 2s ease-in-out infinite;
}
