/* aca-explorer-mobile.css */
@media (max-width: 767px) {
  /* Mobile navbar adjustments */
  .nav-content {
    display: grid;
    grid-template-areas:
      "title title"
      "controls lang";
    grid-template-columns: 1fr auto;
    gap: 0.25rem;
    align-items: center;
    justify-items: center;
    padding: 0.25rem;
    width: 100%;
  }

@media (max-width:767px){ .content-section, .section-title{scroll-margin-top:80px;} }

  /* Style nav-actions for mobile */
  .nav-actions {
    grid-area: lang;
    justify-self: end;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .nav-title {
    grid-area: title;
    text-align: center;
    font-size: 1.1rem;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
    direction: ltr;
  }

    /* Make buttons smaller on mobile */
    .home-button, .language-switch {
      padding: 6px 10px;
      font-size: 14px;
    }
/* Remove the existing language-switch styles since it's now in nav-actions */
.language-switch {
  grid-area: unset;
  justify-self: unset;
  margin-right: unset;
}

  .nav-controls {
    grid-area: controls;
    justify-self: start;
    margin-left: 0.5rem;
    max-width: 200px;
  }

  .nav-wrapper {
    padding: 0.25rem;
  }

  .nav-current {
    padding: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    text-align: left;
    direction: ltr;
    padding-right: 20px;
    display: block; /* Add this */
    text-indent: 0; /* Add this */
    margin-left: 0; /* Add this */
}
.nav-item.current a {
  display: block;
  text-align: left;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
  .nav-menu {
    width: 250px;
    left: -0.5rem;
  }

  .nav-item {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Add this */
  }
  .container {
    padding-top: 70px;
  }

  /* Mobile menu button */
  .menu-button {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .menu-button:hover {
    transform: scale(1.05);
  }

  .hamburger {
    width: 24px;
    height: 20px;
    position: relative;
  }

  .hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
  }

  .hamburger span:nth-child(1) {
    top: 0px;
  }

  .hamburger span:nth-child(2),
  .hamburger span:nth-child(3) {
    top: 8px;
  }

  .hamburger span:nth-child(4) {
    top: 16px;
  }

  .menu-open .hamburger span:nth-child(1),
  .menu-open .hamburger span:nth-child(4) {
    opacity: 0;
  }

  .menu-open .hamburger span:nth-child(2) {
    transform: rotate(45deg);
  }

  .menu-open .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
  }

  /* Mobile menu */
.mobile-menu {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 10px 0;
  z-index: 999;
  min-width: 200px;
  max-width: calc(100% - 40px);
  max-height: 50vh;
  overflow-y: auto;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  /* Add display: none when not active to fully hide it */
  display: none;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  /* Show the menu when active */
  display: block;
}

.mobile-menu-list {
  list-style: none !important; /* Force no bullets */
  margin: 0;
  padding: 0;
}

.mobile-menu-list li {
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Add these properties to ensure no bullets/markers */
  list-style-type: none !important;
  list-style-position: inside !important;
  display: block !important;
}

.mobile-menu-list li:hover {
  background: #f5f5f5;
}

.mobile-menu-list li.active {
  background: var(--primary);
  color: white;
}

  /* Progress indicator */
  .progress-indicator {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
  }

  .progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 0.3s ease;
  }

  /* Markdown content styles */
  blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid var(--primary);
    background-color: rgba(37, 99, 235, 0.1);
    font-style: italic;
  }

  code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
  }

  /* Handle nested lists */
  ul ul {
    margin-left: 1.5rem;
  }

  /* Style links in content */
  .content-section a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }

  .content-section a:hover {
    border-bottom-color: var(--primary);
  }
}


@media (max-width: 767px) {
  /* Improved spacing for section titles to prevent them from being hidden behind navbar */
  .section-title {
    padding-top: 1rem !important;
    margin-top: 1.0rem !important;
    scroll-margin-top: 120px !important;
  }
  
  /* Ensure content sections have proper spacing too */
  .content-section {
    scroll-margin-top: 120px !important;
  }
  
  /* Add more padding to main container to push content down */
  .main-content {
    padding-top: 4rem !important;
  }
  
  /* Ensure container has enough space from top */
  .container {
    padding-top: 80px !important;
  }
  
  /* Increase navbar height on mobile */
  .nav-container {
    min-height: 70px !important;
  }
  
  /* Make sure h3 titles in content sections are visible */
  .content-section h3 {
    margin-top: 1.5rem !important;
    padding-top: 0.5rem !important;
  }
  
  /* Fix for benefits page grid on mobile */
  .benefits-grid {
    padding-top: 2rem;
  }
}

