/*
Theme Name:   Astra Child
Theme URI:    https://wpastra.com/
Description:  Astra Child Theme with dark mode, language switcher (EN/AR/FR), and RTL support.
Author:       Sara Toumi - TCF Canada
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
*/

/* =========================================================
   IMPORT PARENT THEME
   ========================================================= */
@import url("../astra/style.css");

/* =========================================================
   CSS CUSTOM PROPERTIES — LIGHT MODE (default)
   ========================================================= */
:root {
  --brand:        #c8102e;
  --brand-hover:  #a50d26;
  --bg:           #ffffff;
  --bg-secondary: #f5f5f5;
  --surface:      #ffffff;
  --border:       #e0e0e0;
  --text-primary: #111111;
  --text-secondary: #555555;
  --nav-bg:       #ffffff;
  --nav-text:     #111111;
  --nav-shadow:   0 2px 12px rgba(0,0,0,0.08);
  --toggle-bg:    #e0e0e0;
  --toggle-knob:  #ffffff;
  --dropdown-bg:  #ffffff;
  --dropdown-shadow: 0 8px 24px rgba(0,0,0,0.12);
  --transition:   0.3s ease;
}

/* =========================================================
   DARK MODE OVERRIDES  (class added by JS to <html>)
   ========================================================= */
html.dark-mode {
  --bg:           #0f0f0f;
  --bg-secondary: #1a1a1a;
  --surface:      #1e1e1e;
  --border:       #2e2e2e;
  --text-primary: #f0f0f0;
  --text-secondary: #bbbbbb;
  --nav-bg:       #141414;
  --nav-text:     #f0f0f0;
  --nav-shadow:   0 2px 12px rgba(0,0,0,0.4);
  --toggle-bg:    #c8102e;
  --toggle-knob:  #ffffff;
  --dropdown-bg:  #1e1e1e;
  --dropdown-shadow: 0 8px 24px rgba(0,0,0,0.5);

  /* Override Elementor global color system */
  --e-global-color-primary: var(--brand);
  --e-global-color-secondary: var(--text-secondary);
  --e-global-color-text: var(--text-primary);
  --e-global-color-accent: var(--text-secondary);
  --e-global-color-astglobalcolor0: var(--bg);
  --e-global-color-astglobalcolor1: var(--text-primary);
  --e-global-color-astglobalcolor2: var(--text-secondary);
  --e-global-color-astglobalcolor3: var(--surface);
  --e-global-color-astglobalcolor4: var(--text-primary);
  --e-global-color-astglobalcolor5: var(--text-secondary);
  --e-global-color-astglobalcolor6: var(--border);
  --e-global-color-astglobalcolor7: var(--bg-secondary);
  --e-global-color-astglobalcolor8: var(--bg);
  --e-con-bg-color: var(--bg);
}

/* .tc-preserve-brand — add to Elementor's CSS Classes to skip dark mode */
html.dark-mode .tc-preserve-brand {
  background-color: unset !important;
  background-image: unset !important;
}

html.dark-mode .tc-preserve-brand .elementor-heading-title,
html.dark-mode .tc-preserve-brand .elementor-text-editor,
html.dark-mode .tc-preserve-brand .elementor-widget-text-editor,
html.dark-mode .tc-preserve-brand .elementor-widget-text-editor p,
html.dark-mode .tc-preserve-brand .elementor-widget-container p,
html.dark-mode .tc-preserve-brand .elementor-widget-container span,
html.dark-mode .tc-preserve-brand .elementor-icon-list-text,
html.dark-mode .tc-preserve-brand .elementor-counter-title,
html.dark-mode .tc-preserve-brand .elementor-counter-number,
html.dark-mode .tc-preserve-brand .elementor-testimonial-content,
html.dark-mode .tc-preserve-brand .elementor-price-list-header,
html.dark-mode .tc-preserve-brand .elementor-price-list-price {
  color: inherit !important;
  background-color: transparent !important;
}

/* Apply theme colors globally */
html.dark-mode body {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .site-header,
html.dark-mode #masthead,
html.dark-mode .ast-primary-header-bar {
  background-color: var(--nav-bg) !important;
  box-shadow: var(--nav-shadow) !important;
}

html.dark-mode .main-header-menu .menu-item > a,
html.dark-mode .main-header-menu > li > a,
html.dark-mode #site-navigation .menu-item > a {
  color: var(--nav-text) !important;
}

html.dark-mode .main-header-menu .menu-item > a:hover,
html.dark-mode .main-header-menu > li > a:hover {
  color: var(--brand) !important;
}

html.dark-mode .entry-content,
html.dark-mode .entry-title,
html.dark-mode h1, html.dark-mode h2,
html.dark-mode h3, html.dark-mode h4,
html.dark-mode p {
  color: var(--text-primary) !important;
}

html.dark-mode .ast-container,
html.dark-mode .entry-content,
html.dark-mode article,
html.dark-mode .site-content {
  background-color: var(--bg) !important;
}

/* Cards, boxes, tutor LMS elements */
html.dark-mode .tutor-card,
html.dark-mode .tutor-course-card,
html.dark-mode .tutor-course-details-tab-content,
html.dark-mode .tutor-dashboard-content,
html.dark-mode .tutor-wrap,
html.dark-mode .course-card,
html.dark-mode .tutor-course-filter-wrap,
html.dark-mode .tutor-course-archive-filter-wrap,
html.dark-mode .tutor-course-archive-results-wrap,
html.dark-mode .tutor-course-archive-filters-wrap,
html.dark-mode .tutor-course-topic,
html.dark-mode .tutor-course-content-list-item,
html.dark-mode .tutor-accordion-item,
html.dark-mode .tutor-accordion-item-header,
html.dark-mode .tutor-course-sidebar-card,
html.dark-mode .tutor-course-sidebar-card-body,
html.dark-mode .tutor-single-course-segment,
html.dark-mode .tutor-dashboard-permalinks,
html.dark-mode .tutor-question,
html.dark-mode .tutor-quiz-question,
html.dark-mode .woocommerce-account .woocommerce,
html.dark-mode .wc-block-components-product-price {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode footer,
html.dark-mode .site-footer,
html.dark-mode #colophon {
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR CONTAINERS  (skip .tc-preserve-brand)
   ========================================================= */

/* Main sections — force dark bg unless explicitly branded */
html.dark-mode .elementor-section:not(.tc-preserve-brand),
html.dark-mode .elementor-top-section:not(.tc-preserve-brand),
html.dark-mode .e-con:not(.tc-preserve-brand),
html.dark-mode .e-con-inner:not(.tc-preserve-brand),
html.dark-mode .e-con-boxed:not(.tc-preserve-brand),
html.dark-mode .e-con-full:not(.tc-preserve-brand),
html.dark-mode .e-flex:not(.tc-preserve-brand),
html.dark-mode .e-grid:not(.tc-preserve-brand) {
  background-color: var(--bg) !important;
  background-image: none !important;
}

/* Surface containers (inner content areas, slightly lighter) */
html.dark-mode .elementor-widget-container,
html.dark-mode .elementor-widget-wrap,
html.dark-mode .elementor-column-wrap {
  background-color: transparent !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR TEXT / HEADINGS
   ========================================================= */
html.dark-mode .elementor-heading-title,
html.dark-mode .elementor-icon-list-text,
html.dark-mode .elementor-text-editor,
html.dark-mode .elementor-widget-text-editor,
html.dark-mode .elementor-widget-text-editor p,
html.dark-mode .elementor-widget-text-editor span,
html.dark-mode .elementor-counter-title,
html.dark-mode .elementor-counter-number,
html.dark-mode .elementor-testimonial-content,
html.dark-mode .elementor-testimonial-name,
html.dark-mode .elementor-testimonial-job,
html.dark-mode .elementor-tab-title,
html.dark-mode .elementor-toggle-title,
html.dark-mode .elementor-accordion-title,
html.dark-mode .elementor-price-list-header,
html.dark-mode .elementor-price-list-description,
html.dark-mode .elementor-price-list-price,
html.dark-mode .elementor-alert-title,
html.dark-mode .elementor-alert-description,
html.dark-mode .elementor-tabs-content-wrapper,
html.dark-mode .elementor-widget-container p,
html.dark-mode .elementor-widget-container span,
html.dark-mode .elementor-widget-container li,
html.dark-mode .elementor-widget-container div:not([class]),
html.dark-mode .elementor-icon-box-title,
html.dark-mode .elementor-icon-box-description,
html.dark-mode .elementor-image-box-title,
html.dark-mode .elementor-image-box-description,
html.dark-mode .elementor-progress-percentage,
html.dark-mode .elementor-star-rating__title,
html.dark-mode .elementor-blockquote__content,
html.dark-mode .elementor-author-box__name,
html.dark-mode .elementor-author-box__bio,
html.dark-mode .elementor-inline-items {
  color: var(--text-primary) !important;
}

/* Links inside text widgets */
html.dark-mode .elementor-text-editor a,
html.dark-mode .elementor-widget-text-editor a {
  color: var(--brand) !important;
}

html.dark-mode .elementor-text-editor a:hover,
html.dark-mode .elementor-widget-text-editor a:hover {
  color: var(--brand-hover) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR BUTTONS
   ========================================================= */
html.dark-mode .elementor-button-wrapper .elementor-button,
html.dark-mode .elementor-button {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
}

html.dark-mode .elementor-button-wrapper .elementor-button:hover,
html.dark-mode .elementor-button:hover {
  background-color: var(--brand-hover) !important;
}

/* Secondary / outline buttons — keep outline visible */
html.dark-mode .elementor-button.elementor-button-outline {
  background-color: transparent !important;
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

html.dark-mode .elementor-button.elementor-button-outline:hover {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR FORMS
   ========================================================= */
html.dark-mode .elementor-field-group input,
html.dark-mode .elementor-field-group textarea,
html.dark-mode .elementor-field-group select,
html.dark-mode .elementor-form-fields-wrapper input,
html.dark-mode .elementor-form-fields-wrapper textarea,
html.dark-mode .elementor-field-textual {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .elementor-field-group input::placeholder,
html.dark-mode .elementor-field-group textarea::placeholder,
html.dark-mode .elementor-field-textual::placeholder {
  color: var(--text-secondary) !important;
}

html.dark-mode .elementor-field-group label,
html.dark-mode .elementor-field-label {
  color: var(--text-primary) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR CARDS / BOXES / GRIDS
   ========================================================= */
html.dark-mode .elementor-cta,
html.dark-mode .elementor-flip-box,
html.dark-mode .elementor-flip-box__front,
html.dark-mode .elementor-flip-box__back,
html.dark-mode .elementor-price-table,
html.dark-mode .elementor-price-table__header,
html.dark-mode .elementor-price-table__footer,
html.dark-mode .elementor-post__card,
html.dark-mode .elementor-portfolio-item__overlay {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .elementor-flip-box__layer__title,
html.dark-mode .elementor-flip-box__layer__description,
html.dark-mode .elementor-price-table__heading,
html.dark-mode .elementor-price-table__subheading,
html.dark-mode .elementor-price-table__price,
html.dark-mode .elementor-price-table__features-list li,
html.dark-mode .elementor-price-table__footer .elementor-price-table__button,
html.dark-mode .elementor-post__title a,
html.dark-mode .elementor-post__excerpt p {
  color: var(--text-primary) !important;
}

html.dark-mode .elementor-post__title a:hover {
  color: var(--brand) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR NAV / MENU / ICONS / DIVIDERS
   ========================================================= */
html.dark-mode .elementor-nav-menu--dropdown {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .elementor-nav-menu--dropdown .elementor-item {
  color: var(--text-primary) !important;
}

html.dark-mode .elementor-nav-menu--dropdown .elementor-item:hover,
html.dark-mode .elementor-nav-menu--dropdown .elementor-item.highlighted {
  background-color: var(--bg-secondary) !important;
  color: var(--brand) !important;
}

html.dark-mode .elementor-icon i,
html.dark-mode .elementor-icon svg {
  color: var(--text-primary) !important;
}

html.dark-mode .elementor-divider-separator {
  border-color: var(--border) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR CAROUSELS / SLIDES
   ========================================================= */
html.dark-mode .elementor-slides .slick-slide,
html.dark-mode .elementor-carousel-item {
  background-color: var(--surface) !important;
}

/* =========================================================
   DARK MODE — ELEMENTOR MISC
   ========================================================= */
html.dark-mode .elementor-widget-image img {
  opacity: 0.95;
  transition: opacity var(--transition);
}

html.dark-mode .elementor-background-overlay {
  background-color: rgba(0,0,0,0.5) !important;
}

html.dark-mode .elementor-lightbox {
  background-color: rgba(0,0,0,0.92) !important;
}

html.dark-mode .elementor-widget-counter .elementor-counter-number-wrapper {
  color: var(--brand) !important;
}

/* =========================================================
   DARK MODE — TABS / ACCORDIONS / TOGGLES
   ========================================================= */
html.dark-mode .elementor-tabs-wrapper,
html.dark-mode .elementor-tab-content,
html.dark-mode .elementor-toggle-item,
html.dark-mode .elementor-accordion-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .elementor-tab-title.elementor-active,
html.dark-mode .elementor-accordion-item .elementor-active .elementor-accordion-title {
  background-color: var(--bg-secondary) !important;
}

/* =========================================================
   DARK MODE — VIDEO / YOUTUBE / IFRAME EMBEDS
   ========================================================= */
html.dark-mode .elementor-widget-video .elementor-wrapper,
html.dark-mode .elementor-widget-video,
html.dark-mode .elementor-video-wrapper {
  background-color: #000 !important;
}

html.dark-mode .elementor-custom-embed-play i,
html.dark-mode .elementor-custom-embed-play svg {
  color: #ffffff !important;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.6));
}

html.dark-mode .elementor-custom-embed-image-overlay img {
  opacity: 0.85;
}

/* =========================================================
   DARK MODE — COUNTERS / PROGRESS BARS
   ========================================================= */
html.dark-mode .elementor-progress-bar {
  background-color: var(--brand) !important;
}

html.dark-mode .elementor-progress-wrapper {
  background-color: var(--bg-secondary) !important;
}

/* =========================================================
   DARK MODE — TUTOR LMS EXPANDED
   ========================================================= */
html.dark-mode .tutor-course-filter-wrap,
html.dark-mode .tutor-course-archive-filter-wrap,
html.dark-mode .tutor-course-archive-results-wrap,
html.dark-mode .tutor-course-archive-filters-wrap {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-course-card:hover,
html.dark-mode .tutor-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.5) !important;
}

html.dark-mode .tutor-course-title a {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-title a:hover {
  color: var(--brand) !important;
}

html.dark-mode .tutor-course-instructors-wrap,
html.dark-mode .tutor-course-meta,
html.dark-mode .tutor-course-rating-count,
html.dark-mode .tutor-course-details-info,
html.dark-mode .tutor-meta-value,
html.dark-mode .tutor-meta-key,
html.dark-mode .tutor-course-level,
html.dark-mode .tutor-course-duration {
  color: var(--text-secondary) !important;
}

html.dark-mode .tutor-course-content-title,
html.dark-mode .tutor-course-topic-title,
html.dark-mode .tutor-lesson-title,
html.dark-mode .tutor-quiz-title,
html.dark-mode .tutor-assignment-title {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-topic,
html.dark-mode .tutor-course-content-list-item,
html.dark-mode .tutor-accordion-item,
html.dark-mode .tutor-accordion-item-header {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-accordion-item-body-content {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-benefits-list li,
html.dark-mode .tutor-course-requirements-list li,
html.dark-mode .tutor-course-target-audience-list li {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-sidebar-card,
html.dark-mode .tutor-course-sidebar-card-body {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-sidebar-card-footer {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-single-course-segment {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* Tutor LMS quiz / lesson */
html.dark-mode .tutor-question,
html.dark-mode .tutor-quiz-question,
html.dark-mode .tutor-quiz-btn-group button {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-quiz-question-item label {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-quiz-btn-group .tutor-btn-primary {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #ffffff !important;
}

/* Tutor LMS dashboard / profile */
html.dark-mode .tutor-dashboard-permalinks,
html.dark-mode .tutor-dashboard-content,
html.dark-mode .tutor-dashboard-setting-title,
html.dark-mode .tutor-dashboard-setting-content {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* Dashboard header (user info bar) — must match main page bg, not surface */
html.dark-mode .tutor-dashboard-header {
  background-color: var(--bg) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-dashboard-permalinks li a {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dashboard-permalinks li.active a,
html.dark-mode .tutor-dashboard-permalinks li a:hover {
  color: var(--brand) !important;
  background-color: var(--bg-secondary) !important;
}

html.dark-mode .tutor-dashboard-info-table thead th {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-dashboard-info-table tbody td {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-dashboard-info-table tbody tr:hover td {
  background-color: var(--bg-secondary) !important;
}

/* Tutor LMS video player wrapper */
html.dark-mode .tutor-video-player {
  background-color: #000 !important;
}

html.dark-mode .plyr--video {
  background-color: #000 !important;
}

/* =========================================================
   DARK MODE — WOOCOMMERCE EXPANDED
   ========================================================= */
html.dark-mode .woocommerce,
html.dark-mode .woocommerce-page {
  color: var(--text-primary) !important;
}

html.dark-mode .woocommerce ul.products li.product,
html.dark-mode .woocommerce-page ul.products li.product {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .woocommerce ul.products li.product .price,
html.dark-mode .woocommerce ul.products li.product .woocommerce-loop-product__title,
html.dark-mode .woocommerce-Price-amount {
  color: var(--text-primary) !important;
}

html.dark-mode .woocommerce div.product .product_title,
html.dark-mode .woocommerce div.product p.price,
html.dark-mode .woocommerce div.product span.price {
  color: var(--text-primary) !important;
}

html.dark-mode .woocommerce-tabs,
html.dark-mode .woocommerce-tabs ul.tabs,
html.dark-mode .woocommerce-tabs ul.tabs li,
html.dark-mode .woocommerce-tabs .panel {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .woocommerce-tabs ul.tabs li.active {
  background-color: var(--bg) !important;
  border-bottom-color: var(--bg) !important;
}

html.dark-mode .woocommerce table.shop_table,
html.dark-mode .woocommerce table.shop_table th,
html.dark-mode .woocommerce table.shop_table td {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .woocommerce-checkout-review-order,
html.dark-mode .woocommerce-order-details,
html.dark-mode .woocommerce-customer-details {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .woocommerce-MyAccount-navigation {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .woocommerce-MyAccount-navigation ul li a {
  color: var(--text-primary) !important;
}

html.dark-mode .woocommerce-MyAccount-navigation ul li.is-active a,
html.dark-mode .woocommerce-MyAccount-navigation ul li a:hover {
  color: var(--brand) !important;
}

html.dark-mode .woocommerce-message,
html.dark-mode .woocommerce-info {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* =========================================================
   DARK MODE — ASTRA EXPANDED
   ========================================================= */
html.dark-mode .ast-separate-container .ast-article-post,
html.dark-mode .ast-separate-container .ast-article-single {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .ast-separate-container .blog-layout-1,
html.dark-mode .ast-separate-container .ast-blog-featured-section-wrapper {
  background-color: transparent !important;
}

html.dark-mode .ast-pagination .page-numbers {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .ast-pagination .page-numbers.current {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}

html.dark-mode .sidebar-main .widget,
html.dark-mode #secondary .widget {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .sidebar-main .widget-title,
html.dark-mode #secondary .widget-title {
  color: var(--text-primary) !important;
}

html.dark-mode .ast-single-post .entry-meta,
html.dark-mode .ast-single-post .entry-meta a {
  color: var(--text-secondary) !important;
}

html.dark-mode .ast-related-post-title {
  color: var(--text-primary) !important;
}

html.dark-mode .ast-author-box {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .ast-author-box .ast-author-info {
  color: var(--text-primary) !important;
}

html.dark-mode .ast-breadcrumbs-wrapper span,
html.dark-mode .ast-breadcrumbs-wrapper a {
  color: var(--text-secondary) !important;
}

html.dark-mode .ast-scroll-to-top-wrap .ast-scroll-top-icon {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}

/* =========================================================
   DARK MODE — COMMON / GENERIC
   ========================================================= */
html.dark-mode table th,
html.dark-mode table td {
  border-color: var(--border) !important;
}

html.dark-mode table thead th {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

html.dark-mode table tbody td {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

html.dark-mode a:not(.elementor-button):not(.tutor-btn-primary):not(.wp-block-button__link) {
  color: var(--brand);
}

html.dark-mode a:hover:not(.elementor-button):not(.tutor-btn-primary):not(.wp-block-button__link) {
  color: var(--brand-hover);
}

html.dark-mode blockquote,
html.dark-mode .wp-block-quote {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--brand) !important;
}

html.dark-mode .wp-block-pullquote {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode pre,
html.dark-mode code,
html.dark-mode .wp-block-code {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

html.dark-mode hr,
html.dark-mode .wp-block-separator {
  border-color: var(--border) !important;
}

html.dark-mode .wp-block-table figcaption,
html.dark-mode .wp-block-image figcaption,
html.dark-mode .wp-block-gallery figcaption {
  color: var(--text-secondary) !important;
}

/* =========================================================
   DARK MODE — MODALS / DIALOGS / POP-UPS
   ========================================================= */
html.dark-mode .elementor-popup-modal .dialog-widget-content,
html.dark-mode .elementor-location-popup,
html.dark-mode .e-off-canvas,
html.dark-mode .tutor-modal-content,
html.dark-mode .tutor-modal-header,
html.dark-mode .tutor-modal-body,
html.dark-mode .tutor-modal-footer,
html.dark-mode .iziModal,
html.dark-mode .iziModal-header {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-modal-close {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-modal-close:hover {
  color: var(--brand) !important;
}

/* =========================================================
   RTL SUPPORT — Arabic
   ========================================================= */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[dir="rtl"] .ast-primary-header-bar .ast-flex {
  flex-direction: row-reverse;
}

html[dir="rtl"] .main-header-menu {
  direction: rtl;
}

html[dir="rtl"] .lang-switcher-dropdown,
html[dir="rtl"] #tc-controls {
  left: 16px;
  right: auto;
}

/* =========================================================
   DARK MODE — CUSTOM HEADER  #sara-toumi-header
   ========================================================= */
html.dark-mode #sara-toumi-header {
  --color-bg: var(--nav-bg);
  --color-border: var(--border);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-secondary);
}

html.dark-mode #sara-toumi-header .site-nav {
  background: var(--nav-bg) !important;
  border-bottom-color: var(--border) !important;
}

html.dark-mode #sara-toumi-header .nav-logo-name {
  color: var(--text-primary) !important;
}

html.dark-mode #sara-toumi-header .nav-link {
  color: var(--text-secondary) !important;
}

html.dark-mode #sara-toumi-header .nav-link:hover,
html.dark-mode #sara-toumi-header .nav-link.active {
  color: var(--brand) !important;
  background: rgba(200, 16, 46, 0.12) !important;
}

html.dark-mode #sara-toumi-header .btn-primary {
  background: var(--brand) !important;
}

html.dark-mode #sara-toumi-header .btn-primary:hover {
  background: var(--brand-hover) !important;
}

html.dark-mode #sara-toumi-header .cart-btn {
  background: transparent !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode #sara-toumi-header .cart-btn:hover {
  background: rgba(200, 16, 46, 0.12) !important;
  border-color: var(--brand) !important;
  color: var(--brand) !important;
}

html.dark-mode #sara-toumi-header .hamburger-btn {
  color: var(--text-primary) !important;
}

html.dark-mode #sara-toumi-header .mobile-menu {
  background: var(--nav-bg) !important;
  border-top-color: var(--border) !important;
}

html.dark-mode #sara-toumi-header .tc-lang-btn {
  color: var(--nav-text);
  border-color: var(--border);
}

html.dark-mode #sara-toumi-header .tc-lang-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}

/* =========================================================
   NAV CONTROLS WRAPPER
   (dark toggle + language switcher injected by JS)
   ========================================================= */
#tc-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
}

/* --- Dark Mode Toggle (icon button) --- */
#tc-dark-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
  outline: none;
  padding: 0;
  color: var(--nav-text);
}

#tc-dark-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

#tc-dark-toggle .tc-toggle-icon {
  position: static;
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

#tc-dark-toggle .tc-icon-sun  { display: inline; }
#tc-dark-toggle .tc-icon-moon { display: none; }

html.dark-mode #tc-dark-toggle .tc-icon-sun  { display: none; }
html.dark-mode #tc-dark-toggle .tc-icon-moon { display: inline; }

/* Mobile dark toggle — same style, smaller */
#tc-dark-toggle-mob {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
  color: var(--nav-text);
  display: inline-flex;
  align-items: center;
}

#tc-dark-toggle-mob .tc-icon-sun  { display: inline; }
#tc-dark-toggle-mob .tc-icon-moon { display: none; }

html.dark-mode #tc-dark-toggle-mob .tc-icon-sun  { display: none; }
html.dark-mode #tc-dark-toggle-mob .tc-icon-moon { display: inline; }

/* --- Language Switcher --- */
.tc-lang-switcher {
  position: relative;
}

.tc-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-text);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  letter-spacing: 0.5px;
}

.tc-lang-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.tc-lang-btn .tc-flag {
  font-size: 16px;
  line-height: 1;
}

.tc-lang-btn .tc-chevron {
  font-size: 9px;
  transition: transform var(--transition);
  opacity: 0.6;
}

.tc-lang-switcher.open .tc-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.tc-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--dropdown-shadow);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 9999;
  min-width: 140px;
}

.tc-lang-switcher.open .tc-lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tc-lang-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

html[dir="rtl"] .tc-lang-option {
  text-align: right;
  flex-direction: row-reverse;
}

.tc-lang-option:hover {
  background: var(--bg-secondary);
  color: var(--brand);
}

.tc-lang-option.active {
  color: var(--brand);
  font-weight: 700;
}

.tc-lang-option .tc-opt-flag {
  font-size: 18px;
}

@media (max-width: 480px) {
  #tc-controls {
    gap: 7px;
    margin: 0;
  }
  .tc-lang-btn span:not(.tc-flag):not(.tc-chevron) {
    display: none;
  }
}


/* =========================================================
   DARK MODE — COMPREHENSIVE ELEMENTOR FIX  v2
   
   Root cause: Elementor sets backgrounds in THREE ways:
   1. Inline style="" on the element  → JS patcher handles
   2. A generated stylesheet (.elementor-kit-NNN)  → CSS vars handle
   3. A parent container's CSS var that cascades down → needs explicit override
   
   Strategy: We don't fight inline styles with CSS (we lose).
   Instead we paint EVERYTHING dark via the cascade, then
   restore only the intentionally-branded exceptions.
   The JS patcher still handles truly inline overrides.
   ========================================================= */

/* --- 1. PAINT THE WHOLE CANVAS DARK --- */
/* Every Elementor container/section that isn't explicitly branded */
html.dark-mode .elementor-location-header ~ *,
html.dark-mode .elementor-section-wrap,
html.dark-mode #page,
html.dark-mode .site,
html.dark-mode .ast-container,
html.dark-mode main,
html.dark-mode .content-area,
html.dark-mode .site-primary {
  background-color: var(--bg) !important;
}

/* --- 2. EVERY ELEMENTOR CONTAINER TYPE --- */
html.dark-mode .e-con:not(.tc-preserve-brand),
html.dark-mode .e-con-inner:not(.tc-preserve-brand),
html.dark-mode .e-con-boxed:not(.tc-preserve-brand),
html.dark-mode .e-con-full:not(.tc-preserve-brand),
html.dark-mode .e-flex:not(.tc-preserve-brand),
html.dark-mode .e-grid:not(.tc-preserve-brand),
html.dark-mode .elementor-section:not(.tc-preserve-brand),
html.dark-mode .elementor-top-section:not(.tc-preserve-brand),
html.dark-mode .elementor-inner-section:not(.tc-preserve-brand),
html.dark-mode .elementor-column:not(.tc-preserve-brand),
html.dark-mode .elementor-column-wrap:not(.tc-preserve-brand),
html.dark-mode .elementor-widget-wrap:not(.tc-preserve-brand),
html.dark-mode .elementor-widget-container:not(.tc-preserve-brand) {
  background-color: var(--bg) !important;
  background-image: none !important;
  /* Override the CSS custom property Elementor uses for container bg */
  --e-con-bg-color: var(--bg) !important;
  --background-color: var(--bg) !important;
}

/* --- 3. ALL TEXT INSIDE ELEMENTOR --- */
html.dark-mode .elementor-section:not(.tc-preserve-brand) *,
html.dark-mode .e-con:not(.tc-preserve-brand) * {
  color: var(--text-primary) !important;
}

/* --- 4. RESTORE EXCEPTIONS (order matters — these must come AFTER) --- */

/* 4a. Brand sections (red backgrounds) keep their colors */
html.dark-mode .tc-preserve-brand,
html.dark-mode .tc-preserve-brand * {
  /* Intentionally left blank — these elements are opted-out of dark mode */
}

/* 4b. Brand-red heading text that Elementor explicitly colored */
html.dark-mode .elementor-heading-title,
html.dark-mode .elementor-counter-number-wrapper {
  /* Inherits from parent rule above — override only if it was brand red */
}

/* 4c. Buttons must keep their colors */
html.dark-mode .elementor-button-wrapper .elementor-button,
html.dark-mode .elementor-button,
html.dark-mode a.elementor-button {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
}

html.dark-mode .elementor-button.elementor-button-outline,
html.dark-mode a.elementor-button.elementor-button-outline {
  background-color: transparent !important;
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* 4d. Intentionally dark Elementor widgets (icon boxes with dark bg set by design) */
/* These are the dark cards on your About page — they look correct already */
/* They have inline style="background-color:#1a1a1a" etc. which the JS patcher
   will NOT override because isLightComputed() will return false for them */

/* 4e. Images, videos, iframes — never colorize these */
html.dark-mode .elementor-section img,
html.dark-mode .e-con img,
html.dark-mode .elementor-section iframe,
html.dark-mode .e-con iframe,
html.dark-mode .elementor-section video,
html.dark-mode .e-con video {
  background-color: transparent !important;
  background-image: unset !important;
}

/* 4f. Forms */
html.dark-mode .elementor-field-group input,
html.dark-mode .elementor-field-group textarea,
html.dark-mode .elementor-field-group select,
html.dark-mode .elementor-field-textual {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* --- 5. INLINE STYLE OVERRIDES VIA ATTRIBUTE SELECTORS ---
   These target the exact pattern Elementor uses in its generated HTML.
   They only work for background-color and color, not background-image,
   but they're a reliable CSS-only catch for the most common cases.
   The :not() chain prevents collateral damage. */

html.dark-mode [style*="background-color: rgb"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *):not(input):not(textarea):not(select):not([class*="whatsapp"]):not([id*="whatsapp"]):not([class*="wpcwb"]):not([class*="wpwb"]):not([class*="wab-"]) {
  background-color: var(--bg) !important;
}

html.dark-mode [style*="background-color:#fff"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color: #fff"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color:#FFF"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color: #FFF"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color:#ffffff"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color: #ffffff"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color:#FFFFFF"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="background-color: #FFFFFF"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *) {
  background-color: var(--bg) !important;
}

/* Text color overrides — dark text that Elementor hardcoded */
html.dark-mode [style*="color: rgb(0"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:rgb(0"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color: #000"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:#000"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color: #111"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:#111"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color: #333"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:#333"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color: #444"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:#444"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color: #555"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *),
html.dark-mode [style*="color:#555"]:not(.tc-preserve-brand):not([class*="elementor-button"]):not(#tc-controls):not(#tc-controls *) {
  color: var(--text-primary) !important;
}

/* Restore white text on brand/dark backgrounds */
html.dark-mode .tc-preserve-brand *,
html.dark-mode [style*="background-color:#c8102e"] *,
html.dark-mode [style*="background-color: #c8102e"] * {
  color: #ffffff !important;
}

/* --- 6. ELEMENTOR KIT / GLOBAL STYLE OVERRIDES ---
   Elementor generates a stylesheet with :root-level custom properties
   AND injects them on .elementor-kit-NNN. We override both. */
html.dark-mode [class*="elementor-kit-"] {
  --e-global-color-text: var(--text-primary) !important;
  --e-global-color-primary: var(--brand) !important;
  --e-global-color-secondary: var(--text-secondary) !important;
  --e-global-color-accent: var(--text-secondary) !important;
}

/* =========================================================
   DARK MODE — TUTOR LMS COURSE ARCHIVE + FILTER SIDEBAR
   ========================================================= */

/* Filter sidebar — labels, checkboxes, headings */
html.dark-mode .tutor-course-filter-wrap,
html.dark-mode .tutor-course-archive-filter-wrap,
html.dark-mode .tutor-course-archive-filters-wrap,
html.dark-mode .tutor-course-filter,
html.dark-mode .tutor-filter-sidebar,
html.dark-mode .tutor-sidebar,
html.dark-mode .tutor-sidebar-widget,
html.dark-mode .tutor-course-filter-body,
html.dark-mode .tutor-course-filter-header {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* ALL text inside the filter area */
html.dark-mode .tutor-course-filter-wrap *,
html.dark-mode .tutor-course-archive-filter-wrap *,
html.dark-mode .tutor-course-archive-filters-wrap *,
html.dark-mode .tutor-filter-sidebar *,
html.dark-mode .tutor-sidebar *,
html.dark-mode .tutor-sidebar-widget * {
  color: var(--text-primary) !important;
}

/* Filter headings (Type, Category, Tag, Level) */
html.dark-mode .tutor-course-filter-wrap h3,
html.dark-mode .tutor-course-filter-wrap h4,
html.dark-mode .tutor-course-filter-wrap label,
html.dark-mode .tutor-course-filter-wrap span,
html.dark-mode .tutor-course-archive-filters-wrap h3,
html.dark-mode .tutor-course-archive-filters-wrap h4,
html.dark-mode .tutor-course-archive-filters-wrap label,
html.dark-mode .tutor-course-archive-filters-wrap span,
html.dark-mode .tutor-filter-sidebar h3,
html.dark-mode .tutor-filter-sidebar h4,
html.dark-mode .tutor-filter-sidebar label,
html.dark-mode .tutor-filter-sidebar span {
  color: var(--text-primary) !important;
}

/* Checkboxes */
html.dark-mode .tutor-course-filter-wrap input[type="checkbox"],
html.dark-mode .tutor-course-archive-filters-wrap input[type="checkbox"],
html.dark-mode .tutor-filter-sidebar input[type="checkbox"] {
  accent-color: var(--brand);
}

/* Course cards in archive */
html.dark-mode .tutor-card,
html.dark-mode .tutor-course-card,
html.dark-mode .tutor-course-list-item,
html.dark-mode .tutor-archive-course-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

/* ALL text inside course cards */
html.dark-mode .tutor-card *,
html.dark-mode .tutor-course-card *,
html.dark-mode .tutor-course-list-item *,
html.dark-mode .tutor-archive-course-card * {
  color: var(--text-primary) !important;
}

/* Course card footer — price area */
html.dark-mode .tutor-card-footer,
html.dark-mode .tutor-course-card-footer,
html.dark-mode .tutor-course-price,
html.dark-mode .tutor-price,
html.dark-mode .tutor-fs-5,
html.dark-mode .tutor-fw-bold,
html.dark-mode [class*="tutor-price"],
html.dark-mode [class*="tutor-course-price"] {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* "30% Booked" progress text */
html.dark-mode .tutor-course-booked-percentage,
html.dark-mode .tutor-booked-percentage,
html.dark-mode [class*="booked"],
html.dark-mode .tutor-card-footer span,
html.dark-mode .tutor-course-card-footer span {
  color: var(--text-secondary) !important;
}

/* Sort dropdown (Release Date newest first) */
html.dark-mode .tutor-course-sort-filter,
html.dark-mode .tutor-course-archive-results-wrap,
html.dark-mode .tutor-archive-sort,
html.dark-mode select.tutor-select,
html.dark-mode .tutor-select-wrap,
html.dark-mode .tutor-select-wrap select {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* View Cart button outline style */
html.dark-mode .tutor-btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
  background-color: transparent !important;
}

html.dark-mode .tutor-btn-outline-primary:hover {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}

/* =========================================================
   DARK MODE — TUTOR LMS STUDENT DASHBOARD
   ========================================================= */

/* Dashboard stat cards */
html.dark-mode .tutor-dashboard-overview-card,
html.dark-mode .tutor-stats-card,
html.dark-mode [class*="tutor-dashboard"] .tutor-card,
html.dark-mode .tutor-dashboard-overview {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-dashboard-overview-card *,
html.dark-mode .tutor-stats-card *,
html.dark-mode [class*="tutor-dashboard"] .tutor-card * {
  color: var(--text-primary) !important;
}

/* Icon circle backgrounds in stat cards */
html.dark-mode .tutor-dashboard-overview-card .tutor-icon-wrap,
html.dark-mode .tutor-dashboard-overview-card .tutor-dashboard-overview-icon,
html.dark-mode [class*="tutor-icon-bg"] {
  background-color: rgba(200, 16, 46, 0.15) !important;
}

/* Dashboard header area (name, stars, buttons) */
html.dark-mode .tutor-dashboard-header,
html.dark-mode .tutor-dashboard-instructor-header,
html.dark-mode .tutor-dashboard-user-header {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dashboard-header * {
  color: var(--text-primary) !important;
}

/* "New Bundle" / "New Course" outline buttons in header */
html.dark-mode .tutor-btn-outline-primary,
html.dark-mode button.tutor-btn-outline-primary,
html.dark-mode a.tutor-btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
  background-color: transparent !important;
}

/* Sidebar nav items */
html.dark-mode .tutor-dashboard-permalinks,
html.dark-mode .tutor-dashboard-nav {
  background-color: var(--surface) !important;
}

html.dark-mode .tutor-dashboard-permalinks *,
html.dark-mode .tutor-dashboard-nav * {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dashboard-permalinks li.tutor-is-active > a,
html.dark-mode .tutor-dashboard-nav li.tutor-is-active > a,
html.dark-mode .tutor-dashboard-permalinks li > a.tutor-is-active {
  color: var(--brand) !important;
  background-color: rgba(200, 16, 46, 0.1) !important;
}

/* =========================================================
   DARK MODE — WHATSAPP FLOATING BUTTON FIX  (v4 — clean)
   
   RULE: Only target dedicated WA plugin elements by their
   specific plugin class names. NEVER use [class*="whatsapp"] a
   because that catches any <a> inside any element that has
   "whatsapp" in its class — including footer phone links.
   ========================================================= */

/* Wrapper elements — transparent bg, no glow */
html.dark-mode .wpcwb-button,
html.dark-mode .wpcwb-floating-btn,
html.dark-mode .wcb-whatsapp,
html.dark-mode .wab-button,
html.dark-mode .whatsapp-chatbox {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* The actual floating button circle — green with glow */
html.dark-mode .wpcwb-button > a,
html.dark-mode .wpcwb-floating-btn > a,
html.dark-mode .wcb-whatsapp > a,
html.dark-mode .wab-button > a,
html.dark-mode .whatsapp-chat-button > a {
  background-color: #25D366 !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5) !important;
}

/* Icon inside stays white and bg transparent */
html.dark-mode .wpcwb-button > a *,
html.dark-mode .wpcwb-floating-btn > a *,
html.dark-mode .wcb-whatsapp > a *,
html.dark-mode .wab-button > a *,
html.dark-mode .whatsapp-chat-button > a * {
  color: #ffffff !important;
  fill: #ffffff !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* =========================================================
   DARK MODE — TARGETED FIXES v3
   ========================================================= */

/* --- FIX: Level badge circles (A1/A2/B1/B2) ---
   These are Elementor icon-box or custom HTML elements with a
   light-pink/brand bg. Our nuclear rule kills their background.
   Restore brand-tinted circle backgrounds. */
html.dark-mode .elementor-icon-box-icon .elementor-icon,
html.dark-mode .elementor-icon-box-icon,
html.dark-mode [class*="level-badge"],
html.dark-mode [class*="tc-level"],
html.dark-mode .tc-badge {
  background-color: rgba(200, 16, 46, 0.15) !important;
  color: var(--brand) !important;
}

/* Elementor icon-box title (Level A1 - Foundation etc.) */
html.dark-mode .elementor-icon-box-title,
html.dark-mode .elementor-icon-box-title a,
html.dark-mode .elementor-icon-box-description {
  color: var(--text-primary) !important;
}

/* --- FIX: Sort dropdown menu (white bg in dark mode) ---
   Tutor LMS renders a custom dropdown, not a native <select>.
   Target the dropdown list container. */
html.dark-mode .tutor-dropdown,
html.dark-mode .tutor-dropdown-list,
html.dark-mode .tutor-dropdown-item,
html.dark-mode ul.tutor-dropdown,
html.dark-mode .tutor-course-sort-by .tutor-dropdown,
html.dark-mode [class*="tutor-sort"] .tutor-dropdown,
html.dark-mode .tutor-dropdown-wrapper,
html.dark-mode .tutor-dropdown-wrapper ul,
html.dark-mode .tutor-dropdown-wrapper li,
html.dark-mode .tutor-action-btn-group .tutor-dropdown,
html.dark-mode .tutor-v2-dropdown,
html.dark-mode .tutor-v2-dropdown ul,
html.dark-mode .tutor-v2-dropdown li {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dropdown-item:hover,
html.dark-mode .tutor-dropdown li:hover,
html.dark-mode .tutor-v2-dropdown li:hover {
  background-color: var(--bg-secondary) !important;
  color: var(--brand) !important;
}

/* Dropdown trigger button */
html.dark-mode .tutor-course-sort-select,
html.dark-mode .tutor-sort-select,
html.dark-mode button.tutor-dropdown-toggle,
html.dark-mode [data-tutor-dropdown-toggle] {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* --- FIX: Dashboard header exact selector ---
   Tutor LMS uses .tutor-dashboard-header which our earlier
   rule set to --surface. Force it to --bg so it blends with the page. */
html.dark-mode .tutor-dashboard-header,
html.dark-mode .tutor-page-title-area,
html.dark-mode .tutor-page-header,
html.dark-mode .tutor-student-dashboard-header,
html.dark-mode .tutor-instructor-dashboard-header {
  background-color: var(--bg) !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--border) !important;
}

/* --- FIX: WhatsApp button — restore green with proper glow ---
   The plugin (most likely WP Social Chat or similar) wraps the
   button in a div. We need to be very specific to not let our
   global background rules bleed in. */

/* WhatsApp floating widget button — green with glow.
   ONLY targets dedicated WA plugin elements, NOT plain wa.me links
   (those are handled per-context below). */
html.dark-mode .wpcwb-button a,
html.dark-mode .wpwb-wc-btn,
html.dark-mode .wab-button,
html.dark-mode .whatsapp-chat-button a,
html.dark-mode [class*="whatsapp-float"] a,
html.dark-mode [class*="whatsapp-btn"],
html.dark-mode [id*="whatsapp-btn"] {
  background-color: #25D366 !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.55) !important;
  /* No border-radius override — let the plugin control its own shape */
}

/* icon/svg inside WA button — handled in plugin-specific rules above */

/* =========================================================
   TARGETED FIXES v3.1 — icon boxes, dashboard header strip,
   sort dropdown, WhatsApp glow
   ========================================================= */

/* Icon box widget — the small rounded square with icon inside.
   In light mode it has a brand-pink bg. Restore that in dark mode.
   The JS size-guard prevents the patcher from touching these. */
html.dark-mode .elementor-icon-box-icon .elementor-icon,
html.dark-mode .elementor-icon-box-icon {
  background-color: rgba(200, 16, 46, 0.18) !important;
}

html.dark-mode .elementor-icon-box-icon .elementor-icon i,
html.dark-mode .elementor-icon-box-icon .elementor-icon svg,
html.dark-mode .elementor-icon-box-icon i,
html.dark-mode .elementor-icon-box-icon svg {
  color: var(--brand) !important;
  fill: var(--brand) !important;
}

/* Dashboard user-info strip — force same bg as page, not surface */
html.dark-mode .tutor-dashboard-header {
  background-color: var(--bg) !important;
  box-shadow: none !important;
}

/* Sort dropdown white bg fix — Tutor renders a custom <ul> */
html.dark-mode ul.tutor-dropdown,
html.dark-mode .tutor-dropdown > ul,
html.dark-mode .tutor-v2-dropdown > ul,
html.dark-mode [class*="tutor-sort"] ul,
html.dark-mode [class*="tutor-order"] ul {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode ul.tutor-dropdown li a,
html.dark-mode .tutor-dropdown > ul li a,
html.dark-mode .tutor-v2-dropdown > ul li a {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

html.dark-mode ul.tutor-dropdown li:hover a,
html.dark-mode .tutor-dropdown > ul li:hover a {
  color: var(--brand) !important;
  background-color: var(--bg-secondary) !important;
}

/* "Contact Us" green button on the CTA section — this is getting
   caught by our WhatsApp rules because it has a green bg inline style.
   Scope WA rules tighter to only fixed/floating elements. */
html.dark-mode .elementor-button[style*="background-color:#25"],
html.dark-mode .elementor-button[style*="background-color: #25"],
html.dark-mode .elementor-button[style*="background-color:rgb(37"],
html.dark-mode .elementor-button[style*="background-color: rgb(37"] {
  /* Restore whatever color the designer set — don't override */
  background-color: unset !important;
}

/* a[href*="wa.me"] intentionally NOT made green here —
   the Contact Us button uses that href and must stay as designed.
   The floating WA widget is handled by plugin class selectors above. */


/* =========================================================
   DARK MODE — #site-wrapper CUSTOM PAGES
   (about, media, home — NOT Elementor, uses CSS variables)
   ========================================================= */

html.dark-mode #site-wrapper {
  --color-bg:       #0f0f0f;
  --color-surface:  #1e1e1e;
  --color-surface-2:#1a1a1a;
  --color-border:   #2e2e2e;
  --color-text:     #f0f0f0;
  --color-text-muted: #bbbbbb;
  --color-accent:   rgba(200, 16, 46, 0.15);
  --card-shadow:    0 4px 6px -1px rgba(0,0,0,0.3);
}

/* All these classes use var() so they inherit the above automatically.
   But inline style="color:var(--color-text)" also resolves correctly.
   Only the <body> background needs an explicit push: */
html.dark-mode #site-wrapper {
  background: #0f0f0f !important;
  color: #f0f0f0 !important;
}

/* Cards on custom pages */
html.dark-mode #site-wrapper .card {
  background: #1e1e1e !important;
  border-color: #2e2e2e !important;
  color: #f0f0f0 !important;
}

html.dark-mode #site-wrapper .card h3,
html.dark-mode #site-wrapper .card p {
  color: #f0f0f0 !important;
}

/* icon-box circles inside cards */
html.dark-mode #site-wrapper .icon-box {
  background: rgba(200, 16, 46, 0.18) !important;
  color: #c8102e !important;
}

html.dark-mode #site-wrapper .icon-box svg {
  color: #c8102e !important;
  stroke: #c8102e !important;
}

/* Inline style text colors that use --color-text / --color-text-muted
   These resolve via CSS vars above — no extra rules needed.
   BUT hardcoded inline colors need explicit override: */
html.dark-mode #site-wrapper [style*="color:#222"],
html.dark-mode #site-wrapper [style*="color: #222"],
html.dark-mode #site-wrapper [style*="color:#52525B"],
html.dark-mode #site-wrapper [style*="color: #52525B"] {
  color: #bbbbbb !important;
}

/* Section backgrounds with inline bg white */
html.dark-mode #site-wrapper [style*="background:#fff"],
html.dark-mode #site-wrapper [style*="background: #fff"],
html.dark-mode #site-wrapper [style*="background-color:#fff"],
html.dark-mode #site-wrapper [style*="background-color: #fff"],
html.dark-mode #site-wrapper [style*="background:#ffffff"],
html.dark-mode #site-wrapper [style*="background-color:#ffffff"] {
  background-color: #0f0f0f !important;
}

/* Footer */
html.dark-mode #site-wrapper .site-footer {
  background: #1a1a1a !important;
  border-top-color: #2e2e2e !important;
}

/* =========================================================
   FIX: "Contact Us" button on CTA section
   It IS the wa.me link — but it sits on a red bg and should
   stay white/transparent, not turn green.
   Scope the green WA rule away from #site-wrapper CTA.
   ========================================================= */

/* Override our earlier a[href*="wa.me"] rule when inside the red CTA */
html.dark-mode #site-wrapper a[href*="wa.me"],
html.dark-mode #site-wrapper a[href*="whatsapp"] {
  background-color: transparent !important;
  box-shadow: none !important;
  color: white !important;
  border-color: rgba(255,255,255,0.3) !important;
}

/* The floating WhatsApp widget (fixed position, outside site-wrapper sections)
   still gets green — target it by position context */
html.dark-mode [style*="position:fixed"] a[href*="wa.me"],
html.dark-mode [style*="position: fixed"] a[href*="wa.me"],
html.dark-mode .wpcwb-button a[href*="wa.me"],
html.dark-mode .wab-button a[href*="wa.me"],
html.dark-mode [class*="whatsapp-float"] a[href*="wa.me"] {
  background-color: #25D366 !important;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5) !important;
  color: white !important;
}

/* =========================================================
   FIX: Tutor LMS dashboard header dark strip
   The strip around "Kareem Ahmed" is getting --surface color.
   Target the exact Tutor markup: .tutor-dashboard-header
   which wraps .tutor-d-flex with avatar + name
   ========================================================= */
html.dark-mode .tutor-dashboard-header,
html.dark-mode .tutor-student-profile,
html.dark-mode .tutor-dashboard > .tutor-dashboard-header,
html.dark-mode .tutor-page-wrap > .tutor-dashboard-header {
  background-color: var(--bg) !important;
  box-shadow: none !important;
  border: none !important;
}

/* The name and stars text inside */
html.dark-mode .tutor-dashboard-header .tutor-fs-5,
html.dark-mode .tutor-dashboard-header .tutor-color-black,
html.dark-mode .tutor-dashboard-header h5,
html.dark-mode .tutor-dashboard-header h4,
html.dark-mode .tutor-dashboard-header span:not([class*="star"]) {
  color: var(--text-primary) !important;
}


/* =========================================================
   DARK MODE — TUTOR LMS COURSES PAGE  (exact selectors from HTML)
   ========================================================= */

/* ── FILTER SIDEBAR ─────────────────────────────────────── */

/* Section headings: Type, Category, Tag, Level, Price */
html.dark-mode .tutor-widget-title {
  color: var(--text-primary) !important;
}

/* Each filter row (label + checkbox) */
html.dark-mode .tutor-list-item,
html.dark-mode .tutor-list-item label {
  color: var(--text-primary) !important;
}

/* The label text nodes directly inside .tutor-list-item
   Tutor renders: <label><input> Course</label>
   The text is a direct child — color on label covers it */
html.dark-mode .tutor-course-filter label,
html.dark-mode .tutor-course-filter-form label {
  color: var(--text-primary) !important;
}

/* Checkboxes */
html.dark-mode .tutor-form-check-input {
  accent-color: var(--brand);
  border-color: var(--border) !important;
}

/* Sidebar container background */
html.dark-mode .tutor-course-filter-container,
html.dark-mode .tutor-course-filter {
  background-color: transparent !important;
}

/* ── .tutor-color-black CLASS ────────────────────────────
   Tutor uses this utility class for dark text on: course
   title, price, "30% Booked", instructor name etc.
   In dark mode it must become light. */
html.dark-mode .tutor-color-black {
  color: var(--text-primary) !important;
}

/* ── SORT DROPDOWN ───────────────────────────────────────
   Tutor's custom select: .tutor-js-form-select with
   inner .tutor-form-select-dropdown > .tutor-form-select-options */
html.dark-mode .tutor-form-control.tutor-form-select,
html.dark-mode .tutor-js-form-select,
html.dark-mode .tutor-form-select-label {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-form-select-dropdown,
html.dark-mode .tutor-form-select-options {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-form-select-option {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-form-select-option:hover,
html.dark-mode .tutor-form-select-option.is-active {
  background-color: var(--bg-secondary) !important;
  color: var(--brand) !important;
}

html.dark-mode .tutor-form-select-option span {
  color: inherit !important;
}

/* ── COURSE CARD PRICE + BOOKED ─────────────────────────
   .tutor-course-price.tutor-color-black → covered above
   .tutor-fs-7.tutor-color-black ("30% Booked") → covered above */

/* Course card footer divider */
html.dark-mode .tutor-course-card .tutor-card-footer,
html.dark-mode .tutor-card-footer {
  border-top-color: var(--border) !important;
  background-color: transparent !important;
}

/* ── "Courses" heading above the filter on mobile ───────── */
html.dark-mode .tutor-fs-3.tutor-fw-medium.tutor-color-black {
  color: var(--text-primary) !important;
}


/* =========================================================
   DARK MODE — TUTOR LMS  (exact selectors from real HTML)
   ========================================================= */

/* Override Tutor's own CSS variables at :root level */
html.dark-mode {
  --tutor-color-gray: #1e1e1e !important;
  --tutor-border-color: #2e2e2e !important;
  --tutor-body-color: #f0f0f0 !important;
}

/* ── COURSES PAGE: sidebar strip color mismatch ──────────
   The gray left column (.tutor-col-3) uses --tutor-color-gray
   as its background in Tutor's stylesheet. Overriding the var
   above fixes it, but add explicit fallback too. */
html.dark-mode .tutor-course-filter-container,
html.dark-mode .tutor-col-3.tutor-course-filter-container {
  background-color: var(--bg) !important;
}

html.dark-mode .tutor-wrap.tutor-courses-wrap,
html.dark-mode .course-archive-page {
  background-color: var(--bg) !important;
}

/* ── DASHBOARD: header strip (Kareem Ahmed bar) ──────────
   Exact class from HTML: .tutor-frontend-dashboard-header
   wraps .tutor-dashboard-header — both must match page bg */
html.dark-mode .tutor-frontend-dashboard-header {
  background-color: var(--bg) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-header-left-side.tutor-dashboard-header {
  background-color: var(--bg) !important;
  border: none !important;
}

/* Username "Kareem Ahmed" — .tutor-color-black covered globally above,
   but add the specific dashboard class for extra specificity */
html.dark-mode .tutor-dashboard-header-username {
  color: var(--text-primary) !important;
}

/* Dashboard title "Dashboard" text */
html.dark-mode .tutor-dashboard-title {
  color: var(--text-primary) !important;
}

/* ── DASHBOARD: stat cards ───────────────────────────────
   Each stat card is .tutor-card containing a flex row */
html.dark-mode .tutor-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* Stat numbers (0, 1, £0.00) */
html.dark-mode .tutor-card .tutor-fs-3.tutor-fw-bold,
html.dark-mode .tutor-card .tutor-fs-4.tutor-fw-bold {
  color: var(--text-primary) !important;
}

/* Stat labels ("Enrolled Courses", "Active Courses" etc.)
   These use .tutor-color-secondary — override it */
html.dark-mode .tutor-color-secondary {
  color: var(--text-secondary) !important;
}

html.dark-mode .tutor-color-muted {
  color: var(--text-secondary) !important;
}

/* ── DASHBOARD: left nav menu ────────────────────────────*/
html.dark-mode .tutor-dashboard-left-menu {
  background-color: var(--surface) !important;
}

html.dark-mode .tutor-dashboard-left-menu a,
html.dark-mode .tutor-dashboard-left-menu span {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dashboard-menu-divider-header {
  color: var(--text-secondary) !important;
}

/* Active nav item */
html.dark-mode .tutor-dashboard-left-menu .is-active a,
html.dark-mode .tutor-dashboard-left-menu li.tutor-is-active > a {
  color: var(--brand) !important;
}

/* ── ICONIC BUTTONS (bell, filter toggle) ────────────────
   .tutor-iconic-btn-secondary uses --tutor-color-gray as bg */
html.dark-mode .tutor-iconic-btn-secondary {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* ── DASHBOARD CONTENT AREA ──────────────────────────────*/
html.dark-mode .tutor-dashboard-content,
html.dark-mode .tutor-dashboard-content-inner {
  background-color: var(--bg) !important;
}

/* ── TUTOR WRAP (page background) ────────────────────────*/
html.dark-mode .tutor-wrap.tutor-frontend-dashboard {
  background-color: var(--bg) !important;
}


/* =========================================================
   DARK MODE — DASHBOARD, CART & CHECKOUT  (from real HTML)
   ========================================================= */

/* ── DASHBOARD: blue active line fix ────────────────────
   The active item uses class "active" and Tutor renders a
   left border via --ast-global-color-2 (blue). Override it. */
html.dark-mode .tutor-dashboard-left-menu li.tutor-dashboard-menu-item.active,
html.dark-mode .tutor-dashboard-left-menu li.tutor-dashboard-menu-item.active a {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
}

/* The blue line itself is a left border on the li */
html.dark-mode .tutor-dashboard-left-menu li.active {
  border-left-color: var(--brand) !important;
}

/* Also catch Astra's --ast-global-color-2 blue reference */
html.dark-mode {
  --ast-global-color-2: var(--brand) !important;
}

/* ── CART PAGE ───────────────────────────────────────────
   .tutor-cart-page, .tutor-cart-page-wrapper,
   .tutor-cart-course-item, .tutor-cart-summery */
html.dark-mode .tutor-cart-page,
html.dark-mode .tutor-cart-page-wrapper {
  background-color: var(--bg) !important;
}

html.dark-mode .tutor-cart-course-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-cart-course-item * {
  color: var(--text-primary) !important;
}

/* Course info meta text (16h, Beginner) */
html.dark-mode .tutor-cart-course-info li {
  color: var(--text-secondary) !important;
}

/* Summary box */
html.dark-mode .tutor-cart-summery {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-cart-summery * {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-cart-summery-item {
  border-color: var(--border) !important;
}

/* "1 Course in Cart" and "Summary:" headings */
html.dark-mode .tutor-cart-page .tutor-color-black,
html.dark-mode .tutor-cart-page .tutor-fs-3 {
  color: var(--text-primary) !important;
}

/* Remove button */
html.dark-mode .tutor-cart-remove-button {
  color: var(--brand) !important;
}

/* ── CHECKOUT PAGE ───────────────────────────────────────
   .tutor-checkout-page, .tutor-checkout-container,
   .tutor-checkout-details, .tutor-checkout-billing */

/* Top spacing — checkout content sits too close to header */
html.dark-mode .tutor-checkout-page,
.tutor-checkout-page {
  padding-top: 2.5rem !important;
}

html.dark-mode .tutor-checkout-page,
html.dark-mode .tutor-checkout-container {
  background-color: var(--bg) !important;
}

/* Order details left panel */
html.dark-mode .tutor-checkout-details,
html.dark-mode .tutor-checkout-details-inner {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-checkout-details *,
html.dark-mode .tutor-checkout-details-inner * {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-checkout-course-item {
  border-color: var(--border) !important;
}

/* "Order Details" heading */
html.dark-mode .tutor-checkout-page .tutor-color-black,
html.dark-mode .tutor-checkout-page .tutor-border-bottom {
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Billing address form */
html.dark-mode .tutor-checkout-billing,
html.dark-mode #tutor-checkout-billing-address {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-checkout-billing *,
html.dark-mode #tutor-checkout-billing-address * {
  color: var(--text-primary) !important;
}

/* Form inputs inside billing */
html.dark-mode .tutor-checkout-page input[type="text"],
html.dark-mode .tutor-checkout-page input[type="email"],
html.dark-mode .tutor-checkout-page input[type="tel"],
html.dark-mode .tutor-checkout-page select,
html.dark-mode .tutor-checkout-page .tutor-form-control {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-checkout-page input::placeholder {
  color: var(--text-secondary) !important;
}

/* Payment method section */
html.dark-mode .tutor-checkout-payment-method,
html.dark-mode #tutor-checkout-payment {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-checkout-payment-method *,
html.dark-mode #tutor-checkout-payment * {
  color: var(--text-primary) !important;
}

/* Payment option selected state */
html.dark-mode .tutor-checkout-payment-item.is-active,
html.dark-mode .tutor-payment-item-wrap.is-active {
  background-color: var(--bg-secondary) !important;
  border-color: var(--brand) !important;
}

/* InstaPlay / payment instruction box */
html.dark-mode .tutor-checkout-page .tutor-card,
html.dark-mode .tutor-checkout-page [class*="payment-instruction"],
html.dark-mode .tutor-checkout-page [class*="instapay"] {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-checkout-page .tutor-card * {
  color: var(--text-primary) !important;
}

/* Divider lines inside checkout */
html.dark-mode .tutor-checkout-page hr,
html.dark-mode .tutor-checkout-page .tutor-divider {
  border-color: var(--border) !important;
}


/* =========================================================
   DARK MODE — PAYMENT METHOD + DASHBOARD SIDEBAR  v2
   ========================================================= */

/* ── CHECKOUT: Payment method label (exact from HTML) ────
   <label class="tutor-checkout-payment-item active">
     <input type="radio">
     <div class="tutor-payment-item-content"> */
html.dark-mode .tutor-checkout-payment-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-checkout-payment-item.active {
  background-color: var(--bg-secondary) !important;
  border-color: var(--brand) !important;
}

html.dark-mode .tutor-payment-item-content {
  background-color: transparent !important;
}

/* The "InstaPay" text and img inside the payment item */
html.dark-mode .tutor-checkout-payment-item *,
html.dark-mode .tutor-payment-item-content * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* Payment method wrapper and options container */
html.dark-mode .tutor-payment-method-wrapper {
  background-color: transparent !important;
}

html.dark-mode .tutor-checkout-payment-options {
  background-color: transparent !important;
}

/* Payment instructions box (Step 1, Option A, Option B...) */
html.dark-mode .tutor-payment-instructions,
html.dark-mode .tutor-payment-item-instructions {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-payment-instructions *,
html.dark-mode .tutor-payment-item-instructions * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* ── DASHBOARD: sidebar must be same color as page bg ────
   The left menu column uses --tutor-color-gray as bg.
   Force it to match --bg (#0f0f0f) exactly. */
html.dark-mode .tutor-dashboard-left-menu,
html.dark-mode .tutor-col-lg-3.tutor-dashboard-left-menu,
html.dark-mode .tutor-col-md-4.tutor-dashboard-left-menu,
html.dark-mode .tutor-col-lg-3.tutor-col-md-4.tutor-dashboard-left-menu {
  background-color: #0f0f0f !important;
}

/* The nav list inside sidebar */
html.dark-mode .tutor-dashboard-nav,
html.dark-mode .tutor-dashboard-nav ul,
html.dark-mode .tutor-dashboard-menu-items {
  background-color: #0f0f0f !important;
}

/* Each menu item row */
html.dark-mode .tutor-dashboard-menu-item {
  background-color: transparent !important;
}

html.dark-mode .tutor-dashboard-menu-item a {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-dashboard-menu-item.active a,
html.dark-mode .tutor-dashboard-menu-item.active {
  color: var(--brand) !important;
  border-left-color: var(--brand) !important;
  background-color: rgba(200, 16, 46, 0.08) !important;
}


/* =========================================================
   CHECKOUT PAGE — TOP SPACING FIX
   The page content sits too close to the fixed header.
   Target the specific article post ID + the checkout wrapper.
   Applied in both light and dark mode (it's a layout issue).
   ========================================================= */

/* The Astra article wrapper for the checkout page */
#post-27431.ast-article-single,
.woocommerce-checkout #post-27431,
article#post-27431 {
  padding-top: 3rem !important;
}

/* Belt-and-braces: also pad the entry-content and checkout container */
#post-27431 .entry-content,
#post-27431 .tutor-checkout-page,
#post-27431 .tutor-checkout-container {
  padding-top: 2rem !important;
}

/* If the post ID ever changes, this targets any checkout page generically */
.tutor-checkout-page .tutor-checkout-container {
  padding-top: 1.5rem;
}


/* =========================================================
   CHECKOUT — BILLING ADDRESS + PAYMENT CARDS STYLING
   Make the right column match the "Order Details" card style.
   Applied in both light and dark mode.
   ========================================================= */

/* Billing Address card */
.tutor-checkout-billing {
  background-color: var(--surface, #ffffff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem;
}

/* Payment Method card */
.tutor-payment-method-wrapper {
  background-color: var(--surface, #ffffff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem !important;
}

/* Dark mode — use surface color like Order Details card */
html.dark-mode .tutor-checkout-billing {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-payment-method-wrapper {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* "Billing Address" heading inside the card */
.tutor-checkout-billing h5,
.tutor-checkout-billing .tutor-fs-5 {
  margin-bottom: 1.25rem;
}

/* Payment instructions box — give it a subtle inset style */
.tutor-payment-instructions {
  border-radius: 6px;
  padding: 1.25rem !important;
  margin-top: 1rem;
}

html.dark-mode .tutor-payment-instructions {
  background-color: var(--bg) !important;
  border: 1px solid var(--border) !important;
}


/* =========================================================
   HOME PAGE — HERO SECTION SPACING FIX
   The hero uses min-height:100vh with align-items:center
   which pushes content to the vertical middle of the screen.
   Override to align content to the top with comfortable padding.
   ========================================================= */

/* Target the hero section inside #site-wrapper main */
#site-wrapper main > section:first-of-type {
  min-height: unset !important;
  align-items: flex-start !important;
  padding-top: 3rem !important;
  padding-bottom: 4rem !important;
}

/* The inner content div padding */
#site-wrapper main > section:first-of-type > div {
  padding-top: 1rem !important;
}


/* =========================================================
   DARK MODE — SINGLE COURSE PAGE
   ========================================================= */

/* Price display in sidebar */
html.dark-mode .tutor-single-course-sidebar .tutor-course-price,
html.dark-mode .tutor-single-course-sidebar .tutor-fs-3,
html.dark-mode .tutor-single-course-sidebar .tutor-fw-bold {
  color: var(--text-primary) !important;
}

/* Sidebar card background */
html.dark-mode .tutor-single-course-sidebar,
html.dark-mode .tutor-course-sidebar-card,
html.dark-mode .tutor-course-sidebar-card-body,
html.dark-mode .tutor-single-course-sidebar .tutor-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-single-course-sidebar *,
html.dark-mode .tutor-course-sidebar-card * {
  color: var(--text-primary) !important;
}

/* Course meta items (Beginner, 5 enrolled, 16h, last updated) */
html.dark-mode .tutor-course-details-widget li,
html.dark-mode .tutor-course-details-widget span {
  color: var(--text-primary) !important;
}

/* Material includes, requirements, instructor sections */
html.dark-mode .tutor-single-course-segment,
html.dark-mode .tutor-single-course-segment * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* =========================================================
   DARK MODE — CART PAGE: Remove button hover + coupon button
   ========================================================= */

/* "Remove" button — should stay readable on hover */
html.dark-mode .tutor-btn-link.tutor-cart-remove-button {
  color: var(--brand) !important;
  background-color: transparent !important;
}

html.dark-mode .tutor-btn-link.tutor-cart-remove-button:hover {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
}

/* Coupon "Apply" button — visible in dark mode */
html.dark-mode .tutor-coupon-apply-btn,
html.dark-mode button.tutor-coupon-apply-btn,
html.dark-mode .tutor-checkout-coupon-btn,
html.dark-mode [class*="coupon"] button,
html.dark-mode [class*="coupon"] .tutor-btn {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
  opacity: 1 !important;
}

html.dark-mode .tutor-coupon-apply-btn:hover,
html.dark-mode .tutor-checkout-coupon-btn:hover {
  background-color: var(--brand-hover) !important;
}

/* Coupon input field */
html.dark-mode .tutor-coupon-field,
html.dark-mode input[name="coupon_code"],
html.dark-mode [class*="coupon"] input[type="text"] {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* =========================================================
   DARK MODE — COURSE CONTENT PAGE (lesson view)
   ========================================================= */

/* The top bar inside the lesson view */
html.dark-mode .tutor-single-page-top-bar,
html.dark-mode .tutor-course-topic-single-header {
  background-color: var(--surface) !important;
  border-bottom-color: var(--border) !important;
}

html.dark-mode .tutor-single-page-top-bar *,
html.dark-mode .tutor-course-topic-single-header * {
  color: var(--text-primary) !important;
}

/* Sidebar in lesson view */
html.dark-mode .tutor-course-single-sidebar-wrapper,
html.dark-mode .tutor-lesson-sidebar {
  background-color: #0f0f0f !important;
  border-right-color: var(--border) !important;
}

html.dark-mode .tutor-course-single-sidebar-wrapper *,
html.dark-mode .tutor-lesson-sidebar * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* Active lesson item in sidebar */
html.dark-mode .tutor-course-single-sidebar-wrapper .tutor-is-active,
html.dark-mode .tutor-lesson-sidebar .tutor-is-active {
  background-color: rgba(200,16,46,0.1) !important;
}

html.dark-mode .tutor-course-single-sidebar-wrapper .tutor-is-active * {
  color: var(--brand) !important;
  background-color: transparent !important;
}

/* Lesson content area */
html.dark-mode #tutor-single-entry-content,
html.dark-mode .tutor-quiz-single-entry-wrap {
  background-color: var(--bg) !important;
}

/* The top bar overlapping the video — add padding to content body */
html.dark-mode .tutor-course-topic-single-body,
.tutor-course-topic-single-body {
  padding-top: 1rem !important;
}

/* Lesson title and meta */
html.dark-mode .tutor-lesson-wrapper,
html.dark-mode .tutor-fs-6.tutor-color-secondary.tutor-lesson-wrapper {
  color: var(--text-secondary) !important;
}

/* Comments section */
html.dark-mode .tutor-single-course-lesson-comments,
html.dark-mode .tutor-single-comment {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-single-comment * {
  color: var(--text-primary) !important;
}

/* Comment input */
html.dark-mode .tutor-single-course-lesson-comments textarea,
html.dark-mode .tutor-single-course-lesson-comments input {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* =========================================================
   COURSE CONTENT PAGE — video/image not hidden by header
   The .tutor-course-single-content-wrapper needs top offset
   to account for both WP admin bar (32px) + site header
   ========================================================= */
.tutor-course-single-content-wrapper {
  padding-top: 0 !important;
}

.tutor-course-topic-single-body {
  padding-top: 0.75rem !important;
}

/* WhatsApp CTA bubble that appears dark in lesson view */
html.dark-mode .ctc_cta_stick {
  background-color: #25D366 !important;
  color: #ffffff !important;
}


/* =========================================================
   DARK MODE — COURSE CONTENT COMMENTS + SINGLE COURSE SIDEBAR
   (exact classes from real HTML)
   ========================================================= */

/* ── LESSON COMMENTS ───────────────────────────────────── */

/* "Join the conversation" heading */
html.dark-mode .tutor-fs-5.tutor-fw-medium.tutor-color-black {
  color: var(--text-primary) !important;
}

/* Comment card — white bg issue */
html.dark-mode .tutor-actual-comment {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-actual-comment * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* Comment author name */
html.dark-mode .tutor-comment-author .tutor-fw-bold {
  color: var(--text-primary) !important;
}

/* Comment timestamp */
html.dark-mode .tutor-comment-author .tutor-fs-7 {
  color: var(--text-secondary) !important;
}

/* Comment text body */
html.dark-mode .tutor-comment-text {
  color: var(--text-primary) !important;
}

/* Reply link */
html.dark-mode .tutor-comment-actions .tutor-color-secondary {
  color: var(--brand) !important;
}

/* Comment separator line */
html.dark-mode .tutor-comment-line {
  background-color: var(--border) !important;
}

/* ── SINGLE COURSE SIDEBAR (exact from HTML) ───────────── */

/* .tutor-sidebar-card  */
html.dark-mode .tutor-sidebar-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* "Course Progress" heading — .tutor-color-black */
html.dark-mode .tutor-sidebar-card .tutor-color-black {
  color: var(--text-primary) !important;
}

/* Progress steps and percentage text */
html.dark-mode .tutor-sidebar-card .tutor-color-secondary {
  color: var(--text-secondary) !important;
}

/* Course info list items (Beginner, enrolled, duration, updated) */
html.dark-mode .tutor-card-footer .tutor-color-secondary {
  color: var(--text-secondary) !important;
}

html.dark-mode .tutor-card-footer .tutor-color-black {
  color: var(--text-primary) !important;
}

/* Enrolled info text */
html.dark-mode .tutor-enrolled-info-text {
  color: var(--text-secondary) !important;
}

html.dark-mode .tutor-color-success {
  color: #4ade80 !important;
}

/* "A course by" and instructor names */
html.dark-mode .tutor-course-details-instructors .tutor-color-black {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-instructor-designation.tutor-color-muted {
  color: var(--text-secondary) !important;
}

/* Material Includes / Requirements / Audience widget */
html.dark-mode .tutor-course-details-widget .tutor-color-black {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-details-widget-list .tutor-color-black,
html.dark-mode .tutor-course-details-widget-list span {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-color-muted {
  color: var(--text-secondary) !important;
}

/* ── COURSE TABS (Course Info, Reviews, Q&A etc.) ──────── */

/* Tab nav */
html.dark-mode .tutor-nav {
  background-color: var(--bg) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-nav-link {
  color: var(--text-secondary) !important;
}

html.dark-mode .tutor-nav-link.is-active {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* About Course section */
html.dark-mode .tutor-course-details-content .tutor-color-black {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-details-content .tutor-color-secondary {
  color: var(--text-secondary) !important;
}

/* What Will You Learn list */
html.dark-mode .tutor-course-details-widget-list.tutor-color-black,
html.dark-mode .tutor-course-details-widget-list.tutor-color-black li,
html.dark-mode .tutor-course-details-widget-list.tutor-color-black span {
  color: var(--text-primary) !important;
}

/* Course Content accordion */
html.dark-mode .tutor-accordion-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-accordion-item-header {
  color: var(--text-primary) !important;
  background-color: var(--surface) !important;
}

html.dark-mode .tutor-accordion-item-body-content {
  background-color: var(--bg) !important;
}

html.dark-mode .tutor-course-content-list-item {
  border-color: var(--border) !important;
}

html.dark-mode .tutor-course-content-list-item-title a {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-content-list-item-duration {
  color: var(--text-secondary) !important;
}

/* Q&A section */
html.dark-mode .tutor-qna-text {
  color: var(--text-primary) !important;
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-qna-chat {
  background-color: transparent !important;
}

html.dark-mode .tutor-fs-6.tutor-fw-medium.tutor-color-secondary {
  color: var(--text-secondary) !important;
}

/* Announcements card */
html.dark-mode .tutor-announcement-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-announcement-card * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

html.dark-mode .tutor-bg-gray-10 {
  background-color: var(--bg-secondary) !important;
}

/* ── HOME PAGE: "Get Started Today" btn-white fix ──────── 
   In dark mode our [style*="color"] rule was overriding
   color:var(--color-primary) on .btn-white to text-primary
   (white), making white text invisible on white button.
   Explicitly restore the correct colors. */
html.dark-mode #site-wrapper .btn-white {
  background-color: #ffffff !important;
  color: var(--color-primary) !important;
}

html.dark-mode #site-wrapper .btn-white:hover {
  background-color: #f5f5f5 !important;
  color: var(--color-primary) !important;
}

/* Also fix .btn-ghost-white on dark bg CTA section */
html.dark-mode #site-wrapper .btn-ghost-white {
  background-color: transparent !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.4) !important;
}

html.dark-mode #site-wrapper .btn-ghost-white:hover {
  background-color: rgba(255,255,255,0.12) !important;
  color: #ffffff !important;
}

/* CTA section text should always be white regardless of dark mode */
html.dark-mode #site-wrapper .cta-section,
html.dark-mode #site-wrapper .cta-section .cta-title,
html.dark-mode #site-wrapper .cta-section .cta-desc {
  color: #ffffff !important;
  background-color: var(--color-primary) !important;
}

/* =========================================================
   FIX 1 — HOME PAGE: "Get Started Today" resume/arrow icon
   The icon inside .btn-white was getting color:#f0f0f0 from
   our global dark-mode text rule, making it invisible on the
   white button background. Force it to inherit the brand color.
   ========================================================= */
html.dark-mode #site-wrapper .btn-white svg,
html.dark-mode #site-wrapper .btn-white i,
html.dark-mode #site-wrapper .btn-white span,
html.dark-mode #site-wrapper .btn-white .icon,
html.dark-mode #site-wrapper .btn-white::before,
html.dark-mode #site-wrapper .btn-white::after {
  color: var(--color-primary, #c8102e) !important;
  fill: var(--color-primary, #c8102e) !important;
  stroke: var(--color-primary, #c8102e) !important;
}

/* =========================================================
   FIX 2 — TUTOR LMS SINGLE COURSE PAGE: sidebar card
   The .tutor-sidebar-card has two child sections:
   .tutor-card-body  (Course Progress + buttons)
   .tutor-card-footer (meta: level, enrolled, duration, updated)
   Tutor's own stylesheet gives .tutor-card-footer a light grey
   background via --tutor-color-gray. We override every layer so
   the whole card shares the same dark surface.
   ========================================================= */

/* Card wrapper */
html.dark-mode .tutor-sidebar-card,
html.dark-mode .tutor-single-course-sidebar .tutor-card,
html.dark-mode .tutor-single-course-sidebar .tutor-sidebar-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* Card body — progress section */
html.dark-mode .tutor-sidebar-card .tutor-card-body,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-card-body {
  background-color: var(--surface) !important;
}

/* Card footer — meta section (the light-grey strip) */
html.dark-mode .tutor-sidebar-card .tutor-card-footer,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-card-footer,
html.dark-mode .tutor-single-course-sidebar .tutor-card-footer {
  background-color: var(--surface) !important;
  border-top-color: var(--border) !important;
}

/* All text inside the sidebar card */
html.dark-mode .tutor-sidebar-card *,
html.dark-mode .tutor-single-course-sidebar .tutor-card * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* Muted/secondary text (level label, enrolled count, etc.) */
html.dark-mode .tutor-sidebar-card .tutor-color-secondary,
html.dark-mode .tutor-sidebar-card .tutor-color-muted,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-color-secondary,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-color-muted {
  color: var(--text-secondary) !important;
}

/* Enrolled success text stays green */
html.dark-mode .tutor-sidebar-card .tutor-color-success,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-color-success {
  color: #4ade80 !important;
}

/* Buttons inside the card keep their styles */
html.dark-mode .tutor-sidebar-card .tutor-btn-primary,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-btn-primary {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
}

html.dark-mode .tutor-sidebar-card .tutor-btn-outline-primary,
html.dark-mode .tutor-single-course-sidebar .tutor-card .tutor-btn-outline-primary {
  background-color: transparent !important;
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* Progress bar track */
html.dark-mode .tutor-sidebar-card .tutor-progress-bar,
html.dark-mode .tutor-single-course-sidebar .tutor-progress-bar {
  background-color: var(--brand) !important;
}

html.dark-mode .tutor-sidebar-card [style*="--tutor-progress-value"],
html.dark-mode .tutor-single-course-sidebar [style*="--tutor-progress-value"] {
  background-color: var(--bg-secondary) !important;
}

/* =========================================================
   FIX 2b — "A course by" + Material Includes / Requirements /
   Audience sections below the sidebar card.
   These sit in .tutor-single-course-sidebar-more and were
   picking up the same light-grey Tutor variable.
   ========================================================= */
html.dark-mode .tutor-single-course-sidebar-more {
  background-color: transparent !important;
}

html.dark-mode .tutor-single-course-sidebar-more .tutor-course-details-widget,
html.dark-mode .tutor-single-course-sidebar-more .tutor-course-details-instructors {
  background-color: transparent !important;
}

html.dark-mode .tutor-single-course-sidebar-more * {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

html.dark-mode .tutor-single-course-sidebar-more .tutor-color-muted,
html.dark-mode .tutor-single-course-sidebar-more .tutor-color-secondary,
html.dark-mode .tutor-single-course-sidebar-more .tutor-instructor-designation {
  color: var(--text-secondary) !important;
}

/* =========================================================
   FIX 3 — TUTOR LMS COURSE CONTENT ACCORDION: more breathing
   room so the items don't feel cramped.
   ========================================================= */

/* Accordion item header — more vertical padding */
.tutor-accordion-item-header {
  padding: 16px 20px !important;
  min-height: 56px !important;
  line-height: 1.4 !important;
}

/* Each lesson/quiz row inside the accordion body */
.tutor-course-content-list-item {
  padding: 12px 20px !important;
  min-height: 48px !important;
}

/* Gap between icon and title text */
.tutor-course-content-list-item .tutor-course-content-list-item-icon {
  margin-right: 12px !important;
  flex-shrink: 0;
}

/* Make the title fill remaining space */
.tutor-course-content-list-item h5.tutor-course-content-list-item-title {
  flex: 1 1 auto !important;
  margin: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
}

/* Duration + eye icon — keep them to the right with a gap */
.tutor-course-content-list-item .tutor-d-flex.tutor-align-center.tutor-flex-shrink-0 {
  gap: 10px !important;
  margin-left: 12px !important;
}

/* Accordion body content area — add horizontal padding */
.tutor-accordion-item-body-content {
  padding: 0 !important;
}

.tutor-course-content-list {
  padding: 8px 0 !important;
}

/* Dark-mode colours for the newly-padded items */
html.dark-mode .tutor-accordion-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-accordion-item-header {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-accordion-item-body-content {
  background-color: var(--bg) !important;
}

html.dark-mode .tutor-course-content-list-item {
  border-bottom-color: var(--border) !important;
}

html.dark-mode .tutor-course-content-list-item-title a {
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-course-content-list-item-duration,
html.dark-mode .tutor-course-content-list-item .tutor-color-muted {
  color: var(--text-secondary) !important;
}



/* =========================================================
   FIX — LESSON VIEW: Comments section spacing
   The "Join the conversation" wrapper and each comment card
   need more breathing room.
   ========================================================= */

/* Outer wrapper */
.tutor-single-course-lesson-comments,
.tutor-course-topic-comments,
[class*="lesson-comment"],
.tutor-comments-wrap {
  padding: 24px !important;
}

/* "Join the conversation" heading */
.tutor-single-course-lesson-comments .tutor-fs-5,
.tutor-comments-wrap .tutor-fs-5 {
  margin-bottom: 20px !important;
}

/* Comment textarea */
.tutor-single-course-lesson-comments textarea,
.tutor-comments-wrap textarea {
  min-height: 100px !important;
  padding: 12px 14px !important;
  border-radius: 8px !important;
  resize: vertical !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Submit / Reply button row */
.tutor-single-course-lesson-comments .tutor-d-flex.tutor-justify-end,
.tutor-comments-wrap .tutor-d-flex.tutor-justify-end {
  margin-top: 12px !important;
}

/* Individual comment card */
.tutor-single-comment,
.tutor-actual-comment,
.tutor-comment-item {
  padding: 16px 20px !important;
  margin-bottom: 16px !important;
  border-radius: 10px !important;
}

/* Space between avatar and comment content */
.tutor-single-comment .tutor-d-flex,
.tutor-actual-comment .tutor-d-flex {
  gap: 12px !important;
}

/* Comment author + timestamp row */
.tutor-comment-author,
.tutor-qna-user {
  margin-bottom: 6px !important;
  gap: 10px !important;
}

/* Comment text body */
.tutor-comment-text,
.tutor-qna-text {
  margin-top: 6px !important;
  line-height: 1.6 !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
}

/* Reply link */
.tutor-comment-actions {
  margin-top: 10px !important;
}

/* Nested reply box */
.tutor-qa-reply {
  margin-top: 16px !important;
  padding: 16px !important;
  border-radius: 10px !important;
}

/* Dark mode colours for the comment section */
html.dark-mode .tutor-single-course-lesson-comments,
html.dark-mode .tutor-course-topic-comments,
html.dark-mode .tutor-comments-wrap {
  background-color: var(--bg) !important;
}

html.dark-mode .tutor-single-comment,
html.dark-mode .tutor-actual-comment,
html.dark-mode .tutor-comment-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-qna-text {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .tutor-single-course-lesson-comments textarea,
html.dark-mode .tutor-comments-wrap textarea,
html.dark-mode .tutor-qa-reply textarea {
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html.dark-mode .tutor-qa-reply {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

/* =========================================================
   FIX — LESSON SIDEBAR: "1/3" fraction overlapping chevron
   Tutor renders the progress fraction inside the accordion
   header. The chevron arrow (::after or .tutor-icon) is
   positioned absolutely and overlaps the fraction text.
   We push the fraction left and give the header a clear
   flex layout so text and icon never collide.
   ========================================================= */

/* Sidebar accordion header — clear flex layout */
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header,
.tutor-lesson-sidebar .tutor-accordion-item-header,
.tutor-course-topics-list .tutor-accordion-item-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  position: relative !important;
  gap: 8px !important;
}

/* Topic title — let it grow */
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-accordion-item-header-title,
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header > span:first-child,
.tutor-lesson-sidebar .tutor-accordion-item-header > span:first-child {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Progress fraction (e.g. "1/3") — keep it to the right,
   leave enough room so the chevron never overlaps */
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-course-content-progress-count,
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header [class*="progress-count"],
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-fs-7,
.tutor-lesson-sidebar .tutor-accordion-item-header .tutor-fs-7 {
  flex-shrink: 0 !important;
  margin-right: 28px !important; /* gap before the chevron */
  white-space: nowrap !important;
}

/* Chevron — position it at the far right without overlapping */
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-accordion-item-header-icon,
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header [class*="chevron"],
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header [class*="arrow"],
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-icon-angle-down,
.tutor-course-single-sidebar-wrapper .tutor-accordion-item-header .tutor-icon-times,
.tutor-lesson-sidebar .tutor-accordion-item-header .tutor-icon-angle-down {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  flex-shrink: 0 !important;
}



/* =========================================================
   FIX — LESSON VIEW: Header overlap + content top spacing
   The fixed site header (72px) + WP admin bar (32px) = 104px
   total offset that the lesson layout needs to account for.
   ========================================================= */

/* Main lesson content wrapper — push down past header */
.tutor-course-topic-single-body,
.tutor-course-single-content-wrapper,
#tutor-single-entry-content,
.tutor-single-lesson-content {
  padding-top: 24px !important;
  margin-top: 0 !important;
}

/* The full lesson page wrapper */
.tutor-course-single-page,
.tutor-wrap.tutor-course-single,
body.tutor-lms .tutor-course-topic-single-wrap {
  padding-top: 0 !important;
}

/* The top bar inside the lesson (Overview / Notes / Comments tabs) */
.tutor-course-topic-single-header,
.tutor-single-page-top-bar {
  position: sticky !important;
  top: 104px !important; /* admin bar 32px + site header 72px */
  z-index: 90 !important;
  margin-bottom: 0 !important;
}

/* Without admin bar (front-end non-admin view) */
body:not(.admin-bar) .tutor-course-topic-single-header,
body:not(.admin-bar) .tutor-single-page-top-bar {
  top: 72px !important;
}

/* The video / content area below the tab bar */
.tutor-course-topic-body,
.tutor-single-course-lesson,
.tutor-lesson-content-wrap {
  padding-top: 20px !important;
}

/* Sidebar — also needs offset so it starts below the header */
.tutor-course-single-sidebar-wrapper,
.tutor-lesson-sidebar {
  padding-top: 0 !important;
  /* Sidebar is already sticky; just ensure it starts at the right position */
  top: 104px !important;
}

body:not(.admin-bar) .tutor-course-single-sidebar-wrapper,
body:not(.admin-bar) .tutor-lesson-sidebar {
  top: 72px !important;
}

/* Ensure the sidebar accordion doesn't clip the first item */
.tutor-course-single-sidebar-wrapper .tutor-accordion,
.tutor-lesson-sidebar .tutor-accordion {
  margin-top: 0 !important;
  padding-top: 8px !important;
}

/* The cut-off button at the bottom of the sidebar —
   add bottom padding so it's never hidden behind any footer */
.tutor-course-single-sidebar-wrapper,
.tutor-lesson-sidebar {
  padding-bottom: 80px !important;
  overflow-y: auto !important;
  max-height: calc(100vh - 104px) !important;
}

body:not(.admin-bar) .tutor-course-single-sidebar-wrapper,
body:not(.admin-bar) .tutor-lesson-sidebar {
  max-height: calc(100vh - 72px) !important;
}

/* Dark mode colours preserved after layout change */
html.dark-mode .tutor-course-topic-single-header,
html.dark-mode .tutor-single-page-top-bar {
  background-color: var(--surface) !important;
  border-bottom-color: var(--border) !important;
}



/* =========================================================
   MOBILE HEADER — controls in top bar, not sidebar
   ========================================================= */

/* The cloned tc-controls inside .mobile-controls */
#sara-toumi-header .mobile-controls [id^="tc-controls-"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Dark toggle in mobile header — smaller */
#sara-toumi-header .mobile-controls [id^="tc-dark-toggle-"] {
  width: 32px !important;
  height: 32px !important;
  font-size: 15px !important;
  border: 1.5px solid var(--color-border, #E4E4E7) !important;
  border-radius: 50% !important;
  background: transparent !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  color: var(--color-text, #222222) !important;
  flex-shrink: 0 !important;
}

/* Lang button in mobile header — compact */
#sara-toumi-header .mobile-controls .tc-lang-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  height: 32px !important;
  gap: 3px !important;
}

/* Dropdown opens upward on mobile to avoid going off screen */
#sara-toumi-header .mobile-controls .tc-lang-dropdown {
  right: 0 !important;
  left: auto !important;
  min-width: 130px !important;
  top: calc(100% + 6px) !important;
}

/* Hide the original #tc-controls on mobile — the clone is in .mobile-controls */
@media (max-width: 767px) {
  #tc-controls {
    display: none !important;
  }
  #sara-toumi-header .mobile-controls [id^="tc-controls-"] {
    display: inline-flex !important;
  }
}

/* Hide the mobile clone on desktop */
@media (min-width: 768px) {
  #sara-toumi-header .mobile-controls [id^="tc-controls-"] {
    display: none !important;
  }
  #tc-controls {
    display: inline-flex !important;
  }
}

/* =========================================================
   ARABIC FONT — always loaded, activated by class
   ========================================================= */
html.tc-lang-ar body,
html[dir="rtl"] body,
body.tc-lang-ar {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
}

html:not(.tc-lang-ar)[dir="ltr"] body:not(.tc-lang-ar) {
  font-family: 'DM Sans', sans-serif !important;
}

/* =========================================================
   ARABIC RTL LAYOUT FIXES
   ========================================================= */
html[dir="rtl"] #sara-toumi-header .nav-bar {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .desktop-nav {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .desktop-actions {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .mobile-controls {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links {
  text-align: right !important;
}
html[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
  text-align: right !important;
}
html[dir="rtl"] .tc-lang-dropdown {
  right: 0 !important;
  left: auto !important;
}
html[dir="rtl"] .tc-lang-option {
  flex-direction: row-reverse !important;
  text-align: right !important;
}
html[dir="rtl"] #tc-controls {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] .main-header-menu {
  direction: rtl !important;
}

/* =========================================================
   ARABIC DARK MODE — comprehensive text fixes
   ========================================================= */
html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  color: var(--text-primary) !important;
  background-color: var(--bg) !important;
}

/* All text elements */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,  html.dark-mode[dir="rtl"] span,
html.dark-mode[dir="rtl"] li, html.dark-mode[dir="rtl"] a,
html.dark-mode[dir="rtl"] td, html.dark-mode[dir="rtl"] th,
html.dark-mode[dir="rtl"] label, html.dark-mode[dir="rtl"] div {
  color: var(--text-primary) !important;
}

/* Nav header */
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
  color: var(--text-secondary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover {
  color: var(--brand) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
  background: var(--nav-bg) !important;
  border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
  background: var(--nav-bg) !important;
  border-top-color: var(--border) !important;
}

/* Elementor widgets */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-widget-container span,
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description {
  color: var(--text-primary) !important;
}

/* Elementor containers */
html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
  background-color: var(--bg) !important;
}

/* Tutor LMS */
html.dark-mode[dir="rtl"] .tutor-color-black {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted {
  color: var(--text-secondary) !important;
}
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card * {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] .tutor-card-footer {
  background-color: var(--surface) !important;
  border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tutor-btn-primary {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
  background-color: transparent !important;
}
html.dark-mode[dir="rtl"] .tutor-accordion-item-header {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content {
  background-color: var(--bg) !important;
}
html.dark-mode[dir="rtl"] .tutor-course-content-list-item-title a {
  color: var(--text-primary) !important;
}

/* Sidebar single course */
html.dark-mode[dir="rtl"] .tutor-single-course-sidebar *,
html.dark-mode[dir="rtl"] .tutor-course-sidebar-card * {
  color: var(--text-primary) !important;
}

/* Forms */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Footer */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer {
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
}

/* GTranslate select in dark + Arabic */
html.dark-mode[dir="rtl"] .goog-te-gadget select.goog-te-combo,
html.dark-mode[dir="rtl"] #google_translate_element select {
  border-color: var(--border) !important;
  color: var(--nav-text) !important;
  background-color: transparent !important;
}

/* =========================================================
   GTRANSLATE — styled to match site header
   ========================================================= */
.goog-te-banner-frame,#goog-gt-tt,.goog-te-balloon-frame,
.goog-tooltip,.goog-tooltip:hover,.goog-te-ftab-float,
#google_translate_element2 { display: none !important; }

body { top: 0 !important; margin-top: 0 !important; }

.gtranslate_wrapper {
  display: inline-flex !important;
  align-items: center !important;
  position: static !important;
  visibility: visible !important;
  pointer-events: auto !important;
  margin: 0 !important; padding: 0 !important;
  z-index: 9999 !important;
}

.goog-te-gadget {
  font-family: inherit !important;
  font-size: 0 !important;
  color: transparent !important;
}

.goog-te-gadget > span,
.goog-te-gadget > span > a,
.goog-te-gadget br { display: none !important; }

.goog-te-gadget select.goog-te-combo,
#google_translate_element select {
  padding: 5px 28px 5px 10px !important;
  background-color: transparent !important;
  border: 1.5px solid var(--border, #e0e0e0) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--nav-text, #111111) !important;
  font-family: inherit !important;
  height: 34px !important;
  transition: border-color .3s ease, color .3s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 8px !important;
  max-width: 130px !important;
}

.goog-te-gadget select.goog-te-combo:hover { border-color: var(--brand,#c8102e) !important; color: var(--brand,#c8102e) !important; }
.goog-te-gadget select.goog-te-combo:focus { outline: none !important; border-color: var(--brand,#c8102e) !important; }

html.dark-mode .goog-te-gadget select.goog-te-combo,
html.dark-mode #google_translate_element select {
  border-color: var(--border) !important;
  color: var(--nav-text) !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E") !important;
}

.goog-te-gadget select.goog-te-combo option { background-color: var(--dropdown-bg,#fff) !important; color: var(--text-primary,#111) !important; }
html.dark-mode .goog-te-gadget select.goog-te-combo option { background-color: var(--surface,#1e1e1e) !important; color: var(--text-primary,#f0f0f0) !important; }

.skiptranslate iframe { display: none !important; }


/* =========================================================
   ▼▼▼  APPEND THESE RULES TO THE BOTTOM OF style.css  ▼▼▼
   TCF Canada v1.7.0 — Arabic dark mode + mobile controls
   ========================================================= */


/* =========================================================
   ARABIC DARK MODE — comprehensive overrides
   Covers all elements that use Cairo font, RTL layout, and
   the custom #sara-toumi-header in dark mode + RTL together.
   These rules purposely use high specificity to beat Elementor
   and Tutor LMS inline styles.
   ========================================================= */

/* Base: Arabic body text colour in dark mode */
html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  color: var(--text-primary) !important;
  background-color: var(--bg) !important;
  direction: rtl !important;
}

/* All generic text nodes */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,
html.dark-mode[dir="rtl"] span:not(.tc-flag):not(.tc-opt-flag):not(.tc-chevron),
html.dark-mode[dir="rtl"] li,
html.dark-mode[dir="rtl"] label,
html.dark-mode[dir="rtl"] td,
html.dark-mode[dir="rtl"] th {
  color: var(--text-primary) !important;
}

/* Links */
html.dark-mode[dir="rtl"] a:not(.elementor-button):not(.tutor-btn-primary) {
  color: var(--brand) !important;
}

/* ── Custom header (#sara-toumi-header) in dark RTL ── */
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
  background: var(--nav-bg) !important;
  border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-logo-name {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
  color: var(--text-secondary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover,
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link.active {
  color: var(--brand) !important;
  background: rgba(200,16,46,0.12) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
  background: var(--nav-bg) !important;
  border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  color: var(--text-secondary) !important;
  text-align: right !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .hamburger-btn {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .btn-primary {
  background: var(--brand) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

/* ── Lang switcher in Arabic dark mode ── */
html.dark-mode[dir="rtl"] .tc-lang-btn {
  color: var(--nav-text) !important;
  border-color: var(--border) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .tc-lang-dropdown {
  background: var(--dropdown-bg) !important;
  border-color: var(--border) !important;
  /* In RTL open to the left */
  right: auto !important;
  left: 0 !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option {
  color: var(--text-primary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  text-align: right !important;
  flex-direction: row-reverse !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option:hover {
  background: var(--bg-secondary) !important;
  color: var(--brand) !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option.active {
  color: var(--brand) !important;
}

/* ── Elementor widgets in Arabic dark mode ── */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-text-editor p,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-widget-container span:not(.tc-flag),
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description,
html.dark-mode[dir="rtl"] .elementor-counter-title,
html.dark-mode[dir="rtl"] .elementor-counter-number {
  color: var(--text-primary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
  background-color: var(--bg) !important;
}

/* ── Tutor LMS in Arabic dark mode ── */
html.dark-mode[dir="rtl"] .tutor-color-black {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted {
  color: var(--text-secondary) !important;
}
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item,
html.dark-mode[dir="rtl"] .tutor-course-card {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card *,
html.dark-mode[dir="rtl"] .tutor-course-card * {
  color: var(--text-primary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .tutor-card-footer {
  background-color: var(--surface) !important;
  border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tutor-btn-primary {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
  background-color: transparent !important;
}
html.dark-mode[dir="rtl"] .tutor-accordion-item-header {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content {
  background-color: var(--bg) !important;
}
html.dark-mode[dir="rtl"] .tutor-course-content-list-item-title a {
  color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] .tutor-dashboard-header,
html.dark-mode[dir="rtl"] .tutor-frontend-dashboard-header {
  background-color: var(--bg) !important;
  border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu {
  background-color: #0f0f0f !important;
}
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu span {
  color: var(--text-primary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu .tutor-is-active > a,
html.dark-mode[dir="rtl"] .tutor-dashboard-menu-item.active a {
  color: var(--brand) !important;
}

/* Forms in Arabic dark mode */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  direction: rtl !important;
}
html.dark-mode[dir="rtl"] input::placeholder,
html.dark-mode[dir="rtl"] textarea::placeholder {
  color: var(--text-secondary) !important;
}

/* Footer in Arabic dark mode */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer,
html.dark-mode[dir="rtl"] #colophon {
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}


/* =========================================================
   MOBILE HEADER CONTROLS PLACEMENT
   #tc-controls-mob sits inside #sara-toumi-header .mobile-controls
   (injected by JS). Show it in mobile, hide the desktop original.
   ========================================================= */

/* Mobile clone — hidden by default, shown only on mobile */
#tc-controls-mob {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Desktop original — always visible on desktop */
@media (min-width: 768px) {
  #tc-controls {
    display: inline-flex !important;
  }
  #tc-controls-mob {
    display: none !important;
  }
}

/* Mobile breakpoint — swap to the clone */
@media (max-width: 767px) {
  #tc-controls {
    display: none !important;
  }
  #tc-controls-mob {
    display: inline-flex !important;
  }
}

/* Style the dark toggle inside the mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] {
  width: 34px !important;
  height: 34px !important;
  font-size: 16px !important;
  border: 1.5px solid var(--border, #e0e0e0) !important;
  border-radius: 50% !important;
  background: transparent !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  color: var(--nav-text, #111) !important;
  flex-shrink: 0 !important;
}
#tc-controls-mob [id^="tc-dark-toggle-"]:hover {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
}

/* Lang button inside mobile clone — compact */
#tc-controls-mob .tc-lang-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  height: 34px !important;
  gap: 3px !important;
}

/* Dropdown in mobile clone — open downward, align to right edge */
#tc-controls-mob .tc-lang-dropdown {
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  min-width: 135px !important;
}

/* RTL: dropdown opens to the left */
html[dir="rtl"] #tc-controls-mob .tc-lang-dropdown {
  right: auto !important;
  left: 0 !important;
}

/* Dark mode colours for mobile clone */
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] {
  border-color: var(--border) !important;
  color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-btn {
  border-color: var(--border) !important;
  color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-dropdown {
  background: var(--dropdown-bg) !important;
  border-color: var(--border) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option {
  color: var(--text-primary) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option:hover {
  background: var(--bg-secondary) !important;
  color: var(--brand) !important;
}

/* Sun/moon icon visibility in mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: inline; }
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: inline; }


/* =========================================================
   RTL LAYOUT — ensure .mobile-controls row direction is correct
   ========================================================= */
html[dir="rtl"] #sara-toumi-header .mobile-controls {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .nav-bar {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .desktop-nav {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .desktop-actions {
  flex-direction: row-reverse !important;
}
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links {
  text-align: right !important;
}
html[dir="rtl"] .tc-lang-dropdown {
  right: auto !important;
  left: 0 !important;
}
html[dir="rtl"] .tc-lang-option {
  flex-direction: row-reverse !important;
  text-align: right !important;
}
html[dir="rtl"] #tc-controls,
html[dir="rtl"] #tc-controls-mob {
  flex-direction: row-reverse !important;
}

/* ==========================================================
   ▼▼▼  APPEND THESE RULES TO THE BOTTOM OF style.css  ▼▼▼
   TCF Canada v2.0.0
   ========================================================== */


/* ==========================================================
   HIDE GTRANSLATE'S OWN WIDGET COMPLETELY
   GTranslate's JS must still load (so doGTranslate() exists),
   but we replace its UI entirely with our custom switcher.
   ========================================================== */

/* The floating widget container GTranslate injects */
#gt-res-box,
#gt-res-c,
.gt-res-box,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-bubble,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-ftab-float,
#google_translate_element2,
.skiptranslate > iframe,
/* GTranslate v2 floating widget */
[id^="GTranslateWidget"],
[class*="gtranslate_wrapper"] > div,
[class*="gtranslate_wrapper"] > a,
[class*="gt-widget"],
/* The bottom-right floater specifically */
body > [class*="gtranslate"],
body > [id*="gtranslate"],
div[style*="bottom: 0"][style*="right: 0"] > [class*="goog"],
div[style*="bottom:0"][style*="right:0"] > [class*="goog"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent GTranslate from pushing body down with a top bar */
body {
    top: 0 !important;
    margin-top: 0 !important;
}

/* The gtranslate_wrapper div we output in PHP — keep off-screen
   so GTranslate's init still fires, but nothing is visible */
.gtranslate_wrapper {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* GTranslate sometimes injects a select; keep it inert */
.goog-te-gadget select.goog-te-combo,
#google_translate_element select {
    pointer-events: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}


/* ==========================================================
   MOBILE CONTROLS — in top bar, not sidebar
   ========================================================== */

/* Desktop: show #tc-controls, hide mobile clone */
@media (min-width: 768px) {
    #tc-controls     { display: inline-flex !important; }
    #tc-controls-mob { display: none !important; }
}

/* Mobile: hide desktop original, show clone in header top bar */
@media (max-width: 767px) {
    #tc-controls     { display: none !important; }
    #tc-controls-mob { display: inline-flex !important; }
}

/* Base style for the mobile clone */
#tc-controls-mob {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Dark toggle inside mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    border: 1.5px solid var(--border, #e0e0e0) !important;
    border-radius: 50% !important;
    background: transparent !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: var(--nav-text, #111) !important;
    flex-shrink: 0 !important;
    outline: none !important;
}
#tc-controls-mob [id^="tc-dark-toggle-"]:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}

/* Sun/moon in mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: inline; }
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: inline; }

/* Lang button in mobile clone */
#tc-controls-mob .tc-lang-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 34px !important;
    gap: 3px !important;
}

/* Dropdown position — below the button, right-aligned */
#tc-controls-mob .tc-lang-dropdown {
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 135px !important;
}
html[dir="rtl"] #tc-controls-mob .tc-lang-dropdown {
    right: auto !important;
    left: 0 !important;
}

/* Dark mode styles for mobile clone */
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-btn {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option {
    color: var(--text-primary) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option:hover {
    background: var(--bg-secondary) !important;
    color: var(--brand) !important;
}


/* ==========================================================
   ARABIC DARK MODE — complete coverage
   ========================================================== */

html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-primary) !important;
    background-color: var(--bg) !important;
    direction: rtl !important;
}

/* Generic text in dark + RTL */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,
html.dark-mode[dir="rtl"] li,
html.dark-mode[dir="rtl"] label,
html.dark-mode[dir="rtl"] td, html.dark-mode[dir="rtl"] th {
    color: var(--text-primary) !important;
}

/* Custom header in dark + RTL */
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
    background: var(--nav-bg) !important;
    border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-logo-name {
    color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
    color: var(--text-secondary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover,
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link.active {
    color: var(--brand) !important;
    background: rgba(200,16,46,0.12) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
    background: var(--nav-bg) !important;
    border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-secondary) !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .hamburger-btn {
    color: var(--text-primary) !important;
}

/* Lang switcher in dark + RTL */
html.dark-mode[dir="rtl"] .tc-lang-btn {
    color: var(--nav-text) !important;
    border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
    right: auto !important;
    left: 0 !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    flex-direction: row-reverse !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option:hover  { background: var(--bg-secondary) !important; color: var(--brand) !important; }
html.dark-mode[dir="rtl"] .tc-lang-option.active  { color: var(--brand) !important; }

/* Elementor in dark + RTL */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-text-editor p,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
    background-color: var(--bg) !important;
}

/* Tutor LMS in dark + RTL */
html.dark-mode[dir="rtl"] .tutor-color-black          { color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted          { color: var(--text-secondary) !important; }
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item,
html.dark-mode[dir="rtl"] .tutor-course-card          { background-color: var(--surface) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card *,
html.dark-mode[dir="rtl"] .tutor-course-card *        { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-card-footer          { background-color: var(--surface) !important; border-top-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-btn-primary          { background-color: var(--brand) !important; color: #fff !important; }
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary  { color: var(--brand) !important; border-color: var(--brand) !important; background-color: transparent !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-header{ background-color: var(--surface) !important; color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content { background-color: var(--bg) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-header,
html.dark-mode[dir="rtl"] .tutor-frontend-dashboard-header { background-color: var(--bg) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu  { background-color: #0f0f0f !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu span { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-menu-item.active a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu .tutor-is-active > a { color: var(--brand) !important; }

/* Forms in dark + RTL */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    direction: rtl !important;
}

/* Footer in dark + RTL */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}


/* ==========================================================
   RTL LAYOUT — header flex direction
   ========================================================== */
html[dir="rtl"] #sara-toumi-header .nav-bar,
html[dir="rtl"] #sara-toumi-header .desktop-nav,
html[dir="rtl"] #sara-toumi-header .desktop-actions,
html[dir="rtl"] #sara-toumi-header .mobile-controls { flex-direction: row-reverse !important; }
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links,
html[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link { text-align: right !important; }
html[dir="rtl"] .tc-lang-dropdown { right: auto !important; left: 0 !important; }
html[dir="rtl"] .tc-lang-option   { flex-direction: row-reverse !important; text-align: right !important; }
html[dir="rtl"] #tc-controls,
html[dir="rtl"] #tc-controls-mob  { flex-direction: row-reverse !important; }
html[dir="rtl"] .main-header-menu { direction: rtl !important; }


/* ==========================================================
   ▼▼▼  APPEND THESE RULES TO THE BOTTOM OF style.css  ▼▼▼
   TCF Canada v2.0.0
   ========================================================== */


/* ==========================================================
   HIDE GTRANSLATE'S OWN WIDGET COMPLETELY
   GTranslate's JS must still load (so doGTranslate() exists),
   but we replace its UI entirely with our custom switcher.
   ========================================================== */

/* The floating widget container GTranslate injects */
#gt-res-box,
#gt-res-c,
.gt-res-box,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-bubble,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-ftab-float,
#google_translate_element2,
.skiptranslate > iframe,
/* GTranslate v2 floating widget */
[id^="GTranslateWidget"],
[class*="gtranslate_wrapper"] > div,
[class*="gtranslate_wrapper"] > a,
[class*="gt-widget"],
/* The bottom-right floater specifically */
body > [class*="gtranslate"],
body > [id*="gtranslate"],
div[style*="bottom: 0"][style*="right: 0"] > [class*="goog"],
div[style*="bottom:0"][style*="right:0"] > [class*="goog"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent GTranslate from pushing body down with a top bar */
body {
    top: 0 !important;
    margin-top: 0 !important;
}

/* The gtranslate_wrapper div we output in PHP — keep off-screen
   so GTranslate's init still fires, but nothing is visible */
.gtranslate_wrapper {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* GTranslate sometimes injects a select; keep it inert */
.goog-te-gadget select.goog-te-combo,
#google_translate_element select {
    pointer-events: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}


/* ==========================================================
   MOBILE CONTROLS — in top bar, not sidebar
   ========================================================== */

/* Desktop: show #tc-controls, hide mobile clone */
@media (min-width: 768px) {
    #tc-controls     { display: inline-flex !important; }
    #tc-controls-mob { display: none !important; }
}

/* Mobile: hide desktop original, show clone in header top bar */
@media (max-width: 767px) {
    #tc-controls     { display: none !important; }
    #tc-controls-mob { display: inline-flex !important; }
}

/* Base style for the mobile clone */
#tc-controls-mob {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Dark toggle inside mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    border: 1.5px solid var(--border, #e0e0e0) !important;
    border-radius: 50% !important;
    background: transparent !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: var(--nav-text, #111) !important;
    flex-shrink: 0 !important;
    outline: none !important;
}
#tc-controls-mob [id^="tc-dark-toggle-"]:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}

/* Sun/moon in mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: inline; }
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: inline; }

/* Lang button in mobile clone */
#tc-controls-mob .tc-lang-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 34px !important;
    gap: 3px !important;
}

/* Dropdown position — below the button, right-aligned */
#tc-controls-mob .tc-lang-dropdown {
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 135px !important;
}
html[dir="rtl"] #tc-controls-mob .tc-lang-dropdown {
    right: auto !important;
    left: 0 !important;
}

/* Dark mode styles for mobile clone */
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-btn {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option {
    color: var(--text-primary) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option:hover {
    background: var(--bg-secondary) !important;
    color: var(--brand) !important;
}


/* ==========================================================
   ARABIC DARK MODE — complete coverage
   ========================================================== */

html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-primary) !important;
    background-color: var(--bg) !important;
    direction: rtl !important;
}

/* Generic text in dark + RTL */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,
html.dark-mode[dir="rtl"] li,
html.dark-mode[dir="rtl"] label,
html.dark-mode[dir="rtl"] td, html.dark-mode[dir="rtl"] th {
    color: var(--text-primary) !important;
}

/* Custom header in dark + RTL */
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
    background: var(--nav-bg) !important;
    border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-logo-name {
    color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
    color: var(--text-secondary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover,
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link.active {
    color: var(--brand) !important;
    background: rgba(200,16,46,0.12) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
    background: var(--nav-bg) !important;
    border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-secondary) !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .hamburger-btn {
    color: var(--text-primary) !important;
}

/* Lang switcher in dark + RTL */
html.dark-mode[dir="rtl"] .tc-lang-btn {
    color: var(--nav-text) !important;
    border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
    right: auto !important;
    left: 0 !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    flex-direction: row-reverse !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option:hover  { background: var(--bg-secondary) !important; color: var(--brand) !important; }
html.dark-mode[dir="rtl"] .tc-lang-option.active  { color: var(--brand) !important; }

/* Elementor in dark + RTL */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-text-editor p,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
    background-color: var(--bg) !important;
}

/* Tutor LMS in dark + RTL */
html.dark-mode[dir="rtl"] .tutor-color-black          { color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted          { color: var(--text-secondary) !important; }
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item,
html.dark-mode[dir="rtl"] .tutor-course-card          { background-color: var(--surface) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card *,
html.dark-mode[dir="rtl"] .tutor-course-card *        { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-card-footer          { background-color: var(--surface) !important; border-top-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-btn-primary          { background-color: var(--brand) !important; color: #fff !important; }
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary  { color: var(--brand) !important; border-color: var(--brand) !important; background-color: transparent !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-header{ background-color: var(--surface) !important; color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content { background-color: var(--bg) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-header,
html.dark-mode[dir="rtl"] .tutor-frontend-dashboard-header { background-color: var(--bg) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu  { background-color: #0f0f0f !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu span { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-menu-item.active a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu .tutor-is-active > a { color: var(--brand) !important; }

/* Forms in dark + RTL */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    direction: rtl !important;
}

/* Footer in dark + RTL */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}


/* ==========================================================
   RTL LAYOUT — header flex direction
   ========================================================== */
html[dir="rtl"] #sara-toumi-header .nav-bar,
html[dir="rtl"] #sara-toumi-header .desktop-nav,
html[dir="rtl"] #sara-toumi-header .desktop-actions,
html[dir="rtl"] #sara-toumi-header .mobile-controls { flex-direction: row-reverse !important; }
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links,
html[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link { text-align: right !important; }
html[dir="rtl"] .tc-lang-dropdown { right: auto !important; left: 0 !important; }
html[dir="rtl"] .tc-lang-option   { flex-direction: row-reverse !important; text-align: right !important; }
html[dir="rtl"] #tc-controls,
html[dir="rtl"] #tc-controls-mob  { flex-direction: row-reverse !important; }
html[dir="rtl"] .main-header-menu { direction: rtl !important; }


/* ==========================================================
   v3 ADDITIONS — append these to style.css as well
   ========================================================== */

/* ── Footer full-width + always at page bottom ── */
#sara-toumi-footer {
  /* Break out of any Elementor container width constraint */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  /* Guarantee nothing sits below */
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Kill any gap Elementor adds after the footer widget/section */
.elementor-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.elementor-widget:has(#sara-toumi-footer) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Also target the Astra / WordPress footer wrapper */
#colophon,
.site-footer,
footer.site-footer {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Expertise grid — 5 cards, rows: 3 then 2 ── */
@media (min-width: 1024px) {
  #site-wrapper .expertise-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  #site-wrapper .expertise-grid .expertise-card:nth-child(1) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(2) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(3) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(4) { grid-column: span 3 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(5) { grid-column: span 3 !important; }
}


/* ==========================================================
   ▼▼▼  APPEND THESE RULES TO THE BOTTOM OF style.css  ▼▼▼
   TCF Canada v2.0.0
   ========================================================== */


/* ==========================================================
   HIDE GTRANSLATE'S OWN WIDGET COMPLETELY
   GTranslate's JS must still load (so doGTranslate() exists),
   but we replace its UI entirely with our custom switcher.
   ========================================================== */

/* The floating widget container GTranslate injects */
#gt-res-box,
#gt-res-c,
.gt-res-box,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-bubble,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-ftab-float,
#google_translate_element2,
.skiptranslate > iframe,
/* GTranslate v2 floating widget */
[id^="GTranslateWidget"],
[class*="gtranslate_wrapper"] > div,
[class*="gtranslate_wrapper"] > a,
[class*="gt-widget"],
/* The bottom-right floater specifically */
body > [class*="gtranslate"],
body > [id*="gtranslate"],
div[style*="bottom: 0"][style*="right: 0"] > [class*="goog"],
div[style*="bottom:0"][style*="right:0"] > [class*="goog"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent GTranslate from pushing body down with a top bar */
body {
    top: 0 !important;
    margin-top: 0 !important;
}

/* The gtranslate_wrapper div we output in PHP — keep off-screen
   so GTranslate's init still fires, but nothing is visible */
.gtranslate_wrapper {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* GTranslate sometimes injects a select; keep it inert */
.goog-te-gadget select.goog-te-combo,
#google_translate_element select {
    pointer-events: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}


/* ==========================================================
   MOBILE CONTROLS — in top bar, not sidebar
   ========================================================== */

/* Desktop: show #tc-controls, hide mobile clone */
@media (min-width: 768px) {
    #tc-controls     { display: inline-flex !important; }
    #tc-controls-mob { display: none !important; }
}

/* Mobile: hide desktop original, show clone in header top bar */
@media (max-width: 767px) {
    #tc-controls     { display: none !important; }
    #tc-controls-mob { display: inline-flex !important; }
}

/* Base style for the mobile clone */
#tc-controls-mob {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Dark toggle inside mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    border: 1.5px solid var(--border, #e0e0e0) !important;
    border-radius: 50% !important;
    background: transparent !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: var(--nav-text, #111) !important;
    flex-shrink: 0 !important;
    outline: none !important;
}
#tc-controls-mob [id^="tc-dark-toggle-"]:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}

/* Sun/moon in mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: inline; }
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: inline; }

/* Lang button in mobile clone */
#tc-controls-mob .tc-lang-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 34px !important;
    gap: 3px !important;
}

/* Dropdown position — below the button, right-aligned */
#tc-controls-mob .tc-lang-dropdown {
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 135px !important;
}
html[dir="rtl"] #tc-controls-mob .tc-lang-dropdown {
    right: auto !important;
    left: 0 !important;
}

/* Dark mode styles for mobile clone */
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-btn {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option {
    color: var(--text-primary) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option:hover {
    background: var(--bg-secondary) !important;
    color: var(--brand) !important;
}


/* ==========================================================
   ARABIC DARK MODE — complete coverage
   ========================================================== */

html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-primary) !important;
    background-color: var(--bg) !important;
    direction: rtl !important;
}

/* Generic text in dark + RTL */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,
html.dark-mode[dir="rtl"] li,
html.dark-mode[dir="rtl"] label,
html.dark-mode[dir="rtl"] td, html.dark-mode[dir="rtl"] th {
    color: var(--text-primary) !important;
}

/* Custom header in dark + RTL */
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
    background: var(--nav-bg) !important;
    border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-logo-name {
    color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
    color: var(--text-secondary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover,
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link.active {
    color: var(--brand) !important;
    background: rgba(200,16,46,0.12) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
    background: var(--nav-bg) !important;
    border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-secondary) !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .hamburger-btn {
    color: var(--text-primary) !important;
}

/* Lang switcher in dark + RTL */
html.dark-mode[dir="rtl"] .tc-lang-btn {
    color: var(--nav-text) !important;
    border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
    right: auto !important;
    left: 0 !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    flex-direction: row-reverse !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option:hover  { background: var(--bg-secondary) !important; color: var(--brand) !important; }
html.dark-mode[dir="rtl"] .tc-lang-option.active  { color: var(--brand) !important; }

/* Elementor in dark + RTL */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-text-editor p,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
    background-color: var(--bg) !important;
}

/* Tutor LMS in dark + RTL */
html.dark-mode[dir="rtl"] .tutor-color-black          { color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted          { color: var(--text-secondary) !important; }
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item,
html.dark-mode[dir="rtl"] .tutor-course-card          { background-color: var(--surface) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card *,
html.dark-mode[dir="rtl"] .tutor-course-card *        { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-card-footer          { background-color: var(--surface) !important; border-top-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-btn-primary          { background-color: var(--brand) !important; color: #fff !important; }
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary  { color: var(--brand) !important; border-color: var(--brand) !important; background-color: transparent !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-header{ background-color: var(--surface) !important; color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content { background-color: var(--bg) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-header,
html.dark-mode[dir="rtl"] .tutor-frontend-dashboard-header { background-color: var(--bg) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu  { background-color: #0f0f0f !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu span { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-menu-item.active a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu .tutor-is-active > a { color: var(--brand) !important; }

/* Forms in dark + RTL */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    direction: rtl !important;
}

/* Footer in dark + RTL */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}


/* ==========================================================
   RTL LAYOUT — header flex direction
   ========================================================== */
html[dir="rtl"] #sara-toumi-header .nav-bar,
html[dir="rtl"] #sara-toumi-header .desktop-nav,
html[dir="rtl"] #sara-toumi-header .desktop-actions,
html[dir="rtl"] #sara-toumi-header .mobile-controls { flex-direction: row-reverse !important; }
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links,
html[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link { text-align: right !important; }
html[dir="rtl"] .tc-lang-dropdown { right: auto !important; left: 0 !important; }
html[dir="rtl"] .tc-lang-option   { flex-direction: row-reverse !important; text-align: right !important; }
html[dir="rtl"] #tc-controls,
html[dir="rtl"] #tc-controls-mob  { flex-direction: row-reverse !important; }
html[dir="rtl"] .main-header-menu { direction: rtl !important; }


/* ==========================================================
   v3 ADDITIONS — append these to style.css as well
   ========================================================== */

/* ── Footer full-width + always at page bottom ── */
#sara-toumi-footer {
  /* Break out of any Elementor container width constraint */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  /* Guarantee nothing sits below */
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Kill any gap Elementor adds after the footer widget/section */
.elementor-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.elementor-widget:has(#sara-toumi-footer) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Also target the Astra / WordPress footer wrapper */
#colophon,
.site-footer,
footer.site-footer {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Expertise grid — 5 cards, rows: 3 then 2 ── */
@media (min-width: 1024px) {
  #site-wrapper .expertise-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  #site-wrapper .expertise-grid .expertise-card:nth-child(1) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(2) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(3) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(4) { grid-column: span 3 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(5) { grid-column: span 3 !important; }
}


/* ==========================================================
   FOOTER GAP KILLER — append to style.css
   Kills every source of space that could appear below the footer
   ========================================================== */

/* 1. The footer element itself */
#sara-toumi-footer {
  margin-bottom:  0 !important;
  padding-bottom: 0 !important;
  display: block !important;
}

/* 2. Elementor section/container/widget wrapping the footer */
.elementor-section:has(#sara-toumi-footer),
.elementor-top-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.e-con-inner:has(#sara-toumi-footer),
.elementor-widget:has(#sara-toumi-footer),
.elementor-widget-container:has(#sara-toumi-footer),
.elementor-widget-wrap:has(#sara-toumi-footer) {
  padding-bottom: 0 !important;
  margin-bottom:  0 !important;
}

/* 3. Astra footer wrappers */
#colophon,
.site-footer,
footer.site-footer,
.ast-footer-overlay,
.footer-widget-area,
.ast-small-footer,
.ast-small-footer-wrap,
.footer-bar-wrap,
.ast-footer-widget-area,
.ast-above-footer,
.ast-below-footer {
  padding-bottom: 0 !important;
  margin-bottom:  0 !important;
}

/* 4. Body — prevent any remaining scroll gap */
body { overflow-x: hidden; }

/* ==========================================================
   FOOTER LIGHT/DARK MODE — scoped variables
   ========================================================== */

/* Light mode: white background, dark text */
html:not(.dark-mode) #sara-toumi-footer {
  --fbg:    #ffffff !important;
  --fborder:#E4E4E7 !important;
  --ft:     #111111 !important;
  --ftm:    #52525B !important;
  background: #ffffff !important;
  border-top-color: #E4E4E7 !important;
}
html:not(.dark-mode) #sara-toumi-footer .ft-inner {
  background: #ffffff !important;
}
html:not(.dark-mode) #sara-toumi-footer .ft-brand-name { color: #111111 !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-tagline    { color: #52525B !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-nav-link   { color: #111111 !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-contact-link { color: #52525B !important; }

/* Dark mode: near-black background, light text */
html.dark-mode #sara-toumi-footer {
  background: #0f0f0f !important;
  border-top-color: #2e2e2e !important;
}
html.dark-mode #sara-toumi-footer .ft-inner   { background: #0f0f0f !important; }
html.dark-mode #sara-toumi-footer .ft-brand-name  { color: #f0f0f0 !important; }
html.dark-mode #sara-toumi-footer .ft-tagline     { color: #aaaaaa !important; }
html.dark-mode #sara-toumi-footer .ft-nav-link    { color: #f0f0f0 !important; }
html.dark-mode #sara-toumi-footer .ft-contact-link { color: #aaaaaa !important; }


/* ==========================================================
   ▼▼▼  APPEND THESE RULES TO THE BOTTOM OF style.css  ▼▼▼
   TCF Canada v2.0.0
   ========================================================== */


/* ==========================================================
   HIDE GTRANSLATE'S OWN WIDGET COMPLETELY
   GTranslate's JS must still load (so doGTranslate() exists),
   but we replace its UI entirely with our custom switcher.
   ========================================================== */

/* The floating widget container GTranslate injects */
#gt-res-box,
#gt-res-c,
.gt-res-box,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-bubble,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-ftab-float,
#google_translate_element2,
.skiptranslate > iframe,
/* GTranslate v2 floating widget */
[id^="GTranslateWidget"],
[class*="gtranslate_wrapper"] > div,
[class*="gtranslate_wrapper"] > a,
[class*="gt-widget"],
/* The bottom-right floater specifically */
body > [class*="gtranslate"],
body > [id*="gtranslate"],
div[style*="bottom: 0"][style*="right: 0"] > [class*="goog"],
div[style*="bottom:0"][style*="right:0"] > [class*="goog"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent GTranslate from pushing body down with a top bar */
body {
    top: 0 !important;
    margin-top: 0 !important;
}

/* The gtranslate_wrapper div we output in PHP — keep off-screen
   so GTranslate's init still fires, but nothing is visible */
.gtranslate_wrapper {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* GTranslate sometimes injects a select; keep it inert */
.goog-te-gadget select.goog-te-combo,
#google_translate_element select {
    pointer-events: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}


/* ==========================================================
   MOBILE CONTROLS — in top bar, not sidebar
   ========================================================== */

/* Desktop: show #tc-controls, hide mobile clone */
@media (min-width: 768px) {
    #tc-controls     { display: inline-flex !important; }
    #tc-controls-mob { display: none !important; }
}

/* Mobile: hide desktop original, show clone in header top bar */
@media (max-width: 767px) {
    #tc-controls     { display: none !important; }
    #tc-controls-mob { display: inline-flex !important; }
}

/* Base style for the mobile clone */
#tc-controls-mob {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Dark toggle inside mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    border: 1.5px solid var(--border, #e0e0e0) !important;
    border-radius: 50% !important;
    background: transparent !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: var(--nav-text, #111) !important;
    flex-shrink: 0 !important;
    outline: none !important;
}
#tc-controls-mob [id^="tc-dark-toggle-"]:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}

/* Sun/moon in mobile clone */
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: inline; }
#tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-sun  { display: none; }
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] .tc-icon-moon { display: inline; }

/* Lang button in mobile clone */
#tc-controls-mob .tc-lang-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 34px !important;
    gap: 3px !important;
}

/* Dropdown position — below the button, right-aligned */
#tc-controls-mob .tc-lang-dropdown {
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 135px !important;
}
html[dir="rtl"] #tc-controls-mob .tc-lang-dropdown {
    right: auto !important;
    left: 0 !important;
}

/* Dark mode styles for mobile clone */
html.dark-mode #tc-controls-mob [id^="tc-dark-toggle-"] {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-btn {
    border-color: var(--border) !important;
    color: var(--nav-text) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option {
    color: var(--text-primary) !important;
}
html.dark-mode #tc-controls-mob .tc-lang-option:hover {
    background: var(--bg-secondary) !important;
    color: var(--brand) !important;
}


/* ==========================================================
   ARABIC DARK MODE — complete coverage
   ========================================================== */

html.dark-mode.tc-lang-ar body,
html.dark-mode[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-primary) !important;
    background-color: var(--bg) !important;
    direction: rtl !important;
}

/* Generic text in dark + RTL */
html.dark-mode[dir="rtl"] h1, html.dark-mode[dir="rtl"] h2,
html.dark-mode[dir="rtl"] h3, html.dark-mode[dir="rtl"] h4,
html.dark-mode[dir="rtl"] h5, html.dark-mode[dir="rtl"] h6,
html.dark-mode[dir="rtl"] p,
html.dark-mode[dir="rtl"] li,
html.dark-mode[dir="rtl"] label,
html.dark-mode[dir="rtl"] td, html.dark-mode[dir="rtl"] th {
    color: var(--text-primary) !important;
}

/* Custom header in dark + RTL */
html.dark-mode[dir="rtl"] #sara-toumi-header .site-nav {
    background: var(--nav-bg) !important;
    border-bottom-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-logo-name {
    color: var(--text-primary) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link {
    color: var(--text-secondary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link:hover,
html.dark-mode[dir="rtl"] #sara-toumi-header .nav-link.active {
    color: var(--brand) !important;
    background: rgba(200,16,46,0.12) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu {
    background: var(--nav-bg) !important;
    border-top-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    color: var(--text-secondary) !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] #sara-toumi-header .hamburger-btn {
    color: var(--text-primary) !important;
}

/* Lang switcher in dark + RTL */
html.dark-mode[dir="rtl"] .tc-lang-btn {
    color: var(--nav-text) !important;
    border-color: var(--border) !important;
}
html.dark-mode[dir="rtl"] .tc-lang-dropdown {
    background: var(--dropdown-bg) !important;
    border-color: var(--border) !important;
    right: auto !important;
    left: 0 !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    flex-direction: row-reverse !important;
    text-align: right !important;
}
html.dark-mode[dir="rtl"] .tc-lang-option:hover  { background: var(--bg-secondary) !important; color: var(--brand) !important; }
html.dark-mode[dir="rtl"] .tc-lang-option.active  { color: var(--brand) !important; }

/* Elementor in dark + RTL */
html.dark-mode[dir="rtl"] .elementor-heading-title,
html.dark-mode[dir="rtl"] .elementor-text-editor,
html.dark-mode[dir="rtl"] .elementor-widget-text-editor p,
html.dark-mode[dir="rtl"] .elementor-widget-container p,
html.dark-mode[dir="rtl"] .elementor-icon-list-text,
html.dark-mode[dir="rtl"] .elementor-icon-box-title,
html.dark-mode[dir="rtl"] .elementor-icon-box-description {
    color: var(--text-primary) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}
html.dark-mode[dir="rtl"] .e-con:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-section:not(.tc-preserve-brand),
html.dark-mode[dir="rtl"] .elementor-widget-container {
    background-color: var(--bg) !important;
}

/* Tutor LMS in dark + RTL */
html.dark-mode[dir="rtl"] .tutor-color-black          { color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-color-secondary,
html.dark-mode[dir="rtl"] .tutor-color-muted          { color: var(--text-secondary) !important; }
html.dark-mode[dir="rtl"] .tutor-card,
html.dark-mode[dir="rtl"] .tutor-sidebar-card,
html.dark-mode[dir="rtl"] .tutor-accordion-item,
html.dark-mode[dir="rtl"] .tutor-course-card          { background-color: var(--surface) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-card *,
html.dark-mode[dir="rtl"] .tutor-sidebar-card *,
html.dark-mode[dir="rtl"] .tutor-course-card *        { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-card-footer          { background-color: var(--surface) !important; border-top-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-btn-primary          { background-color: var(--brand) !important; color: #fff !important; }
html.dark-mode[dir="rtl"] .tutor-btn-outline-primary  { color: var(--brand) !important; border-color: var(--brand) !important; background-color: transparent !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-header{ background-color: var(--surface) !important; color: var(--text-primary) !important; }
html.dark-mode[dir="rtl"] .tutor-accordion-item-body-content { background-color: var(--bg) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-header,
html.dark-mode[dir="rtl"] .tutor-frontend-dashboard-header { background-color: var(--bg) !important; border-color: var(--border) !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu  { background-color: #0f0f0f !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu span { color: var(--text-primary) !important; font-family: 'Cairo','Tajawal',sans-serif !important; }
html.dark-mode[dir="rtl"] .tutor-dashboard-menu-item.active a,
html.dark-mode[dir="rtl"] .tutor-dashboard-left-menu .tutor-is-active > a { color: var(--brand) !important; }

/* Forms in dark + RTL */
html.dark-mode[dir="rtl"] input,
html.dark-mode[dir="rtl"] textarea,
html.dark-mode[dir="rtl"] select {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    direction: rtl !important;
}

/* Footer in dark + RTL */
html.dark-mode[dir="rtl"] footer,
html.dark-mode[dir="rtl"] .site-footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}


/* ==========================================================
   RTL LAYOUT — header flex direction
   ========================================================== */
html[dir="rtl"] #sara-toumi-header .nav-bar,
html[dir="rtl"] #sara-toumi-header .desktop-nav,
html[dir="rtl"] #sara-toumi-header .desktop-actions,
html[dir="rtl"] #sara-toumi-header .mobile-controls { flex-direction: row-reverse !important; }
html[dir="rtl"] #sara-toumi-header .mobile-menu .menu-links,
html[dir="rtl"] #sara-toumi-header .mobile-menu .nav-link { text-align: right !important; }
html[dir="rtl"] .tc-lang-dropdown { right: auto !important; left: 0 !important; }
html[dir="rtl"] .tc-lang-option   { flex-direction: row-reverse !important; text-align: right !important; }
html[dir="rtl"] #tc-controls,
html[dir="rtl"] #tc-controls-mob  { flex-direction: row-reverse !important; }
html[dir="rtl"] .main-header-menu { direction: rtl !important; }


/* ==========================================================
   v3 ADDITIONS — append these to style.css as well
   ========================================================== */

/* ── Footer full-width + always at page bottom ── */
#sara-toumi-footer {
  /* Break out of any Elementor container width constraint */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  /* Guarantee nothing sits below */
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Kill any gap Elementor adds after the footer widget/section */
.elementor-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.elementor-widget:has(#sara-toumi-footer) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Also target the Astra / WordPress footer wrapper */
#colophon,
.site-footer,
footer.site-footer {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Expertise grid — 5 cards, rows: 3 then 2 ── */
@media (min-width: 1024px) {
  #site-wrapper .expertise-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  #site-wrapper .expertise-grid .expertise-card:nth-child(1) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(2) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(3) { grid-column: span 2 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(4) { grid-column: span 3 !important; }
  #site-wrapper .expertise-grid .expertise-card:nth-child(5) { grid-column: span 3 !important; }
}


/* ==========================================================
   FOOTER GAP KILLER — append to style.css
   Kills every source of space that could appear below the footer
   ========================================================== */

/* 1. The footer element itself */
#sara-toumi-footer {
  margin-bottom:  0 !important;
  padding-bottom: 0 !important;
  display: block !important;
}

/* 2. Elementor section/container/widget wrapping the footer */
.elementor-section:has(#sara-toumi-footer),
.elementor-top-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.e-con-inner:has(#sara-toumi-footer),
.elementor-widget:has(#sara-toumi-footer),
.elementor-widget-container:has(#sara-toumi-footer),
.elementor-widget-wrap:has(#sara-toumi-footer) {
  padding-bottom: 0 !important;
  margin-bottom:  0 !important;
}

/* 3. Astra footer wrappers */
#colophon,
.site-footer,
footer.site-footer,
.ast-footer-overlay,
.footer-widget-area,
.ast-small-footer,
.ast-small-footer-wrap,
.footer-bar-wrap,
.ast-footer-widget-area,
.ast-above-footer,
.ast-below-footer {
  padding-bottom: 0 !important;
  margin-bottom:  0 !important;
}

/* 4. Body — prevent any remaining scroll gap */
body { overflow-x: hidden; }

/* ==========================================================
   FOOTER LIGHT/DARK MODE — scoped variables
   ========================================================== */

/* Light mode: white background, dark text */
html:not(.dark-mode) #sara-toumi-footer {
  --fbg:    #ffffff !important;
  --fborder:#E4E4E7 !important;
  --ft:     #111111 !important;
  --ftm:    #52525B !important;
  background: #ffffff !important;
  border-top-color: #E4E4E7 !important;
}
html:not(.dark-mode) #sara-toumi-footer .ft-inner {
  background: #ffffff !important;
}
html:not(.dark-mode) #sara-toumi-footer .ft-brand-name { color: #111111 !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-tagline    { color: #52525B !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-nav-link   { color: #111111 !important; }
html:not(.dark-mode) #sara-toumi-footer .ft-contact-link { color: #52525B !important; }

/* Dark mode: near-black background, light text */
html.dark-mode #sara-toumi-footer {
  background: #0f0f0f !important;
  border-top-color: #2e2e2e !important;
}
html.dark-mode #sara-toumi-footer .ft-inner   { background: #0f0f0f !important; }
html.dark-mode #sara-toumi-footer .ft-brand-name  { color: #f0f0f0 !important; }
html.dark-mode #sara-toumi-footer .ft-tagline     { color: #aaaaaa !important; }
html.dark-mode #sara-toumi-footer .ft-nav-link    { color: #f0f0f0 !important; }
html.dark-mode #sara-toumi-footer .ft-contact-link { color: #aaaaaa !important; }


/* ==========================================================
   FOOTER FULL-WIDTH CENTERING FIX
   Force the Elementor widget/section wrapping #sara-toumi-footer
   to be 100% wide with no padding so the footer fills the page
   edge to edge and its content is centred by its own max-width.
   ========================================================== */

/* The HTML widget container Elementor wraps around the footer */
.elementor-widget:has(#sara-toumi-footer),
.elementor-widget-container:has(#sara-toumi-footer),
.elementor-widget-wrap:has(#sara-toumi-footer),
.elementor-column:has(#sara-toumi-footer),
.elementor-section:has(#sara-toumi-footer),
.e-con:has(#sara-toumi-footer),
.e-con-inner:has(#sara-toumi-footer) {
  width:          100% !important;
  max-width:      100% !important;
  padding-left:   0    !important;
  padding-right:  0    !important;
  padding-bottom: 0    !important;
  margin-left:    0    !important;
  margin-right:   0    !important;
  margin-bottom:  0    !important;
}

/* Footer itself — 100% width, no position tricks needed */
#sara-toumi-footer {
  width:        100% !important;
  max-width:    100% !important;
  position:     static !important;
  left:         auto  !important;
  margin-left:  0     !important;
  margin-right: 0     !important;
}

/* Inner content centred by max-width */
#sara-toumi-footer .ft-inner {
  width:     100%;
  max-width: 100%;
}
#sara-toumi-footer .ft-grid {
  max-width: 1200px;
  margin-left:  auto !important;
  margin-right: auto !important;
}