/* Robotics & Automation Showcase Section */
.robotics-showcase {
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    background: linear-gradient(to bottom, var(--deep-space), var(--space-dark));
    isolation: isolate;
}

.robotics-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 30%);
    z-index: -1;
}

.robotics-showcase::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23a855f7' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    opacity: 0.3;
}

.robotics-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.robotics-content {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.robotics-content.animate {
    opacity: 1;
    transform: translateY(0);
}

.robotics-content h2 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--starlight), var(--cyber-aqua));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px var(--cyber-aqua-glow);
}

.robotics-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.robotics-showcase-inner {
    position: relative;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    background: rgba(10, 10, 24, 0.7);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(40px);
    margin: 0 auto;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.robotics-showcase-inner.animate {
    opacity: 1;
    transform: translateY(0);
}

.robotic-arm-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    z-index: 3;
}

.robotic-arm {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: arm-rotate 20s infinite linear;
}

.arm-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 15px var(--neon-violet-glow);
}

.arm-segment {
    position: absolute;
    background: linear-gradient(to right, #333, #222);
    border: 1px solid var(--neon-violet);
    box-shadow: 0 0 10px var(--neon-violet-glow);
}

.arm-1 {
    width: 20px;
    height: 120px;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px 10px 0 0;
}

.arm-joint {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--neon-violet);
    box-shadow: 0 0 10px var(--neon-violet-glow);
}

.joint-1 {
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
}

.arm-2 {
    width: 15px;
    height: 100px;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%) rotate(30deg);
    transform-origin: bottom center;
    border-radius: 10px 10px 0 0;
    animation: arm-move-2 8s infinite alternate ease-in-out;
}

.joint-2 {
    bottom: 250px;
    left: 50%;
    transform: translateX(-50%) rotate(30deg);
    transform-origin: bottom center;
}

.arm-3 {
    width: 12px;
    height: 80px;
    bottom: 280px;
    left: 50%;
    transform: translateX(-50%) rotate(-20deg);
    transform-origin: bottom center;
    border-radius: 10px 10px 0 0;
    animation: arm-move-3 6s infinite alternate ease-in-out;
}

.end-effector {
    position: absolute;
    width: 25px;
    height: 25px;
    bottom: 360px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--cyber-aqua);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--cyber-aqua-glow);
}

.holographic-display {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 250px;
    height: 250px;
    perspective: 1000px;
    z-index: 2;
}

.hologram {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: hologram-rotate 15s infinite linear;
}

.hologram-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--cyber-aqua);
    box-shadow: 0 0 30px var(--cyber-aqua-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    overflow: hidden;
    backface-visibility: hidden;
}

.hologram-face::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), transparent),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2306b6d4' fill-opacity='0.2'%3E%3Cpath d='M0 0h10v10H0V0zm10 10h10v10H10V10z'/%3E%3C/g%3E%3C/svg%3E");
    animation: hologram-scan 3s infinite linear;
}

.hologram-content {
    padding: 20px;
    text-align: center;
    z-index: 1;
}

.hologram-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--starlight);
    text-shadow: 0 0 10px var(--cyber-aqua-glow);
}

.hologram-content p {
    font-size: 0.9rem;
    color: var(--cosmic-text);
    opacity: 0.8;
}

.hologram-face:nth-child(1) {
    transform: translateZ(125px);
}

.hologram-face:nth-child(2) {
    transform: rotateY(180deg) translateZ(125px);
}

.hologram-face:nth-child(3) {
    transform: rotateY(90deg) translateZ(125px);
}

.hologram-face:nth-child(4) {
    transform: rotateY(-90deg) translateZ(125px);
}

.hologram-face:nth-child(5) {
    transform: rotateX(90deg) translateZ(125px);
}

.hologram-face:nth-child(6) {
    transform: rotateX(-90deg) translateZ(125px);
}

.circuit-grid {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, transparent 49%, rgba(168, 85, 247, 0.1) 50%, transparent 51%) 0 0 / 20px 20px,
        linear-gradient(0deg, transparent 49%, rgba(168, 85, 247, 0.1) 50%, transparent 51%) 0 0 / 20px 20px;
    animation: circuit-pulse 4s infinite alternate;
    z-index: 1;
}

.data-stream {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, transparent, var(--neon-violet), transparent);
    opacity: 0.7;
    animation: data-flow 5s infinite linear;
    mask: linear-gradient(90deg, transparent, white, transparent);
}

.floating-gears {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.gear {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--electric-orange);
    box-shadow: 0 0 15px var(--electric-orange-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--electric-orange);
    font-size: 1.5rem;
    animation: gear-rotate linear infinite;
}

.gear::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 5px;
    background: var(--electric-orange);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--electric-orange-glow);
}

.gear-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 15%;
    animation-duration: 20s;
}

.gear-2 {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 25%;
    animation-duration: 15s;
    animation-direction: reverse;
}

.gear-3 {
    width: 50px;
    height: 50px;
    bottom: 20%;
    right: 20%;
    animation-duration: 25s;
}

.gear-4 {
    width: 35px;
    height: 35px;
    bottom: 30%;
    right: 30%;
    animation-duration: 12s;
    animation-direction: reverse;
}

.robotics-cta {
    text-align: center;
    margin-top: 50px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.robotics-cta.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Robotics Showcase Animations */
@keyframes arm-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes arm-move-2 {
    0% {
        transform: translateX(-50%) rotate(30deg);
    }
    100% {
        transform: translateX(-50%) rotate(60deg);
    }
}

@keyframes arm-move-3 {
    from {
        transform: translateX(-50%) rotate(-20deg);
    }
    to {
        transform: translateX(-50%) rotate(-50deg);
    }
}

@keyframes hologram-rotate {
    0% {
        transform: rotateX(0) rotateY(0) rotateZ(0);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes hologram-scan {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100px 100px;
    }
}

@keyframes circuit-pulse {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes data-flow {
    0% {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes gear-rotate {
    0% {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments for Robotics Showcase */
@media (max-width: 1200px) {
    .robotics-content h2 {
        font-size: 2.8rem;
    }

    .holographic-display {
        right: 10%;
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 992px) {
    .robotics-showcase {
        padding: 80px 0;
    }

    .robotics-content h2 {
        font-size: 2.4rem;
    }

    .robotics-showcase-inner {
        height: 400px;
    }

    .robotic-arm-container {
        width: 250px;
        height: 250px;
    }

    .holographic-display {
        width: 180px;
        height: 180px;
        right: 5%;
    }
}

@media (max-width: 768px) {
    .robotics-content h2 {
        font-size: 2rem;
    }

    .robotics-content p {
        font-size: 1.1rem;
    }

    .robotics-showcase-inner {
        height: 300px;
    }

    .robotic-arm-container {
        width: 200px;
        height: 200px;
    }

    .holographic-display {
        display: none;
    }

    .gear-1, .gear-2 {
        display: none;
    }
}

@media (max-width: 576px) {
    .robotics-content h2 {
        font-size: 1.8rem;
    }

    .robotics-showcase-inner {
        height: 250px;
    }

    .robotic-arm-container {
        width: 180px;
        height: 180px;
    }
}
