/* Secondary Header Styles */
.secondary-header {
    right: 0;
    z-index: 50;
    background-color: #EDEDED;
    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;
    position: sticky;   /* or: position: -webkit-sticky; for very old Safari */
    top: 0;
}

.secondary-header nav {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

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

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

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

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

/* Desktop Navigation */
.secondary-header .sec-header-menu {
    display: none;
    align-items: center;
    gap: 2rem;
    color: #000000;
}

.secondary-header .sec-header-menu a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s;
}

.secondary-header .sec-header-menu a:hover {
    color: #32D2A0;
}

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

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

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

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

.secondary-header #language-selector span {
    font-size: 1rem;
    font-weight: 600;
    margin: auto 0;
}

/* Become a Partner Button */
.secondary-header .partner-button {
    line-height: 1.6em;
    display: none;
    background-color: #785FDC;
    color: white;
    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;
}

.secondary-header .partner-button:hover {
    color: #000000;
    background-color: #f3f4f6;
}

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

.secondary-header #mobile-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

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

/* Mobile Menu */
.secondary-header #mobile-menu {
    background-color: #EDEDED;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.secondary-header #mobile-menu.hidden {
    display: none;
}
.sec-header-menu ul li a {
  transition: color 0.2s ease-in-out;
}
/* Secondary Header Hover Effects Starts */
.sec-header-menu ul li a:hover {
  color: #00c896 !important;
}

.secondary-header .mobile-menu-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #000000;
}

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

.secondary-header .mobile-menu-content > a:hover {
    color: #32D2A0;
}

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

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

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

.secondary-header #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;
}

.secondary-header .mobile-actions .partner-button {
    display: block;
    width: 100%;
    background-color: #785FDC;
    color: white;
    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, color 0.3s;
    text-decoration: none;
}

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

/* Mobile About Dropdown Arrow Rotation */
.secondary-header #mobile-about-arrow {
    transition: transform 0.3s;
}

.secondary-header #mobile-about-arrow.rotate-180 {
    transform: rotate(180deg);
}

.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;
}

.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;
}

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

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-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;
  }
  
  /* 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;
}

/* Responsive Design */
@media (min-width: 768px) {
    .secondary-header .language-selector-wrapper {
        display: flex;
    }

    .secondary-header .partner-button {
        display: block;
    }
}

@media (min-width: 1024px) {
    .secondary-header nav {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .secondary-header .sec-header-menu {
        display: flex;
    }

    .secondary-header #mobile-menu-button {
        display: none;
    }

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

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