

/* Header Styles */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background-color: transparent;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  transition: background-color 0.3s, color 0.3s;
}

#main-header.bg-white {
  background-color: white;
  color: #111827;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#main-header nav {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

#main-header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-section a {
  width: 12rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-section img {
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 0.3s;
}

.logo-section img:hover {
  opacity: 1;
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
  /* align-items: center; */
}

.desktop-nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 0.25rem;
}
.desktop-nav .arabic-vist-nav {
  padding-bottom: 2px;
  padding-top: 2px;
}
.desktop-nav .english-vist-nav {
  padding-bottom:0px ;
}
.desktop-nav a:hover {
  color: #e5e7eb;
}

#main-header.bg-white .desktop-nav a:hover {
  color: #4b5563;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0.125rem;
  background-color: #10b981;
  width: 0;
  transition: width 0.3s;
}

.desktop-nav a:hover::after {
  width: 100%;
}

/* Right Side Actions */
.right-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Selector */
.language-selector-wrapper {
  display: none;
}

#language-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background-color: white;
  border-radius: 0.375rem;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  gap: 0.75rem;
  color: #10b981;
  transition: background-color 0.3s, color 0.3s;
}

#language-selector:hover {
  color: white;
  background-color: #10b981;
}

#language-selector span {
  font-size: 0.875rem;
  font-weight: 600;
  margin: auto 0;
}

/* Become a Partner Button */
.partner-button {
    line-height: 1.6em;
  display: none;
  background-color: white;
  color: #10b981;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.partner-button:hover {
  color: white;
  background-color: #10b981;
}

/* Mobile Menu Button */
#mobile-menu-button {
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  border: none;
  background-color: transparent;
  color: inherit;
  transition: background-color 0.3s;
}

#mobile-menu-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#mobile-menu-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Menu */
#mobile-menu {
  background-color: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
}

#mobile-menu.hidden {
  display: none;
}

#mobile-menu.text-white {
  color: white !important;
}

.mobile-menu-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu-content > a {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.mobile-menu-content > a:hover {
  color: #e5e7eb;
}

.mobile-actions {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#mobile-language-selector {
  display: flex;
  align-items: center;
}

#mobile-language-selector span {
  font-size: 1.125rem;
  margin: auto 0;
}

#mobile-language-selector #language-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2.5rem;
  width: 2.5rem;
  cursor: pointer;
  background-color: #c5bbff;
  border-radius: 0.375rem;
  margin: 0 0.5rem;
  padding: 0.25rem;
}

.mobile-actions .partner-button {
  display: block;
  width: 100%;
  background-color: white;
  color: #1e3a8a;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mobile-actions .partner-button:hover {
  background-color: #f3f4f6;
}

#nav-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: -10;
}

/* Responsive Design */
@media (min-width: 640px) {
  #main-header nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .logo-section a {
    width: auto;
    height: auto;
  }
}

@media (min-width: 768px) {
  .language-selector-wrapper {
    display: flex;
  }

  .partner-button {
    display: block;
  }
}

@media (min-width: 1024px) {
  #main-header nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .desktop-nav {
    display: flex;
            align-items: center;

  }

  #mobile-menu-button {
    display: none;
  }

  #mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  #main-header nav {
    max-width: 1280px;
  }
}


/* Scrolled Header State */
#main-header.header-scrolled {
    background-color: #CCCCCC;
    color: #111827;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Desktop Navigation Link Colors for Scrolled State */
#main-header.header-scrolled .desktop-nav a:hover {
    color: #4b5563;
}

/* Mobile Menu Text White Override */
#mobile-menu.mobile-menu-white {
    color: white !important;
}

/* Additional helper classes if needed */
#main-header.header-transparent {
    background-color: transparent;
    color: white;
}

#main-header.header-scrolled #language-selector {
    color: #10b981;
    background-color: white;
}

#main-header.header-scrolled #language-selector:hover {
    color: white;
    background-color: #10b981;
}

#main-header.header-scrolled .partner-button {
    background-color: white;
    color: #10b981;
}

#main-header.header-scrolled .partner-button:hover {
    color: white;
    background-color: #10b981;
}

#main-header.header-scrolled #mobile-menu-button {
    color: #111827;
}

#main-header.header-scrolled #mobile-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Contrast controls in header */
#main-header .contrast-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#main-header.header-transparent .contrast-btn {
  background-color: rgba(255, 255, 255, 0.9);
  color: #10b981;
  border-color: #10b981;
}

#main-header.header-transparent .contrast-btn:hover:not(:disabled) {
  background-color: #10b981;
  color: white;
}

/* Accessibility Menu Styles */
.accessibility-menu-wrapper {
  position: relative;
}

.accessibility-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background-color: white;
  color: #10b981;
  border: 1px solid #10b981;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  min-width: 2.5rem;
  height: 2.5rem;
}

.accessibility-menu-btn:hover {
  background-color: #10b981;
  color: white;
}

.accessibility-menu-btn[aria-expanded="true"] {
  background-color: #10b981;
  color: white;
}

#main-header.header-transparent .accessibility-menu-btn {
  background-color: rgba(255, 255, 255, 0.9);
  color: #10b981;
  border-color: #10b981;
}

#main-header.header-transparent .accessibility-menu-btn:hover {
  background-color: #10b981;
  color: white;
}

#main-header.header-scrolled .accessibility-menu-btn {
  background-color: white;
  color: #10b981;
  border-color: #10b981;
}

#main-header.header-scrolled .accessibility-menu-btn:hover {
  background-color: #10b981;
  color: white;
}

.accessibility-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  left: auto;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 280px;
  width: min(360px, calc(100vw - 1.5rem));
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
}

html[dir="rtl"] .accessibility-menu-panel,
html[lang="ar"] .accessibility-menu-panel {
  right: auto;
  left: 0;
}

@media (max-width: 1023px) {
  .accessibility-menu-panel {
    width: calc(100vw - 2rem);
  }
}

.accessibility-menu-panel.hidden {
  display: none;
}

.accessibility-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.accessibility-menu-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.accessibility-menu-close {
  padding: 0.25rem;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
}

.accessibility-menu-close:hover {
  color: #111827;
  background-color: #f3f4f6;
}

.accessibility-menu-content {
  padding: 1rem;
}

.accessibility-menu-section {
  margin-bottom: 1.5rem;
}

.accessibility-menu-section:last-child {
  margin-bottom: 0;
}

.accessibility-menu-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.accessibility-menu-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.accessibility-control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background-color: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  min-width: 80px;
  flex: 1;
}

.accessibility-control-btn:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.accessibility-control-btn.active,
.accessibility-control-btn[aria-checked="true"] {
  background-color: #10b981;
  color: white;
  border-color: #10b981;
}

.accessibility-control-btn.active:hover,
.accessibility-control-btn[aria-checked="true"]:hover {
  background-color: #059669;
  border-color: #059669;
}

.accessibility-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.accessibility-control-btn span:first-child {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.accessibility-control-label {
  font-size: 0.75rem;
  font-weight: 500;
}

.text-size-btn span:first-child {
  font-size: 1.5rem;
}

.text-size-btn.active span:first-child,
.text-size-btn[aria-checked="true"] span:first-child {
  font-size: 1.8rem;
}

/* Visual indicator for different text size levels */
#text-size-default span:first-child {
  font-size: 1.2rem;
}

#text-size-large span:first-child {
  font-size: 1.4rem;
}

#text-size-extra-large span:first-child {
  font-size: 1.6rem;
}

.dark-mode-btn {
  width: 100%;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.dark-mode-btn svg {
  width: 20px;
  height: 20px;
}

.dark-mode-btn.active,
.dark-mode-btn[aria-checked="true"] {
  background-color: #10b981;
  color: white;
}

.screen-reader-mode-btn {
  width: 100%;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.screen-reader-mode-btn svg {
  width: 20px;
  height: 20px;
}

.screen-reader-mode-btn.active,
.screen-reader-mode-btn[aria-pressed="true"] {
  background-color: #10b981;
  color: white;
}

.contrast-btn.contrast-minus span:first-child,
.contrast-btn.contrast-plus span:first-child {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Mobile Accessibility Menu */
.accessibility-menu-mobile {
  width: 100%;
  margin-top: 0.75rem;
}

/* Mobile panel positioning */
@media (max-width: 767px) {
  .accessibility-menu-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    border-radius: 1rem 1rem 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 1001; /* Above header */
  }
  
  /* Make accessibility button smaller on mobile to fit in header */
  .accessibility-menu-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0.375rem;
  }
  
  .accessibility-menu-btn svg {
    width: 18px;
    height: 18px;
  }
}

.accessibility-menu-btn-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: white;
  color: #10b981;
  border: 1px solid #10b981;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.accessibility-menu-btn-mobile:hover {
  background-color: #10b981;
  color: white;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Keep accessibility menu visible on both mobile and desktop */
/* The button in header works on all screen sizes */

/* Hide mobile menu accessibility button (we use the header button instead) */
@media (min-width: 768px) {
  .accessibility-menu-mobile {
    display: none;
  }
}