.imageSlider {
  width: 100%;
  margin: auto;
  box-sizing: border-box;
}

.imageSlider_Block {
  width: 100%;
  margin: auto;
  box-sizing: border-box;
  max-width: 1280px;
  color: #000000;
}

.imageSlider_Column {
  position: relative;
  display: flex;
  flex-direction: column; /* Arrange children in a column */
  justify-content: center; /* Center children vertically */
  align-items: flex-start; /* Align children to the left horizontally */
  height: 100%;
}

.imageSlider_Block > p {
  margin: 0;
  color: var(--Hjortron);
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  margin-bottom: 15px;
}

.imageSlider_Block > h2 {
  margin: 0;
  color: var(--Svart);
  font-family: "Raleway", sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 40px;
}

.slider-container {
  position: relative;
  width: 100%;
  margin: auto;
  overflow: hidden;
}

.slides-wrapper {
  transition: transform 0.5s ease-in-out;
}

.slide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.slide-column {
  display: flex;
  flex-direction: column; /* Stack the content vertically */
  justify-content: space-between; /* Space between header/text and controls */
  height: 100%; /* Make sure the container takes full height */
}

.slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

.slide-content h3 {
  color: var(--Svart);
  font-family: "Raleway", sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  margin-top: 45px;
}

.slide-content p {
  color: var(--Svart);
  font-family: "WixMadeforText", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.slider-controls {
  position: relative;
  bottom: 0;
  width: 100%;
  display: inline-flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.slider-controls::after {
  content: "";
  display: block;
  width: 100%; /* Twice the width of the text */
  height: 1px; /* Height of the line */
  background-color: var(--Svart); /* Same color as the button */
  margin: 20px auto 0; /* Space between the button and the line */
  position: absolute;
  left: 0px; /* Centers the line under the button */
  bottom: -20px; /* Adjusts the distance of the line below the button */
}

.slider-counter {
  display: inline-flex;
  align-items: end;
}

.slider-counter p:first-child {
  color: var(--Svart);
  font-family: "Raleway", sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
  margin: 0;
}

.slider-counter span {
  color: var(--Svart);
  font-family: "Raleway", sans-serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 200;
  line-height: 25px;
  margin: 0;
  margin-left: 5px;
}

.slider-counter p:last-child {
  color: var(--Svart);
  font-family: "Raleway", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin: 0;
}

.slider-buttons {
  display: inline-flex;
}

.slider-controls button {
  background-color: transparent;
  color: #fff;
  border: none;
  padding: 0px;
  cursor: pointer;
  margin-left: 10px;
}

/* Adjust for tablets */
@media (max-width: 1024px) {
  .imageSlider_Block {
    max-width: 95%; /* Reduce max width slightly for better fit */
  }

  .imageSlider_Block > h2 {
    font-size: 36px; /* Slightly smaller font size for tablets */
    margin-bottom: 30px; /* Adjust spacing */
  }

  .imageSlider_Block > p {
    font-size: 14px; /* Adjust paragraph font size for readability */
    margin-bottom: 10px; /* Adjust spacing */
  }

  .slide {
    grid-template-columns: 1fr; /* Switch to single column layout */
    gap: 20px; /* Reduce gap between items */
  }

  .slide img {
    height: 300px; /* Adjust image height for tablets */
  }

  .slide-content h3 {
    font-size: 22px; /* Slightly smaller font size for heading */
    margin-top: 30px; /* Adjust spacing */
  }

  .slider-controls {
    gap: 10px; /* Add spacing between controls */
  }

  .slider-controls::after {
    margin-top: 10px; /* Adjust line margin */
  }

  .slider-counter p:first-child {
    font-size: 36px; /* Reduce counter font size for tablets */
  }

  .slider-counter span {
    font-size: 24px; /* Adjust font size for smaller screens */
  }

  .slider-counter p:last-child {
    font-size: 18px; /* Adjust additional text font size */
  }
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
  .imageSlider_Block {
    max-width: 90%; /* Further reduce max width for mobile */
    padding: 0 10px; /* Add padding for small screens */
  }

  .imageSlider_Block > h2 {
    font-size: 28px; /* Smaller font size for mobile */
    margin-bottom: 20px; /* Adjust spacing */
  }

  .imageSlider_Block > p {
    font-size: 12px; /* Reduce font size for better fit */
    margin-bottom: 10px;
  }

  .slide {
    grid-template-columns: 1fr; /* Single column layout remains */
    gap: 10px; /* Reduce gap further */
  }

  .slide img {
    height: 200px; /* Further adjust image height for mobile */
  }

  .slide-content h3 {
    font-size: 18px; /* Smaller heading font size */
    margin-top: 20px; /* Adjust spacing */
  }

  .slide-content p {
    font-size: 14px; /* Reduce paragraph font size */
  }

  .slider-controls {
    gap: 5px; /* Smaller gap for compact layout */
  }

  .slider-controls::after {
    margin-top: 5px; /* Adjust spacing for the line */
  }

  .slider-counter p:first-child {
    font-size: 30px; /* Further reduce font size for mobile */
  }

  .slider-counter span {
    font-size: 20px; /* Adjust font size */
  }

  .slider-counter p:last-child {
    font-size: 16px; /* Adjust additional text font size */
  }
}
