/* ke-mobile-unify-v3-20261130
   Served as ke-mobile-unify-v3-20261130.css (new URL) because the previous
   file was linked with no ?ver= and Cache-Control max-age=31557600, so
   clients kept a stale v1 copy. Colour and layout rules are the v2 set. */
/* ke-mobile-unify-20261130
   ke-mobile-unify-v3-20261130
   KE Leaders — one consistent mobile layout plus leftover-blue retints.
   Colour retints apply at all widths. Layout rules are mobile-only
   (@media max-width: 767px). Desktop layout is unchanged.
   Does not touch .top-slider-wrapper, #courseSlider / .hs-* hero slides,
   menus, or page content. Off switch: wp-content/uploads/ke-fixes/MOBILE-UNIFY-OFF
*/

/* =====================================================================
   Colour retints — all widths
   Plum #3D2438, deep #24141E, gold #7A5420, champagne #D4B483,
   ivory #FBF7F0, page #F6F0E8, text #1F161A. Key pairs meet WCAG AA.
   Does not target .top-slider-wrapper (handled by a separate pack).
   ===================================================================== */

/* Fixed mobile header (navy #0f2a5c) */
.ke-mobile-topbar {
  background: #3D2438 !important;
  color: #ffffff !important;
}

.ke-mobile-main-menu li > a:hover,
.ke-mobile-main-menu .sub-menu li > a:hover {
  color: #3D2438 !important;
  background: #FBF7F0 !important;
}

.ke-mobile-main-menu .current-menu-item > a,
.ke-mobile-main-menu .current-menu-ancestor > a {
  color: #3D2438 !important;
  background: #F6F0E8 !important;
  font-weight: 600;
}

/* WooCommerce product cards and add-to-cart
   Titles/buttons were #0f2a5c / #163d85 / #1a73e8 / #183574 / #203F8A */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #3D2438 !important;
}

.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price .amount,
.woocommerce ul.products li.product .price ins,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: #7A5420 !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product a.button.product_type_simple,
.single_add_to_cart_button,
.woocommerce div.product form.cart .button {
  background: #3D2438 !important;
  background-color: #3D2438 !important;
  color: #ffffff !important;
  border-color: #3D2438 !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product a.button:focus,
.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus,
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart .button:focus {
  background: #24141E !important;
  background-color: #24141E !important;
  color: #ffffff !important;
  border-color: #24141E !important;
}

/* WPForms submit (was #066aab). Field/button height is handled in the mobile block. */
html {
  --wpforms-button-background-color: #3D2438;
  --wpforms-button-border-color: #3D2438;
  --wpforms-button-text-color: #ffffff;
  --wpforms-page-break-color: #3D2438;
}

.wpforms-form button[type="submit"],
.wpforms-form .wpforms-submit,
.wpforms-submit,
button.wpforms-submit {
  background: #3D2438 !important;
  background-color: #3D2438 !important;
  color: #ffffff !important;
  border-color: #3D2438 !important;
}

.wpforms-form button[type="submit"]:hover,
.wpforms-form button[type="submit"]:focus,
.wpforms-form .wpforms-submit:hover,
.wpforms-form .wpforms-submit:focus,
.wpforms-submit:hover,
.wpforms-submit:focus,
button.wpforms-submit:hover,
button.wpforms-submit:focus {
  background: #24141E !important;
  background-color: #24141E !important;
  color: #ffffff !important;
  border-color: #24141E !important;
}

/* Side TranslatePress language tab (was #203F8A) */
.trp-language-switcher,
.trp-language-switcher-container .trp-language-switcher,
nav.trp-language-switcher.trp-floating-switcher {
  background: #3D2438 !important;
  background-color: #3D2438 !important;
  border-color: #3D2438 !important;
}

.trp-language-switcher:hover,
.trp-language-switcher:focus-within {
  background: #24141E !important;
  background-color: #24141E !important;
  box-shadow: 0 6px 24px rgba(36, 20, 30, 0.24), 0 2px 6px rgba(36, 20, 30, 0.10) !important;
}

html[lang^="ar"] .trp-language-switcher,
html[lang="ar"] .trp-language-switcher,
[dir="rtl"] .trp-language-switcher {
  border-right: 1px solid #3D2438 !important;
}

html[lang^="en"] .trp-language-switcher,
[dir="ltr"] .trp-language-switcher {
  border-color: #3D2438 !important;
}

.bottom-menu-item:focus-visible {
  outline-color: #3D2438 !important;
}

/* Shopify-style mobile bottom nav — leftover blue theme tokens */
:root {
  --bmm-blue: #3D2438;
  --bmm-blue-dark: #24141E;
  --bmm-blue-light: #FBF7F0;
  --bmm-blue-soft: #F6F0E8;
}

.shopify-mobile-bottom-menu .bmi-icon-raised,
.shopify-mobile-bottom-menu .bmi-icon-wrap.bmi-icon-raised,
.bmi-icon-raised {
  background: #3D2438 !important;
  background-color: #3D2438 !important;
}

.shopify-mobile-bottom-menu .bmi-live-dot:not(.bmi-schedule-dot) {
  background: #3D2438 !important;
}

.shopify-mobile-bottom-menu {
  border-top-color: rgba(61, 36, 56, 0.10);
  box-shadow: 0 -4px 20px rgba(36, 20, 30, 0.08);
}

/* Inner-page CIPS / locations band was leftover navy #0B1F3A; homepage already uses deep. */
.ke-bottom-band {
  background: #24141E;
  color: #F6F0E8;
  border-top-color: rgba(212, 180, 131, 0.35);
}

.ke-loc-label,
.ke-cips-dates-kicker,
.ke-cips-date-month {
  color: #D4B483;
}

.ke-cips-btn {
  background: #D4B483;
  color: #24141E !important;
}

.ke-cips-btn:hover,
.ke-cips-btn:focus {
  background: #e0c59a;
  color: #24141E !important;
}


/* v2: Course Finder, product-category and any other template that loads
   ke-home.css but not ke-home-forest.css still use navy chrome
   (#0B1F3A, #071526, the leftover navy header and hero stops).
   Remap header, top bar and .hero to the same cream/plum system as the
   homepage. Colour only — desktop layout is unchanged.

   !important is required: on live pages LiteSpeed prints additional
   combined CSS after ke-mobile-unify.css, so equal-specificity rules
   in this file lose to the original navy .site-header / .kf-crumb
   declarations. Higher-specificity selectors (.hero.kf-hero) already
   won without it, which is why the hero could look cream while the
   header stayed navy. */

:root {
  --navy: #3D2438;
  --navy-deep: #24141E;
  --navy-mid: #4A2C40;
  --navy-glass: rgba(246, 240, 232, 0.10);
}

.topbar {
  background: #3D2438 !important;
  color: #E8D9C8 !important;
  border-bottom-color: rgba(246, 240, 232, 0.10) !important;
}
.topbar a { color: #F6F0E8 !important; }
.topbar svg { fill: #D4B483 !important; }

header.site-header,
.site-header {
  background: #F6F0E8 !important;
  backdrop-filter: saturate(1.15) blur(12px);
  border-bottom: 1px solid #E5D8C8 !important;
}

.site-header nav.primary a,
nav.primary a,
.site-header .lang-switch a,
.lang-switch a,
.lang a {
  color: #1F161A !important;
}
.site-header nav.primary a:hover,
nav.primary a:hover,
.lang-switch a:hover,
.lang a:hover {
  color: #3D2438 !important;
}
.lang a[aria-current="page"],
.lang-switch a[aria-current="page"] {
  background: #3D2438 !important;
  color: #F6F0E8 !important;
}
.lang-switch .sep { color: rgba(31, 22, 26, 0.35) !important; }

.menu-toggle,
#menuBtn.menu-toggle {
  color: #1F161A !important;
  border-color: rgba(31, 22, 26, 0.22) !important;
}

.site-header .logo::before,
.logo::before { color: #1F161A !important; }
.site-header .logo::after,
.logo::after { color: #7A5420 !important; }

.hero,
.hero.kf-hero,
.hero.kp-hero,
.hero.kf-hero.kp-hero,
.kf-hero,
.kp-hero {
  background: #F6F0E8 !important;
  color: #1F161A !important;
}
.hero h1,
.hero h1.ke-hero-h1,
.kf-hero h1,
.kp-hero h1 {
  color: #1F161A !important;
}
.hero .sub,
.hero .ke-hero-line,
.kf-hero .sub,
.kp-hero .sub {
  color: #1F161A !important;
}
.hero h1 em,
.hero h1 .accent,
.hero .eyebrow,
.kf-hero .eyebrow,
.kp-hero .eyebrow {
  color: #7A5420 !important;
}

.kf-crumb,
.kp-crumb {
  color: #5A3A48 !important;
}
.kf-crumb a,
.kp-crumb a {
  color: #3D2438 !important;
  font-weight: 600;
}
.kf-crumb a:hover,
.kp-crumb a:hover {
  color: #7A5420 !important;
}

.hero .finder-bar,
.kf-search .finder-bar,
#ke-home .finder-bar,
#ke-home .hero-search {
  background: #FBF7F0 !important;
  box-shadow: 0 8px 24px rgba(36, 20, 30, 0.07);
}
.hero .finder-bar input,
.kf-search .finder-bar input {
  color: #1F161A !important;
  background: #FBF7F0 !important;
}
.hero .finder-bar input::placeholder,
.kf-search .finder-bar input::placeholder {
  color: #6A4E5A !important;
}
.hero .popular .lab,
.kf-hero .popular .lab,
.kp-hero .popular .lab {
  color: #5A3A48 !important;
}
.hero .chip,
.kf-hero .chip,
.kp-hero .chip {
  background: #FBF7F0 !important;
  color: #1F161A !important;
  border: 1px solid #E5D8C8 !important;
}
.hero .chip:hover,
.kf-hero .chip:hover,
.kp-hero .chip:hover {
  background: #EFE0CC !important;
  color: #1F161A !important;
  border-color: #7A5420 !important;
}

.kf-stats {
  background: #FBF7F0 !important;
  border: 1px solid #E5D8C8 !important;
}
.kf-stat {
  background: #F6F0E8 !important;
  border: 1px solid #E5D8C8 !important;
  color: #1F161A !important;
}
.kf-stat strong { color: #3D2438 !important; }

.btn-dark,
.hero .btn-dark {
  background: #3D2438 !important;
  color: #F6F0E8 !important;
}
.btn-dark:hover,
.hero .btn-dark:hover {
  background: #24141E !important;
  color: #F6F0E8 !important;
}


/* =====================================================================
   Mobile layout only — do not change desktop
   ===================================================================== */
@media (max-width: 767px) {

  :root {
    --ke-m-gutter: 20px;
    --ke-m-gutter-sm: 16px;
    --ke-m-section: 40px;
    --ke-m-header: 56px;
    --ke-m-tap: 44px;
    --ke-m-logo: 40px;
    --header-h: 56px;
    --bottom-bar: 132px;
    --wpforms-button-size-height: 44px;
    --wpforms-field-size-input-height: 44px;
  }

  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    font-size: 1rem;
    line-height: 1.55;
    color: #1F161A;
    /* Call/WhatsApp bar. Extra room for the utility nav is added only
       when that nav is actually visible (it is often .bmm-hidden). */
    padding-bottom: calc(64px + 12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Pages that use the shared site-header already zero the leftover 82px
     top padding from the old navy top bar. Keep that. Pages that still
     show .ke-mobile-topbar keep a matching offset. */
  body.ke-home-v10,
  body.ke-home-v11 {
    padding-top: 0 !important;
  }

  body:not(.ke-home-v10):not(.ke-home-v11) {
    padding-top: 82px !important;
  }

  /* ----- Type scale (content). Leave homepage hero slider typography alone. ----- */
  h1,
  .entry-title,
  .ka-hero h1,
  .kb-post-hero h1,
  .kb-card-featured h3, /* featured title only sized below as h1-adjacent? skip - keep as h3 */
  .kei-hero-band h1,
  .kc-hero h1,
  .kc2-hero h1,
  .woocommerce-products-header h1,
  .product_title,
  .ke-course h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em;
  }

  /* Homepage opening title is already close; keep it in the same scale. */
  #ke-home .hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  h2,
  .section-head h2,
  .section h2,
  .kb-content h2,
  .kei-block > h2,
  .kei-section-h,
  .kei-detail h2,
  .kei-enquiry-panel h2,
  .kc-form-card h2,
  .ke-cips-card h2,
  .ke-course h2 {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }

  h3,
  .section h3,
  .kb-content h3,
  .kc-card h2,
  .ka-person h2 {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  /* Footer and kicker labels stay small */
  footer.site h3,
  .site h3,
  #ke-home footer.site h3,
  .kei-detail h3,
  .cips-slim h2,
  .ke-loc-label,
  .ke-cips-dates-kicker,
  .ke-cips-date-month {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    letter-spacing: 0.08em;
  }

  /* Course / blog card titles — readable, not section-sized */
  .card h3,
  .kf-grid .card h3,
  .kb-card h3,
  .date-card h3,
  .ke-card h3,
  .kei-card h2,
  .why-card h3 {
    font-size: 1rem !important;
    line-height: 1.35 !important;
  }

  /* ----- Gutters and section padding ----- */
  .wrap,
  .ast-container,
  .site-header .wrap,
  .kei-wrap,
  .ka-wrap,
  .kb-wrap,
  .kc-wrap,
  .kf-wrap,
  .ke-course .wrap,
  .ke-training {
    padding-inline: var(--ke-m-gutter);
  }

  .section,
  .reviews-strip,
  .ka-panel,
  .kb-section,
  .kc-section,
  .kei-section,
  .ke-course-section {
    padding-top: var(--ke-m-section);
    padding-bottom: var(--ke-m-section);
  }

  /* ----- Header and hamburger ----- */
  .site-header {
    min-height: var(--ke-m-header);
    overflow: visible;
  }

  .site-header .wrap {
    overflow: visible;
    padding-inline-end: 12px;
  }

  .site-header .header-inner,
  .header-inner {
    min-height: var(--ke-m-header);
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: visible;
  }

  .site-header .logo img,
  .logo img {
    width: var(--ke-m-logo) !important;
    height: var(--ke-m-logo) !important;
    max-width: var(--ke-m-logo);
    object-fit: contain;
    flex-shrink: 0;
  }

  .ke-mobile-topbar .ke-center-logo,
  .ke-mobile-row-2 img.ke-center-logo,
  .ke-mobile-row-2 img {
    height: 36px !important;
    width: auto !important;
    max-height: 36px;
  }

  .lang-switch {
    flex-shrink: 1;
    min-width: 0;
    margin-inline-start: 4px;
  }

  .menu-toggle,
  #menuBtn.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: var(--ke-m-tap);
    min-height: var(--ke-m-tap);
    height: var(--ke-m-tap);
    padding: 8px 10px;
    margin-inline-start: 4px;
    margin-inline-end: 0;
    color: #1F161A !important;
    border: 1px solid rgba(31, 22, 26, 0.22) !important;
    border-radius: 10px;
    background: #FBF7F0 !important;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
  }

  .ke-mobile-menu-button {
    width: var(--ke-m-tap) !important;
    height: var(--ke-m-tap) !important;
    min-width: var(--ke-m-tap) !important;
    min-height: var(--ke-m-tap) !important;
    top: 6px !important;
    right: 8px !important;
    left: auto !important;
    gap: 5px;
  }

  [dir="rtl"] .ke-mobile-menu-button,
  html[lang^="ar"] .ke-mobile-menu-button {
    right: auto !important;
    left: 8px !important;
  }

  /* ----- Buttons and tap targets (not hero-slider chrome) ----- */
  a.btn,
  .btn,
  .header-cta,
  .btn-primary,
  .btn-outline,
  .btn-dark,
  .btn-whatsapp,
  .btn-ghost,
  .ke-cips-btn,
  .elementor-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  input[type="submit"],
  input[type="button"],
  button[type="submit"],
  .wpforms-submit {
    min-height: var(--ke-m-tap);
    min-width: var(--ke-m-tap);
    padding: 12px 16px;
    box-sizing: border-box;
  }

  .mobile-bar .btn,
  .mobile-bar a.btn {
    min-height: var(--ke-m-tap);
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding: 12px 10px;
  }

  /* ----- Forms ----- */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  select,
  textarea,
  .wpforms-form input,
  .wpforms-form select,
  .wpforms-form textarea,
  .form-box input,
  .form-box select,
  .form-box textarea {
    max-width: 100%;
    font-size: 16px !important; /* prevents iOS zoom */
    min-height: var(--ke-m-tap);
    box-sizing: border-box;
  }

  textarea {
    min-height: 88px;
  }

  .wpforms-form,
  .form-box,
  .hero-form .wpforms-form,
  .kei-enquiry-panel,
  .kc-form-card {
    max-width: 100%;
  }

  .wpforms-form input,
  .wpforms-form select,
  .wpforms-form textarea,
  .form-box input,
  .form-box select,
  .form-box textarea {
    width: 100%;
  }

  /* ----- Cards and grids ----- */
  .cards,
  .dates,
  .why-grid,
  .foot-grid,
  .trust-grid,
  .kf-grid,
  .kb-grid,
  .woocommerce ul.products,
  .kei-grid,
  .ka-hero-grid,
  .ke-training__grid,
  .reviews-line,
  .ke-cips-dates {
    grid-template-columns: 1fr !important;
  }

  .cat-grid,
  .city-grid,
  .stats,
  .ke-cips-dates {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }

  .woocommerce ul.products {
    display: block;
    padding-inline: 0 !important;
    margin: 0 !important;
  }

  .woocommerce ul.products li.product {
    width: 100% !important;
    max-width: 100%;
    margin: 0 0 16px 0 !important;
    box-sizing: border-box;
  }

  .woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
  }

  .card,
  .why-card,
  .date-card,
  .kb-card,
  .kei-card,
  .kc-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .card img,
  .kb-card img,
  .date-card img,
  .ke-training__frame img,
  .woocommerce div.product div.images img,
  .wp-post-image,
  img.attachment-woocommerce_thumbnail {
    max-width: 100%;
    height: auto;
  }

  /* ----- Footer ----- */
  footer.site,
  .site .foot-grid,
  .ke-bottom-band {
    padding-inline: var(--ke-m-gutter);
  }

  .ke-bottom-band {
    padding-top: 22px;
    padding-bottom: 28px;
  }

  .legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* ----- Sticky Call/WhatsApp bar + utility nav: no overlap ----- */
  .shopify-mobile-bottom-menu {
    z-index: 80;
    height: auto;
    min-height: 68px;
  }

  .mobile-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 75;
    background: #FBF7F0;
    border-top: 1px solid #E5D8C8;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    box-shadow: 0 -8px 24px rgba(36, 20, 30, 0.08);
  }

  /* Lift the call bar only when the utility nav is actually on screen. */
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) .mobile-bar {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 8px;
  }

  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) {
    padding-bottom: calc(68px + 64px + 12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* First-screen heroes: lift search, chips and stats above the dock + bubble. */
  /* Clear the 64px call bar + 44px bubble + gap. Add 68px only when
     the utility nav is actually visible. */
  .hero,
  .hero.kf-hero,
  .hero.kp-hero,
  .kf-hero,
  .kp-hero,
  #ke-home .hero {
    padding-bottom: calc(64px + 10px + 44px + 16px) !important;
  }
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) .hero,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) .kf-hero,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) .kp-hero,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ke-home .hero {
    padding-bottom: calc(68px + 64px + 10px + 44px + 16px) !important;
  }

  /* Leave a clear column at the inline-end of first-screen controls
     so the 44px chat bubble can sit at the edge without covering
     Search, chips, or .kf-stat cards. Logical property follows RTL. */
  .hero .hero-search,
  .hero .popular,
  .kf-hero .popular,
  .kp-hero .popular,
  .kf-stats {
    padding-inline-end: calc(44px + 16px);
    box-sizing: border-box;
  }

  /* Floating language tab stays mid-side, clear of both bars */
  nav.trp-language-switcher.trp-floating-switcher,
  .trp-language-switcher {
    bottom: auto !important;
  }

  /* Chat bubble: smaller, at the side edge, just above the visible bars.
     Do not assume the 68px utility nav is showing. */
  html body #ke-ar-root,
  #ke-ar-root {
    right: 8px !important;
    left: auto !important;
    width: 44px !important;
    height: 44px !important;
    bottom: calc(64px + 10px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 75 !important;
  }
  html body #ke-ar-root[data-dir="rtl"],
  #ke-ar-root[data-dir="rtl"] {
    left: 8px !important;
    right: auto !important;
  }
  #ke-ar-root #ke-ar-bubble {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  #ke-ar-root #ke-ar-bubble svg {
    width: 22px !important;
    height: 22px !important;
    max-width: none;
  }
  #ke-ar-root[data-open="1"] {
    bottom: calc(64px + 8px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ke-ar-root,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ke-ar-root,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ke-ar-root[data-open="1"] {
    bottom: calc(68px + 64px + 10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Astra "Scroll to Top": keep it on the opposite side from the chat
     bubble, inset so the arrow is not clipped by the viewport edge. */
  #ast-scroll-top,
  #ast-scroll-top.ast-scroll-top-icon,
  #ast-scroll-top.ast-scroll-to-top-right {
    left: 12px !important;
    right: auto !important;
    bottom: calc(64px + 10px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 74;
  }
  #ast-scroll-top .ast-icon,
  #ast-scroll-top svg,
  #ast-scroll-top .ast-arrow-svg {
    overflow: visible !important;
    display: block;
    width: 16px;
    height: 16px;
    max-width: none;
    flex-shrink: 0;
  }
  [dir="rtl"] #ast-scroll-top,
  [dir="rtl"] #ast-scroll-top.ast-scroll-to-top-right,
  html[lang^="ar"] #ast-scroll-top,
  html[lang^="ar"] #ast-scroll-top.ast-scroll-to-top-right {
    left: auto !important;
    right: 12px !important;
  }
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ast-scroll-top,
  body:has(.shopify-mobile-bottom-menu:not(.bmm-hidden)) #ast-scroll-top.ast-scroll-to-top-right {
    bottom: calc(68px + 64px + 10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ----- No clipped text, no horizontal scroll ----- */
  img, video, iframe, svg {
    max-width: 100%;
  }

  /* Keep header logo and small icons at their set size */
  .site-header .logo img,
  .logo img,
  .ke-mobile-row-2 img,
  .trp-flag-image,
  .bmi-icon-wrap svg,
  .city-tile .flag,
  #ast-scroll-top svg,
  #ke-ar-root svg {
    max-width: none;
  }

  .site-header .logo img,
  .logo img {
    max-width: var(--ke-m-logo);
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  pre, code {
    max-width: 100%;
    overflow-x: auto;
  }

  .hs-slide img,
  #courseSlider img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 360px) {
  :root {
    --ke-m-gutter: 16px;
  }

  h1,
  .entry-title,
  .ka-hero h1,
  .kb-post-hero h1,
  .kei-hero-band h1,
  #ke-home .hero h1,
  .product_title {
    font-size: 1.6rem !important;
  }

  .cat-grid,
  .city-grid,
  .stats,
  .ke-cips-dates {
    grid-template-columns: 1fr !important;
  }

  .mobile-bar .btn,
  .mobile-bar a.btn {
    font-size: 0.82rem;
    padding-inline: 8px;
  }

  body:not(.ke-home-v10):not(.ke-home-v11) {
    padding-top: 76px !important;
  }
}

/* RTL: use logical sides; hamburger already flipped above. */
@media (max-width: 767px) {
  [dir="rtl"] body,
  html[lang^="ar"] body {
    text-align: start;
  }

  [dir="rtl"] .legal,
  html[lang^="ar"] .legal {
    align-items: flex-start;
  }

}
