/* ==========================================================================
   Responsive and Mobile Accessibility Stylesheet
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 1.25rem;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1.05rem;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .tool-page-title {
    font-size: 1.75rem;
  }

  .tool-io-grid {
    grid-template-columns: 1fr;
  }

  .author-card-box {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .author-avatar {
    margin: 0 auto;
  }

  .author-links {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    width: 100%;
    justify-content: center;
  }

  .toolbar-group {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .category-pills {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .site-header, .site-footer, .tool-toolbar, .ad-slot-container, .toast-container, .header-actions {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .container, .container-narrow {
    max-width: 100%;
    padding: 0;
  }
}
