/* ========================================
   BNJIS Theme Enhanced Effects CSS
   ======================================== */

/* ========================================
   1. Mouse Cursor Effects (鼠标光标)
   ======================================== */
.bnjis-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--bnjis-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
}

.bnjis-cursor.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: #fff;
    background: rgba(0, 168, 84, 0.1);
}

.bnjis-cursor-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--bnjis-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

/* Custom cursor - only hide default when custom cursor is active */
body.custom-cursor-active {
    cursor: none;
}

body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active .wp-block-button,
body.custom-cursor-active input,
body.custom-cursor-active textarea,
body.custom-cursor-active select {
    cursor: none;
}

/* ========================================
   2. Scroll Reveal Animation (滚动渐显)
   ======================================== */
.bnjis-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), 
                transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Stagger delays for children */
.bnjis-reveal:nth-child(1) { transition-delay: 0.1s; }
.bnjis-reveal:nth-child(2) { transition-delay: 0.2s; }
.bnjis-reveal:nth-child(3) { transition-delay: 0.3s; }
.bnjis-reveal:nth-child(4) { transition-delay: 0.4s; }
.bnjis-reveal:nth-child(5) { transition-delay: 0.5s; }

/* ========================================
   3. Hover Effects (悬停效果)
   ======================================== */

/* Button hover glow */
.wp-block-button__link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.wp-block-button__link:hover::before {
    width: 300px;
    height: 300px;
}

.wp-block-button__link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 168, 84, 0.4);
}

/* Card hover lift */
.product-card,
.news-card,
.cert-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover,
.news-card:hover,
.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Image zoom on hover */
.wp-block-image img,
.product-card img,
.news-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-image:hover img,
.product-card:hover img,
.news-card:hover img {
    transform: scale(1.08);
}

/* Shine effect on cards */
.product-card::after,
.news-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.product-card:hover::after,
.news-card:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* ========================================
   4. Parallax & Background Effects
   ======================================== */
.wp-block-cover {
    overflow: hidden;
}

.wp-block-cover__image-background {
    will-change: transform;
}

/* ========================================
   5. Carousel Styles (轮播)
   ======================================== */
.bnjis-products-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    flex: 0 0 auto;
    width: 300px;
    margin-right: 20px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--bnjis-primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--bnjis-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* ========================================
   6. Loading & Skeleton Effects
   ======================================== */
.bnjis-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* ========================================
   7. Pulse & Glow Animations
   ======================================== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 84, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(0, 168, 84, 0);
    }
}

.bnjis-pulse {
    animation: pulse-glow 2s infinite;
}

/* ========================================
   8. Gradient Text Effect
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--bnjis-primary) 0%, #00d4aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   9. Floating Animation
   ======================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bnjis-float {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   10. Underline Hover Effect
   ======================================== */
.wp-block-navigation-item a {
    position: relative;
}

.wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.wp-block-navigation-item a:hover::after {
    width: 100%;
}

/* ========================================
   11. Stats Section Enhanced (统计数据增强)
   ======================================== */
.bnjis-stats-section {
    border-radius: 12px;
}

.bnjis-stat-item {
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.bnjis-stat-item:hover {
    transform: translateY(-5px);
}

.bnjis-stat-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.bnjis-counter {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 !important;
}

.bnjis-counter::after {
    content: '+';
}

/* Counter animation ready state */
.bnjis-counter.animating {
    color: var(--bnjis-primary);
}

/* Stats section stagger animation */
.bnjis-stat-item:nth-child(1) { animation-delay: 0s; }
.bnjis-stat-item:nth-child(2) { animation-delay: 0.1s; }
.bnjis-stat-item:nth-child(3) { animation-delay: 0.2s; }
.bnjis-stat-item:nth-child(4) { animation-delay: 0.3s; }

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .bnjis-cursor,
    .bnjis-cursor-dot {
        display: none !important;
    }
    
    body {
        cursor: auto !important;
    }
    
    a, button {
        cursor: pointer !important;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .bnjis-stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .bnjis-counter {
        font-size: 2rem !important;
    }
}
