/*Edit CSS Version 0.0.7*/

@font-face {
    font-family: "FC Iconic"; /* The name you'll use in your CSS */
    src: url('../fonts/300_fciconic-light.woff') format('woff'); /* Path to the WOFF file */
    font-weight: normal; /* Specify the font weight if needed */
    font-style: normal; /* Specify the font style (normal, italic, etc.) */
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Word wrap for table columns */
.word-wrap {
    word-wrap: break-word;
    white-space: normal;
}

*{
    font-family: "FC Iconic","Mitr", sans-serif;
}
        
body{
    background-image: url("../images/Background.webp");
    background-repeat: no-repeat;
    background-size: cover;
}
.name_sys{
    color: #8C62FF;
    /* leading-trim: both; */
    /* text-edge: cap; */
    font-family: "FC Iconic";
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-align: center;
}
.name_systh{
    color: #FFF;
    text-align: center;
    /* leading-trim: both; */
    /* text-edge: cap; */
    font-family: "FC Iconic";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 39px; /* 195% */
    letter-spacing: -0.2px;
}
.container-main{
    display: flex;
    /*width: 1440px;*/
    padding: 200px 30px;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}
.desc_sys1{
    color: #FFF;
    text-align: center;
    /* leading-trim: both; */
    /* text-edge: cap; */
    font-family: Outfit;
    font-size: 48px;
    font-style: normal;
    font-weight: 600;
    line-height: 76px; /* 158.333% */
    letter-spacing: -0.48px;
}
.desc_sys2{
    color:#FFF;
    text-align: center;
    /* leading-trim: both; */
    /* text-edge: cap; */
    font-family: "FC Iconic";
    font-size: 22px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    opacity: 0.8;
}

.login_sugg{
    color: rgba(255, 255, 255, 0.80);
    text-align: center;
    /* leading-trim: both; */
    /* text-edge: cap; */
    font-family: "FC Iconic";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.login_header_text{
    color: rgba(255, 255, 255, 0.80);
    font-family: "FC Iconic";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.login_content{
    color: rgba(255, 255, 255, 0.80);
    text-align: center;
    font-family: "FC Iconic";
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

/*Popup-section*/

/* 🔳 เบลอพื้นหลัง */
body.modal-open {
    overflow: hidden;
}

#overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.4); /* มืดนิดหน่อย */
    backdrop-filter: blur(4px);        /* เบลอพื้นหลัง */
    z-index: 9998;
    display: none;
}

.popup {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ccff66;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    /*width: 400px;*/
    text-align: center;
    color: #000;

    /* ✅ เพิ่มกรอบ */
    border: 8px solid #ffffff;

    /* ✅ เพิ่ม animation */
    animation: popupFadeIn 0.4s ease-out;

    /* ✅ เพิ่มส่วนนี้เพื่อให้ scroll ได้ */
    max-height: 90vh;      /* จำกัดความสูง popup */
    overflow-y: auto;       /* ให้ scroll ภายใน popup ได้ */
    overscroll-behavior: contain; /* ป้องกัน scroll ทะลุพื้นหลัง */

}

.popup.safe {
    background-color: #ccff66;
}

.popup.danger {
    background-color: #c41411;
    color: #ffffff;
}

.popup.warning {
    background-color: #ff8c00;
}

.popup .header {
    background: #ffffff;
    color: #202020;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 24px;
}

.popup .checkmark {
    margin-bottom: 15px;
}

.popup .checkmark img {
    width: 150px;
    height: auto;
}

.popup .status {
    font-size: 35px;
    font-weight: bold;
}

.popup .sms-content {
    background-color: #eee;
    color: #333;
    padding: 10px;
    margin: 10px auto;
    width: 90%;
    border-radius: 5px;

     /* ✅ กันข้อความล้นกล่อง */
    white-space: normal;          /* ยอมขึ้นบรรทัดใหม่ได้ */
    word-wrap: break-word;        /* ตัดคำเมื่อยาวเกินกล่อง */
    overflow-wrap: break-word;    /* กันตัวอักษรติดกันยาว ๆ ล้น */
    word-break: break-all;        /* กรณีเป็นตัวเลข/ตัวอักษรยาว ๆ ไม่มีเว้นวรรค */
}

.popup .sms-content-accuracy {
    background-color: #eee;
    color: #333;
    padding: 10px;
    margin: 10px auto;
    width: 40%;
    border-radius: 5px;
}

.popup button {
    padding: 10px 20px;
    background-color: #030751;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

/* ✅ ปุ่ม ✕ มุมขวาบนของ popup — sticky เพื่อให้เห็นเสมอแม้ scroll เนื้อหา */
.popup .popup-close-btn {
    position: sticky;
    top: -22px;               /* ชดเชย padding ของ popup ให้ปุ่มชิดขอบบนตอน scroll */
    display: block;
    margin: -22px -22px -18px auto;  /* ชิดมุมขวาบน และไม่ดันเนื้อหาลง */
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 40px;
    font-family: Arial, sans-serif;
    font-size: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #202020;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 1;
}

.popup .popup-close-btn:hover {
    background-color: #eeeeee;
}

/* ปุ่มยกเลิกใน popup กำลังประมวลผล */
.popup .popup-cancel-btn {
    background-color: #6c757d;
}

#checkBtn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ✅ Hamburger Menu Styles */
.hamburger-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9997; /* ลด z-index ให้ต่ำกว่า popup */
}

/* ✅ ซ่อน hamburger menu เมื่อ popup เปิด */
body.modal-open .hamburger-menu {
  display: none;
}

.menu-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.hamburger-icon {
  color: white;
  font-size: 24px;
  font-weight: bold;
  display: block;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 60px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 15px 0;
  min-width: 250px;
  display: none;
  animation: slideDown 0.3s ease;
}

.dropdown-menu.show {
  display: block;
}

.menu-arrow {
  position: absolute;
  top: -8px;
  right: 20px;
  color: white;
  font-size: 20px;
  transform: rotate(-90deg);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-list li {
  padding: 0;
}

.menu-list a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  font-family: "FC Iconic";
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.menu-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #8c62ff;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ✅ About Us Popup Styles - แยกเฉพาะ */

/* ===========================================
   DESKTOP VERSION (Default)
   =========================================== */
.about-us-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;
  width: 95%;
  max-height: 85vh;
  background: rgba(45, 14, 74, 0.99);
  color: white;
  padding: 0;
  border: 8px solid white;
  border-radius: 15px;
  overflow: hidden;
  z-index: 10001; /* เพิ่ม z-index ให้สูงกว่า hamburger menu */
  animation: popupFadeIn 0.4s ease-out;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.about-popup-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.about-header {
  background: none;
  color: white;
  margin: 0;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  font-family: "FC Iconic";
}

.about-close-btn {
  background: rgba(155, 65, 218, 0.75);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.about-close-btn:hover {
  background: rgba(128, 128, 128, 1);
}

.about-content {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
}

.about-content::-webkit-scrollbar {
  width: 8px;
}

.about-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.about-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.about-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.7);
}

.about-us-popup .project-info {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.about-us-popup .project-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: white;
  font-family: "FC Iconic";
}

.about-us-popup .project-info p {
  font-size: 16px;
  margin: 5px 0;
  opacity: 0.9;
  font-family: "FC Iconic";
}

.about-us-popup .team-section,
.about-us-popup .advisor-section {
  margin-bottom: 30px;
}

.about-us-popup .team-section h3,
.about-us-popup .advisor-section h3 {
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-family: "FC Iconic";
}

.about-us-popup .team-member {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.about-us-popup .member-photo {
  flex-shrink: 0;
  margin-right: 20px;
}

.about-us-popup .profile-image {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.about-us-popup .member-info {
  flex: 1;
  text-align: left;
}

.about-us-popup .member-info p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.4;
  font-family: "FC Iconic";
}

.about-us-popup .member-info strong {
  color: white;
  font-weight: 600;
}

/* ===========================================
   TABLET VERSION (768px and below)
   =========================================== */
@media (max-width: 768px) {
  .about-us-popup {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
    margin: 0 10px;
  }

  .about-popup-header {
    padding: 15px 20px;
    flex-direction: row;
    justify-content: center;
  }

  .about-header {
    font-size: 22px;
  }

  .about-close-btn {
    padding: 6px 10px;
    font-size: 20px;
    right: 15px;
  }

  .about-content {
    padding: 20px 15px;
    max-height: calc(90vh - 100px);
  }

  .about-us-popup .project-info {
    margin-bottom: 25px;
    padding-bottom: 15px;
  }

  .about-us-popup .project-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .about-us-popup .project-info p {
    font-size: 14px;
    margin: 4px 0;
  }

  .about-us-popup .team-section h3,
  .about-us-popup .advisor-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
  }

  .about-us-popup .team-member {
    flex-direction: column;
    text-align: center;
    padding: 15px 10px;
    margin-bottom: 20px;
  }

  .about-us-popup .member-photo {
    margin-right: 0;
    margin-bottom: 15px;
    align-self: center;
  }

  .about-us-popup .profile-image {
    width: 120px;
    height: 180px;
    font-size: 30px;
  }

  .about-us-popup .member-info {
    text-align: center;
  }

  .about-us-popup .member-info p {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.3;
  }

  .about-us-popup .team-section,
  .about-us-popup .advisor-section {
    margin-bottom: 25px;
  }
}

/* ===========================================
   MOBILE VERSION (480px and below)
   =========================================== */
@media (max-width: 480px) {
  .about-us-popup {
    width: 96%;
    max-width: 96%;
    max-height: 92vh;
    margin: 0 8px;
    border: 6px solid white;
  }

  .about-popup-header {
    padding: 14px 18px;
  }

  .about-header {
    font-size: 20px;
  }

  .about-close-btn {
    padding: 6px 9px;
    font-size: 19px;
    right: 12px;
  }

  .about-content {
    padding: 18px 12px;
    max-height: calc(92vh - 90px);
  }

  .about-us-popup .project-info {
    margin-bottom: 22px;
    padding-bottom: 12px;
  }

  .about-us-popup .project-info h3 {
    font-size: 17px;
    margin-bottom: 7px;
  }

  .about-us-popup .project-info p {
    font-size: 13px;
    margin: 3px 0;
  }

  .about-us-popup .team-section h3,
  .about-us-popup .advisor-section h3 {
    font-size: 17px;
    margin-bottom: 12px;
    padding-bottom: 6px;
  }

  .about-us-popup .team-member {
    padding: 12px 8px;
    margin-bottom: 18px;
  }

  .about-us-popup .profile-image {
    width: 110px;
    height: 164px;
    font-size: 28px;
  }

  .about-us-popup .member-info p {
    font-size: 12px;
    margin: 5px 0;
    line-height: 1.2;
  }

  .about-us-popup .team-section,
  .about-us-popup .advisor-section {
    margin-bottom: 22px;
  }
}

/* ===========================================
   SMALL MOBILE VERSION (400px and below)
   =========================================== */
@media (max-width: 400px) {
  .about-us-popup {
    width: 98%;
    max-width: 98%;
    max-height: 95vh;
    margin: 0 5px;
    border: 4px solid white;
  }

  .about-popup-header {
    padding: 12px 15px;
  }

  .about-header {
    font-size: 18px;
  }

  .about-close-btn {
    padding: 5px 8px;
    font-size: 18px;
    right: 10px;
  }

  .about-content {
    padding: 15px 10px;
    max-height: calc(95vh - 80px);
  }

  .about-us-popup .project-info {
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .about-us-popup .project-info h3 {
    font-size: 16px;
  }

  .about-us-popup .project-info p {
    font-size: 12px;
  }

  .about-us-popup .team-section h3,
  .about-us-popup .advisor-section h3 {
    font-size: 16px;
  }

  .about-us-popup .team-member {
    padding: 10px 6px;
  }

  .about-us-popup .profile-image {
    width: 100px;
    height: 150px;
    font-size: 25px;
  }

  .about-us-popup .member-info p {
    font-size: 11px;
    margin: 4px 0;
  }

  .about-us-popup .team-section,
  .about-us-popup .advisor-section {
    margin-bottom: 20px;
  }
}

/* ===========================================
   EXTRA SMALL MOBILE VERSION (360px and below)
   =========================================== */
@media (max-width: 360px) {
  .about-us-popup {
    width: 99%;
    max-width: 99%;
    max-height: 97vh;
    margin: 0 2px;
    border: 3px solid white;
  }

  .about-popup-header {
    padding: 10px 12px;
  }

  .about-header {
    font-size: 16px;
  }

  .about-close-btn {
    padding: 4px 7px;
    font-size: 16px;
    right: 8px;
  }

  .about-content {
    padding: 12px 8px;
    max-height: calc(97vh - 70px);
  }

  .about-us-popup .project-info {
    margin-bottom: 18px;
    padding-bottom: 8px;
  }

  .about-us-popup .project-info h3 {
    font-size: 15px;
    margin-bottom: 5px;
  }

  .about-us-popup .project-info p {
    font-size: 11px;
    margin: 1px 0;
  }

  .about-us-popup .team-section h3,
  .about-us-popup .advisor-section h3 {
    font-size: 15px;
    margin-bottom: 8px;
    padding-bottom: 4px;
  }

  .about-us-popup .team-member {
    padding: 8px 5px;
    margin-bottom: 12px;
  }

  .about-us-popup .profile-image {
    width: 90px;
    height: 136px;
    font-size: 22px;
  }

  .about-us-popup .member-info p {
    font-size: 10px;
    margin: 3px 0;
    line-height: 1.0;
  }

  .about-us-popup .team-section,
  .about-us-popup .advisor-section {
    margin-bottom: 18px;
  }
}

/* ✅ ให้ฟอร์มตรวจสอบกว้างเต็มพื้นที่ (container-main เป็น flex + align-items:center จึงหดฟอร์มตามเนื้อหา) */
#smsForm {
    width: 100%;
    max-width: 900px;
}

#smsForm #smsInput {
    min-height: 52px;
    font-size: 18px;
}

#smsForm,
#smsForm .col {
    text-align: center;
}

#smsForm .form-label {
    display: block;
    text-align: center;
}
