/* Service Page Specific Styles */
.services-hero {
  padding-top: var(--header-height-lg);
  background-repeat: no-repeat;
  background-position: right;
  --dark-charcoal-bg: #2f2f30;
  background-color: var(--dark-charcoal-bg);
}

.services-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.image-position-down {
  object-position: center 20%;
}

.services-hero .container {
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--container-py) 0;
}

.services-description {
  display: flex;
  gap: 31px;
  flex-direction: column;
}

.services-description a {
  width: fit-content;
}

.services-header {
  text-align: center;
  align-self: flex-start;
  box-sizing: border-box;
  max-width: 70%;
}

.btn-primary:hover {
  background-color: var(--primary-blue);
  color: var(--color-dark);
}

/* Technologies Section */
.technologies-section {
  background-color: var(--dark-gray-bg);
  width: 100%;
  padding: var(--container-py) 0;
}

.technologies-section:nth-child(odd) {
  background-color: var(--dark-charcoal-bg);
}

.technologies-section:nth-child(even) {
  background-color: var(--dark-gray-bg);
}
.technologies-section .container {
  margin: 0 auto;
  max-width: var(--container-width);
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tech-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.tech-card {
  display: flex;
  gap: 30px;
}

.tech-card-content {
  display: grid;
  grid-template-columns: 250px 2fr;
  gap: 30px;
}

.tech-card i {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-family: "Alexandria", sans-serif;
}

.process-section {
  width: 100%;
  padding: var(--container-py);
  background-color: var(--dark-charcoal-bg);
}

.process-section .container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Timeline Styles */
.timeline {
  position: relative;
  max-width: var(--container-width);
  margin: 100px auto 0;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background-color: var(--primary-blue);
  top: 15px;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  z-index: 0;
}

.timeline-container {
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-container.left {
  left: 0;
  padding-top: 10px;
  padding-bottom: 80px;
  padding-right: 80px;
}

.timeline-container.right {
  left: 50%;
  padding-top: 10px;
  padding-bottom: 80px;
  padding-left: 80px;
}

.timeline-container::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: white;
  border: 4px solid var(--primary-blue);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-container.right::after {
  left: -16px;
}

.timeline-container.right {
  text-align: left;
}

.timeline-content {
  position: relative;
  border-radius: 6px;
}

.timeline-content h3 {
  margin: 0 0 10px 0;
  background-color: var(--dark-gray-bg);
  padding: 10px 15px;
  border-radius: 4px;
  position: relative;
  width: fit-content;
}

.timeline-container:nth-child(odd) .timeline-content h3 {
  float: right;
}

.timeline-container:nth-child(even) .timeline-content h3 {
  float: left;
}

.timeline-container.left .timeline-content h3::after {
  content: "";
  position: absolute;
  top: 22px;
  right: -15px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid var(--dark-gray-bg);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.timeline-container.right .timeline-content h3::after {
  content: "";
  position: absolute;
  top: 22px;
  left: -15px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-right: 15px solid var(--dark-gray-bg);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.timeline-content p {
  margin: 0;
  clear: both;
}

.timeline-container:nth-child(odd) .timeline-content p {
  text-align: right;
}

.timeline-container:nth-child(even) .timeline-content p {
  text-align: left;
}

/* Responsive Styles */
@media (max-width: 1158px) {
  .services-hero {
    padding-top: var(--header-height-xs) 0;
  }
  .tech-card-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 5px;
  }
  .services-hero .container,
  .technologies-section,
  .process-section {
    padding: var(--container-py) var(--container-px);
  }
}

@media screen and (max-width: 992px) {
  /* Move the main timeline bar to the left */
  .timeline::after {
    left: 31px;
  }

  .timeline-container {
    width: 100%;
    padding-bottom: var(--container-py);
  }

  .timeline-container.left,
  .timeline-container.right {
    left: 0;
    padding-right: 0;
    padding-left: 80px;
  }

  .timeline-container.left::after,
  .timeline-container.right::after {
    left: 15px;
  }

  .timeline-container:nth-child(odd) .timeline-content h3,
  .timeline-container:nth-child(even) .timeline-content h3 {
    float: none;
  }

  .timeline-container:nth-child(odd) .timeline-content p,
  .timeline-container:nth-child(even) .timeline-content p {
    text-align: left;
  }

  .timeline-container.left .timeline-content h3::after {
    border-left: 0;
    border-right: 15px solid var(--dark-gray-bg);
    left: -15px;
    right: auto;
  }
}

/* Fix for removing the tail on the last timeline item */

/* 1. Create the basic cover-up element for the last item */

.timeline-container:last-child::before {
  content: "";
  position: absolute;
  width: 6px; /* This must match the width of your timeline bar */

  /* IMPORTANT: This must be the background color of your section */
  background-color: var(--dark-charcoal-bg);
  opacity: 1;
  z-index: 1;
  /* Position it to start just below the circle */
  top: 25px;
  bottom: 0;

  /* Ensure it sits on top of the blue line */
  /* z-index: 2;  */
}

/* 2. Position the cover-up for the DESKTOP two-column view */
.timeline-container.left:last-child::before {
  right: -3px; /* Aligns it over the line on the right */
}
.timeline-container.right:last-child::before {
  left: -3px;
}

/* 3. Re-position the cover-up for the TABLET/MOBILE single-column view */
@media (max-width: 992px) {
  .timeline-container:last-child::before {
    left: 28px; /* Aligns with the 31px bar position */
    right: auto; /* Resets any positioning from the desktop rule */
  }
  .timeline-container.right:last-child::before {
    left: 28px;
  }
}

@media (max-width: 577px) {
  .services-hero img {
    height: 200px;
  }
  .tech-card {
    gap: 14px;
  }

  .process-section {
    padding-bottom: 0;
  }

  .services-hero .container,
  .technologies-section,
  .process-section {
    padding-top: var(--container-pt);
		padding-bottom: var(--container-pb);
  }

  .timeline-container.right:last-child::before {
    left: 28px;
  }
}

@media (max-width: 374px) {
  .timeline-container:last-child::before {
    width: 8px;
  }
  .timeline-container.right:last-child::before {
    left: 27px;
  }
}
