/* =====================================
   POPUP: DIGITAL COMMAND NODE
===================================== */

/* Overlay - Deep Cinematic Blur */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(0, 0, 0, 0.85); /* Darker for focus */
  display: none;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

/* Popup Box - The Tech Card */
.popup-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  
  /* --- THEME UPDATE: Deep Black Glass --- */
  background: rgba(10, 10, 10, 0.95);
  background-image: 
    linear-gradient(180deg, rgba(20, 20, 20, 0.5) 0%, rgba(5, 5, 5, 1) 100%),
    url('../assets/images/circuit4.webp'); /* Subtle texture if available */
  background-size: cover;
  background-blend-mode: overlay;
  
  width: 420px;
  padding: 60px 40px;
  
  /* Tech Borders */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid #4ade80; /* Neon Green Top Accent */
  border-radius: 0px; /* Sharp corners for B2B look */
  
  /* Green Glow Shadow */
  box-shadow: 
    0 20px 60px -10px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(74, 222, 128, 0.1); /* Ambient Green */

  text-align: center;
  display: none;
  z-index: 1001;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  
  color: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Typography */
.popup-box h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.popup-box p {
  font-size: 15px;
  line-height: 1.6;
  color: #a3a3a3; /* Tech Grey */
  margin-bottom: 30px;
}

/* Buttons - Matches the "Speaker" Section Style */
.popup-btn {
  background: #4ade80; /* Brand Green */
  color: #000000;
  border: 1px solid #4ade80;
  padding: 16px 40px;
  letter-spacing: 1px;
  border-radius: 0px; /* Sharp Tech */
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 5px 20px rgba(74, 222, 128, 0.3);
  transition: all 0.3s ease;
  margin: 10px 0;
  width: 100%; /* Full width looks better in popups */
}

.popup-btn:hover {
  background: transparent;
  color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(74, 222, 128, 0.2);
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

.popup-close:hover {
  color: #4ade80;
  background: transparent !important;
  transform: rotate(90deg);
}

/* Active States */
.popup-overlay.active {
  display: block;
}

.popup-box.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Large Variant */
.popup-box.large {
  width: 90%;
  max-width: 800px; /* Wider for video */
  padding: 50px;
}

/* Video Wrapper */
.popup-video-wrapper {
  width: 100%;
  margin-bottom: 30px;
  justify-content: center;
  display: flex;
}

/* Video Frame - The "Portal" Look */
.popup-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 0px; /* Sharp */
  overflow: hidden;
  
  /* Initial Glow */
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.3);
  border: 1px solid rgba(74, 222, 128, 0.2);
  
  animation: glow 3s ease-in-out infinite alternate;
  transition: transform 0.3s ease;
}

.popup-video-frame:hover {
  transform: scale(1.02);
  border-color: #4ade80;
}

.popup-video-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Glowing Border Animation (Updated to Green) */
@keyframes glow {
  from {
    box-shadow: 
      0 0 20px rgba(74, 222, 128, 0.1),
      inset 0 0 20px rgba(0, 0, 0, 0.8);
    border-color: rgba(74, 222, 128, 0.3);
  }
  to {
    box-shadow: 
      0 0 40px rgba(74, 222, 128, 0.3),
      inset 0 0 10px rgba(0, 0, 0, 0.5);
    border-color: rgba(74, 222, 128, 0.8);
  }
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .popup-box {
    width: 90%;
    padding: 40px 25px;
  }
  
  .popup-box h2 {
    font-size: 22px;
  }
  
  .popup-box.large {
    width: 95%;
    padding: 30px 20px;
  }
  
  .popup-btn {
    padding: 14px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .popup-box {
    padding: 30px 20px;
  }
  
  .popup-video-frame {
    border-radius: 0;
  }
}