/* Mobile-first responsive design utilities */
/* This file provides additional mobile optimization for all pages */

/* Global mobile improvements */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    overflow-x: hidden;
  }

  /* Ensure all text is readable on mobile */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Improve touch targets */
  button,
  a,
  input[type="button"],
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
  }

  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 10px 12px;
  }

  /* Reduce spacing on mobile */
  h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
  }

  p {
    line-height: 1.6;
    margin-bottom: 10px;
  }

  /* Images responsive */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Tables responsive */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
  }

  table td,
  table th {
    padding: 8px 6px;
  }

  /* Forms improvements */
  form {
    width: 100%;
  }

  label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
  }

  input,
  textarea,
  select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
  }

  /* Videos responsive */
  iframe,
  video {
    max-width: 100%;
    height: auto;
  }

  /* Lists responsive */
  ul,
  ol {
    padding-left: 20px;
    margin-bottom: 12px;
  }

  li {
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  h1 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  p {
    line-height: 1.5;
    margin-bottom: 8px;
  }

  /* Ensure visible focus for keyboard navigation */
  :focus-visible {
    outline: 2px solid #063970;
    outline-offset: 2px;
  }

  /* Reduce excessive padding on very small screens */
  body {
    padding: 0;
    margin: 0;
  }

  button,
  a,
  input[type="button"],
  input[type="submit"] {
    min-height: 40px;
    padding: 10px 14px;
  }

  input,
  textarea,
  select {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
  }

  table td,
  table th {
    padding: 6px 4px;
    font-size: 0.85rem;
  }

  ul,
  ol {
    padding-left: 16px;
    margin-bottom: 10px;
  }

  li {
    margin-bottom: 4px;
  }

  /* Prevent horizontal scroll */
  body,
  html {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Print styles for mobile */
@media print {
  body {
    background: white;
  }

  .hamburger,
  .search-container,
  .topbar {
    display: none;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  h1,
  h2 {
    margin-bottom: 6px;
  }

  p {
    margin-bottom: 6px;
  }

  button,
  a,
  input {
    min-height: 40px;
  }
}
