/* ==================== FAQ Accordion Styles ==================== */
.faq-item {
    transition: all 0.3s ease-in-out;
    border: 1px solid transparent;
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-item.open--active {
    background-color: #3EB4A1;
    border-color: #3EB4A1;
}

.faq-question h3 {
    color: #353535;
}

.faq-item.open--active .faq-question h3 {
    color: #ffffff;
}

.faq-item.open--active .arrow-icon {
    transform: rotate(180deg);
    color: #ffffff;
}

.faq-item.open--active .faq-answer {
    max-height: 300px;
    opacity: 1;
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

.faq-item.open--active .faq-answer p {
    color: #ffffff;
}

.open-more div {
    height: auto;
    overflow: visible;
}

.open-more button {
    bottom: -6%;
}

.mt-elem {
    margin-top: 80px;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake-effect {
    animation: shake 0.3s ease-in-out 0s 2;
}

.otp-digit.error-border {
    border-color: #ef4444 !important;
    background-color: #fee2e2;
}

.otp-digit.filled {
    border-color: #3EB4A1 !important;
    border-width: 3px !important;
    color: #3EB4A1 !important;
}

.login-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.login-btn:not(:disabled):hover {
    background-color: #2d9a8a !important;
    transform: scale(0.98);
}

.login-btn:active {
    transform: scale(0.96);
}

.resend-link {
    transition: all 0.2s;
    cursor: pointer;
}

.resend-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.modal-overlay {
    backdrop-filter: blur(4px);
}

.step.hidden {
    display: none;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 250px;
    max-width: 90vw;
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-family: IRANSansLight, sans-serif;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    direction: rtl;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-info {
    background: #3b82f6;
}

.step-active {
    opacity: 100%;
}

.step-active+span {
    opacity: 100%;
}

.custom-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.radio-custom {
    display: inline-block;
    width: 23px;
    height: 23px;
    border-radius: 6px;
    outline: none;
    border: 1px solid rgba(53, 53, 53, 0.7);
    background-color: #fff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.2s ease;
}

.custom-radio input:checked+.radio-custom {
    border: none;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='20' height='20' rx='6' fill='%233EB4A1'/%3E%3Cpath d='M6.63867 10.55L8.55933 12.75L13.3609 7.25' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==================== Article Content (AI SEO Agent output) ==================== */
.article-content {
    --ac-heading: var(--text-dark, #2C2C2C);
    --ac-text: var(--text-primary, #353535);
    --ac-muted: var(--text-muted, #707070);
    --ac-border: var(--border-color, rgba(53, 53, 53, 0.15));
    --ac-brand: var(--brand, #3EB4A1);
    --ac-card: var(--bg-card, rgba(245, 245, 245, 0.8));
}

.article-content h2 {
    font-family: "IRANSans Bold", "IRANSansBold", sans-serif;
    font-size: 1.35rem;
    line-height: 2.1rem;
    color: var(--ac-heading);
    margin: 2.5rem 0 1rem;
    padding-inline-start: 0.85rem;
    border-inline-start: 4px solid var(--ac-brand);
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
    font-size: 1.1rem;
    line-height: 1.9rem;
    color: var(--ac-heading);
    margin: 1.75rem 0 0.75rem;
}

.article-content h4 {
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
    font-size: 1rem;
    color: var(--ac-heading);
    margin: 1.25rem 0 0.5rem;
}

.article-content p {
    color: var(--ac-text);
    margin: 0 0 1.1rem;
    line-height: 2rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.25rem;
    padding-inline-start: 1.5rem;
    color: var(--ac-text);
}

/* Fixed: bullets used to be absolute-positioned against the full-width <li>,
   which in RTL pinned them to the far edge of the column instead of next to
   the text. Flexbox keeps the dot glued to the text regardless of line length. */
.article-content ul {
    list-style: none;
    padding-inline-start: 0;
}

.article-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
    line-height: 1.9rem;
}

.article-content ul li::before {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-top: 0.65rem;
    border-radius: 50%;
    background: var(--ac-brand);
}

/* Table of contents (auto-generated by the AI agent right after the intro) */
.article-content nav.toc {
    margin: 1.5rem 0 2rem;
    padding: 1.1rem 1.25rem;
    background: var(--ac-card);
    border: 1px solid var(--ac-border);
    border-radius: 1rem;
}

.article-content nav.toc p.toc-title {
    margin: 0 0 0.75rem;
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
    color: var(--ac-heading);
}

.article-content nav.toc ol {
    margin: 0;
    padding-inline-start: 1.25rem;
    counter-reset: toc;
}

.article-content nav.toc ol li {
    margin-bottom: 0.5rem;
}

.article-content nav.toc a {
    text-decoration: none;
    color: var(--ac-text);
}

.article-content nav.toc a:hover {
    color: var(--ac-brand);
}

/* Scroll offset so anchored h2 headings don't hide under a sticky header */
.article-content h2[id] {
    scroll-margin-top: 5.5rem;
}

/* Related-links box (rendered from internalLinkSuggestions) */
.article-content .related-links {
    margin: 2rem 0;
    padding: 1.1rem 1.25rem;
    border: 1px dashed var(--ac-border);
    border-radius: 1rem;
}

.article-content .related-links p.related-title {
    margin: 0 0 0.6rem;
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
    color: var(--ac-heading);
}

.article-content .related-links ul {
    margin: 0;
}

.article-content .related-links a {
    color: var(--ac-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content ol {
    list-style: decimal;
}

.article-content ol li {
    margin-bottom: 0.6rem;
    line-height: 1.9rem;
    padding-inline-start: 0.4rem;
}

.article-content a {
    color: var(--ac-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content strong {
    font-family: "IRANSans Bold", "IRANSansBold", sans-serif;
    color: var(--ac-heading);
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--brand-faint, rgba(62, 180, 161, 0.10));
    border-inline-start: 4px solid var(--ac-brand);
    border-radius: 0.75rem;
    color: var(--ac-heading);
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--ac-border);
    margin: 2rem 0;
}

.article-content img {
    max-width: 100%;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

/* Tables */
.article-content .table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.9rem;
    border: 1px solid var(--ac-border);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 480px;
}

.article-content thead th {
    background: var(--ac-brand);
    color: #ffffff;
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
    padding: 0.75rem 1rem;
    text-align: start;
    white-space: nowrap;
}

.article-content tbody td {
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--ac-border);
    color: var(--ac-text);
    vertical-align: top;
}

.article-content tbody tr:nth-child(even) {
    background: var(--ac-card);
}

/* FAQ block appended by publish-article.php */
.article-content h2+h3,
.article-content h3 {
    scroll-margin-top: 5rem;
}

/* CTA paragraph appended by publish-article.php */
.article-content .article-cta {
    display: block;
    margin-top: 2rem;
    padding: 1.1rem 1.5rem;
    text-align: center;
    background: var(--ac-brand);
    color: #ffffff;
    border-radius: 1rem;
    font-family: "IRANSans Medium", "IRANSansMedium", sans-serif;
}

.radio-label {
    color: rgba(53, 53, 53, 0.70);
    font-family: "IRANSans Medium", sans-serif;
    font-size: 15px;
}