/* Custom Styles for Allen Tate Real Estate */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F2;
}
::-webkit-scrollbar-thumb {
    background: #c44420;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1331c;
}

/* Selection color */
::selection {
    background: #c44420;
    color: white;
}

/* Navbar transition */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #c44420;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Stat cards animation */
.stat-card {
    animation: float 6s ease-in-out infinite;
}
.stat-card:nth-child(2) {
    animation-delay: -2s;
}
.stat-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero background parallax */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(196, 68, 32, 0.2);
}

/* Button hover effects */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}
button[type="submit"]:hover::before {
    left: 100%;
}

/* Image hover zoom */
.group:hover .group-hover\\:scale-105,
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.05);
}

/* Mobile menu animations */
#mobile-menu {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
#back-to-top.hidden {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

/* Decorative line animation */
.w-12.h-px.bg-terracotta-500 {
    transition: width 0.3s ease;
}
section:hover .w-12.h-px.bg-terracotta-500 {
    width: 2rem;
}

/* Loading state for form button */
button[type="submit"].loading {
    pointer-events: none;
    opacity: 0.7;
}
button[type="submit"].loading #btn-arrow {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
