/* ==========================================================================
   MH Home — فقط ساختار و چیدمان ویجت‌های صفحه اصلی.
   رنگ، تایپوگرافی، فاصله‌ها، حاشیه و سایه از کنترل‌های Elementor می‌آیند.
   همه‌ی سلکتورها با .mh-home- شروع می‌شوند و به صفحه‌های دیگر اثر نمی‌گذارند.
   ========================================================================== */

.mh-home-w, .mh-home-w *, .mh-home-w *::before, .mh-home-w *::after { box-sizing: border-box; }
.mh-home-w h1, .mh-home-w h2, .mh-home-w h3, .mh-home-w h4, .mh-home-w p, .mh-home-w ul, .mh-home-w li { margin: 0; padding: 0; }
.mh-home-w ul { list-style: none; }
.mh-home-w a { text-decoration: none; }
/* آیکون‌های SVG المنتور: هم‌رنگ متن و هم‌اندازه فونت */
.mh-home-w svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
.mh-home-w i { line-height: 1; }

.mh-home-course-list, .mh-home-tool-list, .mh-home-article-list { display: grid; }
.mh-home-empty { padding: 18px; border: 1px dashed currentColor; border-radius: 10px; opacity: .6; text-align: center; font-size: 13px; }
.mh-home-course__title a, .mh-home-tool__title a, .mh-home-article__title a { color: inherit; text-decoration: none; }

.mh-home-tool, .mh-home-course, .mh-home-online, .mh-home-article, .mh-home-panel__item, .mh-home-btn {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease, color .2s ease;
}

/* ---------- Overline ---------- */
.mh-home-overline { display: inline-flex; align-items: center; gap: 8px; }
.mh-home-overline__line { display: block; height: 2px; border-radius: 2px; flex-shrink: 0; }

/* ---------- Section head ---------- */
.mh-home-head { display: flex; flex-direction: column; }
.mh-home-head__title { display: block; }

/* ---------- Buttons ---------- */
.mh-home-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.mh-home-hero__actions .mh-home-btn:hover,
.mh-home-course__footer .mh-home-btn:hover,
.mh-home-online .mh-home-btn:hover { transform: translateY(-1.5px); }

/* ---------- Hero ---------- */
.mh-home-hero { display: flex; justify-content: space-between; }
.mh-home-hero__copy, .mh-home-panel { min-width: 0; }
.mh-home-hero__title { display: block; }
.mh-home-hero__accent { display: block; }
.mh-home-kicker { display: flex; align-items: center; gap: 10px; }
.mh-home-kicker__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px 0 currentColor; }
.mh-home-hero__actions { display: flex; flex-wrap: wrap; }

.mh-home-panel { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.mh-home-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid transparent; }
.mh-home-panel__tag { border-radius: 999px; padding: 4px 10px; }
.mh-home-panel__title { margin-bottom: 6px; }
.mh-home-panel__desc { margin-bottom: 18px; }
.mh-home-panel__items { display: grid; }
.mh-home-panel__item { display: flex; align-items: center; gap: 13px; color: inherit; }
.mh-home-panel__icon { display: grid; place-items: center; aspect-ratio: 1; flex-shrink: 0; }
.mh-home-panel__txt { display: block; min-width: 0; }
.mh-home-panel__txt b, .mh-home-panel__txt small { display: block; }
.mh-home-panel__txt small { margin-top: 2px; }
.mh-home-panel__arrow { margin-inline-start: auto; opacity: .5; transition: opacity .2s ease, transform .2s ease; }
.mh-home-panel__item:hover .mh-home-panel__arrow { opacity: 1; transform: translateX(-3px); }

/* ---------- Course card ---------- */
.mh-home-course { display: flex; overflow: hidden; }
.mh-home-course__visual { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex-shrink: 0; position: relative; }
.mh-home-course__vimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mh-home-course__vicon { display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 10px; position: relative; z-index: 1; }
.mh-home-course__vtitle, .mh-home-course__vsub { position: relative; z-index: 1; }
.mh-home-course__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mh-home-course__label { margin-bottom: 12px; }
.mh-home-course__title { margin-bottom: 12px; }
.mh-home-course__desc { margin-bottom: 20px; }
.mh-home-course__points { display: grid; margin-bottom: 24px; }
.mh-home-course__point { display: flex; align-items: flex-start; gap: 8px; }
.mh-home-course__point i, .mh-home-course__point svg { flex-shrink: 0; margin-top: .45em; font-size: .85em; width: .85em; height: .85em; }
.mh-home-course__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 20px; border-top: 1px solid transparent; }
.mh-home-course__price, .mh-home-course__note { display: block; }
.mh-home-course__note { margin-top: 2px; }

/* ---------- Tool card ---------- */
.mh-home-tool { position: relative; display: flex; flex-direction: column; }
.mh-home-tool__badge { position: absolute; border-radius: 999px; z-index: 1; }
.mh-home-tool__label { margin-bottom: 14px; }
.mh-home-tool__icon { display: grid; place-items: center; aspect-ratio: 1; align-self: flex-start; margin-bottom: 16px; }
.mh-home-tool__title { margin-bottom: 10px; }
.mh-home-tool__desc { margin-bottom: 16px; }
.mh-home-tool__media { display: block; overflow: hidden; }
.mh-home-tool__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mh-home-tool__icon { overflow: hidden; }
.mh-home-tool__feats { display: flex; flex-direction: column; flex-grow: 1; margin-bottom: 20px; }
.mh-home-tool__feat { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.mh-home-tool__feat i, .mh-home-tool__feat svg { flex-shrink: 0; width: 1em; height: 1em; }
.mh-home-tool__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid transparent; }

/* ---------- Online tool strip ---------- */
.mh-home-online { display: flex; }
.mh-home-online__icon { display: grid; place-items: center; aspect-ratio: 1; flex-shrink: 0; }
.mh-home-online__content { flex: 1; min-width: 0; }
.mh-home-online__label { margin-bottom: 6px; }
.mh-home-online__title { margin-bottom: 6px; }

/* ---------- Article card ---------- */
.mh-home-article { display: flex; flex-direction: column; }
.mh-home-article__media { display: block; overflow: hidden; }
.mh-home-article__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mh-home-article__meta { margin-bottom: 10px; }
.mh-home-article__title { margin-bottom: 10px; }
.mh-home-article__desc { margin-bottom: 16px; flex-grow: 1; }
.mh-home-article .mh-home-btn { align-self: flex-start; }

/* ---------- About ---------- */
.mh-home-about { display: flex; align-items: center; justify-content: space-between; }
.mh-home-about__visual { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex-shrink: 1; min-width: 0; }
.mh-home-about__vtitle { display: block; }
.mh-home-about__vsub { margin-top: 10px; }
.mh-home-about__text { min-width: 0; }
.mh-home-about__title { margin-bottom: 10px; margin-top: 8px; }
.mh-home-about__tags { display: flex; flex-wrap: wrap; margin-top: 18px; }
.mh-home-about__tag { display: inline-block; }

/* ---------- جلوگیری از اسکرول افقی ---------- */
.mh-home-w { max-width: 100%; }

/* ==========================================================================
   حالت شب — پیش‌فرض‌ها از توکن‌های خود قالب (--atour-*) می‌آیند، پس با پالت
   شب سایت هماهنگ می‌مانند. هر رنگ را می‌توان از بخش «حالت شب» همان ویجت در
   Elementor عوض کرد؛ آن تنظیم همیشه بر این پیش‌فرض‌ها برتری دارد.
   هیرو ذاتاً تیره است و قاعده‌ی شب ندارد.
   ========================================================================== */

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-overline__text { color: var(--atour-green); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-overline__line { background-color: var(--atour-green); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-head__title { color: var(--atour-ink); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-head__sub { color: var(--atour-muted); }

/* کارت‌ها */
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online {
    background-image: none;
    background-color: var(--atour-surface);
    border-color: var(--atour-line);
    box-shadow: none;
}
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course:hover,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool:hover,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article:hover,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online:hover {
    background-color: var(--atour-surface);
    border-color: var(--atour-green-dark);
    box-shadow: var(--atour-shadow);
}
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool--featured {
    background-color: var(--atour-mint-soft);
    border-color: var(--atour-green-dark);
}
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__badge { background-color: var(--atour-green); color: var(--atour-on-green); }

/* متن‌ها */
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__title,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__title a,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__title,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__title a,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article__title,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article__title a,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-online__title,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__price,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__price,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__title { color: var(--atour-ink); }

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__desc,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__note,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__desc,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article__desc,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online .mh-home-online__desc { color: var(--atour-muted); }

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article__meta { color: var(--atour-faint); }

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__label,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__label,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online .mh-home-online__label { color: var(--atour-green); }

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__point,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__feat { color: var(--atour-body); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__point i,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__point svg,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__feat i,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__feat svg { color: var(--atour-green); fill: var(--atour-green); }

html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__footer,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__footer { border-top-color: var(--atour-line-soft); }

/* بخش تصویری دوره و آیکون‌ها */
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__visual,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__visual {
    background-image: linear-gradient(155deg, var(--atour-mint), var(--atour-mint-soft));
    border-color: var(--atour-line);
}
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__vicon { background-color: var(--atour-raised); color: var(--atour-green); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__vtitle,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__vtitle { color: var(--atour-ink); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-course__vsub,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__vsub { color: var(--atour-muted); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__icon,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online .mh-home-online__icon { background-color: var(--atour-mint); color: var(--atour-green); }

/* دکمه‌ها */
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-online .mh-home-btn,
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online .mh-home-btn {
    background-color: transparent; border-color: var(--atour-line); color: var(--atour-ink);
}
html[data-theme="dark"] .elementor-widget-container .mh-home-w.mh-home-online .mh-home-btn:hover { border-color: var(--atour-green); color: var(--atour-green); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__footer .mh-home-btn,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article .mh-home-btn { color: var(--atour-green); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-tool__footer .mh-home-btn:hover,
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-article .mh-home-btn:hover { color: var(--atour-green-light); }

/* درباره من */
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__p { color: var(--atour-body); }
html[data-theme="dark"] .elementor-widget-container .mh-home-w .mh-home-about__tag { color: var(--atour-body); background-color: var(--atour-surface); border-color: var(--atour-line); }

/* دکمه‌ی Native «مشاهده تمام مقالات» (کلاس mh-home-all-btn) در شب */
html[data-theme="dark"] .elementor-widget.mh-home-all-btn .elementor-widget-container .elementor-button {
    background-color: transparent;
    border-color: var(--atour-line);
    color: var(--atour-ink);
}
html[data-theme="dark"] .elementor-widget.mh-home-all-btn .elementor-widget-container .elementor-button:hover {
    border-color: var(--atour-green);
    color: var(--atour-green);
}
