/* Toeflyar 1.0.2 | readable dark mode and mobile polish.
 * An additive, class-scoped patch; Elementor documents and custom widget settings
 * are not changed. The colored highlight and editable typography remain intact.
 */

/* 1. The Services dropdown: one consistent, correctly centered chevron on both
 * WordPress menu items and the dynamic fallback menu, in either theme. */
.mzui-global-header :is(.mzui-header-navigation,.mzui-nav-mobile) .mzui-nav-list > li.menu-item-has-children > a,
.tf-menu-sheet .mzui-nav-list > li.menu-item-has-children > a {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start;
  column-gap:8px!important;
  direction:rtl;
}
.mzui-global-header :is(.mzui-header-navigation,.mzui-nav-mobile) .mzui-nav-list > li.menu-item-has-children > a > span[aria-hidden="true"],
.tf-menu-sheet .mzui-nav-list > li.menu-item-has-children > a > span[aria-hidden="true"] {
  display:none!important; /* the old fallback glyph looked off-center */
}
.mzui-global-header :is(.mzui-header-navigation,.mzui-nav-mobile) .mzui-nav-list > li.menu-item-has-children > a::after,
.tf-menu-sheet .mzui-nav-list > li.menu-item-has-children > a::after {
  content:""!important;
  display:inline-block!important;
  width:7px!important;height:7px!important;
  flex:0 0 7px;
  border-right:1.7px solid currentColor;
  border-bottom:1.7px solid currentColor;
  border-top:0;border-left:0;
  transform:translateY(-2px) rotate(45deg);
  transform-origin:center;
  opacity:.88;
  margin:0!important;
  background:none!important;
}
.tf-menu-sheet .mzui-nav-list > li.menu-item-has-children > a {width:100%!important;}

/* 2. Pastel feature cards keep a light background in DARK mode.
 * Therefore their headings and descriptions must use DARK ink, not the global
 * --mz-ink value (which becomes white in dark mode). */
html[data-mz-theme="dark"] .mz-el-section-features .mzui-feature-card {
  color:#20182f;
}
html[data-mz-theme="dark"] .mz-el-section-features .mzui-feature-card :is(.mzui-card-title,h3,h4,h5,h6) {
  color:#20182f;
}
html[data-mz-theme="dark"] .mz-el-section-features .mzui-feature-card p {
  color:#544a5b;
}
/* The labels in the headline and numeric counter ABOVE the six cards remain
 * legible against the dark section background. */
html[data-mz-theme="dark"] .mz-el-section-features .mz-el-title-group .mz-el-heading .elementor-heading-title,
html[data-mz-theme="dark"] .mz-el-section-features .mz-el-feature-top .mz-el-heading .elementor-heading-title {
  color:#f8f3fc!important;
  -webkit-text-fill-color:#f8f3fc;
}
html[data-mz-theme="dark"] .mz-el-section-features .mz-el-counter-number .elementor-heading-title {
  color:#ff8a65!important;
  -webkit-text-fill-color:#ff8a65;
}

/* 3. Dark mode service pages: Elementor stores some headings and descriptions
 * with fixed navy text. Only override section-head/title-group widgets OUTSIDE
 * cards. Preserve pink/green/blue/purple icons and highlighted spans. */
html[data-mz-theme="dark"] :is(.mz-ielts-title,.mz-toefl-title,.mz-gre-title,.mz-duolingo-title)
 :is(.mz-ielts-heading,.mz-toefl-heading,.mz-gre-heading,.mz-duolingo-heading) .elementor-heading-title,
html[data-mz-theme="dark"] :is(.mz-ielts-score-copy,.mz-toefl-score-copy,.mz-gre-score-copy,.mz-duolingo-score-copy)
 :is(.mz-ielts-heading,.mz-toefl-heading,.mz-gre-heading,.mz-duolingo-heading) .elementor-heading-title {
  color:#f9f5ff!important;
  -webkit-text-fill-color:#f9f5ff;
}
html[data-mz-theme="dark"] :is(.mz-ielts-title,.mz-toefl-title,.mz-gre-title,.mz-duolingo-title)
 :is(.mz-ielts-intro,.mz-toefl-intro,.mz-gre-intro,.mz-duolingo-intro) :is(p,span),
html[data-mz-theme="dark"] :is(.mz-ielts-score-info,.mz-toefl-score-info,.mz-gre-score-info,.mz-duolingo-score-info) p,
html[data-mz-theme="dark"] :is(.mz-ielts-requirements-text,.mz-toefl-requirements-text,.mz-gre-requirements-text,.mz-duolingo-requirements-text) p {
  color:#d8cce0!important;
}
/* Highlights MUST remain colored even inside an otherwise light heading. */
html[data-mz-theme="dark"] :is(.mz-ielts-title,.mz-toefl-title,.mz-gre-title,.mz-duolingo-title) .mz-hot,
html[data-mz-theme="dark"] .mz-el-section-features .mz-hot {
  color:#ff8a65!important;
  -webkit-text-fill-color:#ff8a65!important;
}
/* Score tiles are intentionally pale colored and keep dark labels. */
html[data-mz-theme="dark"] :is(.mz-ielts-score-card,.mz-toefl-score-card,.mz-gre-score-card,.mz-duolingo-score-card)
 :is(.mz-ielts-score-label,.mz-toefl-score-label,.mz-gre-score-label,.mz-duolingo-score-label) {
  color:#20182f!important;
}

/* The existing Elementor container has 100% width plus padding (content-box);
 * box-sizing fixes a tablet-width horizontal overflow without changing content. */
.mz-el-section-difference > .mz-el-inner {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:1190px!important;
}

/* 4. 'Results aren't accidental' is a permanently DARK callout (even when
 * the site is light). Do not let the generic pastel-card fix recolor its text. */
.mz-el-section-difference .mz-el-heading .elementor-heading-title,
.mz-el-section-difference .mzui-feature-card :is(.mzui-card-title,h3,h4,h5,h6) {
  color:#fff!important;
  -webkit-text-fill-color:#fff;
}
.mz-el-section-difference .mz-el-diff-text .elementor-widget-text-editor :is(p,span) {
  color:#e1d8e8!important;
}
.mz-el-section-difference .mz-hot {
  color:#ff8a65!important;
  -webkit-text-fill-color:#ff8a65!important;
}

@media (max-width:767px){
  /* 15px is the agreed mobile horizontal page gutter. */
  .mz-el-section-difference {padding-inline:15px!important;}
  .mz-el-section-difference > .mz-el-inner {
    width:100%!important;max-width:100%!important;
    box-sizing:border-box!important;
    padding:27px 20px 30px!important;
    
    display:flex!important;flex-direction:column!important;
    align-items:stretch!important;
    border-radius:27px!important;
  }
.e-con:where(.mz-el-section-difference > .mz-el-inner){--gap:26px;}

  .mz-el-section-difference .mz-el-diff-text {
    width:100%!important;max-width:100%!important;min-width:0!important;
    flex:0 0 auto!important;align-items:stretch!important;
    text-align:right!important;
  }
.e-con:where(.mz-el-section-difference .mz-el-diff-text){--gap:10px;}

  .mz-el-section-difference .mz-el-diff-text .mz-el-heading .elementor-heading-title {
    font-size:clamp(27px,7.5vw,36px);
    line-height:1.4!important;
    text-align:right!important;
  }
  .mz-el-section-difference .mz-el-diff-text .elementor-widget-text-editor p {
    font-size:13px;line-height:2;text-align:right!important;
  }
  .mz-el-section-difference .mz-el-diff-text .elementor-widget-button {
    width:auto!important;max-width:100%!important;align-self:flex-start!important;
  }
  .mz-el-section-difference .mz-el-custom,
  .mz-el-section-difference .mz-el-custom > .elementor-widget-container {
    flex:none!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .mz-el-section-difference .mzui-features {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:15px 12px!important;
    width:100%!important;
  }
  .mz-el-section-difference .mzui-feature-card {
    display:flex!important;flex-direction:row!important;
    align-items:center!important;justify-content:flex-start!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:62px!important;
    padding:3px 0!important;gap:9px!important;
    box-sizing:border-box;
    direction:rtl;text-align:right;
  }
  .mz-el-section-difference .mzui-feature-icon {
    flex:0 0 24px!important;width:24px!important;height:24px!important;
    margin:0!important;
  }
  .mz-el-section-difference .mzui-feature-card .mzui-card-title {
    min-width:0;max-width:100%;overflow-wrap:break-word;
    font-size:12px;line-height:1.85;
    margin:0!important;text-align:right!important;
  }
}
@media (max-width:480px){
  /* At 320-390px the former two-column checklist crushed labels; one readable
   * column prevents line collisions and requires no document rebuild. */
  .mz-el-section-difference .mzui-features {
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  .mz-el-section-difference .mzui-feature-card {
    min-height:46px!important;padding:5px 2px!important;
  }
  .mz-el-section-difference .mzui-feature-card .mzui-card-title {
    font-size:14px;
  }
}

/* 5. The secondary service Hero button was white-on-white in screenshots.
 * Give it an explicit contrasting surface in both themes. */
:is(.mz-ielts-outline-btn,.mz-toefl-outline-btn,.mz-gre-outline-btn,.mz-duolingo-outline-btn) .elementor-button {
  color:#1f1730!important;
  background:#fff!important;
  border:1px solid #e9ddd5!important;
}
:is(.mz-ielts-outline-btn,.mz-toefl-outline-btn,.mz-gre-outline-btn,.mz-duolingo-outline-btn) .elementor-button :is(.elementor-button-text,span) {
  color:inherit!important;
}
html[data-mz-theme="dark"] :is(.mz-ielts-outline-btn,.mz-toefl-outline-btn,.mz-gre-outline-btn,.mz-duolingo-outline-btn) .elementor-button {
  color:#fbf6ff!important;
  background:#3c2b4d!important;
  border-color:#705c7d!important;
}
html[data-mz-theme="dark"] :is(.mz-ielts-outline-btn,.mz-toefl-outline-btn,.mz-gre-outline-btn,.mz-duolingo-outline-btn) .elementor-button:hover {
  background:#4c3961!important;
  color:#fff!important;
}
