/* Custom styles for Christy Sellscasa's Real Estate */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f0d;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: rgba(22, 101, 52, 0.4);
    color: #faf5eb;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background 0.5s ease;
}

#navbar.scrolled {
    backdrop-filter: blur(20px);
    background: rgba(10, 15, 13, 0.85);
    border-bottom: 1px solid rgba(22, 101, 52, 0.15);
}

/* Mobile menu animations */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button animation */
#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobileMenuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobileMenuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile link transitions */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #4ade80;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
}

/* For reduced motion, ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Hero card float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: no-preference) {
    .float-slow {
        animation: float 6s ease-in-out infinite;
    }
    .float-medium {
        animation: float 4s ease-in-out infinite;
        animation-delay: 1s;
    }
    .float-fast {
        animation: float 3s ease-in-out infinite;
        animation-delay: 0.5s;
    }
}

/* Glow effects */
.glow-emerald {
    box-shadow: 0 0 40px rgba(22, 101, 52, 0.3);
}

/* Button hover shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}
.btn-shine:hover::before {
    left: 100%;
}

/* Image hover zoom */
img {
    transition: transform 0.5s ease;
}

/* Select dropdown styling */
select option {
    background: #162018;
    color: #faf5eb;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

/* Map filter override */
iframe[src*="google.com/maps"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
