/* CSS สำหรับจัดรูปแบบ Accordion */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

.faq-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.accordion-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.accordion-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #007bff; /* สีเมื่อเมาส์ชี้ */
}

.accordion-header::after {
    content: '+'; /* เครื่องหมายบวกสำหรับยุบ */
    font-size: 25px;
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    content: '-'; /* เครื่องหมายลบสำหรับขยาย */
    font-size: 25px;
    transform: rotate(0deg); /* ไม่ต้องหมุนเพราะเป็นเครื่องหมายลบ */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* เพิ่ม transition สำหรับการขยาย/ยุบ */
    padding: 0 15px; /* เพิ่ม padding ด้านข้าง */
    color: #666;
    line-height: 1.6;
}

.accordion-content p {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 15px; /* เพิ่ม padding ด้านล่างของเนื้อหา */
}

/* เมื่อเนื้อหาถูกขยาย */
.accordion-content.active {
    max-height: 500px; /* ค่าประมาณการ, ควรปรับให้ครอบคลุมเนื้อหาสูงสุด */
    /* หรือใช้ auto แต่อาจทำให้ animation ไม่ราบรื่นเท่า */
}

/* responsive basic */
@media (max-width: 600px) {
    .faq-container {
        padding: 15px;
    }
}