/* ===== Custom Styles for Sara Thomas Real Estate ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #3a3a58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6030;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(15, 15, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 96, 48, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6030, #ff8050);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.service-card:hover::before {
    transform: scaleX(1);
}

/* Area cards */
.area-card {
    position: relative;
    overflow: hidden;
}
.area-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: border-color 0.4s ease;
    pointer-events: none;
}
.area-card:hover::after {
    border-color: rgba(255, 96, 48, 0.4);
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: rgba(255, 96, 48, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* Mobile menu animation */
.menu-line {
    display: block;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

#mobileMenu.open {
    transform: translateX(0);
}

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

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}
@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes floatSmall {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(0deg); }
}

.hero-float-1 { animation: float 6s ease-in-out infinite; }
.hero-float-2 { animation: floatReverse 5s ease-in-out infinite; }
.hero-float-3 { animation: floatSmall 4s ease-in-out infinite; }

/* Selection color */
::selection {
    background: rgba(255, 96, 48, 0.3);
    color: #fff;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #ff6030;
    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;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2.25rem !important;
    }
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}
