/* Smooth UX Enhancements for TERRA™ */

/* Global smooth scrolling */
* {
    scroll-behavior: smooth;
}

/* Smooth page loading animation */
body {
    opacity: 0;
    animation: fadeInPage 0.8s ease-out forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}

/* Enhanced button interactions */
button, .btn, a[class*="btn"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button:hover, .btn:hover, a[class*="btn"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.25);
}

/* Smooth text animations */
h1, h2, h3 {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card stagger animation */
.property-card {
    animation: fadeInStagger 0.6s ease-out backwards;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth form interactions */
input, textarea {
    transition: all 0.3s ease;
    border-radius: 12px;
}

input:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
}

/* Enhanced search bar */
.search-container {
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.search-container:hover::before {
    left: 100%;
}

/* Smooth navigation animations */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: #9333ea;
    transition: all 0.3s ease;
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

/* Floating elements */
.floating {
    animation: float 3s ease-in-out infinite;
}

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

/* Smooth section transitions */
section {
    opacity: 0;
    transform: translateY(30px);
    animation: sectionReveal 0.8s ease-out forwards;
}

@keyframes sectionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance optimizations */
.property-card, button, input {
    will-change: transform;
    backface-visibility: hidden;
}

/* Mobile touch optimizations */
@media (max-width: 768px) {
    button, .btn, a[class*="btn"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    .property-card:hover {
        transform: none; /* Disable hover effects on mobile */
    }
    
    .property-card:active {
        transform: scale(0.98);
    }
}