/* --- ลบ @import Poppins ออกทั้งบรรทัด --- */

/* กำหนดฟอนต์พื้นฐานให้ตรงกันทั้งเว็บ */

html, body {
  font-family: "Kanit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  overflow-x: hidden;
}


  /*---------------------------------------
  header       
  -----------------------------------------*/

header {
  background-color: #000000; /* พื้นหลังสีดำ */
  color: #ffffff;            /* ตัวหนังสือสีขาว */
  padding: 10px 0;
}

header p,
header span {
  color: #000000; /* สีข้อความใน header */
}

header .fa {
  color: #044122; /* สีไอคอนให้ตัดกับพื้นหลัง */
}
  /*---------------------------------------
     TYPOGRAPHY              
  -----------------------------------------*/

  h1,h2,h3,h4,h5,h6 {
    font-weight: 600;
    line-height: inherit;
  }

  h1,h2,h3,h4 {
    letter-spacing: -1px;
  }

  h5 {
    font-weight: 500;
  }

  h1 {
    color: #040404;
    font-size: 5em;
  }

  h2 {
    color: #ffffff;
    font-size: 3em;
    padding-bottom: 10px;
  }

  h3 {
    font-size: 1.8em;
    line-height: 1.2em;
    margin-bottom: 0;
  }

  h4 {
    color: #ffffff;
    font-size: 1.8em;
    padding-bottom: 2px;
  }

  h6 {
    letter-spacing: 0;
    font-weight: normal;
  }

  p {
    color: #ffffff;
    font-size: 14px;
    font-weight: normal;
    line-height: 24px;
  }

  /*---------------------------------------
     GENERAL               
  -----------------------------------------*/

  html{
    -webkit-font-smoothing: antialiased;
  }

  a {
    color: #252525;
    -webkit-transition: 0.5s;
    transition: 0.5s;
    text-decoration: none !important;
  }

  a:hover, a:active, a:focus {
    color: #a5c422;
    outline: none;
  }

  ::-webkit-scrollbar{
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-thumb {
    cursor: pointer;
    background: #000000;
  }

  .section-title {
    padding-bottom: 20px;
  }

  .section-title h2 {
    margin-top: 0;
  }

  .section-btn {
    background: #a5c422;
    border: 0;
    border-radius: 3px;
    color: #ffffff;
    font-size: inherit;
    font-weight: 500;
    padding: 14px 20px;
    transition: transform 0.1s ease-in;
    transform: translateX(0);
  }

  .section-btn:hover {
    transform: translateY(-5px);
  }

  .text-align-right {
    text-align: right;
  }

  .text-align-center {
    text-align: center;
  }

  .border-top {
    border-top: 1px solid #f2f2f2;
    margin-top: 4em;
    padding-top: 2.5em;
  }

  .btn-gray {
    background: #393939;
  }

  .btn-blue {
    background: #4267b2;
  }

  .news-thumb {
    background: #ffffff;
    border-radius: 10px;
  }
  .news-thumb img {
    border-radius: 10px 10px 0 0;
  }

  .news-info {
    padding: 30px;
    text-align: left;
  }
  .news-info span {
    display: block;
    letter-spacing: 0.5px;
  }
  .news-info h3 {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .author {
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5em;
    margin-top: 2em;
  }
  .author img,
  .author .author-info {
    display: inline-block;
    vertical-align: top;
  }
  .author-info h5 {
    margin-bottom: 0;
  }
  .author img {
    border-radius: 100%;
    width: 50px;
    height: 50px;
    margin-right: 10px;
  }


  #about, #team, #news,
  #news-detail {
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
  }

  #news, #service {
    text-align: center;
  }

  #google-map {
    line-height: 0;
    margin: 0;
    padding: 0;
  }


/*---------------------------------------
       PRE LOADER               
-----------------------------------------*/
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e6f4e6; /* เขียวอ่อนนุ่ม */
}

.spinner {
  position: relative;
  width: 45px;
  height: 45px;
}

.spinner:before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45px;
  height: 45px;
  margin-top: -22.5px;
  margin-left: -22.5px;
  border-radius: 50%;
  border: 4px solid #2d6b2d; /* เขียวเข้ม */
  border-top-color: transparent;
  animation: spinner 1s ease-in-out infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}
@-webkit-keyframes spinner {
  to { -webkit-transform: rotate(360deg); }
}

/*---------------------------------------
    NAVBAR ACTIVE & TRANSITION
-----------------------------------------*/
.navbar-default .navbar-nav > li.active > a {
  color: yellow !important;
  background-color: rgba(0, 0, 0, 0.1); /* สีพื้นเนียนตา */
  font-weight: bold;
}

.navbar-default .navbar-nav > li > a {
  transition: color 0.3s ease;
}

  /* Header Styles */
  header {
    background: #ffffff;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    height: 45px;
  }

  header p, header span {
    font-size: 12px;
    line-height: 24px;
    padding-top: 12px;
  }

  header a, header span {
    color: #000000;
  }

  header span {
    font-weight: 500;
    display: inline-block;
    padding: 11px 15px;
  }

  header span.date-icon {
    border-left: 1px solid #f2f2f2;
    border-right: 1px solid #f2f2f2;
    padding: 11px 19px;
  }

  header span i {
    color: #a5c422;
    margin-right: 5px;
  }

  @media (max-width: 767px) {
    header {
      padding-bottom: 20px;
    }

    header .row > div {
      text-align: center !important;
      margin-bottom: 10px;
    }

    header span {
      display: block;
      margin: 5px 0;
    }
  }

  /* Navbar Hover & Active Highlight */
  .navbar-nav > li > a {
    font-size: 14px;
    padding: 10px;
    color: #ffffff !important;
    transition: color 0.3s ease;
  }

  .navbar-nav > li > a:hover {
    color: #ffd700 !important;
    text-decoration: underline;
  }

  .navbar-nav > li.active > a {
    color: #ff3300 !important;
    font-weight: bold;
  }

.appointment-btn a {
  padding: 12px 18px;             /* เพิ่มขนาด touch target ให้ผ่านมาตรฐาน */
  margin-top: 0;                  
  margin-left: 12px;              /* ระยะห่างจากเมนูอื่น */
  background-color: #006d5b;      /* เขียวเข้ม → contrast ดีมากกับขาว */
  color: #ffffff !important;      /* ตัวอักษรขาวชัดเจน */
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  line-height: 1.4;               /* เพิ่มความอ่านง่าย */
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.appointment-btn a:hover,
.appointment-btn a:focus {
  background-color: #005645;      /* เขียวเข้มกว่าเวลา hover */
  color: #ffffff !important;
  transform: translateY(-2px);    /* มีเอฟเฟกต์กด/โต้ตอบ */
}
  .navbar-brand img {
  width: auto;
  max-height: 40px;
  max-width: 150px;
  object-fit: scale-down;
}

  @media (max-width: 768px) {
    .navbar-brand span {
      font-size: 16px !important;
    }

    .navbar-brand img {
      height: 45px !important;
      margin-right: 6px !important;
    }

    .navbar-header {
      flex-direction: row !important;
    }
  }

  @media (max-width: 768px) {
  .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;         /* จัดกลางแนวนอน */
    align-items: center;
    padding-left: 0;
    margin: 0;
  }

  .navbar-nav > li {
    display: inline-block;
    margin: 4px 6px;                 /* ระยะห่างระหว่างปุ่ม */
  }

  .navbar-nav > li > a {
    font-size: 14px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .appointment-btn a {
    margin-left: 0;                  /* เอา margin-left ออกเพื่อให้ไม่แยก */
  }
}
  /*---------------------------------------
      HOME              
  -----------------------------------------*/
  @media (max-width: 576px) {
  .company-box {
    flex-direction: column;
    padding: 20px;
  }
}

  #home h1 {
    color: #ffffff;
    padding-bottom: 10px;
    margin-top: 0;
  }

  #home h3 {
    color: #ffffff;
    font-size: 14px;
    font-weight: normal;
    line-height: inherit;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
  }

  .slider .container {
    width: 100%;
  }

  .slider .owl-dots {
      position: absolute;
      top: 575px;
      width: 100%;
      justify-content: center;
  }

  .owl-theme .owl-dots .owl-dot span {
    width: 8px;
    height: 8px;
    margin: 5px 7px;
    border: 2px solid #d9d9d9;
    background: transparent;
    display: block;
    -webkit-backface-visibility: visible;
    transition: opacity 200ms ease;
    border-radius: 30px;
  }

  .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
    background-color: #ffffff;
    border-color: transparent;
  }

 .slider .caption {
  display: flex;
  justify-content: center;
  align-items: center; /* เพิ่มสำหรับจัดกลางแนวตั้ง */
  flex-direction: column;
  text-align: center;
  background-color: rgba(20, 20, 20, 0.4); /* เพิ่ม contrast เพื่อให้ข้อความอ่านง่ายขึ้น */
  width: 100%;
  height: 100vh;
}

/* สไลด์หลัก */
.slider .item {
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
  width: 100vw;
  height: 100vh; /* สูงเท่ากับขนาดหน้าจอ */
}

  .slider .item-first {
    background-image: url(../images/godunk9.webp);
  }

  .slider .item-second {
    background-image: url(../images/slider02.webp);
  }

  .slider .item-third {
    background-image: url(../images/slider03.webp);
  }

   .slider .item-forth {
    background-image: url(../images/G01.webp);
  }
/*timeline*/

  /*---------------------------------------
      ABOUT              
  -----------------------------------------*/

  #about {
   /* background: url('../images/about-bg.jpg') no-repeat top center;*/
    background-size: cover;
    padding-top: 150px;
    padding-bottom: 150px;
  }

  .profile img,
  .profile figcaption {
    display: inline-block;
    vertical-align: top;
    margin-top: 1em;
  }
  .profile img {
    border-radius: 100%;
    width: 65px;
    height: 65px;
    margin-right: 1em;
  }
  .profile figcaption h3 {
    margin-top: 0;
  }

  #about h6 {
    color: #090808;
    margin: 0;
  }



  /*---------------------------------------
      TEAM MEMBERS              
  -----------------------------------------*/

  .team-thumb {
    background-color: #f9f9f9;
    border-radius: 0 0 10px 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }

  .team-info {
    padding: 20px 30px 0 30px;
  }

  .team-contact-info {
    border-top: 1px solid #000000;
    padding-top: 1.2em;
    margin-top: 1.5em;
  }

  .team-contact-info .fa {
    margin-right: 5px;
    display: inline-block;
  }

  .team-contact-info p {
    margin-bottom: 2px;
  }

  .team-contact-info a {
    color: #757575;
  }

  .team-thumb .social-icon li {
    font-weight: 500;
  }

  .team-thumb .social-icon li a {
    background: #ffffff;
    border-radius: 100%;
    font-size: 20px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    margin: 0 2px 0 2px;
  }

  .team-thumb .social-icon {
    opacity: 0;
    transform: translateY(100%);
    transition: 0.5s 0.2s;
    text-align: center;
    position: relative;
    top: 0;
  }

  .team-thumb:hover .social-icon {
    opacity: 1;
    transition-delay: 0.3s;
    transform: translateY(0px);
    top: -22em;
  }



  /*---------------------------------------
     SERVICE              
  -----------------------------------------*/

  #service {
    background: #a5c422;
  }

  #service h2,
  #service h4 {
    color: #ffffff;
  }

  #service p {
    color: #d9d9d9;
  }

  #service .service-thumb {
    padding: 0 22px;
  }

  #service .fa {
    font-size: 50px;
    margin-bottom: 10px;
    background: #ffffff;
    color: #a5c422;
    width: 120px;
    height: 120px;
    line-height: 120px;
    border-radius: 100%;
  }


  /*---------------------------------------
      NEWS             
  -----------------------------------------*/

  #news, #news-detail {
    background: #f9f9f9;
  }

  #news-detail blockquote {
    margin: 30px 0;
  }

  .news-detail-thumb .news-image img {
    border-radius: 10px;
  }

  .news-detail-thumb h3 {
    margin-bottom: 8px;
  }

  .news-image {
    margin-bottom: 30px;
    position: relative;
  }

  .news-image img {
    width: 100%;
  }

  .news-detail-thumb ul {
    margin: 32px 12px 22px 0px;
  }

  .news-detail-thumb ul li {
    list-style: circle;
    font-weight: normal;
    padding: 6px 12px 6px 0px;
  }

  .news-sidebar {
    margin-top: 16px;
  }

  .news-social-share {
    text-align: center;
    padding-top: 22px;
  }

  .news-social-share .btn {
    border-radius: 100px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    margin: 2px 6px;
    padding: 8px 14px;
  }

  .news-social-share .btn-primary {
    background: #3b5998;
  }

  .news-social-share .btn-success {
    background: #1da1f2;
  }

  .news-social-share .btn-danger {
    background: #dd4b39;
  }

  .news-social-share a .fa {
    padding-right: 4px;
  }

  .recent-post {
    padding-top: 2px;
    padding-bottom: 18px;
  }

  .recent-post .media img {
    border-radius: 100%;
    width: 80px;
    height: 80px;
    margin-right: 5px;
  }

  .recent-post .media-heading {
    font-size: 16px;
    font-weight: 500;
    line-height: inherit;
    margin-top: 5px;
  }

  .news-categories {
    margin-top: 8px;
  }

  .news-categories li a {
    color: #2b2b2b;
  }

  .news-ads {
    background: #ffffff;
    border-right: 4px solid #2b2b2b;
    padding: 42px;
    text-align: center;
    margin: 26px 0 26px 0;
  }

  .news-ads.sidebar-ads {
    border-left: 4px solid #2b2b2b;
    border-right: 0px;
  }

  .news-ads h4 {
    font-size: 18px;
  }

  .news-tags h4 {
    padding-bottom: 6px;
  }

  .news-categories li,
  .news-tags li {
    list-style: none;
    display: inline-block;
    margin: 4px;
  }

  .news-tags li a {
    background: #393939;
    border-radius: 50px;
    color: #ffffff;
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    float: left;
    min-width: 30px;
    padding: 6px 12px;
    -webkit-transition: all ease-in-out 0.4s;
    transition: all ease-in-out 0.4s;
  }

  .news-tags li a:hover {
    background: #4267b2;
  }



  /*---------------------------------------
      APPOINTMENT             
  -----------------------------------------*/

  #appointment {
    padding-top: 100px;
  }

  #appointment label {
    color: #393939;
    font-weight: 500;
  }

  #appointment .form-control {
    background: #f9f9f9;
    border: none;
    border-radius: 3px;
    box-shadow: none;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 15px;
    transition: all ease-in-out 0.4s;
  }

  #appointment input,
  #appointment select {
    height: 45px;
  }

  #appointment button#cf-submit {
    background: #a5c422;
    color: #ffffff;
    font-weight: 600;
    height: 55px;
  }

  #appointment button#cf-submit:hover {
    background: #393939;
    color: #ffffff;
  }


  /*---------------------------------------
     FOOTER              
  -----------------------------------------*/

  footer {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  footer h4 {
    padding-bottom: 5px;
  }

  footer a {
    color: #ffffff;
  }

  footer a:hover {
    color: #6ed5cb;
  }

  .contact-info {
    padding-top: 10px;
  }

  .contact-info .fa {
    background: #393939;
    border-radius: 100%;
    color: #ffffff;
    font-size: 15px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin-right: 5px;
    margin-bottom: 2px;
  }

  .latest-stories {
    margin-bottom: 20px;
  }

  .stories-image,
  .stories-info {
    display: inline-block;
    vertical-align: top;
  }

  .stories-image img {
    border-radius: 100%;
    width: 65px;
    height: 65px;
  }

  .stories-info {
    margin-left: 15px;
  }

  .stories-info h5 {
    margin-bottom: 2px;
  }

  .stories-info span {
    color: #858585;
    font-size: 12px;
  }

  .opening-hours p {
    line-height: 18px;
  }

  .opening-hours span {
    font-weight: 500;
    display: inline-block;
    padding-left: 10px;
  }

  .copyright-text p,
  .footer-link a {
    color: #858585;
    font-size: 12px;
    font-weight: 500;
  }

  .footer-link a {
    font-size: 12px;
    display: inline-block;
    padding: 0 10px;
    margin-top: 4px;
  }

  .angle-up-btn {
    position: relative;
    bottom: 4em;
    display: block;
  }

  .angle-up-btn a {
    background: #ffffff;
    border: 1px solid #f2f2f2;
    border-radius: 3px;
    font-size: 20px;
    color: #393939;
    display: inline-block;
    text-align: center;
    width: 40px;
    height: 40px;
    line-height: 38px;
    transition: transform 0.1s ease-in;
    transform: translateX(0);
  }

  .angle-up-btn a:hover {
    background: #4267b2;
    color: #ffffff;
    transform: translateY(-5px);
  }


  /*---------------------------------------
     SOCIAL ICON              
  -----------------------------------------*/

  .social-icon {
    position: relative;
    padding: 0;
    margin: 0;
  }

  .social-icon li {
    display: inline-block;
    list-style: none;
  }

  .social-icon li a {
    border-radius: 100px;
    color: #464646;
    font-size: 15px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s ease-in-out;
    position: relative;
  }

  .social-icon li a:hover {
    background: #4267b2;
    color: #ffffff;
  }


  /*---------------------------------------
     RESPONSIVE STYLES              
  -----------------------------------------*/

  @media only screen and (max-width: 1200px) {
    h1 {
      font-size: 4em;
    }
    h2 {
      font-size: 2.5em;
    }
    h3 {
      font-size: 1.5em;
    }

    header {
      height: inherit;
    }
    header span.date-icon {
      border: 0;
      padding-right: 0;
      padding-left: 0;
    }
    header span.email-icon {
      padding-top: 0;
    }

    .navbar-default .navbar-nav li a {
      padding-right: 15px;
      padding-left: 15px;
    }
  }

  @media only screen and (max-width: 992px) {
    .slider .item {
      background-position: center;
    }

    header {
      padding-bottom: 10px;
    }
    header .text-align-right {
      text-align: left;
    }
    header span {
      padding-top: 0;
      padding-left: 0;
      padding-bottom: 0;
    }
  }

  @media only screen and (max-width: 767px) {
    .navbar-default .navbar-collapse, .navbar-default .navbar-form {
      border-color: transparent;
    }
    .navbar-default .navbar-nav li.appointment-btn {
      margin-left: 15px;
    }
    .navbar-default .navbar-nav li a {
      display: inline-block;
      padding-top: 8px;
      padding-bottom: 8px;
    }

    .news-sidebar {
      margin-top: 2em;
    }

    #appointment-form {
      padding-top: 4em;
      padding-bottom: 4em;
    }

    footer {
      padding-top: 60px;
      padding-bottom: 0;
    }
    .footer-thumb {
      padding-bottom: 10px;
    }

    .border-top {
      text-align: center;
    }

    .copyright-text {
      margin-top: 10px;
    }

    .angle-up-btn {
      bottom: 10em;
    }
  }

  @media only screen and (max-width: 639px) {
    h1 {
      font-size: 3em;
      line-height: 1.2em;
    }
    h2 {
      font-size: 2.1em;
    }
    h4 {
      font-size: 1.4em;
    }

    #home h3 {
      font-size: 11px;
      letter-spacing: 1px;
    }

  }

/* บังคับให้ .container ภายใน footer ยืดเต็ม */
footer .container {
  width: 100%;
  max-width: 100%;
  padding-left: 15px;   /* ปรับระยะขอบซ้าย-ขวาตามต้องการ */
  padding-right: 15px;
  margin: 0 auto;
}

/* ยืนยันให้ footer เองกว้างเต็ม */
footer {
  width: 100%;
  left: 0;
  right: 0;
}


.product-box:hover {
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

้.eco-logo {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  background-color: white;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.journey-boxes {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px; /* ระยะห่างระหว่างกล่อง */
  flex-wrap: wrap; /* ถ้ามีพื้นที่ไม่พอ ให้ลงบรรทัดใหม่ */
  padding: 40px 0;
}

.journey-card {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  background-color: #d2e7d6; /* สีเขียวอ่อนเพื่อความสดใส */
  color: #1c1c1c;
  border-radius: 12px;
  text-align: center;
  padding: 30px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.journey-card:hover {
  transform: translateY(-8px);
}

.journey-card h4 {
  font-size: 32px;
  font-family: 'Kanit', sans-serif;
  margin-bottom: 10px;
  color: #02481c;
}

.journey-card p {
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
}
/* Styling */
.info-box {
  background: #ffffff;
  padding: 40px;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  border-radius: 16px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-title {
  color: #215a50;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

.info-sub,
.info-text {
  color: #333333;
  font-size: 17px;
  margin-bottom: 5px;
  font-weight: 400;
}

.timeline-icon {
  transition: transform 0.3s ease;
}

.timeline-box:hover .timeline-icon {
  transform: rotate(10deg);
}

.highlight-box {
  background-color: #006d5b;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px; /* ปรับจาก 20px ให้พอดี ไม่กว้างเกิน */
}

.highlight-box h4 {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0;
}

/* CSS */
.commitment-section {
  display: flex;
  flex-wrap: wrap;
  background-color: #f8f8f8;
  padding: 40px 20px;
  font-family: 'Kanit', sans-serif;
}

.left-box, .right-box {
  flex: 1;
  min-width: 300px;
  padding: 20px;
}

.left-box h2, .right-box h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #2b2b2b;
}

.timeline {
  list-style: none;
  padding: 0;
}

.timeline li {
  margin-bottom: 20px;
  background: #fff;
  border-left: 4px solid #7db661;
  padding: 10px 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* วางกล่องขวาชิดขอบขวา พร้อมตีกรอบ */
.right-box {
  flex: 1;
  min-width: 300px;
  padding: 30px 25px;
  background-color: #fff;
  border: 2px solid #7db661;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 10px;
  margin-left: auto;
}

/* ปรับ commitment cards ให้ดูโดดเด่น */
.commitment-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 25px;
}

/* ปรับ card ให้มีกรอบและเงาชัดเจน */
.card {
  background-color: #fdfdfd;
  border: 2px solid #7db661;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  color: #2b2b2b;
  font-size: 20px;
  margin-bottom: 10px;
}

.card p {
  color: #444;
  font-size: 16px;
  line-height: 1.6;
}

/* --- Join navbar with hero/slider --- */
.navbar,
.navbar-default {
  margin-bottom: 0 !important;   /* ตัดช่องว่างใต้ navbar */
  border: 0 !important;          /* ตัดเส้นขอบสีอ่อนใต้ navbar */
  border-radius: 0 !important;
  box-shadow: none !important;   /* กันกรณีมีเงา */
}

/* กันกรณี section แรกมีระยะบน */
#home,
section.slider {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* กันเลย์เอาต์กระตุกจากรูปโลโก้ */
.logo-img{
  display:block;
  height:60px;          /* header */
  width:auto;
  aspect-ratio:707/353; /* กันสัดส่วนตั้งแต่ยังไม่โหลดรูป */
}
.footer-logo{ height:80px; }

/* กันสไลด์กับ navbar มีช่องว่าง */
.navbar, .navbar-default{ margin-bottom:0 !important; }
#home.slider{ margin:0 !important; padding:0 !important; }
#home .container, #home .row{ margin:0 !important; padding:0 !important; width:100%; }

/* สไลด์สูงคงที่ ลด CLS เวลา Owl สลับภาพ */
#home .owl-carousel .item{ position:relative; min-height:72vh; }
@media (max-width:768px){ #home .owl-carousel .item{ min-height:62vh; } }
#home .caption{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  padding:0 16px; text-align:center; text-shadow:0 2px 14px rgba(0,0,0,.45);
}

/* รูปในส่วน sustainability ให้กันพื้นที่แน่นอน */
#sustainability .right img{
  display:block; width:100%; height:250px; object-fit:cover;
  aspect-ratio:1477/996;           /* ใส่ตามขนาดไฟล์จริงของคุณ */
}



/* ให้สไลด์มีความสูงคงที่ ลด CLS */
#home .owl-carousel .item{ position:relative; min-height:72vh; }
@media (max-width:768px){ #home .owl-carousel .item{ min-height:62vh; } }

/* จัดรูปให้ทำงานเหมือน background-image */
.item-first .hero-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  z-index:0; display:block;
  aspect-ratio:1920/1080; /* ตรงกับ width/height ข้างบน */
}

/* ให้ข้อความอยู่เหนือรูป */
.item-first .caption{ position:relative; z-index:1; }

.owl-carousel{ touch-action: pan-y; }

/* ใส่ไว้ในไฟล์ CSS หลักของคุณ (เช่น css/tooplate-style.css) */
.navbar-toggle .sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}


/* --- ให้เมนูอยู่บรรทัดเดียวแบบพอดี --- */
@media (min-width: 768px){
  .navbar.navbar-default .container-fluid{display:flex;align-items:center;flex-wrap:nowrap;}
  .navbar-header{display:flex;align-items:center;flex:0 0 auto;}
  .navbar-brand{display:flex;align-items:center;padding:8px 0;margin-right:16px;}
  .navbar-brand .logo-img{height:50px;width:auto;}
  #main-nav{display:flex !important;flex:1 1 auto;justify-content:flex-end;}
  .navbar-nav{display:flex;flex-wrap:nowrap;margin:0;}
  .navbar-nav>li{float:none !important;}
  .navbar-nav>li>a{padding:12px 12px;font-size:16px;line-height:48px;}
}

/* โน้ตบุ๊ก/จอแคบ: ซ่อนตัวหนังสือข้างโลโก้กันเมนูตกราง */
@media (min-width: 992px) and (max-width: 1199px){
  .navbar-brand .brand-text{display:none !important;}
  .navbar-nav>li>a{padding:10px 10px;font-size:15px;}
}

/* เดสก์ท็อปใหญ่: โชว์ชื่อปกติ */
@media (min-width: 1200px){
  .navbar-brand .brand-text{display:inline;}
  .navbar-nav>li>a{padding:12px 12px;font-size:16px;}
}

/* มือถือ: ใช้เมนูแฮมเบอร์เกอร์ตามเดิม */
@media (max-width: 767px){
  .navbar-collapse.in .nav>li>a{white-space:normal;}
}


/* ความสูงคงที่ ลด CLS */
#home .owl-carousel .item{ position:relative; min-height:72vh; }
@media (max-width:768px){ #home .owl-carousel .item{ min-height:62vh; } }

/* ทำงานเหมือน background */
.item-first .hero-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  z-index:0; display:block;
  aspect-ratio:1920/1080; /* ให้ตรงกับไฟล์จริงถ้ารู้สัดส่วน */
}

/* ให้ข้อความอยู่เหนือรูป */
.item-first .caption{ position:relative; z-index:1; }


nav.navbar {
  position: sticky;
  top: 0;              /* ติดขอบบนของ viewport */
  z-index: 1050;       /* ให้อยู่เหนือสไลด์/ภาพ */
}

.eco-carousel, .eco-carousel .owl-stage-outer, .eco-carousel .owl-stage { contain: paint; }
.eco-img { display:block; width:100%; height:250px; object-fit:cover; border-radius:8px; aspect-ratio:16/10; }


<style>
  /* ========== A. Tap target helper (ให้ทุกลิงก์/ปุ่มมีโซนคลิก ≥48x48) ========== */
  .tap-target,
  .navbar-default .navbar-nav > li > a,
  header .phone-icon a,
  header .date-icon a,
  header .email-icon a,
  footer a.text-white.text-decoration-none {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;       /* ความสูงขั้นต่ำที่ Lighthouse แนะนำ */
    min-width: 48px;        /* ความกว้างขั้นต่ำ */
    padding: 12px 14px;     /* เพิ่มโซนคลิก */
    border-radius: 8px;     /* แต่งให้โค้งเล็กน้อย */
  }

  /* B. Hamburger button (ให้ปุ่มเมนู ≥48x48) */
  .navbar-toggle {
    width: 48px;
    height: 48px;
    padding: 10px;
  }


  
  /* C. ระยะห่างรายการเมนู ป้องกันชน/ทับกัน */
  @media (min-width: 768px){
    .navbar-default .navbar-nav > li { margin-left: 4px; }
  }

  /* D. ฟุตเตอร์ลิงก์ทั่วไป */
  footer .text-white.text-decoration-non

  /* --- Tap targets: header & footer --- */
@media (max-width: 767px){
  /* ลิงก์เมนูบนสุด */
  .navbar-nav > li > a{
    display:inline-flex;
    align-items:center;
    min-height:44px;        /* สูงอย่างน้อย 44px */
    min-width:44px;         /* กว้างอย่างน้อย 44px */
    padding:12px 14px;      /* เพิ่มพื้นที่สัมผัส */
    line-height:20px;
  }
  .navbar-nav > li{ margin:0 6px 6px 0; }  /* ระยะห่างระหว่างเป้าหมาย */

  /* ปุ่ม hamburger (ถ้ามี) ให้ใหญ่พอ */
  .navbar-toggle{
    padding:10px 12px;
    height:44px; width:44px;
  }

  /* ลิงก์ในฟุตเตอร์ */
  footer a,
  .footer a,
  .footer-links a,
  .footer-menu a{
    display:inline-block;
    min-height:44px;
    min-width:44px;
    padding:10px 12px;
    margin:6px 4px;         /* กันชิดกันเกินไป */
  }
  footer li{ margin-bottom:8px; } /* ถ้าเป็นรายการลิสต์ ให้มีช่องไฟแนวตั้ง */
}

/* โฟกัสด้วยคีย์บอร์ดให้เห็นชัด (accessibility) */
a:focus-visible{
  outline:2px solid #0aa37f;
  outline-offset:2px;
}

/* ===== Mobile-only tweaks ===== */
@media (max-width: 767px) {

  /* Navbar: ให้อยู่บรรทัดเดียว โลโก้ + ปุ่ม 3 ขีด */
  .navbar-header{
    display:flex; align-items:center; justify-content:space-between;
    width:100%;
  }
  .navbar-brand{
    display:flex; align-items:center; gap:8px;
    padding:8px 12px; margin:0;
    max-width: calc(100vw - 110px); /* กันชื่อยาวดันปุ่ม 3 ขีดหลุด */
  }
  .navbar-brand img.logo-img{ height:28px; width:auto; }
  .navbar-brand span{ 
    font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    line-height:1.2;
  }
  .navbar-toggle{ margin:0 12px 0 0; float:none; order:2; }

  /* กัน CLS: จองพื้นที่ภาพ/สไลด์ */
  .hero, #home, .owl-carousel .item{ aspect-ratio:16/9; }
  .hero img, .owl-carousel img{ width:100%; height:auto; display:block; }

  /* ปรับตัวหนังสือใหญ่ไปให้พอดีจอเล็ก */
  h1{ font-size:22px; }
  h2{ font-size:18px; }
  .container{ padding-left:15px; padding-right:15px; }

  /* Tap target >= 44px */
  .navbar-nav > li > a{ padding-top:12px; padding-bottom:12px; min-height:44px; }

  /* ลดโหลด: ซ่อน/เบรกแอนิเมชันที่ไม่จำเป็นบนมือถือ */
  .counter, .animate__animated{ animation: none !important; }

  /* เลย์เอาต์การ์ด/คอลัมน์ให้เป็น 1 คอลัมน์ */
  .row.flex, .info-section, #sustainability-commit .row{
    display:block !important;
  }

  /* โหลดส่วนล่างเมื่อมองเห็นเท่านั้น (เบาเครื่อง) */
  section[id]{ content-visibility:auto; contain-intrinsic-size: 1px 800px; }
}

/* ========== MOBILE-ONLY HERO FIX (ไม่กระทบเดสก์ท็อป) ========== */
@media (max-width: 767px){
  #company-banner > div{
    height:auto !important;          /* ไม่ล็อค 100vh บนมือถือ */
    min-height:60vh !important;      /* ยังสูงพอให้ดูเต็มตา */
    background-attachment:scroll !important;
  }
  /* ตัวหนังสือใน hero เล็กลงนิดในจอเล็ก */
  #company-banner h1{ font-size:32px !important; line-height:1.2 !important; }
  #company-banner h3{ font-size:18px !important; }
  #company-banner p{  font-size:15px !important; }
}

/* ==== Fix: slide01 ไม่แตกคอลัมน์บนมือถือ/ทุกขนาด ==== */
.slider .item { position: relative; display: flex; align-items: center; }

/* ให้ <picture> ของสไลด์เป็นพื้นหลังเต็มจอ ไม่เข้าร่วม flex */
.slider .item > picture{
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.slider .item > picture > img.hero-bg{
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
}

/* ให้กล่องข้อความลอยเหนือรูป และกินความกว้างทั้งแถว */
.slider .item .caption{
  position: relative; z-index: 1; width: 100%;
  max-width: 980px; margin: 0 auto; padding: 24px 16px;
  background: transparent !important;   /* กันกล่องเทา */
}
/* เผื่อใน .caption มี .col-md-* ให้กว้าง 100% เสมอ */
.slider .item .caption > [class*="col-"]{
  float: none; width: 100%;
}

@media (max-width: 767px){
  .slider .item{ min-height: 60vh; }
  .slider .item .caption h1{ font-size: 32px; line-height: 1.2; }
  .slider .item .caption p{ font-size: 15px; }
}


/* Force navbar to collapse on iPad and narrower */
@media (max-width:1024px){
  .navbar-header{ float:none; }
  .navbar-toggle{ display:block; }
  .navbar-collapse{ border-top:1px solid rgba(255,255,255,.15); }
  .navbar-collapse.collapse{ display:none!important; }
  .navbar-collapse.collapse.in{ display:block!important; }
  .navbar-nav{ float:none!important; margin:7.5px 0; }
  .navbar-nav>li{ float:none; }
}

/* === Shadow/Overlay สำหรับสไลด์ให้ตัวหนังสืออ่านง่าย === */
#home .item{ position:relative; min-height:60vh; }       /* มีอยู่แล้วก็ไม่เป็นไร */
#home .item img.slide-img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center; z-index:0;   /* รูปอยู่ชั้นล่าง */
}

/* เงาทับรูป (ปรับความเข้มได้) */
#home .item::after{
  content:""; position:absolute; inset:0; z-index:1;
  /* แบบไล่ระดับ: บนบาง–ล่างเข้ม */
  background: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 70%);
  /* ถ้าอยากเป็นฟิล์มทึบเสมอกัน ใช้บรรทัดล่างแทน:
     background: rgba(0,0,0,.35);
  */
}

/* ข้อความซ้อนเหนือเงา */
#home .caption{ position:relative; z-index:2; }

/* เพิ่ม text-shadow ให้อ่านเด่นขึ้น (ปรับได้ตามชอบ) */
#home .caption h1,
#home .caption h2,
#home .caption p{
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* ท้าย tooplate-style.css */
body{ font-family:"Kanit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important; }

/* Mobile-only hero fix (ไม่กระทบเดสก์ท็อป) */
@media (max-width: 767px){
  #company-banner > div{
    height: auto !important;
    min-height: 60vh !important;
    background-attachment: scroll !important;
  }
}

/* ฟอนต์ให้เป็น Kanit เสมอ (ทับของเดิม) */
body{ font-family:"Kanit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important; }

/* Fix hero: หยุดล็อก 100vh บนมือถือ (ลด LCP) */
@media (max-width:767px){
  #company-banner > div{
    height:auto !important;
    min-height:60vh !important;
    background-attachment:scroll !important;
  }
}

/* iPad / Tablet navbar: กันเมนูแตก */
@media (max-width:1024px){
  .navbar-header{ float:none; }
  .navbar-toggle{ display:block; }
  .navbar-collapse{ border-top:1px solid rgba(255,255,255,.2); }
  .navbar-collapse.collapse{ display:none !important; }
  .navbar-collapse.collapse.in{ display:block !important; }
  .navbar-left,.navbar-right,.navbar-nav{ float:none !important; }
}

/* tooplate-style.css — ช่วยเบราว์เซอร์ skip layout ส่วนที่ยังไม่เห็น */
.gallery-vertical, #news, #service {
  content-visibility: auto;
  contain-intrinsic-size: 800px; /* ค่าประมาณความสูง */
}




/* === Mobile centering only (ไม่แตะเดสก์ท็อป) === */
@media (max-width: 767.98px){
  /* สไลด์: แคปชันอยู่กลางภาพ */
  .slider .item{ position:relative; min-height:60vh; }
  .slider .caption{
    position:absolute; inset:0; padding:20px;
    display:flex; align-items:center; justify-content:center;
    text-align:center; background:rgba(0,0,0,.25);
  }
  .slider .caption h1{ font-size:32px; line-height:1.2; }
  .slider .caption p{ font-size:15px; }

  /* การ์ด/กล่องให้กึ่งกลางทั้งแถว */
  .info-section{ display:flex; flex-direction:column; align-items:center; gap:24px; }
  .info-section .info-box{ width:92%; max-width:560px; margin:0 auto; text-align:center; }
  .info-section .info-box > *{ margin-left:auto; margin-right:auto; }
  .info-section .info-box i.fa{ display:inline-flex; align-items:center; justify-content:center; line-height:1; }
}

/* ปุ่ม hamburger: มือถือกึ่งกลาง / เดสก์ท็อปไม่แสดง */
@media (min-width:768px){ .navbar-toggle{ display:none !important; } }
@media (max-width:767.98px){
  .navbar-toggle{ display:flex; align-items:center; justify-content:center; height:44px; width:56px; padding:0; margin:0 8px 0 0; }
  .navbar-toggle .icon-bar{ width:22px; height:2px; margin:3px 0; }
}


/* Show hamburger only on mobile, hide on desktop */
@media (min-width: 768px){
  .navbar-toggle{ display: none !important; }
}

/* Mobile look & centering (เดิมที่ตั้งไว้ให้สวยบนมือถือ) */
@media (max-width: 767.98px){
  .navbar-toggle{
    display: flex; align-items: center; justify-content: center;
    height: 44px; width: 56px; padding: 0; margin: 0 8px 0 0;
  }
  .navbar-toggle .icon-bar{ width:22px; height:2px; margin:3px 0; }
}

/* Alias FA5 prefixes to FA4 font (safe for desktop) */
.fas, .far, .fab{
  font-family: "FontAwesome" !important;
  font-style: normal; font-weight: normal; line-height: 1;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* === Mobile-only patch pack (safe for desktop) === */
@media (max-width: 767.98px){

  /* 4) Navbar: แสดงปุ่มขีด + ชื่อแบรนด์อ่านง่าย/ไม่ทับ */
  .navbar-header{display:flex; align-items:center;}
  .navbar-toggle{
    display:flex !important; align-items:center; justify-content:center;
    height:44px; width:56px; padding:0; margin:0 8px 0 0;
  }
  .navbar-toggle .icon-bar{background:#fff; width:22px; height:2px; margin:3px 0;}
  .navbar-brand{
    font-size:18px;                       /* เล็กลงนิดให้พอดีจอ */
    max-width: calc(100% - 72px);         /* เว้นที่ให้ปุ่มขีด */
    overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  }

  /* 1)–2) Home slider: ทุกสไลด์เต็มจอเท่ากัน + กันไปทับกล่อง Since 1960 */
  #home.slider{ margin-bottom:12px; }     /* เว้นช่องว่างหลังสไลด์ */
  #home.slider .owl-stage-outer{ min-height:60vh; }
  #home.slider .item{ position:relative; min-height:60vh; }
  #home.slider .item .slide-img,
  #home.slider .item .hero-bg{
    position:absolute; inset:0; width:100%; height:100%;
    object-fit:cover; object-position:center;
    display:block;
  }
  #home.slider .caption{
    position:absolute; inset:0; padding:16px;
    display:flex; align-items:center; justify-content:center;
    text-align:center; background:rgba(0,0,0,.25);
  }
  /* เผื่อสไลด์ #4 ยังดื้อ */
  #home.slider .item-fourth .slide-img{ object-fit:cover; }

  /* 3) กล่องตัวเลข/เปอร์เซ็นต์ให้ขนาดเท่ากัน */
  .info-section .info-box .big-number,
  .info-section .info-box h1,
  .info-section .info-box h2,
  .info-section .info-box strong{
    font-size:44px; line-height:1;        /* 100% จะเท่ากล่องอื่น */
  }

  /* 5) Company Profile: รูปแรกให้อยู่ในกรอบขาว */
  .company-hero, .company-hero .card, .company-hero .box{
    overflow:hidden; border-radius:16px;
  }
  .company-hero img{ display:block; width:100%; height:auto; }

  /* 6) Products: ปุ่มอย่าติดขอบจอ */
  .products .section-btn, .product .section-btn, .cta .section-btn{
    display:inline-block; padding:12px 18px; border-radius:12px;
    margin:12px auto; max-width:90%;
  }
  .container, .row{ padding-left:15px; padding-right:15px; }

  /* 7) Our Customer » Industry Applications: สไลด์อยู่นิ่งในกรอบ */
  .owl-carousel{ overflow:hidden; }                   /* กันล้น */
  .owl-carousel .owl-stage-outer{ overflow:hidden; }
  .owl-carousel .owl-item img{
    width:100%; height:auto; display:block; border-radius:inherit;
  }
}

/* === NAVBAR (iPhone + iPad ≤1024px) === */
@media (max-width:1024px){
  /* header layout */
  .navbar-header{ display:flex; align-items:center; gap:8px; width:100%; }
  .navbar-brand{
    display:flex; align-items:center; gap:10px; margin:0 8px;
    max-width:calc(100% - 56px - 56px); /* เผื่อโลโก้ซ้าย + ปุ่มขวา */
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .logo-img{ height:48px; width:auto; }

  /* hamburger แบบกรอบมุมมน */
  .navbar-toggle{
    display:flex !important; align-items:center; justify-content:center;
    width:48px; height:48px; padding:0; margin-left:auto;
    background:rgba(255,255,255,.06) !important;
    border:1px solid rgba(255,255,255,.9) !important; border-radius:10px;
    box-shadow:none !important; -webkit-tap-highlight-color:transparent;
  }
  .navbar-toggle .icon-bar{
    display:block; width:24px; height:2px; margin:5px 0; border-radius:2px;
    background:#fff !important;
  }

  /* โหมดพับ/กางสำหรับ iPad (ไม่มี Bootstrap JS ก็ใช้ได้) */
  .navbar-collapse.collapse{ display:none !important; }
  .navbar-collapse.collapse.in{ display:block !important; }
  .navbar-nav{ float:none !important; margin:0; }
  .navbar-nav>li{ float:none; }
  .navbar-nav>li>a{ padding:12px 16px; }

  /* เมนูยาวให้เลื่อนได้ */
  #main-nav{ max-height:calc(100vh - 56px); overflow-y:auto; padding:10px 0; }
}

/* Desktop >1024px: ซ่อนปุ่มตามปกติ */
@media (min-width:1025px){
  .navbar-toggle{ display:none !important; }
}

/* ข้อความแบรนด์ (ถ้ามี .brand-text) */

.brand-text{ font-weight:700; font-size:24px; color:#fff; }

/* ========= MOBILE & iPad FIX PACK ========= */
/* ===== Mobile/iPad navbar fix (<=1024px) ===== */
@media (max-width:1024px){
  /* จัด header ให้โลโก้ + ชื่อแบรนด์ + ปุ่ม อยู่แนวเดียวกัน */
  .navbar-header{display:flex;align-items:center;width:100%;}
  .navbar-brand{display:flex;align-items:center;gap:10px;margin:0 8px;}
  /* ให้ข้อความแบรนด์ไม่ล้น/ถูกบัง และตัดด้วย … */
  .navbar-brand .brand-text,
  .navbar-brand span{
    font-weight:700;color:#fff;
    max-width:calc(100vw - 56px - 120px); /* -ปุ่ม48 + เผื่อโลโก้ */
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  /* ปุ่มสามขีดในกรอบมน */
  .navbar-toggle{
    display:flex !important;align-items:center;justify-content:center;
    width:48px;height:48px;margin-left:auto;padding:0;
    border:1px solid rgba(255,255,255,.9) !important;border-radius:12px;
    background:rgba(255,255,255,.06) !important;box-shadow:none !important;
    -webkit-tap-highlight-color:transparent;
  }
  .navbar-toggle .icon-bar{
    display:block;width:26px;height:2px;margin:5px 0;border-radius:2px;
    background:#fff !important;
  }
  /* ให้ collapse ทำงานใน iPad (บังคับโหมดมือถือถึง 1024px) */
  .navbar-collapse.collapse{display:none !important;}
  .navbar-collapse.collapse.in{display:block !important;}
  .navbar-nav{float:none !important;margin:0;}
  .navbar-nav>li{float:none;}
  .navbar-nav>li>a{padding:12px 16px;}
  #main-nav{max-height:calc(100vh - 56px);overflow-y:auto;}
}
/* เดสก์ท็อปซ่อนปุ่มสามขีดตามปกติ */
@media (min-width:1025px){ .navbar-toggle{display:none !important;} }
/* ความสูงโลโก้คงที่ทุกจอ */
.logo-img{height:48px;width:auto;}



/* Fix: explicit h1 size inside section/article/nav/aside (desktop & mobile safe) */
:root{
  --h1-desktop: 5em;          /* คงหน้าตาเดิมของธีมบนจอใหญ่ */
  --h1-mobile: 32px;          /* อ่านง่ายบนมือถือ */
  --h1-line: 1.2;
}
:where(article,aside,nav,section) h1{
  font-size: var(--h1-desktop);
  line-height: var(--h1-line);
}
@media (max-width: 767.98px){
  :where(article,aside,nav,section) h1{
    font-size: var(--h1-mobile);
  }
}

/* ===== Home hero spacing & center on mobile ===== */
@media (max-width:767px){
  /* จำกัดความสูงภาพ Hero ให้พอดีจอ และบังคับแคปชันกึ่งกลาง */
  .slider .item{min-height:60vh;}
  #home .caption .text-center{ text-align:center !important; }
  #home{ margin-bottom:16px; }       /* กันไปชนบล็อกถัดไป */
  /* กันพื้นหลัง/ภาพล้นแล้วคลุมคอนเทนต์ล่าง */
  .owl-carousel .owl-stage-outer{ overflow:hidden; }
}

/* ===== Customer: outer carousel mobile fix ===== */
.outer-carousel .item{ width:100%; overflow:hidden; box-sizing:border-box; }
.outer-carousel .item img{ width:100%; height:auto; display:block; }
@media (max-width:767px){
  .outer-carousel-wrapper{ padding:10px; }
  .outer-carousel .item{ min-height:auto; }
}

/* FontAwesome display fix - placed once globally */
@font-face{
  font-family:'FontAwesome';
  src:url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
      url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff');
  font-weight:normal; font-style:normal; font-display:block;
}
.fa{ display:inline-block; width:1em; text-align:center; vertical-align:middle; }
.fa.fa-2x{ width:2em; } .fa.fa-3x{ width:3em; } .fa.fa-4x{ width:4em; }
