/* Kayra Patent V14 — Arabic route recovery and final opening-screen geometry.
 * Existing form delivery and header/mega-menu interaction code remain untouched.
 */

/* --------------------------------------------------------------------------
   Language selector: compact white panel, Open Sans 14, no framed flags
   -------------------------------------------------------------------------- */
html body .language-switcher.kayra-language-open > .language-menu,
html body .localized-language-menu.kayra-language-open > div,
html body .kayra-header-language-panel-v6,
html body .kayra-header-language-panel-v11,
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 {
  box-sizing: border-box !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  width: min(210px, calc(100vw - 12px)) !important;
  max-height: min(286px, calc(100dvh - 56px)) !important;
  margin-top: 0 !important;
  padding: 4px 7px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 1px solid #d5d9dc !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(12, 16, 20, .16) !important;
  transform: none !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a,
html body .localized-language-menu.kayra-language-open > div > a,
html body .kayra-header-language-panel-v6 > a,
html body .kayra-header-language-panel-v11 > a,
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 > a {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 5px !important;
  overflow: hidden !important;
  color: #22272b !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid #e0e4e6 !important;
  font-family: var(--font-open-sans), "Open Sans", Arial, sans-serif !important;
  text-align: left !important;
  text-decoration: none !important;
  direction: ltr !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a:last-child,
html body .localized-language-menu.kayra-language-open > div > a:last-child,
html body .kayra-header-language-panel-v6 > a:last-child,
html body .kayra-header-language-panel-v11 > a:last-child,
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 > a:last-child {
  border-bottom: 0 !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a:hover,
html body .language-switcher.kayra-language-open > .language-menu > a:focus-visible,
html body .localized-language-menu.kayra-language-open > div > a:hover,
html body .localized-language-menu.kayra-language-open > div > a:focus-visible,
html body .kayra-header-language-panel-v6 > a:hover,
html body .kayra-header-language-panel-v6 > a:focus-visible,
html body .kayra-header-language-panel-v11 > a:hover,
html body .kayra-header-language-panel-v11 > a:focus-visible {
  color: #b90014 !important;
  background: #f3f5f6 !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a > :is(img, .tr-flag),
html body .localized-language-menu.kayra-language-open > div > a > :is(img, .tr-flag),
html body .kayra-header-language-panel-v6 > a > :is(img, .tr-flag),
html body .kayra-header-language-panel-v11 > a > :is(img, .tr-flag),
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 > a > :is(img, .tr-flag) {
  box-sizing: border-box !important;
  display: block !important;
  grid-column: 1 !important;
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  object-fit: cover !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 1px !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a > .tr-flag,
html body .localized-language-menu.kayra-language-open > div > a > .tr-flag,
html body .kayra-header-language-panel-v6 > a > .tr-flag,
html body .kayra-header-language-panel-v11 > a > .tr-flag {
  background-image: url("/assets/kayra-flags-v12/tr.svg") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

html body :is(.language-switcher, .localized-language-menu, .kayra-header-language-panel-v6, .kayra-header-language-panel-v11) a > .tr-flag > * {
  display: none !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a > b,
html body .localized-language-menu.kayra-language-open > div > a > b,
html body .kayra-header-language-panel-v6 > a > b,
html body .kayra-header-language-panel-v11 > a > b,
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 > a > b {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
}

html body .language-switcher.kayra-language-open > .language-menu > a > small,
html body .localized-language-menu.kayra-language-open > div > a > small,
html body .kayra-header-language-panel-v6 > a > small,
html body .kayra-header-language-panel-v11 > a > small,
html body main.localized-home-complete[data-kayra-v11-home] .kayra-header-language-panel-v11 > a > small {
  display: block !important;
  grid-column: 2 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #555d63 !important;
  font-family: var(--font-open-sans), "Open Sans", Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .language-switcher > button,
html body .localized-language-menu > button {
  min-height: 32px !important;
  gap: 6px !important;
  padding-inline: 9px !important;
}

html body .language-switcher > button > :is(img, .tr-flag),
html body .localized-language-menu > button > :is(img, .tr-flag),
html body .desktop-header-language > :is(img, .tr-flag),
html body .mobile-header-language > :is(img, .tr-flag),
html body .drawer-current-language > :is(img, .tr-flag),
html body main.localized-home-complete[data-kayra-v11-home] .language-switcher > button > :is(img, .tr-flag),
html body main.localized-home-complete[data-kayra-v11-home] .desktop-header-language > :is(img, .tr-flag),
html body main.localized-home-complete[data-kayra-v11-home] .mobile-header-language > :is(img, .tr-flag),
html body main.localized-home-complete[data-kayra-v11-home] .drawer-current-language > :is(img, .tr-flag) {
  box-sizing: border-box !important;
  display: block !important;
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  object-fit: cover !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 1px !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .language-switcher > button > b,
html body .localized-language-menu > button > b,
html body .desktop-header-language > b,
html body .mobile-header-language > b,
html body .drawer-current-language > b,
html body main.localized-home-complete[data-kayra-v11-home] .language-switcher > button > b,
html body main.localized-home-complete[data-kayra-v11-home] .desktop-header-language > b,
html body main.localized-home-complete[data-kayra-v11-home] .mobile-header-language > b,
html body main.localized-home-complete[data-kayra-v11-home] .drawer-current-language > b {
  font-family: var(--font-open-sans), "Open Sans", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* Arabic contact strings keep their exact left-to-right number/address order. */
html[lang="ar"][dir="rtl"] body a[href^="tel:"],
html[lang="ar"][dir="rtl"] body a[href^="mailto:"] {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* --------------------------------------------------------------------------
   Desktop slider: move all copy to the same clear axis; CTAs are untouched
   -------------------------------------------------------------------------- */
@media (min-width: 761px) and (max-width: 1000px) {
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article .overline,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article > .container > span:first-child,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article h1,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article p {
    max-width: calc(100% - 67px) !important;
    margin-inline-start: 67px !important;
    margin-inline-end: 0 !important;
  }
}

@media (min-width: 1001px) and (max-width: 1760px) {
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article .overline,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article > .container > span:first-child,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article h1,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article p {
    margin-inline-start: 35px !important;
    margin-inline-end: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile opening: four-card visibility, copy rhythm, CTA/arrow alignment
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero {
    height: clamp(280px, 38svh, 300px) !important;
    min-height: 280px !important;
    max-height: 300px !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article > .hero-copy,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article > .container {
    padding: 14px 0 82px !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article .overline,
  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article > .container > span:first-child {
    max-width: calc(100% - 40px) !important;
    margin-inline-start: 40px !important;
    margin-inline-end: 0 !important;
    font-size: clamp(10.5px, 2.8vw, 11.5px) !important;
    line-height: 1.28 !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article h1 {
    max-width: calc(100% - 40px) !important;
    margin-block: 9px 13px !important;
    margin-inline-start: 40px !important;
    margin-inline-end: 0 !important;
    font-size: clamp(20.5px, 5.6vw, 24px) !important;
    line-height: 1.14 !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > article p {
    display: -webkit-box !important;
    max-width: calc(100% - 40px) !important;
    margin-block: 0 !important;
    margin-inline-start: 40px !important;
    margin-inline-end: 0 !important;
    overflow: hidden !important;
    font-size: clamp(11px, 2.9vw, 12px) !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero .hero-actions {
    right: 32px !important;
    bottom: 24px !important;
    left: 32px !important;
    display: flex !important;
    grid-template-columns: none !important;
    width: auto !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero .hero-actions .button {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(50% - 7px) !important;
    min-height: 48px !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 8px !important;
    font-family: var(--font-oswald), Oswald, Arial, sans-serif !important;
    font-size: clamp(10.5px, 2.75vw, 11.75px) !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero .hero-actions .button svg {
    flex: 0 0 13px !important;
    width: 13px !important;
    height: 13px !important;
  }

  html[dir="rtl"] body main.localized-home-complete[data-kayra-v11-home="ar"] > .home-first-screen > .hero .hero-actions .button {
    direction: rtl !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > .slide-arrow {
    z-index: 8 !important;
    display: grid !important;
    width: 36px !important;
    height: 54px !important;
    place-items: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > .slide-arrow.prev {
    right: auto !important;
    left: 14px !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > .slide-arrow.next {
    right: 14px !important;
    left: auto !important;
  }

  html body :is(main.home-page, main.localized-home-complete[data-kayra-v11-home]) > .home-first-screen > .hero > .slide-dots {
    bottom: 4px !important;
  }
}
