header .header-menu-bar {
    background-color: #AE1B1F;
    border-bottom: 5px solid #8c1515;
}

/* Default styles for menu links */
header .header-menu-bar .menu-list > li > a {
    color: #ffffff !important; /* Default text color */
    background: transparent !important; /* Default background */
    position: relative;
    transition: color 0.3s, background 0.3s;
}

/* Hover and active styles for all menu items */
header .header-menu-bar .menu-list > li:hover > a,
header .header-menu-bar .menu-list > li.active > a {
    color: #333333 !important; /* Text color for hover and active state */
    background: #ffffff !important; /* Background color for hover and active state */
    border-radius: 0.3125rem;
}

/* Submenu arrow styles */
header .header-menu-bar .menu-list > li.has-submenu > a:after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-top: 0.3125rem solid #ffffff; /* Default arrow color */
    border-left: 0.3125rem solid transparent;
    border-right: 0.3125rem solid transparent;
    transition: border-top 0.3s;
}

/* Hover and active styles for submenu arrows */
header .header-menu-bar .menu-list > li.has-submenu:hover > a:after,
header .header-menu-bar .menu-list > li.active > a:after {
    border-top: 0.3125rem solid #333333 !important; /* Arrow color for hover and active state */
}


footer {
background:#AE1B1F;
}

/*Service Box*/
.service-box ul {
  grid-template-columns: repeat(3, 1fr);
}
.service-box ul li a {
  padding: 15px 15px;
  color: #544216;
  background-color: #F2EBDA;
}
.service-box ul li a:hover {
  background: #AE1B1F;
  color: #fff;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
}

.head-line2{
   border-left: 15px solid #cf2d1e;
   padding-left:5px;
}

/*Box link*/
.box-link ul {
  list-style-type: none;
  line-height: 20pt;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
}
.box-link li a {
  display: block;
  color: #333333;
  font-size: 110%;
  padding: 8px 14px;
  text-decoration: none;
  background: #f2f2f2;
  border-radius: 15px;
  border:#CED4DA solid 1px;
  margin-top: 5px;
  margin-bottom: 5px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  box-shadow: none;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}
.box-link li a:hover {
  background-color: #CF2D1E;
  color: white;
  border:1px solid #CF2D1E;
}

.side-menu ul li a {
    border: 0.0625rem solid #f2f2f2;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 17px;
}
.side-menu ul li a:hover{
    background:#303841;
      border: 1px solid #303841;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    color:#FFFFFF;
}
.side-menu ul li.active a {
    color: #ffffff;
    background: #303841;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    border: 1px solid #303841;
}


body.dark-theme .service-box ul li a, body.dark-theme .box-link li a, body.dark-theme .footer{ background:#333333; }
body.dark-theme .side-menu ul li a:hover{background:#333333;}
body.dark-theme .menu-list > li a{color:#ffffff;}

/*more link*/
.more-link a {
    font-family: "athitimedium", sans-serif;
    font-size:90%;
    background-color: #8c1515;
    color: #ffffff;
    font-weight:400;
    border-radius: 100px;
    padding: 5px 10px;;
    text-decoration: none;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    transition: all 0.2s linear;
    float: right;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    margin:10px;
}
.more-link a:hover {
    color: #fff;
    background-color:#333333;
    text-decoration: underline;
}

@media (min-width: 992px){
.card-img-2col , .card-img-3col{
    height: 10vw;
}}

.btn-port {
    border-radius: 0;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s
}
.btn-port.btn-porttheme {
    background: #f2f1eb;
    color: #222831;
    width: 100%;
    border-radius: 5px;
    text-align: left;
    font-size: 17px;
    margin: 1px 0;
    font-weight: 300;
    white-space: normal!important
}
.btn-port.btn-porttheme:hover, .btn-port.btn-porttheme:active {
    color: #FFF;
    background: #222831
}

.btn-instrument {
    color: #222831;
    width: 100%;
    text-align: left;
    font-size: 17px;
    margin: 1px 0;
    font-weight: 300;
    white-space: normal!important;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s;
    border-left: 5px solid #8c1515
}
.btn-instrument:hover, .btn-instrument:active {
    color: #8c1515;
    border-left: 15px solid #8c1515
}

.list-underline{
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.list-underline li a {
  display: block;
  color: #000;
  padding: 8px 16px;
  text-decoration: none;
  background: #f2f1eb;
  margin-bottom:10px;
  transition: all 0.3s;
  border-radius: 5px;
}
.list-underline li a:hover {
  background-color: #222831;
  color: white;
}

.head-line4{
  text-transform: capitalize;
  margin-bottom:10px;
  border-bottom: 5px solid #ED213A;
  /* width:50%; */
}
.head-line4 h2{
  color:#232931;
  margin-bottom:0;
  font-size: 250%;
}
.head-line4 h3{
  border-bottom:0px;
    font-size: 150%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: rgba(0, 0, 0, 0.4);
  padding-bottom: 10px;
  margin-bottom:0;
}

.block3d{
  /* border: 2px solid #45526C; */
  padding:30px 10px;
  box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
  background: #F8F5F1;
  border-radius:20px;
}

.sidebar-intro ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.sidebar-intro li a {
  display: block;
  background: #A30B2E;
  border-radius: 5px;
  box-shadow: rgb(0 0 0 / 7%) 0px 1px 1px, rgb(0 0 0 / 7%) 0px 2px 2px, rgb(0 0 0 / 7%) 0px 4px 4px, rgb(0 0 0 / 7%) 0px 8px 8px, rgb(0 0 0 / 7%) 0px 16px 16px;
  color: #ffffff;
  padding: 10px;
  text-decoration: none;
  margin-bottom: 15px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  font-weight: 600;
}
.sidebar-intro li.active a {
  background: #F5E6CA;
  color: #492F10;
}
.sidebar-intro li a:hover:not(.active) {
  background: #F5E6CA;
  color: #492F10;
}

.sdg-item a{
  color:#FFFFFF;
}
.sdg-item a:hover{
  color:#EEEEEE;
}

.frame-15 h2 {
    color: #AE1B1F;
}

@media (max-width: 991px) {
    header .header-primary .head-right {
        background-color: #FFFFFF;
        padding-bottom: 1.25rem;
    }
}

@media (max-width: 576px) {
    header .xs-head-logo img {
        max-width: 26rem;
    }
}

.ce-textpic {
    display: flex;
    align-items: flex-start; /* จัดให้อยู่บนสุดของแนวแกนตั้ง */
    gap: 20px; /* ระยะห่างระหว่างรูปและข้อความ */
    flex-wrap: wrap; /* ทำให้สามารถตัดบรรทัดใหม่เมื่อจอเล็ก */
    width: 100%; /* ทำให้เต็มความกว้าง */
}

/* คอลัมน์รูปภาพ */
.ce-left {
    flex: 1;
    width: 100%; /* ทำให้คอลัมน์นี้กว้างเต็มจอ */
}

.ce-left img {
    width: 100%;
    height: auto;
    display: block;
}

/* คอลัมน์ข้อความ */
.ce-bodytext {
    flex: 2;
    width: 100%; /* ทำให้คอลัมน์ข้อความกว้างเต็มจอ */
    text-align: left; /* ข้อความชิดซ้าย */
}

/* ปรับสำหรับหน้าจอเล็ก (ต่ำกว่า 768px) */
@media (max-width: 768px) {
    .ce-textpic {
        flex-direction: column; /* เปลี่ยนเป็นแนวตั้ง */
        align-items: center; /* จัดให้อยู่กึ่งกลาง */
    }

    .ce-left, .ce-bodytext {
        max-width: 100%; /* ขยายเต็มจอ */
    }

    .ce-left img {
        max-width: 80%; /* ป้องกันรูปใหญ่เกินไป */
        margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
    }

    .ce-bodytext {
        text-align: left; /* ข้อความยังคงชิดซ้าย */
    }
}