@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/shabnam-font@v5.0.1/dist/font-face.css');

.bilingual-wrapper {
    max-width: 1200px;
    margin: 20px auto 40px auto;
    background: #ffffff;
    padding: 30px 60px 50px 60px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.bilingual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 25px;
}

.bilingual-controls {
    position: relative;
    display: inline-flex;
    background: #f4f4f4;
    border-radius: 30px;
    padding: 4px;
    width: 240px;
}

.bilingual-actions {
    display: flex;
    gap: 15px;
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f9f9f9;
    color: #555;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-icon:hover {
    background: #ffebeb;
    color: #9C0002;
    /* hover vertical transform removed */
    box-shadow: 0 4px 10px rgba(156, 0, 2, 0.1);
}

.switcher-bg {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: #9C0002;
    border-radius: 25px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(156, 0, 2, 0.25);
}

.bilingual-controls:hover .switcher-bg {
    opacity: 0.9;
}

.bilingual-controls[data-active="en"] .switcher-bg {
    transform: translateX(0);
}

.bilingual-controls[data-active="fa"] .switcher-bg {
    transform: translateX(100%);
}

.lang-btn {
    flex: 1;
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: #777;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    border-radius: 25px;
}

.lang-fa-btn {
    font-family: 'Shabnam', sans-serif !important;
}

.lang-btn.active {
    color: #fff;
}

.lang-btn:not(.active):hover {
    color: #9C0002;
    background: #ffebeb;
}

.bilingual-content {
    display: none;
    animation: fadeInTerms 0.5s ease-in-out;
}

.bilingual-content.active {
    display: block;
}

.bilingual-content.lang-en .doc-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 26px;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.faq-accordion {
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0;
    margin-bottom: 8px;
    padding: 0 20px;
    position: relative;
}

.faq-accordion::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ffebeb;
    opacity: 0;
    transition: opacity 0.6s ease-out;
    pointer-events: none;
    z-index: 0;
}

.faq-accordion.active-accordion {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-accordion:not(.active-accordion):hover::before {
    opacity: 1;
    transition: none;
}

.faq-question {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    transition: color 0.3s ease, font-size 0.3s ease, padding 0.3s ease;
}

.last-updated-tag {
    display: inline-block;
    background: #fdf2f2;
    color: #9C0002;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 25px;
    border: 1px solid #fce3e3;
}

.bilingual-content.lang-en .faq-question {
    font-family: 'Poppins', sans-serif !important;
}

.bilingual-content.lang-fa .faq-question {
    font-family: 'Shabnam', Tahoma, Arial, sans-serif !important;
}

.bilingual-content.lang-fa .faq-accordion {
    background: linear-gradient(-135deg, #ffffff 0%, #f8fafc 100%);
}

.bilingual-content.lang-fa .faq-accordion.active-accordion {
    background: linear-gradient(-135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-question:hover {
    color: #9C0002;
}

.faq-question.active {
    color: #9C0002;
    font-size: 18px;
    padding: 20px 0 16px 0;
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #64748b;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
    color: #9C0002;
}

.faq-answer {
    position: relative;
    z-index: 1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding-bottom: 25px;
    padding-top: 5px;
}

.bilingual-content.lang-en .faq-subquestion {
    font-family: 'Poppins', sans-serif !important;
    font-size: 17px;
    font-weight: 600;
    color: #9C0002;
    margin-bottom: 12px;
    margin-top: 25px;
}

.bilingual-content.lang-en .doc-text {
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: #444;
    text-align: left;
    margin-bottom: 16px;
}

.bilingual-content.lang-en .doc-text strong {
    color: #111;
    font-weight: 600;
}

.bilingual-content.lang-en .doc-text .primary-text {
    color: #9C0002;
    font-weight: 500;
}

.bilingual-content.lang-en .doc-list {
    padding-left: 20px;
    margin-bottom: 15px;
    list-style: none;
}

.bilingual-content.lang-en .doc-list li {
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #444;
    text-align: left;
    margin-bottom: 6px;
    position: relative;
    padding-left: 15px;
}

.bilingual-content.lang-en .doc-list li::before {
    content: '•';
    color: #9C0002;
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    left: -5px;
    top: -2px;
}

.bilingual-content.lang-fa .doc-title {
    font-family: 'Shabnam', Tahoma, Arial, sans-serif !important;
    font-size: 26px;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
}

.bilingual-content.lang-fa .faq-subquestion {
    font-family: 'Shabnam', Tahoma, Arial, sans-serif !important;
    font-size: 17px;
    font-weight: 600;
    color: #9C0002;
    margin-bottom: 12px;
    margin-top: 25px;
    text-align: right;
    direction: rtl;
}

.bilingual-content.lang-fa .doc-text {
    font-family: 'Shabnam', Tahoma, Arial, sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 2.2;
    color: #444;
    text-align: right;
    direction: rtl;
    margin-bottom: 16px;
}

.bilingual-content.lang-fa .doc-text strong {
    color: #111;
    font-weight: 600;
}

.bilingual-content.lang-fa .doc-text .primary-text {
    color: #9C0002;
    font-weight: 500;
}

.bilingual-content.lang-fa .doc-list {
    padding-right: 20px;
    margin-bottom: 15px;
    list-style: none;
    direction: rtl;
}

.bilingual-content.lang-fa .doc-list li {
    font-family: 'Shabnam', Tahoma, Arial, sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: #444;
    text-align: right;
    margin-bottom: 6px;
    position: relative;
    padding-right: 15px;
}

.bilingual-content.lang-fa .doc-list li::before {
    content: '•';
    color: #9C0002;
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    right: -5px;
    top: -2px;
}

@keyframes fadeInTerms {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .bilingual-wrapper {
        padding: 30px 20px;
        margin: 20px auto;
    }
    .bilingual-header {
        flex-direction: column;
        gap: 20px;
    }
}
