.services {
  width: 100%;
  background-color: var(--mesana-white);
  position: relative;
  z-index: 2;
}

.services-container {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 100px 82px;
}

.services-header {
  text-align: center;
  margin-bottom: 60px;
}

.services-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--mesana-cream);
  color: var(--mesana-red);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
}

.services-label.in-view {
  animation: fadeIn 0.8s ease-out 0.2s forwards;
}

.services-title {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--mesana-red);
  margin-bottom: 16px;
}

.services-title-line {
  display: inline-block;
  opacity: 0;
}

.services-title-line.in-view {
  animation: fadeIn 0.8s ease-out 0.4s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.services-title-normal {
  font-weight: 400;
  font-style: normal;
}

.services-title-italic {
  font-family: 'PT Serif Italic', serif;
  font-weight: 400;
  font-style: italic;
}

.services-title-italic-span {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 48px;
  font-style: normal;
  color: var(--mesana-red);
}

.services-subtitle {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--mesana-black);
  max-width: 632px;
  margin: 0 auto;
  opacity: 0;
}

.services-subtitle.in-view {
  animation: fadeIn 0.8s ease-out 0.6s forwards;
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  padding: 40px 0;
  align-items: start;
  position: relative;
}

/* Animated border - top */
.service-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--mesana-red);
  transition: width 0.8s ease-out;
}

/* Animated border - bottom (only for last child) */
.service-row:last-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0.5px;
  background-color: var(--mesana-red);
  transition: width 0.8s ease-out;
  transition-delay: 0.2s;
}

/* Reveal animation */
.service-row.reveal::before {
  width: 100%;
}

.service-row:last-child.reveal::after {
  width: 100%;
}

.service-title {
  font-family: 'Libre Franklin Regular', sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--mesana-red);
  line-height: 1.3;
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.service-description {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--mesana-black);
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

/* Fade in text after border animation */
.service-row.reveal .service-title,
.service-row.reveal .service-description {
  opacity: 1;
  transition-delay: 0.4s;
}

.bottom-gradient-services {
  position: absolute;
  text-align: center;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 80px;
  z-index: -1;
  background: linear-gradient(rgba(254, 249, 239, 0) 0%, rgba(254, 249, 239, 0.3) 40%, rgba(254, 249, 239, 1) 95%);
}

@media (max-width: 968px) {
  .services-container {
    padding: 60px 82px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .services-title {
    font-size: 36px;
  }

  .service-title {
    font-size: 24px;
  }

  .services-title-italic-span {
    font-size: 36px;
  }

  .services-header {
    margin-bottom: 32px;
  }
}

@media (max-width: 768px) {
  .services-container {
    padding: 40px 20px;
  }

  .services-label {
    margin-bottom: 12px;
  }

  .services-title {
    font-size: 32px;
    width: 66%;
    margin: 0 auto;
  }

  .services-subtitle {
    font-size: 16px;
    width: 80%;
  }

  .service-title {
    font-size: 20px;
    margin-bottom: 0;
  }

  .service-description {
    font-size: 12px;
  }

  .services-title-italic-span {
    font-size: 32px;
  }

  .services-header {
    margin-bottom: 32px;
  }

  .service-row {
    padding: 20px 0;
  }
}

