/* ========================================
   International Realty Group - Custom Styles
   ======================================== */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background-color: #d97706;
    color: #3d111c;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4789a;
    border-radius: 4px;
}

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

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

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(61, 17, 28, 0.08);
}

/* Mobile Menu */
#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* Mobile Link Animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Service Cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(61, 17, 28, 0.1);
}

/* Neighborhood Cards */
.group:hover .aspect-\[3\/4\] img {
    transform: scale(1.1);
}

/* Back to Top */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:not(.visible) {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

#backToTop.visible {
    transform: translateY(0);
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* Decorative underline animation */
h2 .italic {
    position: relative;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .testimonial-card,
    #backToTop,
    #navbar,
    .mobile-link,
    .overflow-hidden img {
        transition: none;
    }
    
    .overflow-hidden img {
        transform: none !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .font-serif.text-5xl {
        font-size: 2.75rem;
    }
}

/* Large screens */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
