faq-accordion.css 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. .faq-section .faq-header {
  2. max-width: 600px;
  3. margin: 0 auto;
  4. }
  5. .faq-section .faq-header .heading-lg {
  6. color: #000;
  7. margin-bottom: 1rem;
  8. }
  9. .faq-section .faq-header .subtitle {
  10. color: #9e9e9e;
  11. font-size: 1.125rem;
  12. font-weight: 400;
  13. }
  14. .faq-section .faq-content {
  15. max-width: 800px;
  16. margin: 0 auto;
  17. }
  18. .faq-section .faq-item {
  19. background-color: #ffffff;
  20. border: 1px solid #e0e0e0;
  21. border-radius: 1rem;
  22. margin-bottom: 1rem;
  23. overflow: hidden;
  24. -webkit-transition: all 0.3s ease;
  25. -moz-transition: all 0.3s ease;
  26. -ms-transition: all 0.3s ease;
  27. -o-transition: all 0.3s ease;
  28. transition: all 0.3s ease;
  29. }
  30. .faq-section .faq-item:hover {
  31. -webkit-box-shadow: 0 0 20px rgba(116, 116, 116, 0.1);
  32. -moz-box-shadow: 0 0 20px rgba(116, 116, 116, 0.1);
  33. box-shadow: 0 0 20px rgba(116, 116, 116, 0.1);
  34. }
  35. .faq-section .faq-item.active {
  36. border-color: #1e88e5;
  37. -webkit-box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.1);
  38. -moz-box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.1);
  39. box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.1);
  40. }
  41. .faq-section .faq-item.active .faq-question {
  42. background-color: rgba(30, 136, 229, 0.05);
  43. }
  44. .faq-section .faq-item.active .faq-toggle {
  45. color: #1e88e5;
  46. }
  47. .faq-section .faq-item.active .faq-toggle .faq-icon {
  48. -webkit-transform: rotate(180deg);
  49. -moz-transform: rotate(180deg);
  50. -ms-transform: rotate(180deg);
  51. -o-transform: rotate(180deg);
  52. transform: rotate(180deg);
  53. }
  54. .faq-section .faq-question {
  55. display: -webkit-box;
  56. display: -webkit-flex;
  57. display: -moz-box;
  58. display: -ms-flexbox;
  59. display: flex;
  60. -webkit-box-orient: horizontal;
  61. -webkit-box-direction: normal;
  62. -webkit-flex-direction: row;
  63. -moz-flex-direction: row;
  64. -ms-flex-direction: row;
  65. flex-direction: row;
  66. -webkit-box-pack: justify;
  67. -webkit-justify-content: space-between;
  68. -moz-justify-content: space-between;
  69. -ms-justify-content: space-between;
  70. justify-content: space-between;
  71. -webkit-box-align: center;
  72. -webkit-align-items: center;
  73. -moz-align-items: center;
  74. -ms-align-items: center;
  75. align-items: center;
  76. -webkit-flex-wrap: nowrap;
  77. -moz-flex-wrap: nowrap;
  78. -ms-flex-wrap: nowrap;
  79. flex-wrap: nowrap;
  80. padding: 1.5rem;
  81. cursor: pointer;
  82. -webkit-transition: all 0.3s ease;
  83. -moz-transition: all 0.3s ease;
  84. -ms-transition: all 0.3s ease;
  85. -o-transition: all 0.3s ease;
  86. transition: all 0.3s ease;
  87. }
  88. .faq-section .faq-question:hover {
  89. background-color: rgba(30, 136, 229, 0.02);
  90. }
  91. .faq-section .faq-question .question-text {
  92. font-size: 1.125rem;
  93. font-weight: 600;
  94. color: #000;
  95. margin: 0;
  96. padding-right: 1rem;
  97. line-height: 1.4;
  98. }
  99. .faq-section .faq-question .faq-toggle {
  100. background: none;
  101. border: none;
  102. cursor: pointer;
  103. padding: 0.25rem;
  104. -webkit-border-radius: 50%;
  105. -moz-border-radius: 50%;
  106. border-radius: 50%;
  107. display: -webkit-box;
  108. display: -webkit-flex;
  109. display: -moz-box;
  110. display: -ms-flexbox;
  111. display: flex;
  112. -webkit-box-orient: horizontal;
  113. -webkit-box-direction: normal;
  114. -webkit-flex-direction: row;
  115. -moz-flex-direction: row;
  116. -ms-flex-direction: row;
  117. flex-direction: row;
  118. -webkit-box-pack: center;
  119. -webkit-justify-content: center;
  120. -moz-justify-content: center;
  121. -ms-justify-content: center;
  122. justify-content: center;
  123. -webkit-box-align: center;
  124. -webkit-align-items: center;
  125. -moz-align-items: center;
  126. -ms-align-items: center;
  127. align-items: center;
  128. -webkit-flex-wrap: nowrap;
  129. -moz-flex-wrap: nowrap;
  130. -ms-flex-wrap: nowrap;
  131. flex-wrap: nowrap;
  132. -webkit-transition: all 0.3s ease;
  133. -moz-transition: all 0.3s ease;
  134. -ms-transition: all 0.3s ease;
  135. -o-transition: all 0.3s ease;
  136. transition: all 0.3s ease;
  137. flex-shrink: 0;
  138. width: 32px;
  139. height: 32px;
  140. }
  141. .faq-section .faq-question .faq-toggle:hover {
  142. background-color: rgba(30, 136, 229, 0.1);
  143. color: #1e88e5;
  144. }
  145. .faq-section .faq-question .faq-toggle:focus {
  146. outline: 2px solid rgba(30, 136, 229, 0.3);
  147. outline-offset: 2px;
  148. }
  149. .faq-section .faq-question .faq-toggle .faq-icon {
  150. width: 16px;
  151. height: 16px;
  152. color: #9e9e9e;
  153. -webkit-transition: all 0.3s ease;
  154. -moz-transition: all 0.3s ease;
  155. -ms-transition: all 0.3s ease;
  156. -o-transition: all 0.3s ease;
  157. transition: all 0.3s ease;
  158. }
  159. .faq-section .faq-answer {
  160. max-height: 0;
  161. overflow: hidden;
  162. -webkit-transition: max-height 0.4s ease-out;
  163. -moz-transition: max-height 0.4s ease-out;
  164. -ms-transition: max-height 0.4s ease-out;
  165. -o-transition: max-height 0.4s ease-out;
  166. transition: max-height 0.4s ease-out;
  167. }
  168. .faq-section .faq-answer .answer-content {
  169. padding: 15px;
  170. padding-top: 10px;
  171. }
  172. .faq-section .faq-answer .answer-content p {
  173. font-size: 1rem;
  174. font-weight: 400;
  175. color: #424242;
  176. line-height: 1.6;
  177. margin: 0;
  178. }
  179. .faq-section .faq-answer.open {
  180. max-height: 500px;
  181. -webkit-transition: max-height 0.4s ease-in;
  182. -moz-transition: max-height 0.4s ease-in;
  183. -ms-transition: max-height 0.4s ease-in;
  184. -o-transition: max-height 0.4s ease-in;
  185. transition: max-height 0.4s ease-in;
  186. }
  187. /* Responsive adjustments */
  188. @media (max-width: 768px) {
  189. .faq-section .faq-question {
  190. padding: 1rem;
  191. }
  192. .faq-section .faq-question .question-text {
  193. font-size: 1rem;
  194. padding-right: 0.5rem;
  195. }
  196. .faq-section .faq-answer .answer-content {
  197. padding: 0 1rem 1rem;
  198. }
  199. .faq-section .faq-answer .answer-content p {
  200. font-size: 0.875rem;
  201. }
  202. }
  203. @media (max-width: 576px) {
  204. .faq-section .faq-item {
  205. margin-bottom: 0.5rem;
  206. }
  207. .faq-section .faq-question {
  208. padding: 0.5rem 1rem;
  209. }
  210. .faq-section .faq-question .question-text {
  211. font-size: 0.875rem;
  212. }
  213. .faq-section .faq-question .faq-toggle {
  214. width: 28px;
  215. height: 28px;
  216. }
  217. .faq-section .faq-question .faq-toggle .faq-icon {
  218. width: 14px;
  219. height: 14px;
  220. }
  221. .faq-section .faq-answer .answer-content {
  222. padding: 0 1rem 0.5rem;
  223. }
  224. }
  225. /* Animation for smooth accordion effect */
  226. @keyframes slideDown {
  227. from {
  228. opacity: 0;
  229. transform: translateY(-10px);
  230. }
  231. to {
  232. opacity: 1;
  233. transform: translateY(0);
  234. }
  235. }
  236. .faq-section .faq-answer.open .answer-content {
  237. animation: slideDown 0.3s ease-out;
  238. }