/* ==========================================================================
   PREMIUM MICRO-ANIMATIONS - R&CB Advogados
   ========================================================================== */

/* Custom Gold Cursor for Desktop */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23B8860B' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%23B8860B'/%3E%3C/svg%3E") 12 12, auto;
    }

    a,
    button,
    .clickable,
    [onclick] {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%23B8860B' fill-opacity='0.2'/%3E%3Ccircle cx='16' cy='16' r='6' fill='%23B8860B'/%3E%3C/svg%3E") 16 16, pointer;
    }
}

/* Magnetic Button Hover Effect */
.btn-primary,
.btn-submit,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.btn-primary::before,
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

.btn-primary:hover,
.btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(184, 134, 11, 0.4),
        0 0 20px rgba(184, 134, 11, 0.2);
}

.btn-primary:active,
.btn-submit:active {
    transform: translateY(-1px) scale(0.98);
}

/* Gold Shimmer Effect on Headings */
.hero-title,
.section-title {
    background: linear-gradient(135deg,
            var(--primary-black) 0%,
            var(--accent-gold) 50%,
            var(--primary-black) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 8s linear infinite;
}

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

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

/* Floating Animation for Hero Elements */
.hero-image img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Card Entrance Animation Enhancement */
.service-luxury-card,
.team-card,
.testimonial-card,
.why-choose-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-luxury-card:hover,
.why-choose-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(184, 134, 11, 0.1);
}

/* Animated Border for Cards */
.animated-border-card {
    position: relative;
    background: var(--white);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.animated-border-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
            var(--accent-gold) 0%,
            transparent 30%,
            transparent 70%,
            var(--accent-gold) 100%);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.animated-border-card:hover::before {
    opacity: 1;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

/* Gold Particles Effect in Hero */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(184, 134, 11, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(184, 134, 11, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(184, 134, 11, 0.08) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100px);
    }
}

/* Smooth Section Transitions - Optimized for Performance */
section {
    transition: opacity 0.6s ease;
    will-change: auto;
}

/* Social Proof Counter Animation Enhancement */
.proof-number {
    transition: transform 0.3s ease;
}

.proof-item:hover .proof-number {
    transform: scale(1.1);
    color: var(--accent-gold);
}

/* Link Underline Animation */
nav a,
.footer-section a {
    position: relative;
}

nav a::after,
.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after,
.footer-section a:hover::after {
    width: 100%;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-gold);
    box-shadow:
        0 0 0 3px rgba(184, 134, 11, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* WhatsApp Button Pulse */
.whatsapp-float {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow:
            0 4px 30px rgba(37, 211, 102, 0.6),
            0 0 40px rgba(37, 211, 102, 0.3);
    }
}

/* Back to Top Button Animation */
.btn-top {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(184, 134, 11, 0.3);
}

/* Text Selection Style */
::selection {
    background: rgba(184, 134, 11, 0.3);
    color: var(--primary-black);
}

/* Scroll Reveal Enhancement */
[data-aos] {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}