/* Hero Section */
.hero {
  background: linear-gradient(rgba(11, 19, 43, 0.85), rgba(28, 28, 28, 0.85)),
              url('../services/images/ECSB.JPG') no-repeat center center/cover;
  height: 400px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  color: #00F5D4;
  text-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

/* Content Section */
.content-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  gap: 20px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-in-out;
}

.content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.content-section .text {
  flex: 1;
  max-width: 50%;
  transform: translateX(-100%);
  transition: transform 0.8s ease-in-out;
}

.content-section .text.visible {
  transform: translateX(0);
}

.content-section .text h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #6C63FF; /* Purple accent */
}

.content-section .text p {
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
  color: #333;
}

.content-section .image {
  flex: 1;
  max-width: 50%;
  transform: translateX(100%);
  transition: transform 0.8s ease-in-out;
}

.content-section .image.visible {
  transform: translateX(0);
}

.content-section .image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Intro Section */
.intro-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background-color: #0B132B; /* Dark background */
  color: #e0e0e0;
}

.intro-section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #00F5D4; /* Aqua */
}

.intro-section p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 600px;
}

/* Services Section */
.services-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 50px;
  justify-content: center;
  align-items: center;
}

.service-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, height 0.3s ease;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.service-card:hover {
  transform: scale(1.05);
  height: 500px;
  z-index: 10;
}

.service-card .image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.service-card .image-container img.active {
  opacity: 1;
}

.service-card:hover .image-container img.active {
  transform: scale(1.1);
}

.service-card h3 {
  position: absolute;
  bottom: 10px;
  width: 100%;
  font-size: 20px;
  color: #fff;
  margin: 0;
  text-align: center;
  background: rgba(108,99,255,0.9); /* Purple overlay */
  padding: 8px 0;
  z-index: 5;
}

.service-card .description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(11,19,43,0.95);
  color: #e0e0e0;
  font-size: 16px;
  text-align: justify;
  line-height: 1.6;
  padding: 15px;
  display: none;
  z-index: 10;
}

.service-card:hover .description {
  display: block;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .content-section {
    flex-direction: column;
  }

  .content-section .text {
    max-width: 100%;
    order: 1;
  }

  .content-section .image {
    max-width: 100%;
    order: 2;
  }

  .content-section .text h2 {
    font-size: 30px;
    text-align: center;
  }

  .content-section .text p {
    font-size: 14px;
  }

  .intro-section h2 {
    font-size: 30px;
  }

  .intro-section p {
    font-size: 14px;
  }

  .service-card .description {
    font-size: 14px;
  }
}

@media screen and (max-width: 1024px) {
  .services-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .services-container {
    grid-template-columns: 1fr;
  }

  .service-card {
    height: 300px;
  }

  .service-card:hover {
    height: 400px;
  }

  .service-card h3 {
    font-size: 16px;
  }

  .service-card .description {
    font-size: 12px;
  }
}
