163 lines
3.5 KiB
CSS
163 lines
3.5 KiB
CSS
/* ============================================================
|
|
FAQ COMPONENT
|
|
Accordion-style questions with smooth expand/collapse
|
|
============================================================ */
|
|
|
|
.faq {
|
|
padding: 6rem 0;
|
|
background-color: var(--color-surface);
|
|
transition: background-color 0.4s ease;
|
|
}
|
|
|
|
.faq-inner {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr;
|
|
gap: 5rem;
|
|
align-items: start;
|
|
}
|
|
|
|
/* ── Left: heading ─────────────────────────────────────── */
|
|
.faq-heading {
|
|
position: sticky;
|
|
top: 5rem;
|
|
}
|
|
|
|
.faq-heading .section-title {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.faq-heading .section-subtitle {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.faq-contact-nudge {
|
|
font-size: 0.88rem;
|
|
color: var(--color-text-muted);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.faq-contact-nudge a {
|
|
color: var(--color-primary);
|
|
font-weight: 600;
|
|
text-decoration: underline;
|
|
text-decoration-color: transparent;
|
|
transition: text-decoration-color 0.2s ease;
|
|
}
|
|
|
|
.faq-contact-nudge a:hover {
|
|
text-decoration-color: var(--color-primary);
|
|
}
|
|
|
|
/* ── Right: accordion list ─────────────────────────────── */
|
|
.faq-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
border-top: 1px solid var(--color-border);
|
|
}
|
|
|
|
/* ── Individual item ───────────────────────────────────── */
|
|
.faq-item {
|
|
border-bottom: 1px solid var(--color-border);
|
|
transition: border-color 0.3s ease;
|
|
}
|
|
|
|
.faq-item.is-open {
|
|
border-bottom-color: var(--color-primary);
|
|
}
|
|
|
|
.faq-question {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
padding: 1.5rem 0;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
list-style: none;
|
|
background: none;
|
|
border: none;
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
|
|
.faq-question::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.faq-question-text {
|
|
font-family: var(--font-heading);
|
|
font-size: 1.05rem;
|
|
font-weight: 700;
|
|
color: var(--color-heading);
|
|
line-height: 1.4;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.faq-item.is-open .faq-question-text {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.faq-icon {
|
|
flex-shrink: 0;
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
border: 1.5px solid var(--color-border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.3s ease;
|
|
background-color: var(--color-surface);
|
|
}
|
|
|
|
.faq-item.is-open .faq-icon {
|
|
background-color: var(--color-primary);
|
|
border-color: var(--color-primary);
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.faq-icon svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
stroke: var(--color-text-muted);
|
|
fill: none;
|
|
stroke-width: 2.5;
|
|
stroke-linecap: round;
|
|
transition: stroke 0.3s ease;
|
|
}
|
|
|
|
.faq-item.is-open .faq-icon svg {
|
|
stroke: var(--color-btn-text);
|
|
}
|
|
|
|
/* ── Answer panel ──────────────────────────────────────── */
|
|
.faq-answer {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.4s ease, padding 0.3s ease;
|
|
}
|
|
|
|
.faq-item.is-open .faq-answer {
|
|
max-height: 300px;
|
|
}
|
|
|
|
.faq-answer-inner {
|
|
padding-bottom: 1.5rem;
|
|
font-size: 0.93rem;
|
|
color: var(--color-text-muted);
|
|
line-height: 1.8;
|
|
}
|
|
|
|
/* ── Responsive ─────────────────────────────────────────── */
|
|
@media (max-width: 860px) {
|
|
.faq-inner {
|
|
grid-template-columns: 1fr;
|
|
gap: 2.5rem;
|
|
}
|
|
|
|
.faq-heading {
|
|
position: static;
|
|
}
|
|
}
|