/* 3D Battery Hero Styles */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

:root {
    --primary-color: #ED0053;
    --rotation-speed: 20s;
}

/* Main Hero Section */
.battery-hero-3d {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0008 0%, #000 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    perspective: 1500px;
    width: 100%;
    max-width: 100vw;
}

/* Hero Container */
.battery-hero-3d .hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Content Styles */
.battery-hero-3d .content-left {
    animation: fadeInLeft 1s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.battery-hero-3d .hero-heading {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.1;
    color: #fff;
}

.battery-hero-3d .hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 30px;
}

/* Button Styles */
.battery-hero-3d .control-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.battery-hero-3d .control-btn {
    background: rgba(237, 0, 83, 0.1);
    border: 1px solid rgba(237, 0, 83, 0.3);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.battery-hero-3d .control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-color), transparent);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.battery-hero-3d .control-btn:hover::before {
    width: 300px;
    height: 300px;
}

.battery-hero-3d .control-btn:hover {
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(237, 0, 83, 0.4);
}

.battery-hero-3d .control-btn span {
    position: relative;
    z-index: 1;
}

/* 3D Mockup Container */
.battery-hero-3d .mockup-3d {
    transform-style: preserve-3d;
    position: relative;
}

.battery-hero-3d.rotation-enabled .mockup-3d {
    animation: rotate3d var(--rotation-speed) infinite ease-in-out;
}

@keyframes rotate3d {
    0%, 100% {
        transform: rotateY(-15deg) rotateX(5deg);
    }
    25% {
        transform: rotateY(10deg) rotateX(-5deg);
    }
    50% {
        transform: rotateY(-10deg) rotateX(5deg);
    }
    75% {
        transform: rotateY(15deg) rotateX(-5deg);
    }
}

/* Screen Layers */
.battery-hero-3d .screen-layers {
    position: relative;
    transform-style: preserve-3d;
    width: 100%;
}

.battery-hero-3d .screen {
    background: rgba(237, 0, 83, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(237, 0, 83, 0.3);
    border-radius: 15px;
    padding: 15px;
    position: absolute;
    width: 100%;
    box-shadow: 
        0 25px 50px -12px rgba(237, 0, 83, 0.25),
        inset 0 0 20px rgba(237, 0, 83, 0.1);
    overflow: hidden;
}

/* Layer positioning */
.battery-hero-3d .screen.layer-1 {
    transform: translateZ(0px);
    opacity: 1;
    z-index: 3;
    position: relative;
}

.battery-hero-3d .screen.layer-2 {
    transform: translateZ(-30px) translateX(30px);
    opacity: 0.7;
    z-index: 2;
}

.battery-hero-3d .screen.layer-3 {
    transform: translateZ(-60px) translateX(60px);
    opacity: 0.4;
    z-index: 1;
}

/* Hide layers when 3D layers are disabled */
.battery-hero-3d:not(.layers-enabled) .screen.layer-2,
.battery-hero-3d:not(.layers-enabled) .screen.layer-3 {
    display: none;
}

/* Mockup Images */
.battery-hero-3d .mockup-img {
    width: 100%;
    border-radius: 10px;
    display: block;
    position: relative;
    z-index: 1;
}

/* Mockup Placeholder */
.battery-hero-3d .mockup-placeholder {
    background: linear-gradient(135deg, rgba(237, 0, 83, 0.2), rgba(237, 0, 83, 0.1));
    border-radius: 10px;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(237, 0, 83, 0.3);
    position: relative;
    overflow: hidden;
}

/* Pulse Overlay Effect */
.battery-hero-3d.pulse-enabled .pulse-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: 15px;
    overflow: hidden;
}

.battery-hero-3d.pulse-enabled .pulse-overlay::before,
.battery-hero-3d.pulse-enabled .pulse-overlay::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 15px;
    pointer-events: none;
}

/* Pulse animation that shows through images */
.battery-hero-3d.pulse-enabled .pulse-overlay::before {
    background: radial-gradient(circle at center, 
        rgba(237, 0, 83, 0.3) 0%, 
        transparent 50%);
    animation: pulseGlow 4s ease-in-out infinite;
}

.battery-hero-3d.pulse-enabled .pulse-overlay::after {
    border: 2px solid var(--primary-color);
    opacity: 0;
    animation: pulseBorder 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes pulseBorder {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Additional layer effects */
.battery-hero-3d .screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    animation: shine 6s infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Orbital Ring */
.battery-hero-3d.orbit-enabled .orbit-ring {
    position: absolute;
    width: 80%;
    height: 80%;
    border: 2px solid rgba(237, 0, 83, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    animation: orbitRotate 30s linear infinite;
    z-index: 1;
}

@keyframes orbitRotate {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

.battery-hero-3d.orbit-enabled .orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--primary-color);
}

/* Background Particles - CLEAN VERSION */
.battery-hero-3d.particles-enabled .hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

/* CRITICAL: Clean particle styling - NO CIRCLES */
.battery-hero-3d .particle {
    position: absolute;
    color: var(--primary-color);
    font-weight: 900;
    font-size: 16px;
    text-shadow: 0 0 10px var(--primary-color);
    animation: floatUp 15s infinite linear;
    line-height: 1;
    user-select: none;
    will-change: transform, opacity;
    pointer-events: none;
    bottom: 0;
    /* FORCE clean text rendering */
    font-family: 'Arial Black', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    list-style: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* CRITICAL: Ensure absolutely no pseudo-elements create circles */
.battery-hero-3d .particle::before,
.battery-hero-3d .particle::after {
    content: none !important;
    display: none !important;
    background: none !important;
    border: none !important;
}

/* Additional safeguards */
.battery-hero-3d .particle * {
    display: none !important;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) translateX(50px) rotate(180deg);
        opacity: 0;
    }
}

/* Hover Effects */
.battery-hero-3d .screen {
    transition: all 0.3s ease;
}

.battery-hero-3d .screen:hover {
    transform: translateZ(10px) scale(1.02);
    box-shadow: 
        0 30px 60px -12px rgba(237, 0, 83, 0.4),
        inset 0 0 30px rgba(237, 0, 83, 0.15);
    border-color: var(--primary-color);
}

/* Responsive Design */

/* Tablet landscape and below */
@media (max-width: 1200px) {
    .battery-hero-3d .hero-container {
        padding: 40px 30px;
        gap: 50px;
    }
    
    .battery-hero-3d .hero-heading {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    
    .battery-hero-3d .hero-description {
        font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    }
}

/* Tablet portrait and below */
@media (max-width: 968px) {
    .battery-hero-3d {
        min-height: auto;
        padding: 60px 0;
    }
    
    .battery-hero-3d .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
        max-width: 100%;
    }
    
    .battery-hero-3d .content-left {
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .battery-hero-3d .mockup-3d {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .battery-hero-3d .hero-heading {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        margin-bottom: 20px;
    }
    
    .battery-hero-3d .hero-description {
        font-size: clamp(0.9rem, 2.5vw, 1.05rem);
        margin-bottom: 25px;
    }
    
    .battery-hero-3d .control-buttons {
        justify-content: center;
        gap: 15px;
    }
    
    .battery-hero-3d .control-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 25px;
        font-size: 15px;
    }
    
    /* Reduce 3D depth on tablets */
    .battery-hero-3d .screen.layer-2 {
        transform: translateZ(-20px) translateX(20px);
    }
    
    .battery-hero-3d .screen.layer-3 {
        transform: translateZ(-40px) translateX(40px);
    }
    
    /* Simplify animations on tablets */
    .battery-hero-3d.rotation-enabled .mockup-3d {
        animation-duration: 30s;
    }
    
    /* REDUCE particle count on tablet - only show 8 */
    .battery-hero-3d .particle:nth-child(n+9) {
        display: none !important;
    }
}

/* Mobile devices */
@media (max-width: 576px) {
    .battery-hero-3d {
        padding: 40px 0;
        perspective: 1000px;
    }
    
    .battery-hero-3d .hero-container {
        padding: 30px 15px;
        gap: 30px;
    }
    
    .battery-hero-3d .hero-heading {
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .battery-hero-3d .hero-description {
        font-size: clamp(0.85rem, 3vw, 1rem);
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .battery-hero-3d .control-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .battery-hero-3d .control-btn {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .battery-hero-3d .mockup-3d {
        max-width: 100%;
    }
    
    .battery-hero-3d .mockup-placeholder {
        height: 300px;
        font-size: 1rem;
    }
    
    .battery-hero-3d .screen {
        padding: 12px;
        border-radius: 12px;
    }
    
    /* Further reduce 3D effects on mobile */
    .battery-hero-3d .screen.layer-2 {
        transform: translateZ(-15px) translateX(15px);
        opacity: 0.6;
    }
    
    .battery-hero-3d .screen.layer-3 {
        transform: translateZ(-30px) translateX(30px);
        opacity: 0.3;
    }
    
    /* Disable rotation animation on mobile for better performance */
    .battery-hero-3d.rotation-enabled .mockup-3d {
        animation: none;
    }
    
    /* DRASTICALLY REDUCE particles on mobile - only show 5 */
    .battery-hero-3d .particle:nth-child(n+6) {
        display: none !important;
    }
    
    .battery-hero-3d .particle {
        font-size: 14px;
    }
    
    /* Simplify orbital ring on mobile */
    .battery-hero-3d.orbit-enabled .orbit-ring {
        width: 70%;
        height: 70%;
        border-width: 1px;
    }
    
    .battery-hero-3d.orbit-enabled .orbit-dot {
        width: 6px;
        height: 6px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .battery-hero-3d .hero-container {
        padding: 25px 12px;
    }
    
    .battery-hero-3d .hero-heading {
        font-size: 1.5rem;
    }
    
    .battery-hero-3d .hero-description {
        font-size: 0.85rem;
    }
    
    .battery-hero-3d .control-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .battery-hero-3d .mockup-placeholder {
        height: 250px;
        font-size: 0.9rem;
    }
}

/* Elementor Editor Styles */
.elementor-editor-active .battery-hero-3d {
    min-height: 600px;
}

/* Animation Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    .battery-hero-3d * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile-specific optimizations */
.battery-hero-3d.mobile-optimized .particle {
    animation-duration: 20s !important;
    font-size: 14px !important;
}

.battery-hero-3d.mobile-optimized .screen::before {
    animation: none;
}

.battery-hero-3d.mobile-optimized .orbit-ring {
    animation-duration: 40s;
}

.battery-hero-3d.tablet-optimized .particle {
    animation-duration: 18s !important;
}

/* Prevent layout shift on mobile */
@media (max-width: 576px) {
    .battery-hero-3d .mockup-3d,
    .battery-hero-3d .screen-layers,
    .battery-hero-3d .screen {
        transform-style: flat !important;
    }
}

/* Dark overlay for better text readability */
.battery-hero-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(0, 0, 0, 0.3) 100%);
    z-index: 0;
    pointer-events: none;
}