:root {
    --mg-bg: #0e1620;
    --mg-section: #111d29;
    --mg-card: #142431;
    --mg-card-2: #162230;
    --mg-border: #294252;
    --mg-gold: #f4b400;
    --mg-gold-light: #ffd55e;
    --mg-text: #f7f9fc;
    --mg-muted: #b8c3cf;
}

.elementor-widget-mahbet-guide-content-editor,
.elementor-widget-mahbet-guide-toc,
.elementor-widget-mahbet-guide-stats-table,
.elementor-widget-mahbet-guide-notice,
.elementor-widget-mahbet-guide-responsible,
.elementor-widget-mahbet-guide-faq,
.elementor-widget-mahbet-guide-cta {
    direction: rtl;
    font-family: "IRANYekanX", "IRANYekan", Tahoma, Arial, sans-serif;
}

/* عمدا هیچ پس زمینه کلی برای ویجت ها تعریف نشده است. */
.mahbet-article-content {
    width: 100%;
    margin-inline: auto;
    background: transparent;
    color: #dce4ec;
    font-size: 16px;
    line-height: 2.15;
}

.mahbet-article-content > :first-child { margin-top: 0; }
.mahbet-article-content > :last-child { margin-bottom: 0; }
.mahbet-article-content p { margin: 0 0 22px; }
.mahbet-article-content a { color: var(--mg-gold-light); text-decoration: underline; text-underline-offset: 4px; }
.mahbet-article-content h2,
.mahbet-article-content h3,
.mahbet-article-content h4 {
    position: relative;
    color: var(--mg-text);
    font-weight: 900;
    scroll-margin-top: 110px;
}
.mahbet-article-content h2 {
    margin: 48px 0 20px;
    padding-right: 22px;
    font-size: clamp(23px, 3vw, 31px);
    line-height: 1.65;
}
.mahbet-article-content h2::before {
    position: absolute;
    top: .45em;
    right: 0;
    width: 6px;
    height: 1.15em;
    border-radius: 8px;
    content: "";
    background: var(--mg-gold);
}
.mahbet-article-content h3 {
    margin: 34px 0 15px;
    padding-right: 18px;
    font-size: clamp(19px, 2.3vw, 23px);
    line-height: 1.75;
}
.mahbet-article-content h3::before {
    position: absolute;
    top: .8em;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    content: "";
    background: var(--mg-gold);
}
.mahbet-article-content ul,
.mahbet-article-content ol { margin: 18px 0 28px; padding-right: 24px; }
.mahbet-article-content li { margin-bottom: 8px; }
.mahbet-article-content blockquote {
    margin: 28px 0;
    padding: 18px 20px;
    border-right: 4px solid var(--mg-gold);
    color: var(--mg-muted);
    background: rgba(20, 36, 49, .65);
}

/* TOC */
.mahbet-toc { width: 100%; }
.mahbet-toc.is-sticky { position: sticky; top: var(--mahbet-toc-top, 88px); z-index: 20; }
.mahbet-toc__inner {
    overflow: hidden;
    border: 1px solid var(--mg-border);
    border-radius: 18px;
    background: rgba(20, 36, 49, .96);
}
.mahbet-toc__toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid rgba(184, 195, 207, .14);
    color: var(--mg-text);
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    text-align: right;
    cursor: default;
}
.mahbet-toc__title-wrap { display: inline-flex; align-items: center; gap: 10px; }
.mahbet-toc__marker { width: 5px; height: 25px; border-radius: 8px; background: var(--mg-gold); }
.mahbet-toc__toggle-icon { display: none; position: relative; width: 18px; height: 18px; flex: 0 0 18px; }
.mahbet-toc__toggle-icon::before,
.mahbet-toc__toggle-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 3px;
    content: "";
    background: var(--mg-gold);
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}
.mahbet-toc__toggle-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.mahbet-toc.is-open .mahbet-toc__toggle-icon::after { transform: translate(-50%, -50%) rotate(0); }
.mahbet-toc__panel { padding-top: 14px; max-height: calc(100vh - var(--mahbet-toc-top, 88px) - 24px); overflow-y: auto; }
.mahbet-toc__list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.mahbet-toc__link {
    display: block;
    padding: 8px 11px;
    border-right: 2px solid transparent;
    border-radius: 8px;
    color: var(--mg-muted);
    font-size: 13px;
    line-height: 1.7;
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.mahbet-toc__item--h3 .mahbet-toc__link { padding-right: 25px; font-size: 12px; }
.mahbet-toc__item--h4 .mahbet-toc__link { padding-right: 38px; font-size: 11px; }
.mahbet-toc__link:hover,
.mahbet-toc__link.is-active { color: var(--mg-gold-light); border-right-color: var(--mg-gold); background: rgba(244, 180, 0, .06); }
.mahbet-toc__empty { margin: 0; color: var(--mg-muted); font-size: 13px; }

/* عنوان مشترک ویجت */
.mahbet-widget-heading,
.mahbet-responsible__title,
.mahbet-faq__title {
    position: relative;
    margin: 0 0 24px;
    padding-right: 18px;
    color: var(--mg-text);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
    line-height: 1.5;
}
.mahbet-widget-heading::before,
.mahbet-responsible__title::before,
.mahbet-faq__title::before {
    position: absolute;
    top: .3em;
    right: 0;
    width: 5px;
    height: 1.1em;
    border-radius: 8px;
    content: "";
    background: var(--mg-gold);
}

/* جدول آمار */
.mahbet-stats-table__wrap { width: 100%; overflow-x: auto; border: 1px solid var(--mg-border); border-radius: 18px; background: var(--mg-card); }
.mahbet-stats-table { width: 100%; min-width: 680px; border-spacing: 0; border-collapse: separate; color: var(--mg-text); font-size: 14px; }
.mahbet-stats-table th,
.mahbet-stats-table td { padding: 17px 19px; border-bottom: 1px solid rgba(41, 66, 82, .75); text-align: right; vertical-align: middle; }
.mahbet-stats-table th { color: var(--mg-gold-light); background: rgba(244, 180, 0, .07); font-size: 13px; font-weight: 800; }
.mahbet-stats-table tbody tr:last-child td { border-bottom: 0; }
.mahbet-stats-table__badge { display: inline-flex; min-width: 82px; justify-content: center; padding: 5px 11px; border: 1px solid rgba(244, 180, 0, .35); border-radius: 30px; color: var(--mg-gold-light); background: rgba(244, 180, 0, .07); font-size: 11px; font-weight: 800; white-space: nowrap; }

/* باکس نکته */
.mahbet-notice {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--mg-border);
    border-radius: 18px;
    background: var(--mg-card);
}
.mahbet-notice__icon { color: var(--mg-gold); font-size: 24px; line-height: 1; }
.mahbet-notice__icon svg { width: 24px; height: 24px; fill: currentColor; }
.mahbet-notice__title { margin-bottom: 4px; color: var(--mg-text); font-size: 15px; font-weight: 900; }
.mahbet-notice__text,
.mahbet-notice__text p { margin: 0; color: var(--mg-muted); font-size: 14px; line-height: 2; }

/* بازی مسئولانه */
.mahbet-responsible__list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.mahbet-responsible__item {
    display: flex;
    min-height: 56px;
    align-items: center;
    gap: 13px;
    padding: 13px 17px;
    border: 1px solid var(--mg-border);
    border-radius: 13px;
    color: #dce4ec;
    background: var(--mg-card);
    font-size: 14px;
    line-height: 1.85;
}
.mahbet-responsible__check { display: inline-grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border-radius: 50%; color: #0e1620; background: var(--mg-gold); font-size: 12px; font-weight: 900; }

/* FAQ */
.mahbet-faq__eyebrow { margin-bottom: 8px; color: var(--mg-gold); font-size: 12px; font-weight: 900; letter-spacing: 1.2px; }
.mahbet-faq__list { display: grid; gap: 11px; }
.mahbet-faq__item { overflow: hidden; border: 1px solid var(--mg-border); border-radius: 16px; background: var(--mg-card); }
.mahbet-faq__button {
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 22px;
    border: 0;
    color: var(--mg-text);
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
}
.mahbet-faq__icon { position: relative; width: 18px; height: 18px; flex: 0 0 18px; }
.mahbet-faq__icon::before,
.mahbet-faq__icon::after { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 3px; content: ""; background: var(--mg-gold); transform: translate(-50%, -50%); transition: transform .18s ease; }
.mahbet-faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.mahbet-faq__item.is-open .mahbet-faq__icon::after { transform: translate(-50%, -50%) rotate(0); }
.mahbet-faq__answer { padding: 0 22px 19px; color: var(--mg-muted); font-size: 14px; line-height: 2; }
.mahbet-faq__answer > :first-child { margin-top: 0; }
.mahbet-faq__answer > :last-child { margin-bottom: 0; }

/* CTA */
.mahbet-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px; border: 1px solid var(--mg-border); border-radius: 18px; background: var(--mg-card); }
.mahbet-cta__title { margin-bottom: 3px; color: var(--mg-text); font-size: 16px; font-weight: 900; }
.mahbet-cta__description { margin: 0; color: var(--mg-muted); font-size: 13px; line-height: 1.8; }
.mahbet-cta__button { display: inline-flex; min-height: 48px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 10px 18px; border: 0; border-radius: 13px; color: #0e1620; background: var(--mg-gold); font: inherit; font-size: 13px; font-weight: 900; text-decoration: none; cursor: pointer; }

.mahbet-toc__toggle:focus-visible,
.mahbet-toc__link:focus-visible,
.mahbet-faq__button:focus-visible,
.mahbet-cta__button:focus-visible { outline: 2px solid var(--mg-gold); outline-offset: 3px; }

@media (max-width: 767px) {
    .mahbet-article-content { font-size: 15px; line-height: 2.08; }
    .mahbet-article-content h2 { margin-top: 38px; font-size: 23px; }
    .mahbet-article-content h3 { font-size: 19px; }

    .mahbet-toc.is-sticky { position: static; }
    .mahbet-toc__toggle { cursor: pointer; padding-bottom: 0; border-bottom: 0; }
    .mahbet-toc__toggle-icon { display: block; }
    .mahbet-toc.is-open .mahbet-toc__toggle { padding-bottom: 14px; border-bottom: 1px solid rgba(184, 195, 207, .14); }
    .mahbet-toc:not(.is-open) .mahbet-toc__panel { display: none; }
    .mahbet-toc__panel { max-height: 65vh; }

    .mahbet-stats-table { min-width: 0; }
    .mahbet-stats-table thead { display: none; }
    .mahbet-stats-table,
    .mahbet-stats-table tbody,
    .mahbet-stats-table tr,
    .mahbet-stats-table td { display: block; width: 100%; }
    .mahbet-stats-table tr { padding: 12px 15px; border-bottom: 1px solid rgba(41, 66, 82, .75); }
    .mahbet-stats-table tbody tr:last-child { border-bottom: 0; }
    .mahbet-stats-table td { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 7px 0; border: 0; }
    .mahbet-stats-table td::before { content: attr(data-label); color: var(--mg-muted); font-size: 12px; font-weight: 700; }

    .mahbet-responsible__item { align-items: flex-start; }
    .mahbet-cta { align-items: stretch; flex-direction: column; }
    .mahbet-cta__button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .mahbet-toc__link,
    .mahbet-toc__toggle-icon::after,
    .mahbet-faq__icon::after { transition: none !important; }
}
