* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif; /* Ensuring Roboto font is being used */
}

.fences-painting-section {
  background: url('services BG.jpg') no-repeat center center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: white;
  flex-wrap: wrap; /* Allow wrapping for mobile devices */
}

.image-container {
  flex: 1;
  max-width: 37%; /* Slightly reduce the size */
  padding-right: 20px;
}

.fences-image {
  width: 100%; /* Slightly reduce the image width */
  height: auto;
  object-fit: cover;
}

.content-container {
  flex: 1;
  padding: 40px;
  max-width: 1190px;
  text-align: left;
}

.title {
  font-size: 56px; /* Increased font size */
  font-weight: 700;
  margin-bottom: 80px;
  background-color: white;
  color: #000;

  padding: 12px 24px;
  border-radius: 10px;
  text-align: right;
  position: relative;
  top: 30px; /* Adjusted top position */
  right: -550px;
  text-transform: uppercase;
  width: fit-content; /* Adjust width to fit the content */
}

.description {
  font-size: 33px; /* Increased font size */
  margin-bottom: 30px;
  line-height: 1.8;
  font-weight: normal;
}

.learn-more-btn {
  padding: 12px 24px;
  font-size: 18px;
  background-color: #9e2a2b;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
  background-color: #6e1f1e;
}


.back-button {
  position: absolute;
  top: 20px;
  left: 40px;
  background-color: transparent;  /* Remove background color */
  color: white;  /* Arrow is white */
  font-size: 24px;
  border: 2px solid white;  /* White border */
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;  /* Transition for smooth change */
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button:hover {
  background-color: #9e2a2b;  /* Red background on hover */
  color: white;  /* Keep arrow white */
  border: 2px solid #9e2a2b;  /* Red border on hover */
}



/* Responsive Styles for smaller devices */
@media screen and (max-width: 768px) {
  .fences-painting-section {
    flex-direction: column; /* Stack the content vertically */
    justify-content: flex-start;
    height: auto;
    padding: 20px 0;
  }

  .image-container {
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 20px; /* Add spacing between the image and text */
  }

  .content-container {
    flex: none;
    max-width: 100%;
    padding: 20px;
    text-align: center;
  }

  .title {
    font-size: 36px; /* Decrease font size for small screens */
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    right: 0;
    width: 100%;
  }

  .description {
    font-size: 22px; /* Decrease font size for small screens */
    margin-bottom: 20px;
  }

  .back-button {
    top: 10px;
    left: 10px;
    font-size: 20px;
    width: 40px;
    height: 40px;
  }

  .learn-more-btn {
    font-size: 16px; /* Decrease font size for small screens */
  }
}