:root {
  --color-main: #423625;
  --color-back01: #f0e9dc;
  --color-back02: #faf5ec;
  --main-text-click: #a2762f;
  --font-sans: "SVN-Gilroy", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*{
  padding: 0;
  margin: 0;
  font-family: var(--font-sans);
}

html, body{
  width: 100%;
  overflow-x: hidden;
}

#service_header{
  padding-top: 25%;
  background-color: var(--color-back01);
  position: relative;
}

#service_header span{
  display: flex;
  flex-direction: row;
  position: absolute;
  top: 52px;
  left: 100px;
  z-index: 2; 
  align-items: center;
}

#service_header a{
  text-decoration: none;
  font-weight: 400;
  font-size: 17px;
  color: var(--color-main);
}

#service_header a:hover{
  color: var(--main-text-click);
  border-bottom: 1px solid var(--main-text-click);
  transform: translateY(-1px);
}

.service_text{
  position: absolute;
  text-align: center;
  bottom: 100px;
  width: 100%;
  padding: 0 16px;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.service_text h2{
  font-weight: 700;
  font-size: 35px;
  color: var(--color-main);
}

.service_text div{
  font-weight: 300;
  font-size: 16px;
  margin-top: 13px;
  line-height: 1.2;
}

.service_text p{
  color: var(--color-main);
  font-weight: 400;
}

#service_content{
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
  background-color: var(--color-back02);
}

#service_content img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.decs{
  min-height: 360px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.decs h3{
  color: var(--main-text-click);
  font-size: 24px;
  text-align: center;
  padding-bottom: 15px;
}

.decs ul{
  padding-left: 25px;
  width: 80%;
}

.decs li{
  color: var(--color-main);
  font-size: 18px;
}

#steps{
  background-color: var(--color-back01);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 50px;
  padding: 50px 0px;
}

#steps h2{
  color: var(--color-main);
  font-size: 28px;
  padding: 0 16px; 
  text-align: center;
}

.steps_content{
  display: flex;
  flex-direction: row;
  gap: 30px;
  padding: 0 16px; 
  align-items: flex-start;
}

.img_box{
  width: 400px;
  height: 460px;
  border-radius: 24px;
  overflow: hidden;
  margin-right: 20px;
  flex: 0 0 auto;
}

.img_box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step_line{
  flex: 0 0 auto;
}

.step_line img{
  width: 78%;
  height: 90%;
  padding-top: 2px;
  display: block;
}

.steps_text{
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.content{
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.content p{
  color: var(--color-main);
  font-size: 13px;
  font-weight: 400;
}

.content h3{
  color: var(--color-main);
}

#up_footer{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  text-align: center;
  background-color: var(--color-back02);
  padding: 30px 100px;
  gap: 0;
}

#up_footer .section_footer{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 110%;
  margin: 0 auto;
}

#up_footer .section_footer p{
  color: var(--color-main);
  font-size: 16px;
  line-height: 1.35;
}

#up_footer .section_footer strong{
  color: var(--color-main);
}

.divider{
  width: 1px;
  height: 80px;
  background-color: var(--main-text-click);
  justify-self: center;
}



@media (max-width: 1200px){
  #service_header span{
    left: 40px;
    top: 72px;
  }

  #up_footer{
    padding: 30px 40px;
  }

  #up_footer img{
    padding-left: 60px;
  }
}

/* Tablet */
@media (max-width: 992px){
  /* Header */
  #service_header{
    padding-top: 40%;
  }

  #service_header span{
    left: 16px;
    top: 16px;
    max-width: calc(100% - 32px);
    font-size: 13px;
    flex-wrap: wrap;
  }

  .service_text{
    bottom: 12%;
    padding: 0 16px;
  }

  .service_text h2{
    font-size: clamp(24px, 4vw, 35px);
  }

  .service_text div{
    font-size: 14px;
    line-height: 1.4;
  }

  /* Service content: từ 2 cột xuống 1 cột, căn đều theo từng block */
  #service_content{
    display: flex;
    flex-direction: column;
  }

  /* block thứ 2 đảo lại: ảnh trên, text dưới cho cân */
  #service_content:nth-of-type(2){
    flex-direction: column-reverse;
  }

  /* đảm bảo phần mô tả không quá cao khi xuống 1 cột */
  .decs{
    min-height: auto;
    padding: 32px 16px;
  }

  .decs ul{
    width: min(520px, 92%);
  }

  /* Steps: cho wrap để không tràn */
  .steps_content{
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .img_box{
    width: min(420px, 92vw);
    height: auto;
    aspect-ratio: 4 / 5;
    margin-right: 0;
  }

  /* line giữa: ẩn trên tablet để layout gọn, không phá bố cục (desktop vẫn giữ) */
  .step_line{
    display: none;
  }

  .steps_text{
    gap: 26px;
    max-width: 720px;
  }

  /* Up footer: chuyển từ 5 cột -> 1 cột gọn gàng (vẫn giữ nội dung, màu sắc) */
  #up_footer{
    grid-template-columns: 1fr;
    padding: 28px 16px;
    gap: 18px;
  }

  #up_footer img{
    padding-left: 0;
    margin: 0 auto;
    width: 140px;
    height: auto;
  }

  #up_footer .section_footer{
    width: 100%;
  }

  #service_header span{
    left: 24px;
    top: 24px;
    max-width: calc(100% - 48px);
    font-size: 13px;
    flex-wrap: wrap;
  }
}

/* Mobile */
@media (max-width: 768px){
  /* Mobile: ẩn breadcrumb */
  #service_header span{
    display: none;
  }

  #service_header{
    padding-top: 55%;
  }

  .service_text{
    bottom: 14%;
  }

  .service_text h2{
    font-size: clamp(22px, 5vw, 30px);
  }

  .decs h3{
    font-size: 20px;
  }

  .decs li{
    font-size: 16px;
    line-height: 1.4;
  }

  #steps{
    gap: 28px;
  }

  #steps h2{
    font-size: 22px;
  }

  .content p{
    font-size: 12px;
  }

  #service_header span{
    left: 16px;
    top: 16px;
    font-size: 11px;
    max-width: calc(100% - 32px);
    flex-wrap: wrap;
  }

  .service_text{
    padding: 0 16px;
  }
}

/* iPhone 12 & breadcrumb scale */
@media (max-width: 430px){
  #service_header span{
    left: 12px;
    top: 12px;
    font-size: 11px;
    max-width: calc(100% - 24px);
    flex-wrap: wrap;
  }

  .service_text{
    padding: 0 12px;
  }
}

/* Thiết bị cảm ứng: bỏ hover transform để khỏi “nhảy” */
@media (hover: none){
  #service_header a:hover{
    transform: none;
  }
}

/* iPhone 12 & màn nhỏ hơn (~390px) */
@media (max-width: 430px){
  /* Header dịch vụ */
  #service_header{
    padding-top: 80%;
  }

  .service_text{
    bottom: 12%;
    padding: 0 14px;
  }

  .service_text h2{
    font-size: clamp(20px, 5.6vw, 26px);
  }

  .service_text p{
    font-size: 14px;
  }

  #service_header span{
    left: 12px;
    top: 35px;
    font-size: 14px;
  }

  #service_header a{
    font-size: 14px;
  }

  /* Nội dung dịch vụ */
  .decs ul{
    width: min(480px, 94%);
  }

  .decs li{
    font-size: 15px;
    line-height: 1.5;
  }

  /* Quy trình 5 bước */
  #steps{
    padding: 36px 0 40px;
  }

  #steps h2{
    font-size: 20px;
  }

  .steps_content{
    padding: 0 14px;
  }

  .img_box{
    width: 100%;
    max-width: 360px;
  }
  .divider{
    height: 1px;
    width: 50px;
  }
}
