/* Custom styles for Sharon Torgerson Real Estate Website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0a10;
}
::-webkit-scrollbar-thumb {
    background: #500724;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9d174d;
}

/* Selection color */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(26, 10, 16, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(148, 60, 100, 0.2) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Reveal animations - progressive enhancement via JS */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Gold shimmer effect on cards */
.shimmer-card {
    position: relative;
    overflow: hidden;
}
.shimmer-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 40%,
        rgba(245, 158, 11, 0.03) 50%,
        transparent 60%
    );
    transform: rotate(30deg);
    transition: transform 0.6s;
}
.shimmer-card:hover::after {
    transform: rotate(30deg) translate(10%, 10%);
}

/* Gold gradient border animation */
@keyframes borderGlow {
    0%, 100% { border-color: rgba(245, 158, 11, 0.2); }
    50% { border-color: rgba(245, 158, 11, 0.5); }
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

.float-animation-delay {
    animation: float 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Pulse animation for CTA buttons */
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

.cta-pulse:hover {
    animation: pulse-gold 1.5s ease-in-out infinite;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-menu.open {
    max-height: 400px;
}

/* Custom select dropdown styling */
select option {
    background: #1a0a10;
    color: #fff;
}

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
