/* Mobile popup styles */
#mobile-view-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-view-popup.show {
  opacity: 1;
}

#mobile-view-popup.fade-out {
  opacity: 0;
}

.mobile-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mobile-popup-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(96, 165, 250, 0.3);
  border-radius: 20px;
  padding: 30px 25px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.mobile-popup-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.mobile-popup-title {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.mobile-popup-message {
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 25px;
}

.mobile-popup-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.mobile-popup-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  /* Disable 3D background on mobile */
  #vanta-bg {
    display: none !important;
  }

  /* Fix hero section padding and content width */
  #home {
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: hidden;
    width: 100%;
  }

  /* Adjust typography for mobile */
  #name-heading {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
  
  h2.text-4xl {
    font-size: 1.8rem !important;
    line-height: 1.3;
  }
  
  .typewriter {
    white-space: normal !important;
    animation: none;
    border-right: none;
  }
  
  /* Fix paragraph width */
  #home p {
    max-width: 100%;
    width: 100%;
  }
  
  /* Fix buttons */
  #home .flex.flex-wrap.gap-4 {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  #home .flex.flex-wrap.gap-4 a {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
  }
  
  /* Add padding to all sections */
  .section-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* Fix project cards */
  .project-card {
    width: 100%;
  }
  
  /* Fix modal on mobile */
  #project-modal-content {
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
  }
  
  /* Maintain aspect ratio in modal gallery on mobile */
  .modal-gallery-main {
    aspect-ratio: 16 / 9 !important; /* Force 16:9 aspect ratio */
    width: 100% !important;
    height: auto !important;
  }
  
  /* Adjust spacing for modal content */
  .modal-gallery-thumbs {
    height: 60px;
  }
  
  /* Ensure thumbnails maintain aspect ratio */
  .modal-gallery-thumbs .swiper-slide {
    aspect-ratio: 16 / 9;
    height: 100%;
  }
  
  /* Hide navigation arrows on mobile devices */
  .gallery-navigation,
  .swiper-button-next,
  .swiper-button-prev,
  .main-gallery-nav,
  .tech-swiper-button-prev,
  .tech-swiper-button-next {
    display: none !important;
  }
  
  /* Adjust padding for containers that had navigation arrows */
  .modal-gallery-thumbs-container {
    padding: 0 !important; /* Remove padding that was for navigation arrows */
  }
  
  /* Testimonials responsive */
  .testimonials-wrapper {
    padding: 1rem 0;
  }
  
  .testimonials-track {
    gap: 1rem;
    animation-duration: 40s;
  }
  
  .testimonial-card-scroll {
    min-width: 280px;
    max-width: 280px;
    padding: 1.25rem;
  }
  
  .testimonial-card-scroll h4 {
    font-size: 0.95rem;
  }
  
  .testimonial-card-scroll p {
    font-size: 0.85rem;
  }
}