* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sarabun', sans-serif;
  background-color: #f8f8f8;
  color: #333;
  font-size: 18px;
  line-height: 1.6;
}

/* แบนเนอร์ */
.banner {
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #7b1fa2, #512da8);
  color: white;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.banner img {
  height: 80px;
  margin-right: 20px;
}

.banner-text h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

.banner-text p {
  font-size: 16px;
  opacity: 0.85;
}

/* กล่องเนื้อหา */
.container {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.container h2 {
  text-align: center;
  font-size: 54px;
  margin-bottom: 20px;
}

/* รายการแบบ Apple-style */
.info-list {
  list-style: none;
  margin-bottom: 80px; /* กันไม่ให้ tooltip อันสุดท้ายล้น */
}

.info-list li {
  position: relative;
  background: #f9f9f9;
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-list li:hover {
  transform: scale(1.02);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-list li a {
  display: block;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
}

.info-list li:hover a {
  color: #512da8;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background-color: #512da8;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 16px;
  white-space: normal;
  max-width: 90vw;
  transition: all 0.3s ease;
  transform: translateY(5px);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
  .banner {
    flex-direction: column;
    text-align: center;
  }

  .banner img {
    margin-bottom: 10px;
  }

  .container {
    margin: 20px;
    padding: 16px;
  }

  .info-list li {
    padding: 14px 16px;
  }

  .tooltip-text {
    font-size: 14px;
    max-width: 100%;
  }
}
/* ตั้ง tooltip อยู่ใน flow ปกติ */
.tooltip-text {
  display: none;
  margin-top: 10px;
  background-color: #512da8;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* แสดง tooltip แบบ inline เมื่อ hover */
.tooltip:hover .tooltip-text {
  display: block;
}

/* แอนิเมชันเลื่อนลง */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body {
  font-family: 'Sarabun', sans-serif;
  background: linear-gradient(to bottom right, #f3e5f5, #ede7f6, #ffffff);
  color: #333;
  font-size: 18px;
  line-height: 1.6;
}
