/* Responsive Styles */

/* Prevent horizontal overflow on mobile */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  
  .main,
  .main__content {
    overflow-x: hidden;
  }
}

/* Mobile responsive - up to 768px */
@media (max-width: 768px) {
  /* Typography - Make headers smaller on mobile */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  h5 {
    font-size: 1rem;
  }

  h6 {
    font-size: 0.875rem;
  }

  /* Page headers */
  .page-header__title {
    font-size: 2rem;
  }

  .page-header__lead {
    font-size: 1rem;
  }

  /* Header */
  .header-content {
    flex-wrap: nowrap;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .logo-image {
    width: 300px;
    max-width: 80%;
  }

  .header-search {
    order: 3;
    width: 100%;
    margin-top: var(--spacing-md);
  }

  .search-form {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .search-input {
    min-width: auto;
    width: 100%;
  }

  /* Grid utilities */
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  /* Container */
  .container {
    padding: 0 var(--spacing-sm);
  }

  /* Companies */
  .companies-grid {
    grid-template-columns: 1fr;
  }
  
  .search-bar {
    flex-direction: column;
  }
  
  .filter-options {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .company-header__main {
    flex-direction: column;
    text-align: center;
  }
  
  .company-map {
    height: 300px;
  }

  .company-info-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Admin */
  .admin-nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .admin-nav__brand {
    margin-right: 0;
    text-align: center;
  }
  
  .admin-nav__menu {
    justify-content: center;
  }
  
  .admin-nav__user {
    justify-content: center;
  }
  
  .admin-main {
    padding: var(--spacing-md);
  }
  
  .admin-login__container {
    padding: var(--spacing-md);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
  
  .activity-section {
    grid-template-columns: 1fr;
  }

  /* Search bar - column layout on mobile */
  .search-bar--column {
    flex-direction: column;
  }

  .filter-options--column {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .company-header-main {
    flex-direction: column;
    text-align: center;
  }
}

/* Small mobile responsive - up to 640px */
@media (max-width: 640px) {
  /* Typography - Even smaller headers on small mobile */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .page-header__title {
    font-size: 1.75rem;
  }

  .page-header__lead {
    font-size: 0.9rem;
  }

  .header-content {
    padding: var(--spacing-sm) 0;
  }

  .logo-image {
    width: 260px;
    max-width: 75%;
  }
}

/* Tablet responsive - 768px to 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
