/* ========================================
   Market Advantage Real Estate
   Custom Styles
======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-sans {
    font-family: 'Montserrat', system-ui, sans-serif;
}

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

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

::-webkit-scrollbar-thumb {
    background: #C9A962;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8944f;
}

/* Selection */
::selection {
    background: #C9A962;
    color: #0a1628;
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

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

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.08);
}

#navbar.scrolled .text-navy-900 {
    color: #0a1628;
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.inactive {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger Animation */
#menu-toggle.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active #bar2 {
    opacity: 0;
}

#menu-toggle.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* Service Card Hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-line {
        animation: none;
    }
    
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
    
    .transition-all,
    .transition-transform,
    .transition-colors {
        transition-duration: 0s !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
    
    #hero h1 {
        font-size: clamp(2.25rem, 7vw, 4rem);
    }
}

/* Select styling */
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='%230a1628' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #C9A962 !important;
}

/* Loading state for form */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    nav,
    .animate-scroll-line,
    #contact-form,
    iframe {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-navy-900 {
        background: #0a1628 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
