/**
 * FABTECH SYSTEM - Custom Styles
 * High-tech, Modern Design
 */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1779BA;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #12619A;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== TECH BACKGROUND PATTERNS ===== */

/* Animated Grid Background */
.tech-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(23, 121, 186, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 121, 186, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Circuit Pattern */
.circuit-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: 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='%231779BA' 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");
}

/* Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: float 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(23, 121, 186, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(23, 121, 186, 0.1) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(232, 185, 49, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* Glowing Lines */
.glow-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(23, 121, 186, 0.5), transparent);
    animation: glowMove 3s ease-in-out infinite;
}

@keyframes glowMove {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(100%); }
}

/* Particle Effect */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(23, 121, 186, 0.3);
    border-radius: 50%;
    animation: particleFloat 10s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: -2s; }
.particle:nth-child(3) { left: 30%; animation-delay: -4s; }
.particle:nth-child(4) { left: 40%; animation-delay: -6s; }
.particle:nth-child(5) { left: 50%; animation-delay: -8s; }
.particle:nth-child(6) { left: 60%; animation-delay: -1s; }
.particle:nth-child(7) { left: 70%; animation-delay: -3s; }
.particle:nth-child(8) { left: 80%; animation-delay: -5s; }
.particle:nth-child(9) { left: 90%; animation-delay: -7s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) scale(1);
    }
    100% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
}

/* Hexagon Pattern */
.hex-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%231779BA' fill-opacity='1'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Data Flow Lines */
.data-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.1;
}

.data-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #1779BA 50%, transparent 100%);
    animation: dataFlow 8s linear infinite;
}

.data-line:nth-child(1) { top: 20%; animation-delay: 0s; }
.data-line:nth-child(2) { top: 40%; animation-delay: -2s; }
.data-line:nth-child(3) { top: 60%; animation-delay: -4s; }
.data-line:nth-child(4) { top: 80%; animation-delay: -6s; }

@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* ===== GLASSMORPHISM ===== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(23, 121, 186, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(23, 121, 186, 0.2);
}

/* ===== GLOW EFFECTS ===== */
.glow {
    box-shadow: 0 0 20px rgba(23, 121, 186, 0.3);
}

.glow-text {
    text-shadow: 0 0 20px rgba(23, 121, 186, 0.5);
}

/* Neon Border Animation */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #1779BA, #2A8CC4, #E8B931, #1779BA);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: neonGlow 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.neon-border:hover::before {
    opacity: 1;
}

@keyframes neonGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== EXISTING STYLES ===== */

/* Timeline Responsive */
@media (max-width: 768px) {
    #history .absolute.left-4 {
        left: 1rem !important;
    }
}

/* Form Focus Effects */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 121, 186, 0.15);
}

/* Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn-primary:hover::after {
    width: 400px;
    height: 400px;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(23, 121, 186, 0.15);
}

/* Tech Card Style */
.tech-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,252,0.9) 100%);
    border: 1px solid rgba(23, 121, 186, 0.1);
    transition: all 0.3s ease;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1779BA, #2A8CC4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tech-card:hover::before {
    transform: scaleX(1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #10B981, #059669);
}

.toast.error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 300px;
}

/* Section Padding Adjustment for Fixed Nav */
section {
    scroll-margin-top: 80px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1779BA 0%, #2A8CC4 50%, #1779BA 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Map Container */
.map-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Stats Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Typing Effect */
.typing-effect {
    border-right: 2px solid #1779BA;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu,
    .no-print {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ===== LOGISTICS CENTER ANIMATION ===== */

.logistics-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.4;
}

/* Conveyor Belt System - 스테커에서 시작하는 합류/분기 시스템 */
.conveyor-system {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    height: 250px;
}

.conveyor-belt {
    position: absolute;
    height: 6px;
    background: linear-gradient(90deg,
        rgba(23, 121, 186, 0.2) 0%,
        rgba(23, 121, 186, 0.5) 20%,
        rgba(23, 121, 186, 0.5) 80%,
        rgba(23, 121, 186, 0.2) 100%
    );
    border-radius: 3px;
}

.conveyor-belt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.15) 15px,
        rgba(255, 255, 255, 0.15) 17px
    );
    animation: conveyorMove 1.5s linear infinite;
}

/* 메인 라인 - 스테커(3%)에서 시작 */
.conveyor-main {
    width: 70%;
    left: 5%;
    top: 80px;
}

/* 분기 라인 1 - 위쪽으로 */
.conveyor-branch-1 {
    width: 25%;
    left: 35%;
    top: 20px;
}

/* 분기 연결선 (대각선) */
.conveyor-diag-1 {
    width: 60px;
    left: 33%;
    top: 50px;
    transform: rotate(-45deg);
    transform-origin: left center;
}

/* 분기 라인 2 - 아래쪽으로 */
.conveyor-branch-2 {
    width: 30%;
    left: 50%;
    top: 140px;
}

/* 분기 연결선 (대각선) */
.conveyor-diag-2 {
    width: 60px;
    left: 48%;
    top: 110px;
    transform: rotate(45deg);
    transform-origin: left center;
}

/* 합류 라인 - 중앙에서 디스테커로 */
.conveyor-merge {
    width: 20%;
    right: 25%;
    left: auto;
    top: 80px;
}

/* 디스테커 출고 라인 - 디스테커(97%)에서 나감 */
.conveyor-destacker-out {
    width: 20%;
    right: 3%;
    left: auto;
    top: 80px;
}

/* 합류 연결선 위 */
.conveyor-merge-diag-1 {
    width: 50px;
    right: 28%;
    left: auto;
    top: 50px;
    transform: rotate(45deg);
    transform-origin: right center;
}

/* 합류 연결선 아래 */
.conveyor-merge-diag-2 {
    width: 50px;
    right: 28%;
    left: auto;
    top: 110px;
    transform: rotate(-45deg);
    transform-origin: right center;
}

/* 수직 컨베이어 (분기점) */
.conveyor-vertical {
    width: 6px;
    height: 60px;
    background: linear-gradient(180deg,
        rgba(23, 121, 186, 0.2) 0%,
        rgba(23, 121, 186, 0.5) 50%,
        rgba(23, 121, 186, 0.2) 100%
    );
    border-radius: 3px;
}

.conveyor-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.15) 15px,
        rgba(255, 255, 255, 0.15) 17px
    );
    animation: conveyorMoveVertical 1.5s linear infinite;
}

.conveyor-vert-1 {
    left: 35%;
    top: 20px;
}

.conveyor-vert-2 {
    left: 50%;
    top: 80px;
}

/* 분기점 노드 */
.junction-node {
    position: absolute;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, rgba(232, 185, 49, 0.8) 0%, rgba(232, 185, 49, 0.3) 70%);
    border-radius: 50%;
    border: 2px solid rgba(232, 185, 49, 0.6);
    animation: junctionPulse 1.5s ease-in-out infinite;
}

.junction-1 { left: 33%; top: 74px; }
.junction-2 { left: 48%; top: 74px; }
.junction-3 { right: 28%; top: 74px; left: auto; }

@keyframes conveyorMove {
    0% { background-position: 0 0; }
    100% { background-position: 34px 0; }
}

@keyframes conveyorMoveVertical {
    0% { background-position: 0 0; }
    100% { background-position: 0 34px; }
}

@keyframes junctionPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Moving Packages/Boxes - 스테커에서 출발 */
.package {
    position: absolute;
    width: 24px;
    height: 18px;
    background: linear-gradient(135deg, rgba(232, 185, 49, 0.7) 0%, rgba(232, 185, 49, 0.4) 100%);
    border: 1px solid rgba(232, 185, 49, 0.5);
    border-radius: 2px;
}

.package::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    right: 2px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.package::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
}

/* 메인 라인 패키지 - 스테커(5%)에서 출발 → 합류점(70%)으로 */
.package-main-1 {
    top: 72px;
    animation: movePackageMain 10s linear infinite;
    animation-delay: 0s;
}
.package-main-2 {
    top: 72px;
    animation: movePackageMain 10s linear infinite;
    animation-delay: -3.3s;
}
.package-main-3 {
    top: 72px;
    animation: movePackageMain 10s linear infinite;
    animation-delay: -6.6s;
}

/* 상단 분기 라인 패키지 */
.package-branch-1 {
    top: 12px;
    animation: movePackageBranch1 8s linear infinite;
    animation-delay: 0s;
}
.package-branch-2 {
    top: 12px;
    animation: movePackageBranch1 8s linear infinite;
    animation-delay: -4s;
}

/* 하단 분기 라인 패키지 */
.package-branch-3 {
    top: 132px;
    animation: movePackageBranch2 9s linear infinite;
    animation-delay: -1s;
}
.package-branch-4 {
    top: 132px;
    animation: movePackageBranch2 9s linear infinite;
    animation-delay: -5.5s;
}

/* 메인 라인: 5% → 75% */
@keyframes movePackageMain {
    0% { left: 5%; opacity: 0; }
    5% { left: 8%; opacity: 1; }
    90% { left: 72%; opacity: 1; }
    100% { left: 75%; opacity: 0; }
}

/* 상단 분기: 35% → 58% */
@keyframes movePackageBranch1 {
    0% { left: 35%; opacity: 0; }
    10% { left: 38%; opacity: 1; }
    85% { left: 56%; opacity: 1; }
    100% { left: 60%; opacity: 0; }
}

/* 하단 분기: 50% → 78% */
@keyframes movePackageBranch2 {
    0% { left: 50%; opacity: 0; }
    10% { left: 53%; opacity: 1; }
    85% { left: 75%; opacity: 1; }
    100% { left: 80%; opacity: 0; }
}

/* 디스테커 출고 패키지 - 디스테커(97%)에서 나가는 방향 */
.package-destacker-out {
    top: 72px;
    animation: movePackageDestack 7s linear infinite;
}

.package-destacker-out-1 { animation-delay: 0s; }
.package-destacker-out-2 { animation-delay: -3.5s; }

/* 디스테커 출고: 75% → 95% (오른쪽으로) */
@keyframes movePackageDestack {
    0% { right: 25%; left: auto; opacity: 0; }
    10% { right: 22%; left: auto; opacity: 1; }
    85% { right: 5%; left: auto; opacity: 1; }
    100% { right: 3%; left: auto; opacity: 0; }
}

/* IoT Sensor Nodes */
.iot-nodes {
    position: absolute;
    inset: 0;
}

.iot-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(23, 121, 186, 0.8) 0%, rgba(23, 121, 186, 0.2) 70%);
    border-radius: 50%;
    animation: sensorPulse 2s ease-in-out infinite;
}

.iot-node::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(23, 121, 186, 0.4);
    border-radius: 50%;
    animation: sensorRing 2s ease-out infinite;
}

.iot-node::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(23, 121, 186, 0.2);
    border-radius: 50%;
    animation: sensorRing 2s ease-out infinite 0.3s;
}

.iot-node-1 { top: 20%; left: 15%; animation-delay: 0s; }
.iot-node-2 { top: 35%; left: 30%; animation-delay: 0.5s; }
.iot-node-3 { top: 25%; right: 25%; animation-delay: 1s; }
.iot-node-4 { top: 45%; right: 15%; animation-delay: 1.5s; }
.iot-node-5 { top: 60%; left: 20%; animation-delay: 0.3s; }
.iot-node-6 { top: 55%; left: 50%; animation-delay: 0.8s; }
.iot-node-7 { top: 40%; left: 70%; animation-delay: 1.2s; }
.iot-node-8 { top: 70%; right: 30%; animation-delay: 0.6s; }

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

@keyframes sensorRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

/* Network Connection Lines */
.network-lines {
    position: absolute;
    inset: 0;
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(23, 121, 186, 0.3) 20%,
        rgba(23, 121, 186, 0.5) 50%,
        rgba(23, 121, 186, 0.3) 80%,
        transparent 100%
    );
    transform-origin: left center;
}

.network-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(232, 185, 49, 0.8);
    border-radius: 50%;
    top: -2.5px;
    animation: dataPacket 3s linear infinite;
    box-shadow: 0 0 10px rgba(232, 185, 49, 0.5);
}

.network-line-1 {
    top: 25%;
    left: 15%;
    width: 200px;
    transform: rotate(15deg);
}
.network-line-1::after { animation-delay: 0s; }

.network-line-2 {
    top: 35%;
    left: 30%;
    width: 250px;
    transform: rotate(-10deg);
}
.network-line-2::after { animation-delay: -1s; }

.network-line-3 {
    top: 30%;
    right: 20%;
    width: 180px;
    transform: rotate(25deg);
}
.network-line-3::after { animation-delay: -0.5s; }

.network-line-4 {
    top: 50%;
    left: 25%;
    width: 300px;
    transform: rotate(-5deg);
}
.network-line-4::after { animation-delay: -1.5s; }

.network-line-5 {
    top: 55%;
    left: 50%;
    width: 220px;
    transform: rotate(20deg);
}
.network-line-5::after { animation-delay: -2s; }

.network-line-6 {
    top: 45%;
    right: 15%;
    width: 160px;
    transform: rotate(-15deg);
}
.network-line-6::after { animation-delay: -0.8s; }

@keyframes dataPacket {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% - 6px); opacity: 0; }
}

/* Warehouse Grid Floor */
.warehouse-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background:
        linear-gradient(to top, rgba(23, 121, 186, 0.1) 0%, transparent 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(23, 121, 186, 0.05) 80px,
            rgba(23, 121, 186, 0.05) 82px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 80px,
            rgba(23, 121, 186, 0.05) 80px,
            rgba(23, 121, 186, 0.05) 82px
        );
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom center;
}

/* Rack/Shelf Silhouettes with Heartbeat */
.warehouse-racks {
    position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    height: 180px;
}

.rack {
    position: absolute;
    background: linear-gradient(180deg,
        rgba(23, 121, 186, 0.2) 0%,
        rgba(23, 121, 186, 0.08) 100%
    );
    border: 1px solid rgba(23, 121, 186, 0.25);
    border-radius: 3px;
    animation: rackHeartbeat 2s ease-in-out infinite;
}

.rack::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(232, 185, 49, 0.1) 0%,
        transparent 50%
    );
    opacity: 0;
    animation: rackGlow 2s ease-in-out infinite;
}

/* Left side racks - 스테커(3%) 우측으로 배치 */
.rack-1 { left: 10%; width: 25px; height: 70px; bottom: 0; animation-delay: 0s; }
.rack-2 { left: 14%; width: 40px; height: 130px; bottom: 0; animation-delay: 0.2s; }
.rack-3 { left: 20%; width: 30px; height: 95px; bottom: 0; animation-delay: 0.4s; }
.rack-4 { left: 26%; width: 45px; height: 150px; bottom: 0; animation-delay: 0.1s; }
.rack-5 { left: 33%; width: 35px; height: 110px; bottom: 0; animation-delay: 0.3s; }

/* Right side racks - 디스테커(97%) 좌측으로 배치 */
.rack-6 { right: 10%; width: 28px; height: 85px; bottom: 0; animation-delay: 0.15s; }
.rack-7 { right: 14%; width: 42px; height: 140px; bottom: 0; animation-delay: 0.35s; }
.rack-8 { right: 20%; width: 32px; height: 100px; bottom: 0; animation-delay: 0.05s; }
.rack-9 { right: 26%; width: 38px; height: 120px; bottom: 0; animation-delay: 0.25s; }
.rack-10 { right: 33%; width: 35px; height: 105px; bottom: 0; animation-delay: 0.45s; }

@keyframes rackHeartbeat {
    0%, 100% {
        transform: scaleY(1) scaleX(1);
        opacity: 0.7;
    }
    15% {
        transform: scaleY(1.03) scaleX(1.02);
        opacity: 1;
    }
    30% {
        transform: scaleY(0.98) scaleX(0.99);
        opacity: 0.8;
    }
    45% {
        transform: scaleY(1.02) scaleX(1.01);
        opacity: 0.95;
    }
    60% {
        transform: scaleY(1) scaleX(1);
        opacity: 0.75;
    }
}

@keyframes rackGlow {
    0%, 100% { opacity: 0; }
    15%, 45% { opacity: 1; }
    30%, 60% { opacity: 0.3; }
}

/* Central Control Hub */
.control-hub {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
}

.control-hub-core {
    position: absolute;
    inset: 20px;
    background: radial-gradient(circle, rgba(232, 185, 49, 0.6) 0%, rgba(232, 185, 49, 0.2) 70%);
    border-radius: 50%;
    animation: hubPulse 3s ease-in-out infinite;
}

.control-hub-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(23, 121, 186, 0.3);
    border-radius: 50%;
    animation: hubRotate 10s linear infinite;
}

.control-hub-ring::before,
.control-hub-ring::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(23, 121, 186, 0.8);
    border-radius: 50%;
}

.control-hub-ring::before { top: -4px; left: 50%; transform: translateX(-50%); }
.control-hub-ring::after { bottom: -4px; left: 50%; transform: translateX(-50%); }

.control-hub-ring-2 {
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(23, 121, 186, 0.2);
    border-radius: 50%;
    animation: hubRotate 15s linear infinite reverse;
}

@keyframes hubPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes hubRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Signal Waves from Hub */
.signal-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(23, 121, 186, 0.3);
    border-radius: 50%;
    animation: signalExpand 4s ease-out infinite;
}

.signal-wave-1 { animation-delay: 0s; }
.signal-wave-2 { animation-delay: 1s; }
.signal-wave-3 { animation-delay: 2s; }
.signal-wave-4 { animation-delay: 3s; }

@keyframes signalExpand {
    0% { width: 40px; height: 40px; opacity: 0.8; }
    100% { width: 400px; height: 400px; opacity: 0; }
}

/* Forklift/AGV Animation - Multi-directional */
.agv {
    position: absolute;
    width: 40px;
    height: 20px;
    background: linear-gradient(180deg, rgba(232, 185, 49, 0.6) 0%, rgba(232, 185, 49, 0.35) 100%);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(232, 185, 49, 0.3);
}

.agv::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 5px;
    right: 5px;
    height: 10px;
    background: rgba(232, 185, 49, 0.4);
    border-radius: 2px 2px 0 0;
}

.agv::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 5px;
    width: 10px;
    height: 10px;
    background: rgba(23, 121, 186, 0.7);
    border-radius: 50%;
    box-shadow: 20px 0 0 rgba(23, 121, 186, 0.7);
}

/* AGV 1: 상단 수평 이동 (좌→우) - 컨베이어 위 */
.agv-1 {
    bottom: 70%;
    animation: agvPath1 14s linear infinite;
}

/* AGV 2: 중상단 역방향 수평 이동 (우→좌) - 컨베이어 위 */
.agv-2 {
    bottom: 58%;
    animation: agvPath2 12s linear infinite;
}

/* AGV 3: 우측 ㄷ자 경로 - 컨베이어 위 (높이 48%~62%) */
.agv-3 {
    left: 60%;
    animation: agvPath3 16s ease-in-out infinite;
}

/* AGV 4: 좌측 역 L자 경로 - 컨베이어 위 (높이 45%~65%) */
.agv-4 {
    animation: agvPath4 18s ease-in-out infinite;
}

/* AGV 1: 단순 수평 이동 (좌→우) - 컨베이어 위 70% */
@keyframes agvPath1 {
    0% {
        left: -50px;
        bottom: 70%;
        transform: rotate(0deg);
    }
    100% {
        left: calc(100% + 50px);
        bottom: 70%;
        transform: rotate(0deg);
    }
}

/* AGV 2: 단순 역방향 수평 이동 - 컨베이어 위 58% */
@keyframes agvPath2 {
    0% {
        left: calc(100% + 50px);
        bottom: 58%;
        transform: rotate(180deg);
    }
    100% {
        left: -50px;
        bottom: 58%;
        transform: rotate(180deg);
    }
}

/* AGV 3: 우측 ㄷ자 순환 경로 - 컨베이어 위 (48%~62%) */
@keyframes agvPath3 {
    0% {
        left: 60%;
        bottom: 48%;
        transform: rotate(-90deg);
    }
    20% {
        left: 60%;
        bottom: 62%;
        transform: rotate(-90deg);
    }
    25% {
        left: 60%;
        bottom: 62%;
        transform: rotate(0deg);
    }
    45% {
        left: 80%;
        bottom: 62%;
        transform: rotate(0deg);
    }
    50% {
        left: 80%;
        bottom: 62%;
        transform: rotate(90deg);
    }
    70% {
        left: 80%;
        bottom: 48%;
        transform: rotate(90deg);
    }
    75% {
        left: 80%;
        bottom: 48%;
        transform: rotate(180deg);
    }
    95% {
        left: 60%;
        bottom: 48%;
        transform: rotate(180deg);
    }
    100% {
        left: 60%;
        bottom: 48%;
        transform: rotate(-90deg);
    }
}

/* AGV 4: 좌측 ㄷ자 순환 경로 - 컨베이어 위 (45%~68%) */
@keyframes agvPath4 {
    0% {
        left: 10%;
        bottom: 45%;
        transform: rotate(-90deg);
    }
    20% {
        left: 10%;
        bottom: 68%;
        transform: rotate(-90deg);
    }
    25% {
        left: 10%;
        bottom: 68%;
        transform: rotate(0deg);
    }
    45% {
        left: 35%;
        bottom: 68%;
        transform: rotate(0deg);
    }
    50% {
        left: 35%;
        bottom: 68%;
        transform: rotate(90deg);
    }
    70% {
        left: 35%;
        bottom: 45%;
        transform: rotate(90deg);
    }
    75% {
        left: 35%;
        bottom: 45%;
        transform: rotate(180deg);
    }
    95% {
        left: 10%;
        bottom: 45%;
        transform: rotate(180deg);
    }
    100% {
        left: 10%;
        bottom: 45%;
        transform: rotate(-90deg);
    }
}

/* ===== STACKER / DESTACKER ===== */

/* 스태커 (박스 쌓기) */
.stacker {
    position: absolute;
    bottom: 8%;
    width: 60px;
    height: 120px;
}

.stacker-frame {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    border: 2px solid rgba(23, 121, 186, 0.4);
    border-bottom: none;
    background: linear-gradient(180deg,
        rgba(23, 121, 186, 0.1) 0%,
        rgba(23, 121, 186, 0.05) 100%
    );
}

.stacker-lift {
    position: absolute;
    left: 5px;
    right: 5px;
    height: 8px;
    background: rgba(232, 185, 49, 0.7);
    border-radius: 2px;
    animation: stackerLift 4s ease-in-out infinite;
}

.stacker-box {
    position: absolute;
    left: 10px;
    width: 40px;
    height: 25px;
    background: linear-gradient(135deg, rgba(232, 185, 49, 0.5) 0%, rgba(232, 185, 49, 0.3) 100%);
    border: 1px solid rgba(232, 185, 49, 0.4);
    border-radius: 2px;
    opacity: 0;
    animation: stackerBox 4s ease-in-out infinite;
}

/* 스테커: 좌측 하단 - 박스 출발점 */
.stacker-1 { left: 3%; }

/* 출고 박스 애니메이션 (스테커에서 컨베이어로) */
.outgoing-box {
    position: absolute;
    width: 28px;
    height: 22px;
    background: linear-gradient(135deg, rgba(232, 185, 49, 0.7) 0%, rgba(232, 185, 49, 0.4) 100%);
    border: 1px solid rgba(232, 185, 49, 0.5);
    border-radius: 2px;
    animation: outgoingBox 6s ease-in-out infinite;
}

.outgoing-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    right: 2px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.outgoing-box-1 { bottom: 12%; left: 3%; animation-delay: 0s; }
.outgoing-box-2 { bottom: 12%; left: 3%; animation-delay: 3s; }

@keyframes outgoingBox {
    0%, 5% {
        left: 3%;
        bottom: 12%;
        opacity: 1;
        transform: scale(1);
    }
    40% {
        left: 25%;
        bottom: 16%;
        opacity: 1;
        transform: scale(0.9);
    }
    80% {
        left: 50%;
        bottom: 16%;
        opacity: 0.8;
        transform: scale(0.8);
    }
    100% {
        left: 60%;
        bottom: 16%;
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes stackerLift {
    0%, 10% { bottom: 10px; }
    40%, 60% { bottom: 85px; }
    90%, 100% { bottom: 10px; }
}

@keyframes stackerBox {
    0%, 5% { opacity: 0; bottom: 18px; }
    10%, 85% { opacity: 1; bottom: 18px; }
    90%, 100% { opacity: 0; bottom: 93px; }
}

/* 디스태커 (박스 내리기) */
.destacker {
    position: absolute;
    bottom: 8%;
    width: 60px;
    height: 120px;
}

.destacker-frame {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    border: 2px solid rgba(232, 185, 49, 0.4);
    border-bottom: none;
    background: linear-gradient(180deg,
        rgba(232, 185, 49, 0.1) 0%,
        rgba(232, 185, 49, 0.05) 100%
    );
}

.destacker-lift {
    position: absolute;
    left: 5px;
    right: 5px;
    height: 8px;
    background: rgba(23, 121, 186, 0.7);
    border-radius: 2px;
    animation: destackerLift 4s ease-in-out infinite;
}

.destacker-box {
    position: absolute;
    left: 10px;
    width: 40px;
    height: 25px;
    background: linear-gradient(135deg, rgba(23, 121, 186, 0.5) 0%, rgba(23, 121, 186, 0.3) 100%);
    border: 1px solid rgba(23, 121, 186, 0.4);
    border-radius: 2px;
    opacity: 0;
    animation: destackerBox 4s ease-in-out infinite;
}

/* 쌓인 박스들 (스태커용) */
.stacked-boxes {
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
}

.stacked-box {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(135deg, rgba(232, 185, 49, 0.3) 0%, rgba(232, 185, 49, 0.15) 100%);
    border: 1px solid rgba(232, 185, 49, 0.25);
    border-radius: 2px;
    animation: stackedPulse 2s ease-in-out infinite;
}

.stacked-box-1 { bottom: 0; animation-delay: 0s; }
.stacked-box-2 { bottom: 22px; animation-delay: 0.3s; }
.stacked-box-3 { bottom: 44px; animation-delay: 0.6s; }

/* 대기 박스들 (디스태커용) */
.waiting-boxes {
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
}

.waiting-box {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(135deg, rgba(23, 121, 186, 0.3) 0%, rgba(23, 121, 186, 0.15) 100%);
    border: 1px solid rgba(23, 121, 186, 0.25);
    border-radius: 2px;
    animation: stackedPulse 2s ease-in-out infinite;
}

.waiting-box-1 { bottom: 66px; animation-delay: 0s; }
.waiting-box-2 { bottom: 88px; animation-delay: 0.2s; }

/* 디스테커: 우측 하단 - AGV 출발점 */
.destacker-1 { right: 3%; left: auto; }

/* 입고 AGV 애니메이션 (디스테커로 도착) */
.incoming-agv {
    position: absolute;
    width: 35px;
    height: 18px;
    background: linear-gradient(180deg, rgba(23, 121, 186, 0.7) 0%, rgba(23, 121, 186, 0.4) 100%);
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(23, 121, 186, 0.3);
    animation: incomingAgv 8s ease-in-out infinite;
}

.incoming-agv::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 4px;
    right: 4px;
    height: 8px;
    background: rgba(23, 121, 186, 0.5);
    border-radius: 2px 2px 0 0;
}

.incoming-agv::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: rgba(232, 185, 49, 0.7);
    border-radius: 50%;
    box-shadow: 16px 0 0 rgba(232, 185, 49, 0.7);
}

.incoming-agv-1 { animation-delay: 0s; }
.incoming-agv-2 { animation-delay: 4s; }

@keyframes incomingAgv {
    0% {
        right: calc(100% + 50px);
        bottom: 18%;
        opacity: 0;
        transform: rotate(180deg);
    }
    10% {
        right: 70%;
        bottom: 18%;
        opacity: 1;
        transform: rotate(180deg);
    }
    50% {
        right: 35%;
        bottom: 18%;
        opacity: 1;
        transform: rotate(180deg);
    }
    70% {
        right: 10%;
        bottom: 18%;
        opacity: 1;
        transform: rotate(180deg);
    }
    85%, 100% {
        right: 3%;
        bottom: 12%;
        opacity: 0.5;
        transform: rotate(180deg);
    }
}

@keyframes destackerLift {
    0%, 10% { bottom: 85px; }
    40%, 60% { bottom: 10px; }
    90%, 100% { bottom: 85px; }
}

@keyframes destackerBox {
    0%, 5% { opacity: 0; bottom: 93px; }
    10%, 85% { opacity: 1; bottom: 93px; }
    90%, 100% { opacity: 0; bottom: 18px; }
}

@keyframes stackedPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Scanner Beam Effect */
.scanner-beam {
    position: absolute;
    top: 30%;
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg,
        rgba(232, 185, 49, 0) 0%,
        rgba(232, 185, 49, 0.8) 50%,
        rgba(232, 185, 49, 0) 100%
    );
    animation: scannerMove 5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(232, 185, 49, 0.5);
}

/* 스캐너 위치: AGV 경로와 충돌 방지 */
.scanner-beam-1 { left: 42%; animation-delay: 0s; }
.scanner-beam-2 { left: 58%; animation-delay: -2.5s; }

@keyframes scannerMove {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(50px) scaleY(1.2);
        opacity: 1;
    }
}

/* ===== SECTION NAVIGATION ARROWS ===== */

.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-nav-arrow {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(23, 121, 186, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-nav-arrow:hover {
    background: #1779BA;
    border-color: #1779BA;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(23, 121, 186, 0.4);
}

.section-nav-arrow:hover svg {
    color: white;
}

.section-nav-arrow svg {
    width: 20px;
    height: 20px;
    color: #1779BA;
    transition: color 0.3s ease;
}

.section-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark sections에서 화살표 스타일 */
.section-nav.dark-mode .section-nav-arrow {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.section-nav.dark-mode .section-nav-arrow svg {
    color: white;
}

.section-nav.dark-mode .section-nav-arrow:hover {
    background: #E8B931;
    border-color: #E8B931;
}

.section-nav.dark-mode .section-nav-arrow:hover svg {
    color: #1e293b;
}

/* 현재 섹션 인디케이터 */
.section-indicator {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(23, 121, 186, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.section-dot:hover {
    background: rgba(23, 121, 186, 0.6);
    transform: scale(1.2);
}

.section-dot.active {
    background: #1779BA;
    box-shadow: 0 0 10px rgba(23, 121, 186, 0.5);
    transform: scale(1.2);
}

/* 모바일에서 숨김 */
@media (max-width: 768px) {
    .section-nav {
        display: none;
    }
}

/* 각 섹션 하단 네비게이션 화살표 */
.section-bottom-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 20px;
}

.section-bottom-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.section-bottom-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.section-bottom-arrow svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* 밝은 섹션용 */
.section-bottom-arrow.light {
    background: rgba(23, 121, 186, 0.1);
    border-color: rgba(23, 121, 186, 0.3);
}

.section-bottom-arrow.light svg {
    color: #1779BA;
}

.section-bottom-arrow.light:hover {
    background: #1779BA;
    border-color: #1779BA;
}

.section-bottom-arrow.light:hover svg {
    color: white;
}
