/* โหลดฟอนต์ Prompt */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600&display=swap');

html[lang="th"] body {
  font-family: 'Prompt' !important;
}

body {
 font-family: 'Helvetica Neue', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* ===== BASE FONT CLASSES ===== */
.font-h1 {

    font-weight: bold;
    line-height: 110%;
    font-size: 56px;
}

.font-h2 {
  
    font-weight: bold;
    line-height: 120%;
    font-size: 37px;
}

.font-h3 {
 
    font-weight: bold;
    line-height: 120%;
    font-size: 30px;
}

.font-h4 {
 
    font-weight: bold;
    line-height: 130%;
    font-size: 23px;
}

.font-p-bold {

    font-weight: bold;
    line-height: 140%;
    font-size: 20px;
}

.font-p {

    font-weight: normal;
    line-height: 140%;
    font-size: 20px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {

    /* Tablet */
    .font-h1 {
        font-size: 37px;
        line-height: 120%;
    }

    .font-h2 {
        font-size: 30px;
        line-height: 120%;
    }

    .font-h3 {
        font-size: 23px;
        line-height: 130%;
    }

    .font-h4 {
        font-size: 20px;
        line-height: 140%;
    }

    .font-p-bold,
    .font-p {
        font-size: 18px;
        line-height: 140%;
    }
}

@media (max-width: 768px) {

    /* Mobile */
    .font-h1 {
        font-size: 30px;
        line-height: 120%;
    }

    .font-h2 {
        font-size: 23px;
        line-height: 130%;
    }

    .font-h3 {
        font-size: 20px;
        line-height: 140%;
    }

    .font-h4 {
        font-size: 18px;
        line-height: 140%;
    }

    .font-p-bold,
    .font-p {
        font-size: 16px !important;
        line-height: 140%;
    }
}



.faq-section {
    padding: 8rem 0 5rem !important;

}


.faq-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: auto;
    align-items: flex-start;
}
.faq-container-right {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: auto;
    align-items: flex-start;
    flex-direction: row-reverse;
}

.faq-left {
    flex: 1 1 45%;
}

.faq-left h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.faq-left p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.faq-left .cta-button {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 20px;
}

.faq-left img {
    width: 100%;
    border-radius: 12px;
    margin-top: 20px;
}

.faq-right {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: "";
    font-size: 12px;
    color: #2563eb;
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    padding: 12px 20px 20px;
}

.accordion-content p {
    font-size: 0.95rem;
    color: #444;
    margin: 0;
    line-height: 1.6;
}



.accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



.accordion details {
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.accordion details[open] {
  background: #f8f8f8;
}

.accordion summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  position: relative;
}

.accordion summary .icon,
.accordion summary .icon svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.accordion summary .icon svg {
  width: 20px;
  height: 20px;
}

.accordion summary .title-collapse {
  flex-grow: 1;

  font-size: 18px;
  font-weight: bold;
  line-height: 130%;
  color: var(--Grays-Black, #000);
}

.accordion details p {
  padding: 0 17px 16px 60px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}


/* 
details {
    border: 0px solid #ccc;
    border-radius: 12px;
    padding: 0;
    background-color: transparent;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

details[open] {
    background-color: #F8F8F8;
}

summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    position: relative;
}

summary .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

summary .icon svg {
    width: 20px;
    height: 20px;
}

summary .title-collapse {
    color: var(--Grays-Black, var(--Grays-Black, #000));
    font-family: Helvetica;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    line-height: 130%;
    flex-grow: 1;

}



details p {
    padding: 0 17px 16px 60px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
} */


.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 0fr));
    gap: 20px;
  }



.faq-left img {
    max-width: 600px;
    width: 100%;
    margin-top: 20px;
    border-radius: 12px;
}
/* --- xl --- */
@media (min-width: 1281px){
 
}
/* --- lg --- */
@media (min-width: 1025px) and (max-width: 1280px){
 
}
/* --- md --- */
@media (min-width: 768px) and (max-width: 1024px){
    .finance-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    .faq-image{
        display: none;
    }


    
}
/* --- sm xs --- */
@media (min-width: 200px) and (max-width: 767px){
    .faq-container {
        flex-direction: column;
    }
    .faq-left h2 {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .faq-section {
        padding: 6rem 0 5rem !important;
    }
}





/* ซ่อนไอคอนลูกศรขึ้น */
details[open] .arrow.up {
    display: inline-block; /* แสดงไอคอนลูกศรขึ้นเมื่อเปิด */
    animation: rotateUp 0.3s ease-out; /* เพิ่ม animation */
  }
  details[open] .arrow.down {
    display: none; /* ซ่อนไอคอนลูกศรลงเมื่อเปิด */
  }
  
  /* ซ่อนไอคอนลูกศรลง */
  details:not([open]) .arrow.down {
    display: inline-block; /* แสดงไอคอนลูกศรลงเมื่อปิด */
    /* animation: rotateDown 0.3s ease-out;  */
    
  }
  details:not([open]) .arrow.up {
    display: none; /* ซ่อนไอคอนลูกศรขึ้นเมื่อปิด */
  }
  
  /* Animation เมื่อเปิด - ลูกศรขึ้น */
  @keyframes rotateUp {
    0% {
      transform: rotate(180deg); /* เริ่มจากมุม 180 องศา */
    }
    100% {
      transform: rotate(0deg); /* หมุนไปที่มุม 0 องศา */
    }
  }
  
  /* Animation เมื่อปิด - ลูกศรลง */
  @keyframes rotateDown {
    0% {
      transform: rotate(0deg); /* เริ่มจากมุม 0 องศา */
      transform-origin: center; /* หมุนจากจุดกลาง */
    }
    100% {
      transform: rotate(180deg); /* หมุนไปที่มุม 180 องศา */
      transform-origin: center; /* หมุนจากจุดกลาง */
    }
  }
  
  /* เพิ่ม transition ให้กับการหมุน */
  .arrow-icon {
    transition: transform 0.3s ease;
  }
  

  /* ซ่อนไอคอน marker */
details summary::-webkit-details-marker,
details summary::marker {
  display: none;
}


/* ซ่อนไอคอนที่ไม่ต้องการ */
details summary .arrow.up {
  display: none;
}
details[open] summary .arrow.down {
  display: none;
}
details[open] summary .arrow.up {
  display: inline-flex;
}
details:not([open]) summary .arrow.down {
  display: inline-flex;
}
details:not([open]) summary .arrow.up {
  display: none;
}

