.career-section {
  background-image: url('/images/double_transmission_towers.jpg');
  background-size: cover;
}

/* Main container for the scrolling section */
.main-content-container {
  display: flex;
  justify-content: center; /* Center the content and arrows */
  align-items: center; /* Center vertically */
  position: relative;
}

/* The arrows (left and right) */
.scroll-arrow {
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10; /* Ensure arrows are above content */
  transition: background-color 0.3s ease;
}

/* Main content scroll container styles */
.main-content {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  scroll-snap-type: x mandatory;
  min-height: 50vh;
  max-width: 100%;
  white-space: nowrap;
}

/* Card content */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 300px;
  margin: 2% 0 2% 0;
  padding: 0 0 50px 0;
  /* background: linear-gradient(to bottom, #ffffff, #dcdcdc); */
  background: radial-gradient(circle, #f0f0f0, #e0e0e0);
  border-radius: 8px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: auto;
  max-height: 100%;
  min-width: 25%;
  max-width: 25%;
  position: relative;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Image inside each card */
.card-content img {
  width: 100%;
  height: 25%;
  padding: 20px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* Heading inside each card */
.card-content h1 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  white-space: normal;
  position: relative;
  transition: opacity 0.3s ease;
}

.card-text-box {
  margin: 0 5% 0 7%;
}

/* Paragraph inside each card */
.card-content p {
  font-size: 1rem;
  margin: 0 2% 0 0;
  text-align: left;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: normal;
  position: absolute;
  /* width: 100%; */
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s, top 0.3s ease,
    left 0.3s ease;
}

/* Show the paragraph and hide the heading when the card is hovered */
.card-content:hover h1 {
  opacity: 0;
}

.card-content:hover p {
  opacity: 1;
  visibility: visible;
  top: 25%;
  left: 10px;
  transition: opacity 0.3s ease, visibility 0s 0s, top 0.3s ease, left 0.3s ease;
}

.button-box {
  margin: 0 0 5% 0; /* top | right | bottom | left */
}

.button-box button {
  background-color: #b0b0b0;
  border-radius: 5px;
  padding: 5px 15px;
}
#sub-title h1 {
  font-size: 0.75rem;
}

#link-text {
  font-size: 1.2rem;
}

@media (max-width: 850px) {
  .main-content {
    margin-left: 10%;
  }

  .card-content {
    min-width: 80%;
    max-width: 80%;
  }

  .card-text-box h1,
  .card-text-box #sub-title {
    display: none; /* Hide the h1s on mobile */
  }

  .card-content .card-text-box p {
    display: block !important;
    visibility: visible;
    opacity: 1;
  }
}
