/* Accessibility Control Hub + inclusive content helpers */

.a11y-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2147483646;
  padding: 0.75rem 1.25rem;
  background: #0b179b;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.a11y-skip-link:focus {
  left: 0;
  outline: 3px solid #ffd200;
  outline-offset: 2px;
}

/* Floating toolbar — above header/menu (header uses ~999999999) */
.a11y-widget {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 2147483000;
  font-family: inherit;
  transition: bottom 0.25s ease;
}

/* Raised when back-to-top is visible — stacked above it, same right edge */
.a11y-widget.is-raised {
  bottom: calc(2rem + 52px + 12px);
}

.a11y-widget__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0b179b;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, bottom 0.25s ease;
}

.a11y-widget__toggle:hover,
.a11y-widget__toggle:focus {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  outline: 3px solid #ffd200;
  outline-offset: 2px;
}

.a11y-widget__toggle i {
  font-size: 1.35rem;
}

.a11y-widget__toggle-wrap {
  position: relative;
  display: inline-flex;
}

.a11y-widget__tip {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  width: 260px;
  max-width: min(260px, calc(100vw - 90px));
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.5;
  border: 1px solid #0b179b;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 2147483002;
  text-align: left;
}

.a11y-widget__tip::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid #0b179b;
  border-top: 1px solid #0b179b;
  transform: rotate(45deg);
}

.a11y-widget__tip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0b179b;
  font-size: 0.85rem;
  font-weight: 700;
}

.a11y-widget__tip a {
  color: #0b179b !important;
  font-weight: 700;
  text-decoration: underline;
}

.a11y-widget__toggle-wrap:hover .a11y-widget__tip,
.a11y-widget__toggle-wrap:focus-within .a11y-widget__tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* Hide floating tip while the control panel is open */
.a11y-widget.is-panel-open .a11y-widget__tip,
.a11y-widget:has(.a11y-widget__panel.is-open) .a11y-widget__tip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.a11y-widget__panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 280px;
  max-width: calc(100vw - 36px);
  background: #fff;
  border: 1px solid #e2e5ef;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  padding: 1rem 1rem 0.85rem;
  display: none;
  z-index: 2147483001;
}

.a11y-widget__panel.is-open {
  display: block;
}

.a11y-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8eaf2;
}

.a11y-widget__header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b179b;
  letter-spacing: 0.02em;
}

.a11y-widget__close {
  border: none;
  background: transparent;
  color: #575757;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

.a11y-widget__close:hover,
.a11y-widget__close:focus {
  color: #0b179b;
  outline: 2px solid #0b179b;
  outline-offset: 2px;
}

.a11y-widget__group {
  margin-bottom: 0.85rem;
}

.a11y-widget__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #575757;
  margin-bottom: 0.45rem;
}

.a11y-widget__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.a11y-widget__btn {
  flex: 1 1 auto;
  min-width: 72px;
  border: 1px solid #0b179b;
  background: #fff;
  color: #0b179b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.a11y-widget__btn:hover,
.a11y-widget__btn:focus,
.a11y-widget__btn.is-active {
  background: #0b179b;
  color: #fff;
  outline: none;
}

.a11y-widget__btn:focus {
  box-shadow: 0 0 0 3px rgba(11, 23, 155, 0.25);
}

.a11y-widget__reset {
  width: 100%;
  margin-top: 0.25rem;
  border: none;
  background: #f0f2f8;
  color: #333;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.a11y-widget__reset:hover,
.a11y-widget__reset:focus {
  background: #e2e5ef;
  outline: 2px solid #0b179b;
  outline-offset: 1px;
}

/* Back to top — always visible colors; aligned with a11y widget */
#scroll-to-top.section-scroll,
a#scroll-to-top {
  position: fixed !important;
  right: 2rem !important;
  bottom: 2rem !important;
  width: 52px !important;
  height: 52px !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  border-radius: 50% !important;
  background: #0b179b !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  z-index: 2147483000 !important;
  font-size: 1.5rem !important;
  text-align: center;
}

#scroll-to-top.section-scroll:hover,
a#scroll-to-top:hover,
#scroll-to-top.section-scroll:focus,
a#scroll-to-top:focus {
  background: #06107a !important;
  color: #fff !important;
  outline: 3px solid #ffd200;
  outline-offset: 2px;
}

#scroll-to-top.is-visible {
  display: flex !important;
}

/* Body modifiers */
html.a11y-text-lg {
  font-size: 112.5% !important;
}

html.a11y-text-xl {
  font-size: 125% !important;
}

body.a11y-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.a11y-contrast #wrapper,
body.a11y-contrast .page-wrapper,
body.a11y-contrast .content-wrapper,
body.a11y-contrast .content-block,
body.a11y-contrast .bg-gray-light,
body.a11y-contrast .post-text-block,
body.a11y-contrast .blog-holder,
body.a11y-contrast .contact-container,
body.a11y-contrast .footer-v1,
body.a11y-contrast .main-header.scrolled {
  background: #000 !important;
  color: #fff !important;
}

body.a11y-contrast a {
  color: #ffd200 !important;
  text-decoration: underline;
}

body.a11y-contrast .btn.btn-primary,
body.a11y-contrast .a11y-widget__toggle,
body.a11y-contrast #scroll-to-top {
  background: #ffd200 !important;
  border-color: #fff !important;
  color: #000 !important;
}

body.a11y-contrast img {
  filter: grayscale(100%) contrast(1.15);
}

body.a11y-contrast .a11y-widget__panel {
  background: #111 !important;
  border-color: #ffd200 !important;
  color: #fff !important;
}

body.a11y-contrast .a11y-widget__header h2,
body.a11y-contrast .a11y-post-badge__tip strong,
body.a11y-contrast .a11y-widget__tip strong {
  color: #ffd200 !important;
}

body.a11y-contrast .a11y-post-badge__tip,
body.a11y-contrast .a11y-widget__tip {
  background: #111 !important;
  color: #fff !important;
  border-color: #ffd200 !important;
}

body.a11y-readable p,
body.a11y-readable .content-title,
body.a11y-readable h1,
body.a11y-readable h2,
body.a11y-readable h3,
body.a11y-readable .blog-desc,
body.a11y-readable .post-text-block p {
  letter-spacing: 0.02em !important;
  line-height: 1.7 !important;
  max-width: 70ch;
}

/* Strong focus only when enabled via toolbar — keyboard focus-visible preferred */
body.a11y-focus-strong a:focus-visible,
body.a11y-focus-strong button:focus-visible,
body.a11y-focus-strong input:focus-visible,
body.a11y-focus-strong textarea:focus-visible,
body.a11y-focus-strong select:focus-visible {
  outline: 3px solid #0b179b !important;
  outline-offset: 3px !important;
}

body.a11y-contrast.a11y-focus-strong a:focus-visible,
body.a11y-contrast.a11y-focus-strong button:focus-visible,
body.a11y-contrast.a11y-focus-strong input:focus-visible,
body.a11y-contrast.a11y-focus-strong textarea:focus-visible {
  outline-color: #ffd200 !important;
}

/* Menu keyboard focus — clear border while tabbing (overrides theme outline:none) */
.main-header .nav > li > a:focus-visible,
.main-header .navbar-nav > li > a:focus-visible,
.main-header .dropdown-menu > li > a:focus-visible,
.main-header .nav a:focus-visible,
#mega-menu a:focus-visible {
  outline: 3px solid #ffd200 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #0b179b !important;
  z-index: 1;
  position: relative;
}

body.a11y-contrast .main-header .nav a:focus-visible,
body.a11y-contrast #mega-menu a:focus-visible {
  outline-color: #ffd200 !important;
  box-shadow: 0 0 0 2px #fff !important;
}

/* Inclusive opportunity content — hidden until a11y features are on */
.post-grid .a11y-post-badge,
.a11y-detail-note {
  display: none !important;
}

.post-grid .img-block.post-img {
  position: relative;
  overflow: visible;
}

/* Highly visible accessibility badge + tooltip */
body.a11y-features-on .post-grid .a11y-post-badge {
  display: inline-flex !important;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #0b179b;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.a11y-features-on .post-grid .a11y-post-badge i {
  font-size: 1.25rem;
  color: #fff;
}

body.a11y-features-on .post-grid .a11y-post-badge:hover,
body.a11y-features-on .post-grid .a11y-post-badge:focus {
  background: #06107a;
  outline: 3px solid #ffd200;
  outline-offset: 2px;
}

.a11y-post-badge__tip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 260px;
  max-width: min(260px, calc(100vw - 40px));
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.5;
  border: 1px solid #0b179b;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 20;
  text-align: left;
}

.a11y-post-badge__tip::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #0b179b;
  border-top: 1px solid #0b179b;
  transform: rotate(45deg);
}

.a11y-post-badge__tip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0b179b;
  font-size: 0.85rem;
  font-weight: 700;
}

.a11y-post-badge__tip a {
  color: #0b179b !important;
  font-weight: 700;
  text-decoration: underline;
}

body.a11y-features-on .post-grid .a11y-post-badge:hover .a11y-post-badge__tip,
body.a11y-features-on .post-grid .a11y-post-badge:focus .a11y-post-badge__tip,
body.a11y-features-on .post-grid .a11y-post-badge:focus-within .a11y-post-badge__tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

body.a11y-features-on .a11y-detail-note {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  background: #f4f6fb;
  border: 1px solid #d8deef;
  border-radius: 4px;
}

.a11y-detail-note__icon {
  flex-shrink: 0;
  color: #0b179b;
  font-size: 1.5rem;
  line-height: 1;
}

.a11y-detail-note p {
  margin: 0;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.55;
}

.a11y-support-options {
  margin-top: 0.75rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.35rem;
  background: #f4f6fb;
  border: 1px solid #d8deef;
}

.a11y-support-options__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0b179b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.a11y-support-options__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.a11y-support-options__list li {
  margin: 0;
  font-size: 0.92rem;
  color: #444;
}

.a11y-support-options__list a {
  color: #0b179b;
  font-weight: 600;
  text-decoration: underline;
}

.a11y-support-options__list i {
  margin-right: 0.35rem;
  color: #0b179b;
}

.waituk_contact-form .a11y-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.35rem;
}

.waituk_contact-form .form-control:focus {
  border-color: #0b179b;
  box-shadow: 0 0 0 0.2rem rgba(11, 23, 155, 0.2);
}

.waituk_contact-form .a11y-required {
  color: #0b179b;
}

@media (max-width: 575px) {
  .a11y-widget,
  #scroll-to-top.section-scroll,
  a#scroll-to-top {
    right: 12px !important;
  }

  .a11y-widget {
    bottom: 12px;
  }

  .a11y-widget.is-raised {
    bottom: calc(12px + 52px + 10px);
  }

  #scroll-to-top.section-scroll,
  a#scroll-to-top {
    bottom: 12px !important;
  }

  body.a11y-features-on .post-grid .a11y-post-badge {
    width: 38px;
    height: 38px;
  }

  body.a11y-features-on .post-grid .a11y-post-badge i {
    font-size: 1.1rem;
  }

  .a11y-post-badge__tip {
    width: 220px;
  }
}

/* News detail English / Arabic language switcher */
.news-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 1.25rem auto 0;
  border: 1px solid #0b179b;
  border-radius: 4px;
  overflow: hidden;
}

.news-lang-btn {
  border: none;
  background: #fff;
  color: #0b179b;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.news-lang-btn + .news-lang-btn {
  border-left: 1px solid #0b179b;
}

.news-lang-btn.is-active,
.news-lang-btn:hover,
.news-lang-btn:focus {
  background: #0b179b;
  color: #fff;
  outline: none;
}

.news-lang-btn:focus-visible {
  outline: 3px solid #ffd200;
  outline-offset: 2px;
  z-index: 1;
  position: relative;
}

/* Keep heading, author, and date centered in Arabic */
#news-article.is-rtl .blog-title,
#news-article.is-rtl .blog-title h1,
#news-article.is-rtl .blog-list-items {
  text-align: center !important;
  direction: ltr;
}

#news-article.is-rtl .blog-list-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

#news-article.is-rtl .blog-desc .news-body-lang {
  text-align: right;
  direction: rtl;
}

#news-article.is-rtl .blog-share .social-network {
  direction: rtl;
  text-align: right;
}

#news-article.is-rtl .news-lang-switcher {
  direction: ltr;
}
