/* ============================================
   PREMIUM ANIMATIONS & INTERACTIONS
   ============================================ */

/* 1. PROPERTY CARD HOVER ZOOM */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.property-card img {
    transition: transform 0.5s ease;
    display: block;
    width: 100%;
}

.property-card:hover img {
    transform: scale(1.1);
}

.property-card .property-info {
    transition: background 0.3s ease;
}

.property-card:hover .property-info {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(255, 107, 237, 0.05));
}

/* 2. FADE-IN SCROLL ANIMATIONS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation for cards */
.fade-in-stagger {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Add delays for staggered effect */
.fade-in-stagger:nth-child(1) {
    transition-delay: 0.1s;
}

.fade-in-stagger:nth-child(2) {
    transition-delay: 0.2s;
}

.fade-in-stagger:nth-child(3) {
    transition-delay: 0.3s;
}

.fade-in-stagger:nth-child(4) {
    transition-delay: 0.4s;
}

.fade-in-stagger:nth-child(5) {
    transition-delay: 0.5s;
}

.fade-in-stagger:nth-child(6) {
    transition-delay: 0.6s;
}

/* 3. COUNTING ANIMATION (Applied to stat numbers) */
.stat-number {
    font-weight: 700;
    display: inline-block;
}

.stat-number.counting {
    animation: pulse 0.3s ease;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 4. BUTTON HOVER EFFECTS */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.2);
}

/* Primary button gradient shift */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #3b82f6) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
    background-size: 200% 200%;
    transition: all 0.3s ease, background-position 0.5s ease;
}

.btn-primary:hover {
    background-position: 100% 0;
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

/* Outline button fill effect */
.btn-outline {
    position: relative;
    z-index: 1;
}

.btn-outline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: 50px;
}

.btn-outline:hover::after {
    width: 100%;
}

.btn-outline:hover {
    color: white;
    border-color: transparent;
}

/* Icon animation in buttons */
.btn i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn:hover i {
    transform: translateX(5px);
}

/* 5. TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    pointer-events: all;
    animation: slideInRight 0.4s ease, fadeOut 0.3s ease 2.7s forwards;
    border-left: 4px solid;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* LOADING SPINNER for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* SMOOTH SCROLL */
html {
    scroll-behavior: smooth;
}

/* TESTIMONIAL CARD HOVER */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* FEATURE CARD HOVER */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(108, 99, 255, 0.15);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon {
    transition: transform 0.3s ease;
}

/* STATS CARD PULSE */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

/* IMAGE SKELETON LOADER */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* LINK UNDERLINE ANIMATION */
a:not(.btn) {
    position: relative;
}

a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s ease;
}

a:not(.btn):hover::after {
    width: 100%;
}

/* FORM INPUT FOCUS ANIMATION */
input:focus,
textarea:focus,
select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.15);
}

/* CHECKBOX/RADIO CUSTOM ANIMATION */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    animation: checkBounce 0.3s ease;
}

@keyframes checkBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

