/* General Styles */
body {
  background-color: #0d1117;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  color: white;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  background: linear-gradient(135deg, #0d1117 0%, #151922 100%);
}

/* Particle Background */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Hero Section */
.hero-section {
  padding: 80px 0;
  text-align: justify;
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 50px 20px 80px;
  position: relative;
  opacity: 1; /* Ensure the hero section is visible */
  visibility: visible; /* Ensure visibility */
  display: block; /* Ensure it's displayed */
}

.hero-content {
  position: relative;
  z-index: 1;
  opacity: 1; /* Ensure content is visible */
}

.section-title {
  font-size: 4rem;
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(77, 208, 225, 0.3);
}

.section-underline {
  height: 4px;
  width: 100px;
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  margin: 0 auto 30px;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(77, 208, 225, 0.5);
}

.section-underline.center {
  margin: 0 auto 40px;
}

.section-description {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  color: #ffffffdd; /* Slightly transparent white */
  text-align: justify; /* Ensure text is justified */
  text-justify: inter-word; /* Improve justification spacing */
}

/* Services Section */
.services-section {
  padding: 80px 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  position: relative;
  overflow: hidden;
}

.section-subtitle {
  font-size: 2.8rem;
  background: linear-gradient(90deg, #ffffff, #cccccc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  margin-bottom: 15px;
  font-weight: 600;
}

/* Tabs Styles */
.tabs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tab-navigation {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(77, 208, 225, 0.2);
}

.tab-button {
  background: none;
  border: none;
  color: #ffffffbb;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 15px 25px;
  cursor: pointer;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.tab-button:hover {
  color: #ffffff;
}

.tab-button.active {
  color: #4a90e2;
  border-bottom-color: #4a90e2;
}

.tab-content {
  padding: 20px 0;
}

/* Expanded content styles */
.expanded-content {
  width: 100%;
  display: none; /* Hide by default */
  background: linear-gradient(135deg, #22252b 0%, #2c2f33 100%);
  border-radius: 16px;
  padding: 40px 0;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(77, 208, 225, 0.3);
}

.expanded-content.active {
  display: block; /* Show when active */
}

.expanded-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
}

/* Two column layout for expanded content */
.expanded-info {
  flex: 1;
  padding: 20px 30px;
  min-width: 300px;
}

.expanded-images {
  flex: 1;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 300px;
}

.expanded-title {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 25px;
  position: relative;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(77, 208, 225, 0.3);
}

.expanded-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  border-radius: 3px;
}

.info-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #ffffffee;
  text-align: justify;
}

.service-list {
  margin-left: 5px;
  margin-bottom: 25px;
  list-style-type: none;
  padding-left: 5px;
}

.service-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 28px;
}

.service-list li i {
  color: #2970ff;
  margin-right: 10px;
  position: absolute;
  left: 0;
  top: 4px;
}

/* Image gallery in expanded view */
.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  transform: translateY(30px);
  opacity: 0;
}

.expanded-content.active .image-wrapper {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.2s;
}

.expanded-content.active .image-wrapper:nth-child(2) {
  transition-delay: 0.4s;
}

.expanded-content.active .image-wrapper:nth-child(3) {
  transition-delay: 0.6s;
}

.service-image {
  width: 100%;
  max-width: 500px;
  transition: transform 0.5s ease, filter 0.5s ease;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(13, 17, 23, 0.7),
    rgba(13, 17, 23, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper:hover .service-image {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.image-wrapper:hover .image-overlay {
  opacity: 1;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: linear-gradient(
    135deg,
    rgba(77, 208, 225, 0.1) 0%,
    rgba(77, 208, 225, 0.05) 100%
  );
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(77, 208, 225, 0.2);
}

.cta-title {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 30px;
}

.cta-button {
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  color: #181a20;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 15px 40px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
  position: relative;
  overflow: hidden;
}

.cta-button:after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 1s ease;
  opacity: 0;
}

.cta-button:hover {
  background: linear-gradient(135deg, #2970ff, #4a90e2, #2970ff);
  box-shadow: 0 8px 25px rgba(77, 208, 225, 0.7);
  transform: translateY(-5px) scale(1.05);
}

.cta-button:hover:after {
  left: 100%;
  opacity: 1;
}

/* Pulse animation for CTA button */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(77, 208, 225, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
  }
}

/* Animations */
.animate__animated {
  animation-duration: 1s;
}

.animate__fadeIn {
  animation-delay: 0.3s;
}

.animate__fadeInUp {
  animation-delay: 0.5s;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .service-card {
    width: calc(50% - 30px);
  }

  .section-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .service-card {
    width: 100%;
    max-width: 100%;
  }

  .expanded-wrapper {
    flex-direction: column;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .section-subtitle {
    font-size: 2.2rem;
  }

  .hero-section,
  .services-section,
  .cta-section {
    padding: 60px 0;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-button {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 2.5rem;
  }

  .section-subtitle {
    font-size: 1.8rem;
  }

  .card-title {
    font-size: 1.6rem;
  }

  .expanded-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 50px 15px;
  }

  .service-card {
    height: auto;
    min-height: 320px;
  }
}

/* Ensure smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Animation durations for smoother transitions */
.animate__animated {
  animation-duration: 0.8s !important;
}

/* Override existing transitions if needed */
.service-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.5s ease-out;
}

/* Override any existing transitions that might conflict */
.hero-section,
.services-section,
.cta-section {
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Enhance the fade effect with slight scale */
.fade-element:not(.active) {
  transform: scale(0.98);
}

.fade-element.active,
.fade-element:hover {
  transform: scale(1);
}

/* Ensure active elements are fully visible */
.service-card.active,
.expanded-content.active {
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: all 0.4s ease-out;
}

/* Ensure expanded content remains visible */
.expanded-content.active .expanded-wrapper,
.expanded-content.active .expanded-info,
.expanded-content.active .expanded-images,
.expanded-content.active .image-gallery {
  opacity: 1 !important;
}

/* Additional responsiveness improvements */
@media (max-width: 768px) {
  .fade-element {
    transition: opacity 0.3s ease-out; /* Faster transitions on mobile */
  }
}

/* Fixed animation keyframes */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes slideInFromBottom {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animation classes with improved implementation */
.slide-from-left {
  animation: slideInFromLeft 0.8s ease forwards;
}

.slide-from-right {
  animation: slideInFromRight 0.8s ease forwards;
}

.slide-from-bottom {
  animation: slideInFromBottom 0.8s ease forwards;
}

.slide-from-top {
  animation: slideInFromTop 0.8s ease forwards;
}

/* Ensure sections are properly positioned for animation */
.hero-section,
.services-section,
.cta-section,
.hero-content,
.section-subtitle,
.cta-container {
  position: relative;
  will-change: transform, opacity;
}

/* Animation durations */
.slide-from-left,
.slide-from-right,
.slide-from-bottom,
.slide-from-top {
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
}

/* Fix for card animations */
.service-cards .service-card {
  opacity: 1; /* Make cards initially visible */
}
