/* Mobile Styles - For screens up to 768px */

/* Prevent horizontal overflow on mobile */
body, html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ensure all sections don't overflow */
.technology-section,
.why-choose,
.service-container,
.contact-container,
.portfolio,
.main-section {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Mobile CTA Button */
.mobile-cta-btn {
  display: none;
  background: #3949ab;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
}

.mobile-cta-btn:hover {
  background: #1a237e;
}

  /* Mobile Contact Button */
  .mobile-contact-btn {
    display: none;
    background: #3949ab;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 20px auto;
    width: 200px;
  }

  /* Hide the standalone mobile contact button */
  .contact-container + .mobile-contact-btn {
    display: none;
  }

.mobile-contact-btn:hover {
  background: #1a237e;
}

/* Popup Forms - Only for mobile */
@media (max-width: 768px) {
  .popup-form {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }

  .popup-form.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .popup-form-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
  .popup-form-content::-webkit-scrollbar {
    display: none;
  }

  .close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 2001;
  }

  .close-popup:hover {
    color: #333;
  }

  .popup-nav {
    width: 48px;
    height: 48px;
    font-size: 32px;
    left: 8px;
    right: 8px;
    z-index: 10001;
  }
  .popup-prev {
    left: 8px;
  }
  .popup-next {
    right: 8px;
  }
}

/* Mobile Sticky Footer */
.mobile-sticky-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 15px;
  flex-direction: column;
  gap: 10px;
}

footer {
  padding-top: 2rem;

}

.pulse  {
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(38, 50, 143, 0.7);
    }
    70% {
      transform: scale(1.05);
      box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
  }

.mobile-footer-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.call-btn:hover {
  background: #3949ab;
  color: white;
  border-color: #3949ab;
}

.contact-btn {
  background: #3949ab;
  color: white;
  padding-top: 10px;
  padding-bottom: 10px;
}

.contact-btn:hover {
  background: #1a237e;
}

/* Review Section Mobile Styles */
@media (max-width: 768px) {
  .review-section {
    margin: 1rem 2rem; /* Match other mobile sections */
    padding: 20px 0;
  }
  
  .review-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px; /* 30px row gap, 20px column gap */
    justify-items: center;
    align-items: center;
  }
  
  .review-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .review-image {
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  /* Center the last item (5th item) */
  .review-item:last-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .review-section {
    margin: 1rem;
    padding: 15px 0;
  }
  
  .review-wrapper {
    gap: 40px 15px; /* 30px row gap, 15px column gap */
  }
  
  .review-image {
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  /* Consistent spacing for mobile view */
  .portfolio-section {
    padding: 40px 0;
  }

  .technology-section {
    padding: 40px 0;
  }

  .why-choose {
    padding: 40px 1rem;
  }

  .service-container {
    padding: 40px 10px;
  }

  .contact-section {
    padding: 40px 0;
    margin: 0;
  }

  .main-section {
    padding: 40px 10px;
  }

  /* Hide desktop forms and show mobile buttons */
  .desktop-form {
    display: none;
  }

  .mobile-cta-btn,
  .mobile-contact-btn {
    display: none;
  }

  /* Show mobile sticky footer */
  .mobile-sticky-footer {
    display: flex;
  }

  .contact-container {
    display: none;
  }

  /* Adjust hero section for mobile */
  .hero {
    flex-direction: column;
    margin: 1rem 2rem;
    text-align: center;
    padding-top: 2rem;
    min-height: 60vh; /* Reduced height */
    justify-content: center; /* Center content vertically */
  }

  .left-content {
    padding-right: 0;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .headline {
    font-size: 32px;
    text-align: center;
  }

  .sub-headline {
    font-size: 16px!important;
    text-align: center;
  }

  .mobile-cta-btn {
    align-self: center;
    margin-top: 0px;
  }

  /* Adjust logo for mobile */
  .logo img {
    height: 60px;
    width: 60px;
    margin: 0 2rem;
  }

  /* Make header non-sticky for mobile */
  .sticky-header {
    position: static;
    padding: 0.5rem 0;
  }

  /* Adjust home section height for mobile */
  .home {
    height: auto;
    min-height: 60vh; /* Reduced height */
  }

  /* Portfolio adjustments */
  .portfolio-section .common-heading h2 {
    font-size: 32px;
  }

  .swiper.portfolio-swiper {
    min-width: 200px;
    height: 300px;
  }

  .swiper-slide img {
    width: 350px;
    height: 350px;
    border-radius: 4px;
  }

  .portfolio-wrapper {
    max-width: 100%;
  }

  /* Technology section adjustments */
  .technology-section {
    position: relative;
    overflow: hidden;
  }

  .technology-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
  }

  .technology-body {
    flex-direction: column;
    position: relative;
    z-index: 1;
    margin: 1rem 2rem;
  }

  .stack-section {
    width: 100%;
  }

  .technology-stack-image {
    display: none; /* Hide the image container completely */
  }

  .stack-category h2{
    text-align: center;
    position: relative;
    z-index: 2;
    /* background: rgba(255, 255, 255, 0.9); */
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 1rem;
  }

  .technology-body{
    margin: 1rem;
  }

  /* Ensure section title is visible */
  .technology-section .sub-heading {
    position: relative;
    z-index: 2;
    /* background: rgba(255, 255, 255, 0.9); */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 2rem;
  }

  /* Technology grid - 3 cards per row */
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    position: relative;
    z-index: 2;
  }

  .tech-item {
    padding: 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
  }

  .tech-item img {
    max-width: 80%;
    margin-bottom: 8px;
  }

  .stats{
    margin: 1rem;
    gap: 30px 10px;
    flex-direction: column;
  }

  .tech-item p {
    font-size: 12px;
  }

  /* Services grid adjustments - 2 columns per row */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

  .service-item {
    padding: 20px;
  }

  .service-title {
    font-size: 16px;
  }

  .service-description {
    font-size: 14px;
  }

  /* Contact section adjustments for mobile */
  .contact-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    padding: 0 1rem;
    max-width: 100%;
    overflow: hidden;
  }

  /* Hide contact form on mobile */
  .contact-form {
    display: none;
  }

  /* Show only contact-info on mobile */
  .contact-info {
    width: 100%;
    max-width: 100%;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .contact-info .section-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
  }

  .contact-info .office-location {
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .contact-info .office-title {
    color: #3949ab;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .contact-info .office-address {
    color: #666;
    line-height: 1.6;
  }

  /* Style the mobile contact button inside contact-info */
  .contact-info .mobile-contact-btn {
    display: block;
    margin: 2rem auto 0;
    width: 200px;
  }

  .contact-container {
    padding: 2rem 0;
    /* width: 100%; */
    max-width: 100vh;
    overflow: hidden;
  }

  /* Footer adjustments */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-left{
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;     /* Center horizontally */
    justify-content: center; /* Optional: Center vertically if needed */
    text-align: center;
    /* width: 100%; */
  }
  .footer-left .logo {
    align-self: center;
    background: #fff;
  }
  .footer-right {
    justify-content: center;
  }

  /* Roadmap adjustments for mobile */
  .roadmap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Hide module canvases on mobile */
  .modules-canvas {
    display: none;
  }

  /* Hide roadmap modules on mobile */
  .roadmap-modules {
    display: none;
  }

  /* Make content columns take full width and center them */
  .roadmap-content {
    width: 100%;
    margin: 0;
    padding: 0 1rem;
    max-width: 800px; /* Limit width for better readability */
  }

  .roadmap__box--content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
  }

  .roadmap__box--content .content {
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
  }

  /* Why choose section adjustments */
  .reasons {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1rem;
    margin-bottom: 5rem;
  }

  /* .stats div {
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  } */

  .reasons article {
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
  }

  .stats div {
    text-align: center;
  }


  .modules-canvas {
    width: 280px;
    height: 430px;
  }

  .modules-circle {
    width: 130px;
    height: 130px;
  }

  .modules-text {
    font-size: 14px;
  }

  .module-card {
    width: 80px;
    height: 80px;
  }

  .icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .hero {
    margin: 1rem 1rem;
    min-height: 50vh; /* Even smaller height for very small screens */
    max-width: 100%;
    overflow: hidden;
  }

  .logo img {
    margin: 0 1rem;
  }

  .headline {
    font-size: 28px;
  }

  .sub-headline {
    font-size: 14px;
  }

  .mobile-cta-btn,
  .mobile-contact-btn {
    width: 100%;
    max-width: 300px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }

  .popup-form-content {
    padding: 20px;
    width: 95%;
    max-width: 95%;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .form-group {
    width: 100%;
  }

  .mobile-footer-btn {
    font-size: 28px;
    padding: 12px;
    height: 70px;
    bottom: 0;
  }

  /* Portfolio card adjustments */
  .card {
    min-width: 200px;
    height: 300px;
  }

  /* Technology grid adjustments - 2 columns for very small screens */
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 0px;
  }

  .tech-item {
    padding: 20px 5px;
    /* width: 80%; */
  }

  .tech-item img {
    width: 50px;
    height: 50px;
  }

  .tech-item p {
    font-size: 11px;
  }

  /* Services grid for very small screens - 1 column */
  .services-grid {
    margin: 1rem;
  }

  .service-item {
    padding: 15px;
  }

  .service-title {
    font-size: 14px;
  }

  .service-description {
    font-size: 12px;
  }

  /* Contact form adjustments */
  .contact-container {
    padding: 2rem 1rem;
    max-width: 100%;
    overflow: hidden;
    margin: 0 1rem;
  }

  .contact-section {
    padding: 40px 0.5rem;
    max-width: 100%;
    overflow: hidden;
    box-shadow: none;
  }

  .office-location {
    margin-bottom: 1.5rem;
  }

  .office-title {
    font-size: 16px;
  }

  .office-address {
    font-size: 14px;
  }

  .submit-btn {
 width: 100%!important;
}

  /* Roadmap adjustments for very small screens - 1 column */
  .roadmap__box--content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .roadmap__box--content .content {
    padding: 12px;
  }

  .roadmap__box--content .title {
    font-size: 14px;
  }

  .roadmap__box--content .text {
    font-size: 12px;
  }
}

/* Ensure body has proper padding for mobile sticky footer */
@media (max-width: 768px) {
  body {
    padding-bottom: 80px; /* Increased padding to account for stacked buttons */
  }
}
