/* ============================================
   TW Homes Team — Custom Styles
   Classic & Elegant Real Estate Website
   ============================================ */

/* ---------- Base / Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #e84f36;
    color: #ffffff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1b1e;
}
::-webkit-scrollbar-thumb {
    background: #e84f36;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d93b24;
}

/* ---------- Navbar ---------- */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* ---------- Hero ---------- */
#hero {
    position: relative;
}

/* ---------- Service Cards ---------- */
#services .group:hover svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

#services .group svg {
    transition: transform 0.3s ease;
}

/* ---------- Testimonial Cards ---------- */
#testimonials .reveal {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#testimonials .reveal:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ---------- Form Inputs ---------- */
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='%23656870' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ---------- Mobile Menu Button Animation ---------- */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Back to Top ---------- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal[data-revealed="true"] {
        opacity: 1;
        transform: none;
    }
    
    #back-to-top {
        transition: none;
    }
}
