/* =================================================================
   FAQ Section Styles
   ================================================================= */

/* FAQ Search Bar */
.faq-search-container {
    margin-bottom: 2rem;
}

#faq-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#faq-search::placeholder {
    color: var(--text-muted);
}

#faq-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(77, 184, 232, 0.2);
}

/* No Results Message */
#no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    display: none; /* Initially hidden */
}

/* FAQ Tabs */
.faq-tabs {
    position: relative;
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.faq-tab {
    flex: 1;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.faq-tab.active,
.faq-tab:hover {
    color: var(--primary-color);
    background: rgba(77, 184, 232, 0.1);
}

.faq-tabs-slider {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 50%; /* Assumes 2 tabs */
    background-color: var(--primary-color);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* RTL (Arabic) styles for tabs */
html[lang="ar"] .faq-tabs-slider {
    right: 0;
    left: auto;
}

/* German language specific styles */
html[lang="de"] {
    /* German text tends to be longer, so adjust spacing */
    line-height: 1.6;
}

html[lang="de"] .faq-question {
    /* Slightly more padding for longer German text */
    padding: 1.3rem 0.5rem;
}

html[lang="de"] .faq-tab {
    /* Ensure German tab text fits well */
    font-size: 0.95rem;
}

/* FAQ Accordion Container */
.faq-container {
    padding-top: 1rem;
}

.faq-content.hidden {
    display: none;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item.hidden {
    display: none;
}

.faq-content > .faq-item:last-of-type {
    border-bottom: none;
}

/* FAQ Accordion Question */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1.25rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
}

/* Accordion Icon (+) */
.icon {
    position: relative;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-speed) ease-out;
    flex-shrink: 0;
}

.icon::before,
.icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-speed) ease-out;
}

.icon::before {
    top: 9px;
    left: 3px;
    width: 14px;
    height: 2px;
}

.icon::after {
    top: 3px;
    left: 9px;
    width: 2px;
    height: 14px;
}

/* Icon animation when active */
.faq-item.active .icon {
    transform: rotate(225deg);
}

.faq-item.active .icon::before,
.faq-item.active .icon::after {
    background-color: var(--primary-color);
}

/* RTL (Arabic) styles for icon positioning */
html[lang="ar"] .faq-question .icon {
    margin-left: 1rem;
    margin-right: 0;
}

/* FAQ Accordion Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 0.5rem;
}

.faq-answer p {
    margin: 0 0 1.25rem 0;
}

/* Answer expansion when active */
.faq-item.active .faq-answer {
    max-height: 300px; /* Adjust as needed for your longest answer */
}