/* Mobile responsiveness improvements */

/* Improve header layout on small screens */
@media (max-width: 768px) {
  .md-header {
    padding: 0.5rem 1rem;
  }
  
  .md-header__title {
    flex-wrap: wrap;
  }
  
  .md-header__topic {
    margin-bottom: 0.5rem;
  }
}

/* Improve navigation on small screens */
@media (max-width: 768px) {
  .md-nav__title {
    padding: 0.5rem 1rem;
    font-weight: 600;
  }
  
  .md-nav__list {
    padding: 0;
  }
  
  .md-nav__item {
    margin: 0;
  }
  
  .md-nav__link {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0,0,0,0.12);
  }
  
  .md-nav__item--active > .md-nav__link {
    font-weight: 600;
  }
}

/* Improve content readability on small screens */
@media (max-width: 768px) {
  .md-main__inner {
    margin: 0;
    padding: 1rem;
  }
  
  .md-typeset h1,
  .md-typeset h2,
  .md-typeset h3,
  .md-typeset h4,
  .md-typeset h5,
  .md-typeset h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .md-typeset p,
  .md-typeset li {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .md-typeset pre {
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
  }
  
  .md-typeset code {
    font-size: 0.9rem;
  }
  
  .md-typeset table {
    display: block;
    overflow-x: auto;
    margin: 1rem 0;
  }
  
  .md-typeset th,
  .md-typeset td {
    padding: 0.5rem;
    min-width: 80px;
  }
}

/* Improve tabs on small screens */
@media (max-width: 768px) {
  .md-tabs {
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .md-tabs__list {
    display: inline-flex;
  }
  
  .md-tabs__item {
    flex-shrink: 0;
  }
  
  .md-tabs__link {
    padding: 0.5rem 1rem;
    min-width: auto;
    white-space: nowrap;
  }
}

/* Improve search on small screens */
@media (max-width: 768px) {
  .md-search__input {
    font-size: 1rem;
    padding: 0.75rem;
  }
}