.zg-faq-tabs-container {
    display: flex;
    flex-direction: column;
}

.zg-tabs-header {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 720px;
    margin: 0 auto 40px;
}

.zg-tab-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: calc(33.33% - 10px);
    margin-bottom: 20px;
}

.zg-faq-question-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zg-faq-question-wrapper:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.zg-faq-question-wrapper.active {
    background: rgba(255,255,255,0.15);
}

.zg-faq-question {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.3s ease;
}

.zg-faq-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    line-height: 25px;
    font-weight: 100;
    margin-left: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #A135AD;
}

.zg-faq-question-wrapper.active .zg-faq-toggle {
    transform: rotate(45deg);
}

/* ✅ FIXED: Use max-height + overflow for smooth transition */
.zg-faq-answer {
    max-height: 0;        /* CHANGED: max-height instead of height */
    overflow: hidden;     /* ✅ ADDED: Hides content when collapsed */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}

.zg-faq-question-wrapper.active + .zg-faq-answer {
    max-height: 300px;    /* ✅ FIXED: Specific max-height (not auto) */
    margin: 10px 0 0;
}

/* Tab content transition */
.zg-faq-content {
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 0;
    overflow: hidden;     /* ✅ ADDED: Prevents content leak */
}

.zg-faq-content.active {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

.zg-faq-item {
    margin: 0 auto 18px;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.zg-faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

@media (max-width: 767px) {
    .zg-tab-item {
        width: calc(50% - 6px);
        padding: 15px;
    }
    .zg-faq-item{
        padding: 15px;
    }
}
