/* Basic Reset to make styling easier across browsers */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f8f9fa; /* Light gray background */
color: #333;
line-height: 1.6;
padding: 20px;
}
/* Main container for the FAQ section */
.faq-container {
max-width: 800px; /* Keeps text readable on large screens */
margin: 40px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
h1 {
text-align: center;
margin-bottom: 40px;
font-weight: 600;
color: #222;
}
/* The container for a single Question/Answer pair */
.faq-item {
margin-bottom: 15px;
border: 1px solid #e5e7eb;
border-radius: 8px;
overflow: hidden; /* Ensures content stays within rounded corners */
box-shadow: 0 2px 5px rgba(0,0,0,0.02);
transition: all 0.3s ease;
}
/* Subtle hover effect for the whole item */
.faq-item:hover {
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
/* The clickable question header */
.faq-question {
width: 100%;
text-align: left;
padding: 20px 25px;
background-color: #fff; /* White background for the question header */
border: none;
outline: none;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
font-weight: 500;
color: #333;
transition: background-color 0.3s ease;
}
/* Style for when a question is active/open */
.faq-question.active {
background-color: #f9fafb; /* Slightly darker gray when open */
color: #000;
}
/* The icon span (+/-) */
.faq-icon {
font-size: 24px;
font-weight: 300;
color: #777;
transition: transform 0.3s ease;
}
/* Rotate the icon when active */
.faq-question.active .faq-icon {
transform: rotate(45deg); /* Turns the + into an x */
}
/* The answer content container */
.faq-answer {
max-height: 0; /* Hidden by default */
overflow: hidden;
transition: max-height 0.4s ease-out, padding 0.3s ease;
background-color: #fff;
padding: 0 25px; /* Horizontal padding only initially */
}
/* The actual paragraph text inside the answer */
.faq-answer p {
padding-bottom: 25px; /* Add bottom padding for spacing */
color: #555;
}
/* Responsive design for smaller screens */
@media (max-width: 600px) {
.faq-question {
font-size: 16px;
padding: 15px 20px;
}
}