.anuphan-extralight {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
}

.anuphan-lightweith {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
}

.anuphan-light {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

.anuphan-regular {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.anuphan-medium {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.anuphan-semibold {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.anuphan-bold {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}
.swal2-container {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}
.swal2-container button {
  font-family: "Anuphan", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.text-shadow-1 {
  text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.25);
}

.text-shadow-2 {
  text-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}

.text-shadow-3 {
  text-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

/* ========================================
   Staff Structure Styles
   ======================================== */
.staff-structure {
  margin-top: 40px;
  margin-bottom: 40px;
}

.staff-grid {
  display: grid;
  gap: 30px;
  align-items: center;
  justify-items: center;
}

/* Row 1: 1 person (center) */
.staff-row-1 {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Row 2: 2 people (left and right) */
.staff-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  width: 100%;
  max-width: 600px;
}

/* Row 3: 5 people (evenly spaced) */
.staff-row-3 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px; /* ลดจาก 40px เป็น 20px */
  width: 100%;
  max-width: 900px; /* เพิ่มจาก 800px เป็น 900px */
}

.staff-member {
  text-align: center;
  transition: transform 0.3s ease;
}

.staff-member:hover {
  transform: translateY(-5px);
}

.staff-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  object-fit: cover;
}

.staff-photo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 50%;
}

.staff-member:hover .staff-photo {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Different gradient colors for each row */
.staff-row-1 .staff-photo {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.staff-row-2 .staff-member:nth-child(1) .staff-photo {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.staff-row-2 .staff-member:nth-child(2) .staff-photo {
  background: linear-gradient(135deg, #fbbc05, #ea4335);
}

.staff-row-3 .staff-member:nth-child(1) .staff-photo {
  background: linear-gradient(135deg, #9c27b0, #673ab7);
}

.staff-row-3 .staff-member:nth-child(2) .staff-photo {
  background: linear-gradient(135deg, #ff9800, #ff5722);
}

.staff-row-3 .staff-member:nth-child(3) .staff-photo {
  background: linear-gradient(135deg, #00bcd4, #009688);
}

.staff-row-3 .staff-member:nth-child(4) .staff-photo {
  background: linear-gradient(135deg, #795548, #607d8b);
}

.staff-row-3 .staff-member:nth-child(5) .staff-photo {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
}

.staff-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  font-size: 1.1rem; /* คืนค่าเดิม */
  white-space: nowrap; /* ป้องกันการตัดบรรทัด */
  overflow: hidden;
  text-overflow: ellipsis; /* แสดง ... หากข้อความยาวเกินไป */
}

.staff-position {
  color: #667eea;
  font-size: 0.9rem; /* คืนค่าเดิม */
  font-weight: 500;
  white-space: nowrap; /* ป้องกันการตัดบรรทัด */
  overflow: hidden;
  text-overflow: ellipsis; /* แสดง ... หากข้อความยาวเกินไป */
}

/* ========================================
   Chatbot
   ======================================== */
.chatbot-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
}

.chatbot-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.chatbot-float .icon {
  font-size: 1.8rem;
  color: white;
}

.chatbot-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.chatbot-container {
  width: 450px;
  height: 600px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.close-chatbot {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.2rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center; /* ✅ สำคัญที่สุด */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.chat-header {
  background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335);
  color: white;
  padding: 25px;
  text-align: center;
  position: relative;
}

.chat-header h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.chat-header h2 img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.chat-header h2 img:hover {
  transform: scale(1.1);
}

.chat-header p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #667eea, #764ba2);
  border-radius: 3px;
}

.welcome-message {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05)
  );
  border-radius: 20px;
  border: 2px dashed rgba(102, 126, 234, 0.2);
  margin-bottom: 20px;
}

.welcome-message h3 {
  color: #4285f4;
  margin-bottom: 10px;
}

.message {
  margin-bottom: 15px;
  padding: 12px 18px;
  border-radius: 20px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.5;
  animation: messageSlide 0.4s ease-out;
}

.user-message {
  background: linear-gradient(135deg, #4285f4, #667eea);
  color: white;
  margin-left: auto;
  text-align: right;
  border-bottom-right-radius: 5px;
}

.bot-message {
  background: white;
  color: #333;
  border: 1px solid #e9ecef;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 5px;
}

.typing-indicator {
  display: none;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 15px;
}

.typing-bubble {
  background: white;
  padding: 15px 20px;
  border-radius: 20px;
  border-bottom-left-radius: 5px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4285f4;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input {
  padding: 20px;
  background: white;
  border-top: 1px solid #e9ecef;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 5px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: #4285f4;
  background: white;
}

.input-wrapper input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
}

.input-wrapper input::placeholder {
  color: #999;
}

.send-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.1);
}
.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Welcome Tooltip
   ======================================== */
.welcome-tooltip {
  position: fixed;
  bottom: 110px;
  right: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 15px 20px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
  z-index: 1500;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 280px;
  pointer-events: none;
}

.welcome-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: tooltipPulse 2s ease-in-out infinite;
}

.tooltip-content {
  position: relative;
}

.tooltip-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  padding-right: 25px;
}

.tooltip-content strong {
  color: #ffd700;
  font-weight: 600;
}

.tooltip-close {
  position: absolute;
  top: -5px;
  right: -5px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.tooltip-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tooltip-arrow {
  position: absolute;
  bottom: -8px;
  right: 30px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #764ba2;
}

/* ========================================
   Corner Mode & Quiz Modal
   ======================================== */
.chatbot-modal.corner-mode {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
}

.chatbot-modal.corner-mode .chatbot-container {
  width: 400px;
  height: 500px;
  margin: 0;
  position: fixed;
  bottom: 100px;
  right: 30px;
  animation: slideInCorner 0.3s ease-out;
}

.quiz-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.quiz-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-quiz {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #999;
}

/* ========================================
   Animations
   ======================================== */
@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInCorner {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tooltipPulse {
  0%,
  100% {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
  }
}

.knowledge-card,
.quiz-card {
  animation: slideUp 0.6s ease-out;
}
.consultation-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.consultation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.consultation-btn:active {
  transform: translateY(0);
}
.appointment-btn-inline {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.appointment-btn-inline {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.appointment-btn-inline:active {
  transform: translateY(0);
}
@media (max-width: 768px) {
  /* ========================================
   Chatbot
   ======================================== */
  /* .chatbot-container {
    position: fixed;
    width: 95%;
    height: 100vh;
    margin: 20px;
  } */
  .chatbot-modal.corner-mode .chatbot-container {
    width: calc(100vw - 40px);
    height: 540px;
    right: 20px;
    bottom: 80px;
    border-radius: 20px;
  }
  .chatbot-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .chatbot-float .icon {
    font-size: 1.5rem;
  }

  .chat-header {
    padding: 20px;
  }

  .chat-header p {
    display: none; /* ซ่อนคำอธิบายและปุ่ม */
  }

  .chat-header h2 {
    font-size: 1.2rem;
  }

  .chat-messages {
    padding: 15px;
    height: 100%;
  }

  .send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .input-wrapper input {
    font-size: 14px;
  }
  /* .chatbot-container {
    width: 95%;
    height: 80vh;
    margin: 20px;
  }
  .chatbot-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .chatbot-float .icon {
    font-size: 1.5rem;
  } 
    .chat-header h2 img {
    width: 40px;
    height: 40px;
  } 
    .welcome-tooltip {
    bottom: 90px;
    right: 15px;
    max-width: 250px;
    padding: 12px 16px;
  }
  .tooltip-content p {
    font-size: 13px;
  }
  .tooltip-arrow {
    right: 25px;
  }
  .chatbot-modal.corner-mode .chatbot-container {
    width: calc(100vw - 40px);
    height: 400px;
    right: 20px;
    bottom: 80px;
  } 
  */
  /* ========================================
   จบ Chatbot
   ======================================== */
  .nav-menu {
    display: none;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .about-content {
    padding: 0 10px;
  }

  .logo-img {
    width: 35px;
    height: 35px;
  }
  .logo {
    font-size: 1.3rem;
    gap: 10px;
  }
  .knowledge-grid,
  .quiz-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  .knowledge-card,
  .quiz-card {
    padding: 25px 20px;
  }
  .knowledge-card .icon,
  .quiz-card .icon {
    font-size: 3rem;
  }
  .knowledge-card h3,
  .quiz-card h3 {
    font-size: 1.1rem;
  }

  /* Service Process Responsive */
  .simple-process-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
  }

  .simple-step:nth-child(1),
  .simple-step:nth-child(2),
  .simple-step:nth-child(3),
  .simple-step:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .simple-step {
    padding: 25px 20px;
  }

  .step-header h3 {
    font-size: 1.2rem;
  }

  .step-header h4 {
    font-size: 1.1rem;
  }

  .step-body p {
    font-size: 0.95rem;
  }

  .emergency-simple {
    padding: 25px;
    margin: 30px 0;
  }

  .emergency-simple .phone {
    font-size: 1.6rem;
  }

  /* Staff Structure Responsive */
  .staff-row-2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .staff-row-3 {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  /* ========================================
   Chatbot
   ======================================== */

  .chatbot-modal.corner-mode .chatbot-container {
    width: calc(100vw - 40px);
    height: 540px;
    right: 20px;
    bottom: 80px;
    border-radius: 20px;
  }

  .chat-header {
    padding: 15px;
  }

  .chat-header p {
    display: none;
  }

  .chat-header h2 {
    font-size: 1.1rem;
    gap: 8px;
  }

  .chat-header h2 img {
    width: 35px;
    height: 35px;
  }

  /* .close-chatbot {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  } */

  .chat-messages {
    padding: 12px;
    height: calc(100% - 160px); /* ปรับให้เหลือพื้นที่มากขึ้นสำหรับข้อความ */
  }

  .send-btn {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }

  .input-wrapper input {
    font-size: 13px;
  }
  /* .chat-header h2 img {
    width: 35px;
    height: 35px;
  }
  .welcome-tooltip {
    bottom: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
    text-align: center;
  }
  .tooltip-arrow {
    right: 50%;
    transform: translateX(50%);
  } */
  /* ========================================
   จบ Chatbot
   ======================================== */
  .container {
    padding: 0 15px;
  }
  .section {
    padding: 60px 0;
  }
  .hero {
    padding: 100px 0 60px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .knowledge-card,
  .quiz-card {
    padding: 20px;
  }
  .quiz-content {
    padding: 30px 20px;
  }
  .contact-info {
    padding: 20px;
  }

  /* Service Process Mobile */
  .simple-process-grid {
    margin: 20px 0;
    gap: 15px;
  }

  .simple-step {
    padding: 20px 15px;
  }

  .step-header h3 {
    font-size: 1.1rem;
  }

  .step-header h4 {
    font-size: 1rem;
  }

  .step-body p {
    font-size: 0.9rem;
  }

  .option strong {
    font-size: 1rem;
  }

  .emergency-simple {
    padding: 20px;
    margin: 25px 0;
  }

  .emergency-simple h3 {
    font-size: 1.2rem;
  }

  .emergency-simple .phone {
    font-size: 1.4rem;
  }

  /* Staff Structure Mobile */
  .staff-row-3 {
    grid-template-columns: 1fr;
  }
  .staff-photo {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }
  .staff-name {
    font-size: 0.9rem;
  }
  .staff-position {
    font-size: 0.75rem;
  }
}

.hero-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 12px;
}
