/* ============= SMOOTH TRANSITIONS & ANIMATIONS ============= */

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
    transition: var(--transition-normal);
}

/* Section animations on scroll */
.section-title {
    animation: slideInDown 0.6s ease forwards;
    opacity: 0;
}

/* Property card animations */
.property-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transition: var(--transition-normal);
}

.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; }
.property-card:nth-child(n+4) { animation-delay: 0.4s; }

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Filter elements smooth animations */
.search-input, .filter-select {
    transition: var(--transition-normal);
}

.search-input:focus, .filter-select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Button animations */
button {
    transition: var(--transition-normal);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
}

/* Contact section animation */
.contact-item {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

/* Form animation */
.contact-form {
    animation: slideInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

/* Modal smooth entry */
.modal-content {
    animation: scaleIn 0.3s ease;
}

/* Hero content animations */
.hero-content h2 {
    animation: slideInDown 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-content p {
    animation: slideInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

/* Ad carousel smooth transitions */
.ad-slide {
    transition: opacity 0.6s ease;
}

/* WhatsApp button pulse animation */
.whatsapp-btn {
    transition: var(--transition-normal);
}

.whatsapp-btn:hover {
    transform: scale(1.15);
}

/* Smooth page transitions */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    transition: opacity 0.4s ease;
}

img.lazy {
    opacity: 0;
}

img.lazy.loaded {
    opacity: 1;
}

/* Link hover effects */
a {
    transition: var(--transition-normal);
}

/* Fade in animation class for scroll animations */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Intersection Observer animations */
.in-view {
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards !important;
}

/* Smooth color transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

/* Performance optimizations */
* {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Prevent flickering during animations */
body {
    will-change: scroll-position;
}

section {
    will-change: auto;
}
