@font-face {
  font-family: "Kanit";
  src: url(Kanit-Regular.ttf) format("truetype");
  font-weight: normal;
}

@font-face {
  font-family: "Kanit";
  src: url(Kanit-Bold.ttf) format("truetype");
  font-weight: bold;
}

html,
body {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  padding-top: 56px;
  background-color: #ffffff !important;
  font-family: "Kanit", sans-serif !important;
  font-weight: normal !important;
}

h1,
h2 {
  font-family: "Kanit", sans-serif !important;
  font-weight: bold !important;
}

.vcontainer {
  padding: 0px !important;
  margin: 0px !important;
  width: 100%;
  overflow-x: visible !important;
}

.pcontainer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  overflow: visible;
  width: 100%;
  height: 100%;
}

.bordercontainer {
  width: 100%;
  border: 15px solid green;
  padding: 50px;
  margin: 20px;
}

p {
  font-size: 18px;
}

/* callout */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e9ecef;
  border-left-width: 0.25rem;
  border-radius: 0.25rem;
}
.bd-callout h4 {
  margin-bottom: 0.25rem;
}
.bd-callout p:last-child {
  margin-bottom: 0;
}
.bd-callout code {
  border-radius: 0.25rem;
}
.bd-callout + .bd-callout {
  margin-top: -0.25rem;
}
.bd-callout-info {
  border-left-color: #5bc0de;
}
.bd-callout-warning {
  border-left-color: #f0ad4e;
}
.bd-callout-danger {
  border-left-color: #d9534f;
}

/* menu */
nav {
  background-color: rgb(66, 170, 103) !important;
}

.navbar-collapse {
  flex-grow: unset !important;
}

.navbar-nav {
  align-items: end;
}

.nav-item,
.navbar-brand {
  margin: 0px 10px 0px 10px;
  font-size: 1.5rem !important;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.8) !important;
}

.nav-item:hover {
  color: rgba(0, 0, 0, 0.55) !important;
}

.nav-link {
  padding: 16px 0px 16px 0px;
  font-weight: 600;
}

.dropdown-menu {
  border-radius: 0px 0px 16px 16px;
}

/* progress */
#progress-bar {
  width: 0;
  height: 7px;
  background-color: blue;
  position: fixed;
  top: 93px;
  z-index: 9;
}

/* Header */
header {
  background-color: rgb(126, 173, 140);
  width: 100%;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.no {
  padding: 0px !important;
  margin: 0px !important;
}

/* page */
.page {
  display: flex;
  align-items: center;
  height: fit-content;
  margin-top: 30px;
  margin-bottom: 30px;
  max-height: 600px;
  overflow: hidden;
}

.left {
  order: 1;
  width: 50%;
}

.right {
  order: 2;
  width: 50%;
}

.home_page_font {
  margin-top: 40em;
  margin-bottom: 40em;
}

.home_page_first_font {
  margin-bottom: 40em;
}

.home_page_second_font {
  margin-top: 168em;
  margin-bottom: 150em;
}

.home_page_third_font {
  display: flex;
  align-items: center;
  height: fit-content;
  margin-top: 30px;
  margin-bottom: 30px;
  max-height: 419px;
  overflow: visible;
}

.members {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.members_row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
}

.member_img {
  flex: 1 1 calc(33.333% - 10px); /* Each image takes up 1/3 of the container width, minus some spacing */
  max-width: calc(
    33.333% - 10px
  ); /* Ensures images do not exceed 1/3 of the container width */
  margin-bottom: 30px; /* Adds spacing between rows */
  object-fit: cover; /* Ensures images cover the allocated space without distortion */
  max-height: 419px; /* Ensures images do not exceed this height */
}

.w30 {
  width: 30% !important;
}
.w70 {
  width: 70% !important;
}
.w40 {
  width: 40% !important;
}
.w60 {
  width: 60% !important;
}
.w80 {
  width: 80% !important;
}

@media (max-width: 767px) {
  .page .home_page_third_font {
    flex-direction: column;
    text-align: center;
    max-height: none;
    overflow: hidden;
  }

  #progress-bar {
    width: 0;
    height: 5px;
    background-color: blue;
    position: fixed;
    top: 62px;
    z-index: 999;
  }

  .rcontainer {
    width: 100%;
  }

  .member_img {
    flex: 1 1 90%; /* Each image takes up 1/3 of the container width, minus some spacing */
    max-width: 90%; /* Ensures images do not exceed 1/3 of the container width */
    margin-bottom: 30px; /* Adds spacing between rows */
    object-fit: cover; /* Ensures images cover the allocated space without distortion */
    max-height: 419px; /* Ensures images do not exceed this height */
  }
}

/* Sidebar */
/* Sidebar container */
.sidebar {
  width: 20%;
  position: sticky;
  height: 80vh; /* Full height of the viewport */
  background-color: transparent; /* Transparent background */
  border-radius: 20px;
  top: 120px; /* Distance from the top */
  overflow-y: auto; /* Enable vertical scrolling */
}

/* Unordered list styling */
.sidebar ul {
  list-style-type: none; /* Remove default list style */
  padding: 0; /* Remove padding */
  margin: 0; /* Remove margin */
}

/* List item styling */
.sidebar li {
  position: relative; /* Needed for absolute positioning of submenu */
  padding: 5px; /* Increase padding for larger hover area */
  width: auto;
}

/* Link styling */
.sidebar a {
  border: 2px solid rgb(108, 161, 222); /* Border color */
  height: auto; /* Fixed height */
  width: calc(100% - 20px); /* Adjust width for margins */
  margin: 10px; /* Margin around links */
  border-radius: 30px; /* Rounded corners */
  color: rgb(63, 102, 77); /* Text color */
  text-align: center; /* Center text */
  font-family: "Kanit", sans-serif; /* Font family */
  font-size: min(1.5vw, 20px); /* Responsive font size */
  transition: width 0.5s, color 0.5s; /* Smooth transition for hover effects */
  cursor: pointer; /* Pointer cursor */
  text-decoration: none; /* No underline */
  display: inline-block; /* Inline block for layout */
  overflow-wrap: break-word; /* Ensure long words break to the next line */
  white-space: normal; /* Allow text to wrap */

}

/* Hover effect for links */
.sidebar li:hover > a {
  background-color: rgba(233, 255, 184, 0.5); /* Highlight on hover */
}

/* Submenu styling */
.submenu {
  display: none; /* Hide submenu by default */
  list-style-type: none; /* Remove bullets */
  padding: 0; /* Remove padding */
  margin: 0; /* Remove margin */
  background-color: rgb(255, 255, 255); /* Background color */
  border-radius: 10px; /* Rounded corners */
  position: relative; /* Position relative for dropdown */
  top: 0; /* Align with the top of the parent */
  z-index: 10; /* Ensure it appears above other elements */
  max-width: 100%; /* Prevent submenu from exceeding the sidebar width */
}

/* Show submenu on hover */
.sidebar li:hover > .submenu {
  display: block; /* Show submenu */
}

/* Submenu item styling */
.submenu li {
  margin: 0; /* No margin for submenu items */
  width: auto; /* Allow width to be flexible */
}

/* Submenu link styling */
.submenu a {
  display: block; /* Make the link a block element */
  height: auto; /* Allow height to adjust */
  border: 2px solid rgb(108, 161, 222); /* Same border style */
  margin: 5px 10px; /* Margin for submenu items */
  padding: 10px; /* Padding for better spacing */
  white-space: normal; /* Allow text to wrap */
  overflow-wrap: break-word; /* Ensure long words break to the next line */
}

/* Optional scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 8px; /* Width of the scrollbar */
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgb(108, 161, 222); /* Color of the scrollbar thumb */
  border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

.sidebar::-webkit-scrollbar-track {
  background: transparent; /* Background of the scrollbar track */
}

/* Page */

.rcontainer {
  width: 72%;
}

.rcontainer h1 {
  margin-bottom: 20px;
  margin-top: 20px;
}

.rcontainer p {
  margin-bottom: 30px;
}

/* footer */
footer {
  padding: 0px !important;
  /* margin: 0px -100px 0px -100px !important; */
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  justify-items: center;
  text-align: center;
  background-color: rgb(166, 197, 153);
}

footer a {
  color: rgb(0, 0, 0) !important;
  text-decoration: none;
}
footer a:hover {
  color: rgb(255, 255, 255) !important;
  text-decoration: underline;
}

small {
  color: black !important;
}

/* project */
.xcontainer {
  width: 100%;
}

.xcontainer h2 {
  margin-bottom: 20px;
  margin-top: 20px;
}

.xcontainer p {
  margin-bottom: 30px;
}

/* back-to-top */

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none; /* Hide the button by default */
  width: 40px;
  height: 40px;
  background-color: #333;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
}
