/* Advanced Features CSS - Modern Wholesale Real Estate Sites */

/* Advanced Animations and Transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Advanced Header with Glassmorphism */
.header-advanced {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-advanced.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Advanced CTA Buttons */
.cta-advanced {
    position: relative;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.cta-advanced:hover::before {
    left: 100%;
}

.cta-advanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.cta-pulse {
    animation: pulse 2s infinite;
}

/* Advanced Stats Counter */
.stats-counter {
    display: flex;
    justify-content: space-around;
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.stat-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #007bff;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
    margin-top: 10px;
    font-weight: 500;
}

/* Advanced Property Cards */
.property-card-advanced {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.property-card-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #00d4aa);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.property-card-advanced:hover::before {
    transform: scaleX(1);
}

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

/* Advanced Form Styling */
.form-advanced {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.form-group-advanced {
    position: relative;
    margin-bottom: 30px;
}

.form-control-advanced {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.form-control-advanced:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.form-label-advanced {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #666;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 10px;
}

.form-control-advanced:focus + .form-label-advanced,
.form-control-advanced:not(:placeholder-shown) + .form-label-advanced {
    top: -10px;
    font-size: 14px;
    color: #007bff;
    font-weight: 600;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #00d4aa);
    z-index: 9999;
    transition: width 0.3s ease;
    width: 0%;
}

/* Scroll-triggered Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

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

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

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

/* Advanced Testimonial Slider */
.testimonial-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    min-width: 100%;
    padding: 60px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.testimonial-content {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    font-size: 1.1rem;
}

.testimonial-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Advanced Features Icons */
.feature-icon-advanced {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #00d4aa);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
}

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

.feature-icon-advanced:hover::before {
    left: 100%;
}

.feature-icon-advanced i {
    font-size: 2rem;
    color: white;
}

/* Advanced Notification Toast */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #28a745;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    border-left-color: #28a745;
}

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

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

/* Advanced Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-trigger:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.3s ease;
}

.chat-window.show {
    transform: scale(1);
}

/* Advanced Pricing Tables */
.pricing-table-advanced {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pricing-table-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #00d4aa);
}

.pricing-table-advanced:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.pricing-table-advanced.featured {
    border: 2px solid #007bff;
    transform: scale(1.05);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .stats-counter {
        flex-direction: column;
        gap: 30px;
    }

    .form-advanced {
        padding: 20px;
        margin: 10px;
    }

    .chat-window {
        width: 300px;
        height: 400px;
    }

    .testimonial-slide {
        padding: 40px 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .form-advanced {
        background: rgba(30, 30, 30, 0.95);
        color: white;
    }

    .form-control-advanced {
        background: rgba(50, 50, 50, 0.8);
        border-color: #444;
        color: white;
    }

    .form-control-advanced:focus {
        background: #333;
        border-color: #007bff;
    }

    .property-card-advanced {
        background: #222;
        color: white;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
.cta-advanced:focus,
.form-control-advanced:focus,
.chat-trigger:focus {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Enhanced Touch-Friendly Targets */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
    position: relative;
    display: inline-block;
    touch-action: manipulation;
}

.touch-target::before {
    content: "";
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: inherit;
}

/* Touch feedback */
.touch-target:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Improved form touch targets */
.form-control-advanced {
    min-height: 48px;
    touch-action: manipulation;
}

/* Enhanced button touch areas */
.cta-advanced {
    min-height: 48px;
    padding: 16px 32px;
}

.nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

/* Touch-friendly chat widget */
.chat-trigger {
    min-width: 60px;
    min-height: 60px;
    touch-action: manipulation;
}

/* Better tap highlights */
* {
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content */
p, span, div, h1, h2, h3, h4, h5, h6, li {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Form inputs should be selectable */
input, textarea, select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Improved focus states for touch */
.touch-target:focus {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }

    /* Larger touch targets on mobile */
    .nav__link,
    .cta-advanced,
    .form-control-advanced {
        min-height: 52px;
    }

    /* Remove hover effects on touch devices */
    .property-card-advanced:hover,
    .cta-advanced:hover,
    .feature-icon-advanced:hover {
        transform: none;
    }
}

