/*
Theme Name: Custom Divi Dashboard
Theme URI: 
Description: A custom Divi child theme for customizing WordPress dashboard
Author: Marga Bagus
Author URI: https://margabagus.com
Template: Divi
Version: 1.0.0
*/

/* Import parent theme style.css */
@import url("../Divi/style.css");

/* Style untuk FAQ dengan Kategori */
.faq-container {
  max-width: 800px;
  margin: 20px auto;
  font-family: inherit;
}

.faq-category {
  margin-top: 30px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
  color: #333;
  font-size: 20px;
}

.faq-accordion {
  margin-bottom: 30px;
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  background-color: #fff;
}

.faq-question {
  padding: 15px 20px;
  background-color: #f9f9f9;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
  position: relative;
}

.faq-question:hover {
  background-color: #f0f0f0;
}

.faq-question:after {
  content: '+';
  font-size: 20px;
  font-weight: 600;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.faq-question.active:after {
  content: '−';
  transform: rotate(0deg);
}

.faq-answer {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer-content {
  padding: 0 20px;
}

.faq-answer-content ul {
  padding-left: 20px;
  margin: 10px 0;
}

.faq-answer-content li {
  margin-bottom: 5px;
}

.faq-answer.active {
  padding: 20px;
  max-height: 800px; /* Ditingkatkan untuk konten panjang */
  overflow-y: auto;
  margin-bottom: 5px;
}

/* Tambahkan space di bawah paragraf terakhir dalam jawaban */
.faq-answer-content p:last-child {
  margin-bottom: 10px;
}

/* CSS untuk layar berukuran 768px dan lebih kecil (tablet) */
@media (max-width: 768px) {
  .faq-container {
    max-width: 95%;
    margin: 15px auto;
  }
  
  .faq-category {
    font-size: 18px;
  }
  
  .faq-question {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .faq-answer.active {
    padding: 16px;
    max-height: 800px;
  }
}

/* CSS untuk layar berukuran 550px dan lebih kecil */
@media (max-width: 550px) {
  .faq-container {
    max-width: 100%;
    margin: 10px auto;
  }
  
  .faq-category {
    font-size: 17px;
    margin-top: 25px;
    margin-bottom: 12px;
  }
  
  .faq-item {
    margin-bottom: 12px;
  }
  
  .faq-question {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
  }
  
  .faq-question:after {
    font-size: 18px;
  }
  
  .faq-answer.active {
    padding: 14px;
    max-height: 900px;
  }
  
  .faq-answer-content {
    padding: 0 10px;
  }
}

/* CSS untuk layar berukuran 480px dan lebih kecil (mobile) */
@media (max-width: 480px) {
  .faq-container h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .faq-category {
    font-size: 16px;
    margin-top: 20px;
  }
  
  .faq-question {
    padding: 12px;
    font-size: 14px;
    line-height: 1.3;
  }
  
  .faq-question:after {
    font-size: 16px;
  }
  
  .faq-answer.active {
    padding: 12px;
    padding-bottom: 15px;
    margin-bottom: 8px;
  }
  
  .faq-answer-content ul {
    padding-left: 15px;
  }
  
  .faq-answer-content {
    padding: 0 8px;
    padding-bottom: 5px;
  }
}