/* color theme 
f9b281
d49785
e3d0b6
ffca73
f5a361
FF8C66

font content
#1967a7
FF8C66 with bgcontent

bgcontent
1b2126

*/

    /* -------------------- Global -------------------- */
    body {
      background: #FFF;
      margin: 0;
      font-family: 'Sarabun', sans-serif;
      display: flex;
      flex-direction: column;
      min-height: 50vh;
      transition: background 0.3s ease;
      overflow-x: hidden;
      color:#2E3A59;
    }

    #myBtn {
      display: none;
      position: fixed;
      bottom: 50px;
      right: 30px;
      z-index: 99;
      border: none;
      outline: none;
      background-color: #e14d2a;
      color: white;
      cursor: pointer;
      padding: 15px;
      border-radius: 25px;
    }
    
    #myBtn:hover {
      background-color:rgb(139, 140, 143);
    }
    .bg-orange {
      color: #e14d2a;
    }
    /* -------------------- Navbar -------------------- */
    .navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 60px;
      background-color: #ffffff;
      border-bottom: 1px solid #ddd;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 20px;
      z-index: 1200;
      transition: background 0.3s ease;
    }
    #loginForm {
      display: none;
      position: fixed;
      top: 60px; /* ปรับให้พอดีกับความสูงของ Navbar */
      right: 20px;
      background-color: #ffffff;
      padding: 15px;
      border: 1px solid #ccc;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      z-index: 100;
    }
    #loginForm input {
      margin-bottom: 10px;
      padding: 6px;
      width: 200px;
    }

    .textlogo {
      font-weight: bold;
      color: #1e2a4a;
      font-size: 18px;
      margin-left: 20px;
    }
    .icon-group {
      display:flex;
      gap: 10px; /* ระยะห่างระหว่างไอคอน */
      align-items: center;
    }
    .icon {
      width: 24px;
      height: 24px;
      color: #1e2a4a;
      cursor: pointer;
    }

    .search-btn {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #2E3A59; /*202123 */
      margin-right: 10px;
    }

    /* -------------------- Sidebar -------------------- */
    .sidebar {
      background-color: #f7f7f8;
      width: 250px; /*250px*/
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      padding: 20px 10px;
      transition: transform 0.3s ease, background 0.3s ease;
      height: 220vh; /*380vh*/
      position: fixed; /*absolute*/
      top: 60px;
      z-index: 1000;
      overflow-y: auto;
      overflow-x: hidden;
      /*height: calc(380vh - 60px);  ให้ sidebar สูงเท่าหน้าจอ ลบ navbar*/
    }

  
    .sidebar a {
      color: #2E3A59;
      text-decoration: none;
      padding: 12px 20px;
      border-radius: 8px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      transition: background 0.3s;
      cursor: pointer;
    }
    .sidebar a:hover {
      background-color:#e14d2a; /*ffca73*/
      color: #f5f2f2;
    }
    .sidebar svg {
      margin-right: 10px;
      width: 20px;
      height: 20px;
      fill: white;
    }
    #sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}
    .submenu {
      overflow: hidden;
      height: 0;
      transition: height 0.4s ease, padding 0.4s ease;
      padding-left: 20px;
    }
    .submenu a {
      font-size: 14px;
      padding: 8px 10px;
    }
    .submenu.open {
      max-height: 800px; /* เพียงพอสำหรับ submenu หลายรายการ */
    }
    .sidebar-bottom a {
      display: block;
      padding: 15px 20px;
      text-decoration: none;
      color: white;
    }
    /* .sidebar-bottom {
      border-top: 1px solid #666;
    } */

/*
.afundlink a:link,a:visited {
  background-color:#1b2126;
  color: #e14d2a;
}
.afundlink a:hover {
  background-color:#e14d2a;
  color: #f5f2f2;
}*/


    /* -------------------- Content -------------------- */
    .content {
      flex: 1;
      margin-left: 250px;
      padding: 80px 20px 20px;
      background-color: #FFF;/*f7f7f8 */
      min-height: 100vh;
      transition: margin-left 0.3s ease, background 0.3s ease;
    }

    /* -------------------- Hamburger -------------------- */
    .hamburger {
      position: fixed;
      top: 20px;
      left: 20px;
      width: 30px;
      height: 18px;
      display: none;
      flex-direction: column;
      justify-content: space-between;
      cursor: pointer;
      background: #FFF;/*transparent*/
      border: none;
      z-index: 1300;
    }
    .hamburger span {
      display: block;
      width: 100%;
      height: 3px;
      background-color: rgb(85, 85, 85);
      border-radius: 2px;
      transition: 0.4s;
    }
    .hamburger.open span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.open span:nth-child(2) {
      opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }
    @media (prefers-color-scheme: light) {
      .hamburger span {
        background-color: #000;
      }
    }

    /* -------------------- Search Popup -------------------- */
    .search-popup {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: none;
      align-items: center;
      justify-content: center;
      background-color: rgba(0,0,0,0.4);
      z-index: 2000;
    }
    .search-popup-content {
      background: #fff;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.3);
      width: 80%;
      max-width: 400px;
    }
    .search-popup input {
      width: 97%;
      padding: 10px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 8px;
      outline: none;
    }
/* .wrapper {
  border: 1px solid white;
  position:absolute;
  width: 80vm;
  transform: translate(-50%, -50%);
  top: 50%; 
  left:50%;
  padding: 10px;
  background-color: #FF8C66;
}
.stat {
  width: 28vmin;
  height: 28vmin;
  border: 1px solid orange;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 1em 0;
  position: relative;
  font-size: 16px;
  border-radius: 0.5em;
  background-color: #FF8C66;
}
span.num {
  color: #f5f2f2;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 2em;
}
span.textnc {
  color: #f5f2f2;
  font-size: 1em; 
  text-align: center;
  pad: 0.7em 0;
  font-weight: 400;
  line-height: 0;
} */

    /* -------------------- Responsive -------------------- */
    @media screen and (max-width: 1024px) {
      .wrapper {
        width: 85vw;
      }
      .stat {
        /* height: 26vmin; */
        width: 26vmin;
        font-size: 12px;

      }
    }
    @media screen and (max-width: 768px) {
      .sidebar {
        transform: translateX(-100%);
      }
      .sidebar.open {
        transform: translateX(0);
      }
      .content {
        margin-left: 0;
        padding-top: 80px;
      }
      .hamburger {
        display: flex;
      }
      .py-5.pt-5 {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px; /* ปรับตามความสูงที่ต้องการ */
}
    }

/*--------------------------------------------------------------
# Stats Section
--------------------------------------------------------------*/
/*.stats .stats-item {
  padding: 30px;
  width: 100%;
}

.stats .stats-item span {
  color: var(--heading-color);
  font-size: 48px;
  display: block;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

.stats .stats-item span:after {
  content: "";
  position: absolute;
  display: block;
  width: 25px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.stats .stats-item p {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  padding: 0;
  margin: 0;
  font-family: var(--heading-font);
  font-weight: 500;
}
*/
/*-----------------------------------
.stats-container {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 20px auto;
  max-width: auto;
  padding-inline: 16px;
  background-color: #FF8C66;
}
.stats-container .stat {
 display: grid;
 padding: 24px;
 text-align: center;
 color: #f5f2f2; 
}
.stats-container .stat .num {
 font-size: 45px;
 font-weight: bold;
}
-----------------------------*/
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px auto;
  padding: 24px 16px;
  background-color: #FF8C66;
  text-align: center;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
}

.stats-container .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #f5f2f2;
}

.stats-container .stat .num {
  font-size: 45px;
  font-weight: bold;
}

.stats-container .textnc {
  font-size: 16px;
  word-wrap: break-word;
}

.imgX {
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.imgX:hover {
  transform: scale(1.1);
}
.imgX1 {
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.imgX1:hover {
  transform: scale(0.9);
}
.section-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center; }