/* Bg Home Animate */
.bg-home1 {
  animation:slide 3s ease-in-out infinite alternate;
  background-image: linear-gradient(-60deg, #fff0e2 50%, #ffe295 50%, #ffe6b5 50%);
  bottom:0;
  left:-50%;
  opacity:.5;
  position:fixed;
  right:-50%;
  top:0;
  z-index:-1;
}

.bg-home2 {
  animation-direction:alternate-reverse;
  animation-duration:4s;
}

.bg-home3 {
  animation-duration:5s;
}
@keyframes slide {
  0% {
    transform:translateX(-25%);
  }
  100% {
    transform:translateX(25%);
  }
}


/* Text Headline */
.headline-container {
  position: relative;
  display: flex;
  gap: 4;
  padding-left: 0px;
}

.headline {
  font-weight: bold;
  font-size: 2rem !important;
  line-height: 0.28in;
  color: #0d0c1d;
  position: relative;
  z-index: 1;
}

/* เส้นแนวนอนล่าง — ความยาวเริ่มต้น: 124px */
.headline-container::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 124px;
  height: 4px;
  background: orange;
  transition: width 0.3s ease;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* เส้นแนวตั้งซ้าย */
.headline-container::after {
  /* content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 12px;
  height: 100%;
  background: orange;
  transition: height 0.3s ease;
  clip-path: polygon(0 0, 100% 50%, 0 100%); */
}

/* เมื่อ hover ให้เส้นหดลง (เหลือ 24px) */
.headline-container:hover::before {
  width: 24px;
}


.curved-box {
  position: relative;
  display: inline-block;
  padding-left: 0px;
  background-color: #fceddf; /* พื้นหลังตามภาพ */
}

.curved-text {
  font-weight: bold;
  font-size: 1.8rem;
  color: #0d0c1d;
  position: relative;
  z-index: 1;
}

/* สามเหลี่ยมโค้งมนด้านซ้าย */
.curved-box::before {
  /* content: "";
  position: absolute;
  left: 0;
  top: 10%;
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-right: 20px solid orange;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  clip-path: path("M0,0 Q10,20 0,40 L20,20 Z"); /* กำหนดให้โค้ง */
  background: orange; */
}

/* Curved of topic */
.curved-box::after {
  content: "";
  position: absolute;
  left: 0px;
  bottom: 0;
  height: 3px;
  width: 120px;
  background: orange;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* hover effect: เส้นล่างหดลง */
.curved-box:hover::after {
  width: 30px;
}



.arm-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: #fceddf;
  padding: 8px 16px;
}

.arm-shape {
  width: 50px;
  height: 50px;
  margin-right: 12px;
  transform: rotate(-45deg) translateY(4px);
  flex-shrink: 0;
}

.arm-text {
  font-weight: bold;
  font-size: 1.8rem;
  color: #0d0c1d;
  position: relative;
}

.arm-underline {
  position: absolute;
  left: 60px;
  bottom: 4px;
  height: 4px;
  width: 120px;
  background-color: orange;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.arm-container:hover .arm-underline {
  width: 30px;
}




/* Panel Branch */
.branch-container {
    /* background: #fff0e2; */
    min-height: 100vh;
    padding: 40px 0;
}

.branch-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
}

.branch-grid {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
}

.branch-row {
    display: inline-flex;
    gap: 1.5rem;
    width: max-content;
}

.branch-card {
    background: linear-gradient(135deg, #ffdb95 0%, #e6aa60 100%);
    border-radius: 0 20px 0 20px;
    padding: 1.5rem;
    color: white;
    text-align: center;
    /* box-shadow: 0 8px 25px rgba(255, 154, 86, 0.3); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: normal;
    /* width: 280px; */
    min-height: 320px;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    scroll-snap-align: start;
}

.branch-card:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 12px 35px rgba(255, 154, 86, 0.4); */
    color: white;
    text-decoration: none;
}

.branch-card:active {
    transform: translateY(-2px);
}

.branch-image {
    width: 100%;
    height: 180px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.branch-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}




/* Panel Service */
.service-container {
    /* background: #fff0e2; */
    min-height: 100vh;
    padding: 40px 0;
}

.service-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
}

.service-grid {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
}

.service-row {
    display: inline-flex;
    gap: 1.5rem;
    width: max-content;
}

.service-card {
    background: linear-gradient(135deg, #ffdb95 0%, #e6aa60 100%);
    border-radius: 0 20px 0 20px;
    padding: 1.5rem;
    color: white;
    text-align: center;
    /* box-shadow: 0 8px 25px rgba(255, 154, 86, 0.3); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: normal;
    /* width: 280px; */
    min-height: 320px;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    scroll-snap-align: start;
}

.service-card:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 12px 35px rgba(255, 154, 86, 0.4); */
    color: white;
    text-decoration: none;
}

.service-card:active {
    transform: translateY(-2px);
}

.service-image {
    width: 100%;
    height: 180px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
} 


.description-section {
    margin-top: 4rem;
    padding: 0 2rem;
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: center;
    margin-bottom: 2rem;
}

.final-statement {
    color: #535353;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-top: 2rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .services-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .services-grid {
        padding: 0 1rem;
    }

    .services-row {
        gap: 1rem;
    }

    .service-card {
        /* width: 250px; */
        min-height: 300px;
        padding: 1.2rem;
    }

    .service-image {
        height: 150px;
    }

    .service-title {
        font-size: 1rem;
    }

    .description-section {
        padding: 0 1rem;
    }

    .description-text {
        font-size: 1rem;
    }
}

/* Custom scrollbar */
.services-grid::-webkit-scrollbar {
    height: 8px;
}

.services-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.services-grid::-webkit-scrollbar-thumb {
    background: #ff9a56;
    border-radius: 10px;
}

.services-grid::-webkit-scrollbar-thumb:hover {
    background: #ff6b35;
}