/* Explain: Premium glassmorphism, glowing cards, and luxury UI components */
.apex-header {
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.apex-brand-mark {
    background: linear-gradient(135deg, var(--primary-color), #AA7C11);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #000;
}

.nav-link {
    color: var(--secondary-color);
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover, .nav-link.is-active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.is-active::after {
    width: 100%;
}

.btn-gold {
    background: linear-gradient(135deg, #D4AF37, #AA7C11);
    color: #050508 !important;
    border: none;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: all 0.7s ease;
}

.btn-gold:hover::before {
    left: 150%;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #F3E5AB, #D4AF37);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
}

.btn-dark {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-dark:hover {
    background: var(--primary-color);
    color: #050508 !important;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.glass-panel {
    background: rgba(20, 15, 35, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    will-change: transform, box-shadow, border-color;
}

.glass-panel:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(109, 66, 199, 0.1);
}

.dark-glass {
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.apex-kicker {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.apex-section-title {
    color: var(--white-color);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.apex-rule {
    width: 4rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.apex-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--white-color);
    min-height: 3.5rem;
    transition: all 0.3s ease;
}

.apex-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

/* Image Zoom on hover */
.img-zoom-container {
    overflow: hidden;
}
.img-zoom-container img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-zoom-container:hover img {
    transform: scale(1.08);
}

/* Luxury Floating Particles */
.luxury-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    opacity: 0;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: #25D366;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
@media (min-width: 768px) {
    .floating-whatsapp {
        bottom: 2rem;
        right: 2rem;
        width: 4rem;
        height: 4rem;
        font-size: 2.25rem;
    }
}
.floating-whatsapp:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
    color: white;
}

/* Premium Animated Logo */
.logo-premium-wrapper {
    perspective: 1000px;
}

.premium-animated-logo {
    animation: 
        logoSpinIn 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards,
        logoFloatGlow 4s ease-in-out 1.5s infinite;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.0));
    transform-style: preserve-3d;
}

@keyframes logoSpinIn {
    0% { transform: rotateY(-360deg) scale(0.5); opacity: 0; }
    100% { transform: rotateY(0deg) scale(1); opacity: 1; filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.4)); }
}

@keyframes logoFloatGlow {
    0% { transform: translateY(0); filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.4)); }
    50% { transform: translateY(-6px); filter: drop-shadow(0 15px 25px rgba(212, 175, 55, 0.7)); }
    100% { transform: translateY(0); filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.4)); }
}

.logo-premium-wrapper:hover .premium-animated-logo {
    animation: logoHoverSpin 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes logoHoverSpin {
    0% { transform: rotateY(0deg) scale(1); }
    100% { transform: rotateY(360deg) scale(1.1); filter: drop-shadow(0 15px 30px rgba(212, 175, 55, 0.9)); }
}

/* Virtual Factory Guide Mascot - Small, elegant, non-intrusive */
.factory-guide-container {
    pointer-events: none;
}
.factory-guide-mascot {
    width: clamp(70px, 8vw, 90px);
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
    animation: mascotBreathe 4s ease-in-out infinite;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.factory-guide-mascot:hover {
    transform: scale(1.05);
}
.factory-guide-bubble {
    background: rgba(20, 15, 35, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--white-color);
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    max-width: 200px;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-body);
    line-height: 1.4;
    position: relative;
    pointer-events: none;
}
@media (min-width: 768px) {
    .factory-guide-bubble {
        border-radius: 1rem 1rem 0 1rem;
    }
    .factory-guide-bubble::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: -8px;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 12px 0 0 12px;
        border-color: transparent transparent transparent rgba(212, 175, 55, 0.3);
    }
}
.factory-guide-bubble.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.factory-guide-bubble strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@keyframes mascotBreathe {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-5px) scaleY(1.02); }
}

@keyframes mascotWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.mascot-waving {
    animation: mascotWave 1.5s ease-in-out infinite !important;
}

@keyframes mascotEntrance {
    0% { transform: translateY(100px) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.mascot-entrance {
    animation: mascotEntrance 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Premium Scroll Reveals & Preloader */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}
.reveal-element.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes progressBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.animate-progress-bar {
    animation: progressBar 1.5s infinite ease-in-out;
}

/* Mobile Optimization for Virtual Guide */
@media (max-width: 768px) {
    .factory-guide-mascot {
        width: clamp(55px, 14vw, 75px);
    }
    .factory-guide-bubble {
        max-width: 160px;
        font-size: 0.7rem;
    }
    #guideChatPanel {
        max-width: calc(100vw - 2rem);
    }
}
