/* // ปุ่มหลักของเว็บไซต์ (CI Color Button) */
.ci-color-button {
  background: #005da8; 
  color: #ffffff;         
}
.ci-color-button:hover {
  background: #0096d1;
  transform: scale(0.975);
}
.ci-color-button:focus {
  outline: 3px solid rgba(0, 110, 255, 0.555);
}

/* // แถบเมนูหลัก (Main Navigation Bar) */
#mainNav {
  background: rgba(30, 58, 138, 0.85) !important; /* semi-transparent blue */
  box-shadow: 0 4px 24px rgba(30,58,138,0.10);
  transition: all 0.3s ease;
}

/* // ลิงก์ในเมนู (Nav Link Default Style) */
#mainNav .nav-link {
  background: transparent;
  color: #fff !important;
  border-radius: 9999px;
  font-weight: 500;
  min-width: 44px;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, border 0.2s;
  border: 2px solid transparent;
}

/* // เอฟเฟกต์เมื่อเอาเมาส์ชี้ลิงก์ (Hover Nav Link) */
#mainNav .nav-link:hover {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

/* // ลิงก์ที่ถูกเลือก (Active Nav Link) */
#mainNav .nav-link.active {
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.10);
  color: #ffd600 !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}

/* // ลิงก์ที่ Active แล้ว Hover ซ้ำ (Active Hover) */
#mainNav .nav-link.active:hover {
  color: #ffd600 !important;
  background: rgba(255,255,255,0.18);
}

/* // สไตล์พื้นหลังสีเทาอ่อน */
.bg-gray-150 {
  background-color: #f5f5f5;
}

/* // เอฟเฟกต์ Fade-Out สำหรับโมดอลต้อนรับ */
.fade-out {
  animation: fadeOut 0.5s forwards;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
  }
}

/* // โหมดเมนูบาร์แบบย่อ (Compact Menu Bar) */
#mainNav.compact {
  justify-content: center !important;
  background: rgba(30, 58, 138, 0.95);
  box-shadow: 0 4px 24px rgba(30,58,138,0.10);
  border-radius: 9999px;
  width: fit-content;
  min-width: 240px;
  max-width: 80vw;
  margin: 0.5rem auto 0 auto;
  padding: 0.4rem 1.5rem;
  left: 0;
  right: 0;
  position: relative;
  top: 0;
  z-index: 60;
  transition: all 0.5s cubic-bezier(.4,0,.2,1);
}

/* // เมนูบาร์แบบย่อ: ปรับระยะห่างลิงก์ */
#mainNav.compact #navLinks {
  gap: 0.4rem;
}

/* // ลิงก์ในโหมด Compact */
#mainNav.compact .nav-link {
  background: #fff;
  color: #1e3a8a !important;
  border-radius: 9999px;
  font-weight: 600;
  min-width: 44px;
  padding: 0.35rem 1rem;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(30,58,138,0.08);
  transition: background 0.2s, color 0.2s;
}
#mainNav.compact .nav-link:hover {
  background: #2563eb;
  color: #fff !important;
}

/* // ซ่อนโลโก้เมื่อเป็น Compact */
#mainNav.compact #navLogo {
  display: none !important;
}

/* // เมนูบาร์ปกติ (Spread Out Style) */
#mainNav {
  border-radius: 9999px;
  margin: 0.5rem auto 0 auto;
  width: 65vw;
  max-width: 423px;
  min-width: 240px;
  position: sticky;
  top: 0;
  justify-content: flex-start;
  background: linear-gradient(90deg, #1e3a8a 0%);
  box-shadow: 0 4px 24px rgba(30,58,138,0.10);
  padding: 0.4rem 1.5rem;
  z-index: 60;
  transition: all 0.5s cubic-bezier(.4,0,.2,1);
}

/* // ลิงก์ในเมนูบาร์ปกติ */
#mainNav .nav-link {
  background: transparent;
  color: #fff !important;
  border-radius: 9999px;
  font-weight: 500;
  padding: 0.35rem 1rem;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
#mainNav .nav-link:hover {
  background: rgba(255,255,255,0.15);
}
#mainNav .nav-link:active {
  background: rgba(255,255,255,0.25);
}

/* // ดรอปดาวน์ตั้งค่า (Settings Dropdown) */
.settings-dropdown {
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  display: block;
}
.settings-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.settings-dropdown.hidden {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}

/* // เอฟเฟกต์หมุนเฟือง (Settings Gear Animation) */
.rotate-gear {
  animation: rotateGear 0.5s cubic-bezier(.4,0,.2,1);
}
.rotate-gear-reverse {
  animation: rotateGearReverse 0.5s cubic-bezier(.4,0,.2,1);
}
@keyframes rotateGear {
  from { transform: rotate(0deg);}
  to { transform: rotate(180deg);}
}
@keyframes rotateGearReverse {
  from { transform: rotate(180deg);}
  to { transform: rotate(0deg);}
}

/* // พื้นหลัง Hero Section */
.hero-background {
  background-color: #0b0b0b;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('your-background-image.jpg');
  background-size: cover;
  background-position: center;
  min-height: calc(100vh - 88px);
}

/* // เงาข้อความใน Hero */
.text-shadow-custom {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* // ปุ่มหลัก (Primary Button) */
.btn-primary {
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-weight: 700;
  transition: all 0.2s;
}

/* // ปุ่มเข้าสู่ระบบ (Login Button) */
.btn-login {
  background-color: #ffffff;
  color: #1f2937;
}
.btn-login:hover {
  background-color: #e5e7eb;
}

/* // ปุ่มเรียนรู้เพิ่มเติม (Learn More Button) */
.btn-learn {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}
.btn-learn:hover {
  background-color: #fbbf24;
  color: #000000;
}

/* // ขนาดโลโก้ */
.custom-logo-size {
  height: 60px;
  width: 150px;
}

/* // เอฟเฟกต์เบลอพื้นหลังเมื่อเลื่อน (Blur on Scroll) */
#mainNav.scrolled {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(30, 58, 138, 0.85) !important;
}

/* // การแสดงผลบนหน้าจอมือถือ */
@media (max-width: 768px) {
  #navLinks {
    background: inherit;
    width: 100%;
  }

  #navLinks .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0;
  }

  #navLinks .nav-link:hover {
    background: rgba(255,255,255,0.1);
  }
}

/* // ปุ่มในเมนู Settings Dropdown */
.settings-dropdown button {
  margin-bottom: 0.5rem;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
}
.settings-dropdown button:last-child {
  margin-bottom: 0;
}

.content-section {
     margin: 0 auto;
     opacity: 0;
     transform: translateY(50px);
     transition: all 0.8s ease;/
   }
   .content-section.visible {
     opacity: 1;
     transform: translateY(0);
   }