/* Shared header treatment: keep navigation identical across every page bundle. */
.c-header,
.c-header.scrolled {
  background: linear-gradient(
    180deg,
    rgba(4, 7, 9, 0.54) 0%,
    rgba(4, 7, 9, 0.3) 44%,
    rgba(4, 7, 9, 0.1) 60%,
    transparent 84%,
    transparent 100%
  );
}

.c-header .item_label,
.c-header .search_toggle,
.c-header .nav_lang {
  color: lightgray;
}

.c-header .nav_burger span {
  background: #fff;
}

/* Match the news CTA interaction state to the active tab color. */
.news-explore-more:hover,
.news-explore-more:focus-visible {
  border-color: #BB8B16 !important;
  background: #BB8B16 !important;
  color: #fff !important;
}

/* Keep Arabic's menu on the left; retain the default right side in English. */
html[dir="ltr"] .mobile_drawer {
  left: auto;
  right: 0;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
}

html[dir="ltr"] .mobile_drawer.open {
  transform: translateX(0);
}

html[dir="rtl"] .mobile_drawer {
  left: 0;
  right: auto;
  direction: rtl;
  text-align: right;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
}

html[dir="rtl"] .mobile_drawer.open {
  transform: translateX(0);
}

/* Keep the database-driven nested mega-menu layout available to page-specific
   bundles (Contact, Team, Branch Locator, and Forms), not only styles.css. */
.digital-bankak-panel,
.private-mega-panel {
  grid-template-columns: 210px minmax(0, 1fr);
}

.digital-mega-groups,
.private-mega-tabs,
.private-mega-groups {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 24px;
  border-right: 1px solid rgba(0, 0, 0, 0.16);
}

.digital-mega-group-tab,
.private-mega-tab,
.private-mega-group-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  transition: background 0.22s ease, border-color 0.22s ease,
    transform 0.22s ease, box-shadow 0.22s ease;
}

.digital-mega-group-tab::before,
.private-mega-tab::before,
.private-mega-group-tab::before {
  content: "\f105";
  color: #bb8b16;
  font-family: "Font Awesome 6 Free";
  font-size: 0.85rem;
  font-weight: 900;
}

.digital-mega-group-tab::after,
.private-mega-tab::after,
.private-mega-group-tab::after {
  content: "\f061";
  color: #bb8b16;
  font-family: "Font Awesome 6 Free";
  font-size: 0.85rem;
  font-weight: 900;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.digital-mega-group-tab:is(:hover, :focus-visible, .active),
.private-mega-tab:is(:hover, :focus-visible, .active),
.private-mega-group-tab:is(:hover, :focus-visible, .active) {
  background: linear-gradient(90deg, rgba(187, 139, 22, 0.24), rgba(187, 139, 22, 0.08));
  border-color: rgba(187, 139, 22, 0.32);
  color: #000;
  outline: none;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 #bb8b16;
}

.digital-mega-group-tab:is(:hover, :focus-visible, .active)::after,
.private-mega-tab:is(:hover, :focus-visible, .active)::after,
.private-mega-group-tab:is(:hover, :focus-visible, .active)::after {
  opacity: 1;
  transform: translateX(0);
}

.digital-mega-detail-panels,
.private-mega-panels,
.private-mega-detail-panels {
  min-width: 0;
  min-height: 210px;
  padding: 4px 2px;
}

.digital-mega-detail-panel,
.private-mega-panel,
.private-mega-detail-panel {
  display: none;
  gap: 12px 24px;
  align-content: start;
  opacity: 0;
  transform: translateX(12px);
}

.digital-mega-detail-panel,
.private-mega-detail-panel {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.digital-mega-detail-panel.active,
.private-mega-panel.active,
.private-mega-detail-panel.active {
  display: grid;
  animation: businessMegaPanelIn 0.24s ease forwards;
}

.digital-mega-detail-panel span,
.private-mega-detail-panel span {
  grid-column: 1 / -1;
  color: #bb8b16;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.digital-mega-detail-panel a,
.private-mega-detail-panel a {
  position: relative;
  width: fit-content;
  max-width: 100%;
  color: #000;
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease, transform 0.2s ease;
}

.digital-mega-detail-panel a:hover,
.digital-mega-detail-panel a:focus-visible,
.private-mega-detail-panel a:hover,
.private-mega-detail-panel a:focus-visible {
  color: #a11a19;
  transform: translateX(4px);
}

.private-mega-menu {
  width: min(1040px, calc(100vw - 80px));
}

.private-mega-inner {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
}

.drawer_submenu_heading {
  padding: 13px 0 5px;
  color: #bb8b16;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .private-mega-menu {
    width: min(920px, calc(100vw - 48px));
  }

  .private-mega-inner {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .digital-mega-detail-panel,
  .private-mega-detail-panel {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (min-width: 1025px) {
  html[dir="rtl"] .c-header {
    direction: rtl;
    justify-content: flex-start;
    gap: 24px;
  }

  html[dir="rtl"] .c-header > .header_logo {
    order: 0;
  }

  html[dir="rtl"] .c-header > .header_nav {
    order: 1;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  html[dir="rtl"] .header_nav > .nav_menu {
    order: 0;
  }

  html[dir="rtl"] .header_nav > .nav_search {
    order: 1;
    margin-right: auto;
  }

  html[dir="rtl"] .header_nav > .nav_lang {
    order: 2;
  }

  html[dir="rtl"] .header_nav > .nav_burger {
    order: 3;
  }

  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content {
    left: auto !important;
    right: 50px !important;
    width: min(720px, 58vw) !important;
    margin: 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content > *,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"] .account-features-grid,
  html[dir="rtl"] .ussd-features-slider {
    direction: rtl !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html[dir="rtl"] .account-feature-card {
    direction: rtl !important;
    align-items: flex-start !important;
    text-align: right !important;
    scroll-snap-align: start !important;
  }

  html[dir="rtl"][data-page="ussd"] .ussd-features-slider .account-feature-card h3,
  html[dir="rtl"][data-page="ussd"] .ussd-features-slider .account-feature-card p {
    margin-right: 0 !important;
    margin-left: auto !important;
    text-align: right !important;
  }

  html[dir="rtl"][data-page="ussd"] .ussd-features-slider .account-feature-card p {
    max-width: 280px !important;
  }
}

@media (max-width: 768px) {
  html:not([data-page="home"]) .accounts-page-hero,
  html:not([data-page="home"]) .cards-page-hero,
  html:not([data-page="home"]) .awards-achievements-hero,
  html:not([data-page="home"]) .csr-page-hero,
  html:not([data-page="home"]) .team-page-hero {
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px;
  }

  html:not([data-page="home"]) .accounts-page-hero-content,
  html:not([data-page="home"]) .cards-page-hero-content {
    padding-top: 76px;
    padding-bottom: 56px;
  }
}

@media (max-width: 1024px) {
  html[dir="rtl"] .mobile_drawer {
    left: 0 !important;
    right: auto !important;
    width: min(360px, 88vw) !important;
    max-width: 88vw !important;
    padding: 28px 26px !important;
    gap: 32px !important;
    overflow-y: auto !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.12) !important;
    direction: rtl;
    text-align: right;
    transform: translateX(-100%) !important;
  }

  html[dir="rtl"] .mobile_drawer.open {
    transform: translateX(0) !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_close {
    position: static !important;
    align-self: flex-end !important;
    margin: 0 !important;
    color: #111 !important;
    font-size: 2.2rem !important;
    line-height: 1 !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu.drawer_menu_desktop {
    display: none !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu.drawer_menu_mobile {
    display: flex !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu {
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu .item_label {
    display: flex !important;
    align-items: center !important;
    min-height: 46px !important;
    padding: 0 8px !important;
    color: #111 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_menu a.item_label {
    justify-content: flex-start !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_accordion {
    justify-content: space-between !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_accordion::after {
    margin-right: auto !important;
    margin-left: 0 !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_submenu {
    gap: 8px !important;
    margin: 8px 0 14px !important;
    padding: 0 18px 0 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"] .mobile_drawer .drawer_submenu a {
    padding: 7px 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: rgba(17, 17, 17, 0.72) !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    text-align: right !important;
  }
}

@media (max-width: 640px) {
  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100% - 36px) !important;
    max-width: calc(100% - 36px) !important;
    padding: 76px 0 56px !important;
    margin: auto 18px 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content > *,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content h1,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content h1 {
    margin-bottom: 8px !important;
    font-size: clamp(1.8rem, 8vw, 2.7rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
  }

  html[dir="rtl"]:not([data-page="home"]) .accounts-page-hero-content span,
  html[dir="rtl"]:not([data-page="home"]) .cards-page-hero-content span {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }
}

/* Shared inner-page section rhythm for English and Arabic. */
html:not([data-page="home"]) body > main > :is(
  .account-intro-section,
  .account-features-section,
  .account-benefits-section,
  .account-requirements-section,
  .card-limit-section,
  .open-account-section,
  .request-card-details,
  .contact-options-section,
  .ussd-intro-section,
  .ussd-available-services-section,
  .ussd-flow-section,
  .ussd-grey-section,
  .ussd-settings-section
) {
  padding-top: clamp(64px, 5vw, 82px) !important;
  padding-bottom: clamp(64px, 5vw, 82px) !important;
}

html:not([data-page="home"]) body > main > :is(
  .account-benefits-section,
  .account-requirements-section,
  .open-account-section.has-open-account-media,
  .contact-options-section
) {
  align-items: start !important;
}

html:not([data-page="home"]) .reference-account-card > a > span,
html:not([data-page="home"]) .reference-account-card-shell > span {
  flex: 1 1 auto !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  padding-top: 22px !important;
  text-align: center !important;
}

html:not([data-page="home"]) .reference-account-card .reference-account-actions {
  flex: 0 0 auto !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  align-self: center !important;
  flex-wrap: wrap !important;
  width: auto !important;
  padding: 0 !important;
  margin-top: 22px !important;
}

html:not([data-page="home"]) .reference-account-card :is(strong, small) {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

html:not([data-page="home"]) .reference-account-card .reference-account-button {
  flex: 0 0 auto !important;
}

@media (max-width: 980px) {
  html:not([data-page="home"]) body > main > :is(
    .account-intro-section,
    .account-features-section,
    .account-benefits-section,
    .account-requirements-section,
    .card-limit-section,
    .open-account-section,
    .request-card-details,
    .contact-options-section,
    .ussd-intro-section,
    .ussd-available-services-section,
    .ussd-flow-section,
    .ussd-grey-section,
    .ussd-settings-section
  ) {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }
}

@media (max-width: 640px) {
  html:not([data-page="home"]) body > main > :is(
    .account-intro-section,
    .account-features-section,
    .account-benefits-section,
    .account-requirements-section,
    .card-limit-section,
    .open-account-section,
    .request-card-details,
    .contact-options-section,
    .ussd-intro-section,
    .ussd-available-services-section,
    .ussd-flow-section,
    .ussd-grey-section,
    .ussd-settings-section
  ) {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}
