.hero {
  padding: 80px 20px;
  max-width: 1640px;
  margin: 0 auto;
  background: #fff;
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 0px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.service-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 0;
  text-align: center;
  transition: transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  color: var(--primary-color);
  margin: 25px 20px 15px;
  font-size: 1.4rem;
  line-height: 1.3;
}

.service-card p {
  padding: 0 20px 30px;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.6;
}

.service-image {
  margin-bottom: 0;
  width: 100%;
  max-height: 369px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

/* Wider technology section keeps text embedded in the graphics readable. */
.technologies {
  max-width: 1920px;
  padding-left: 24px;
  padding-right: 24px;
}

.technologies .services-grid {
  gap: 24px;
}

.technologies .service-card h3 {
  font-size: 1.65rem;
}

.technologies .service-card p {
  font-size: 1.2rem;
}

@media (min-width: 769px) and (max-width: 1200px) {
  .technologies .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Technology illustrations are square: show the whole graphic without cropping. */
.technologies .service-image {
  max-height: none;
  aspect-ratio: 1;
}

.technologies .service-image img {
  display: block;
  object-fit: contain;
}

.technologies .technology-zoom-image {
  cursor: zoom-in;
}

.technologies .technology-zoom-image:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: -6px;
}

.technology-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.technology-image-modal.active {
  display: flex;
}

.technology-image-modal img {
  max-width: min(96vw, 1254px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.technology-image-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--secondary-color);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.technology-image-modal-close:hover,
.technology-image-modal-close:focus-visible {
  background: var(--primary-color);
  color: #fff;
}

.technologies .service-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(230, 57, 70, .14), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #fffafb 100%);
  border: 1px solid rgba(230, 57, 70, .16);
  box-shadow: 0 10px 24px rgba(44, 62, 80, .10), 0 2px 0 rgba(230, 57, 70, .16);
  position: relative;
  transform: none;
}

.technologies .service-card::before {
  background: linear-gradient(90deg, var(--primary-color), #ff8991 55%, transparent);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 14px rgba(230, 57, 70, .5);
  content: '';
  height: 8px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 4;
}

.technologies .service-card h3 {
  position: relative;
}

.technologies .service-card h3::after {
  background: var(--primary-color);
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(230, 57, 70, .4);
  content: '';
  display: block;
  height: 4px;
  margin: 12px auto 0;
  width: 58px;
}

.technologies .service-card::after {
  background: radial-gradient(circle, rgba(230, 57, 70, .25) 0 4px, transparent 5px) 0 0 / 16px 16px;
  content: '';
  height: 96px;
  opacity: .85;
  pointer-events: none;
  position: absolute;
  right: -10px;
  top: 8px;
  transform: rotate(12deg);
  width: 120px;
  z-index: 3;
}

.technologies .service-card:hover,
.technologies .service-card:focus-within {
  box-shadow: 0 18px 34px rgba(44, 62, 80, .16), 0 3px 0 rgba(230, 57, 70, .28);
  transform: translateY(-6px);
}

.technologies .service-card:hover .service-image img,
.technologies .service-card:focus-within .service-image img {
  transform: scale(1.015);
}

.technologies .technology-inclusions {
  max-width: none;
  margin: 32px 0 24px;
  padding: 24px;
  background: #f7f8fa;
  border-left: 4px solid var(--primary-color);
  border-radius: 10px;
}

.technologies .technology-cta {
  display: inline-block;
  max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 40px 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 0;
  }
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}