/* loading-scroll.css - Loading & Navbar Scroll Effects for Propland Realtor */
/* 📁 File Location: css/loading-scroll.css */

/* ===== PAGE LOADER STYLES ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFF8F5 0%, #fef3c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: all 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    transform: scale(0.9);
    animation: loaderPulse 2s ease-in-out infinite;
}

.loader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    animation: logoFloat 3s ease-in-out infinite;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(239, 90, 82, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(239, 90, 82, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    width: 0%;
    animation: progressFill 3s ease-in-out forwards;
}

/* ===== LOADER ANIMATIONS ===== */
@keyframes loaderPulse {
    0%, 100% { 
        transform: scale(0.9); 
    }
    50% { 
        transform: scale(1); 
    }
}

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

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

@keyframes progressFill {
    0% { width: 0%; }
    25% { width: 30%; }
    50% { width: 60%; }
    75% { width: 90%; }
    100% { width: 100%; }
}

/* ===== NAVBAR SCROLL EFFECTS ===== */
.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
    background: var(--white);
    box-shadow: var(--shadow);
}

.navbar-container.navbar-hidden {
    transform: translateY(-100%);
}

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

.navbar-container.navbar-scrolled .navbar {
    padding: 0.75rem 1rem;
}

.navbar-container.navbar-scrolled .logo img {
    height: 35px;
}

/* ===== SMOOTH AUTH BUTTON TRANSITIONS ===== */
.auth-buttons {
    transition: all 0.3s ease;
}

.auth-buttons .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateZ(0); /* Hardware acceleration */
}

.auth-buttons .btn::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 ease;
}

.auth-buttons .btn:hover::before {
    left: 100%;
}

.auth-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-buttons .btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* ===== MOBILE USER PROFILE SMOOTH TRANSITIONS ===== */
.mobile-user-profile-compact {
    transition: all 0.3s ease;
}

.mobile-user-profile-compact .user-profile {
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.mobile-user-profile-compact .user-profile:hover {
    transform: translateY(-1px);
}

.mobile-user-profile-compact .user-profile:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* ===== CONTENT LOADING STATES ===== */
.content-loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.content-loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SECTION REVEAL ANIMATIONS ===== */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

/* ===== STAGGERED ANIMATIONS FOR PROPERTY CARDS ===== */
.property-card {
    opacity: 1;
    transform: translateY(10px);
    transition: all 0.6s ease;
}

.property-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.property-card.animate-in:nth-child(1) { animation-delay: 0.1s; }
.property-card.animate-in:nth-child(2) { animation-delay: 0.2s; }
.property-card.animate-in:nth-child(3) { animation-delay: 0.3s; }
.property-card.animate-in:nth-child(4) { animation-delay: 0.4s; }
.property-card.animate-in:nth-child(5) { animation-delay: 0.5s; }
.property-card.animate-in:nth-child(6) { animation-delay: 0.6s; }

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

.skeleton-property-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 400px;
}

.skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-title {
    height: 1.5rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 70%;
}

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

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .loader-logo {
        width: 80px;
        margin-bottom: 1rem;
    }
    
    .loader-text {
        font-size: 1rem;
    }
    
    .loader-progress {
        width: 150px;
    }
    
    .navbar-container.navbar-scrolled .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-container.navbar-scrolled .logo img {
        height: 30px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 60px;
        margin-bottom: 1rem;
    }
    
    .loader-text {
        font-size: 0.9rem;
    }
    
    .loader-progress {
        width: 120px;
        height: 3px;
    }
    
    .loader-content {
        padding: 1rem;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    .page-loader,
    .navbar-container,
    .auth-buttons .btn,
    .mobile-user-profile-compact .user-profile,
    .content-loading,
    .section-reveal,
    .property-card {
        transition: none;
        animation: none;
    }
    
    .loader-spinner {
        animation: none;
        border: 4px solid var(--primary-color);
    }
    
    .loader-logo {
        animation: none;
    }
    
    .loader-content {
        animation: none;
        transform: none;
    }
    
    .loader-progress-bar {
        animation: none;
        width: 100%;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .page-loader {
        background: #ffffff;
        color: #000000;
    }
    
    .loader-spinner {
        border-color: #000000;
        border-top-color: var(--primary-color);
    }
    
    .navbar-container.navbar-scrolled {
        background: #ffffff;
        border-bottom: 2px solid #000000;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .page-loader,
    .navbar-container {
        display: none;
    }
}