/* ==========================================================================
   Max Interior Design - Animation & Interactive Effects Architecture
   ========================================================================== */

/* Preloader Screen */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-brand {
    text-align: center;
    color: #ffffff;
    font-family: var(--font-heading);
    margin-bottom: 2rem;
}

.preloader-brand h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.preloader-brand span {
    font-family: var(--font-accent);
    font-size: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
}

.preloader-progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.preloader-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #e6c88b);
    transition: width 0.1s linear;
}

/* Custom Cursor */
.custom-cursor {
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(212, 141, 59, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.custom-cursor.active {
    width: 20px;
    height: 20px;
    background-color: rgba(212, 141, 59, 0.3);
}

.custom-cursor-follower.active {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
    background-color: rgba(212, 141, 59, 0.05);
}

/* Disable Custom Cursor on Touch Devices */
@media (pointer: coarse) {
    .custom-cursor, .custom-cursor-follower {
        display: none !important;
    }
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent) 0%, #f3d79b 100%);
    box-shadow: 0 0 10px rgba(212, 141, 59, 0.5);
}

/* Image Reveal Parallax Animation Wrapper */
.reveal-img-container {
    position: relative;
    overflow: hidden;
}

.reveal-img-container img {
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reveal-img-container:hover img {
    transform: scale(1.06);
}

.reveal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 2;
    transform-origin: right;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-overlay.active {
    transform: scaleX(0);
}

/* Floating Action Pulse Keyframes */
@keyframes pulseGold {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 141, 59, 0.7);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(212, 141, 59, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 141, 59, 0);
    }
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.pulse-gold {
    animation: pulseGold 2.5s infinite;
}

.pulse-green {
    animation: pulseGreen 2.5s infinite;
}

/* Shimmer Line Glow */
.gold-glow-divider {
    height: 2px;
    width: 80px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    margin: 1.25rem 0;
    position: relative;
}

.gold-glow-divider::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 8px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

/* Floating Action Buttons */
.floating-btn-group {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9990;
}

.floating-whatsapp {
    width: 55px;
    height: 55px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-whatsapp:hover {
    color: #ffffff;
    transform: translateY(-5px) scale(1.05);
    background-color: #20ba5a;
}

.floating-quote {
    width: 55px;
    height: 55px;
    background-color: var(--primary);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-quote:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-5px) scale(1.05);
}

.back-to-top {
    width: 45px;
    height: 45px;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(200, 169, 106, 0.4);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-4px);
}
