/* Responsive Design System */

/* Tablet - Large (1024px and below) */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet - Medium (768px and below) */
@media (max-width: 768px) {
  /* Hide desktop navigation */
  .desktop-nav {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Adjust header controls */
  .header-controls {
    gap: var(--space-sm);
  }
  
  /* Hero adjustments */
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Section adjustments */
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Grid adjustments */
  .models-grid,
  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  /* Show mobile navigation */
  .mobile-nav {
    display: flex;
  }
  
  /* Adjust main content for mobile nav */
  .main {
    margin-bottom: 60px;
  }
}

/* Mobile - Large (640px and below) */
@media (max-width: 640px) {
  /* Typography adjustments */
  html {
    font-size: 15px;
  }
  
  /* Container padding */
  .container {
    padding: 0 var(--space-md);
  }
  
  /* Header adjustments */
  .header-content {
    height: 56px;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
  
  /* Language toggle - stack vertically on very small screens */
  .lang-toggle {
    font-size: 0.8125rem;
    padding: var(--space-xs) var(--space-sm);
  }
  
  /* Search overlay */
  .search-input {
    font-size: 1rem;
    padding: var(--space-md) var(--space-lg);
  }
  
  /* Hero visual - hide on mobile */
  .hero-visual {
    display: none;
  }
  
  /* Card adjustments */
  .card {
    padding: var(--space-md);
  }
  
  /* Footer adjustments */
  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* Mobile - Small (480px and below) */
@media (max-width: 480px) {
  /* Hero adjustments */
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  /* Section title */
  .section-title {
    font-size: 1.5rem;
  }
  
  /* All grids to single column */
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  /* Button adjustments */
  .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
  }
}

/* Mobile - Extra Small (360px and below) */
@media (max-width: 360px) {
  /* Hide search toggle on very small screens */
  .search-toggle {
    display: none;
  }
  
  /* Smaller language toggle */
  .lang-separator {
    display: none;
  }
  
  .lang-toggle {
    padding: var(--space-xs);
  }
  
  .lang-current,
  .lang-switch {
    font-size: 0.75rem;
  }
}

/* Hover effects only on desktop */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
  }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Sharper borders */
  .header,
  .card,
  .btn-secondary {
    border-width: 0.5px;
  }
}

/* Print styles */
@media print {
  /* Hide navigation and controls */
  .header,
  .mobile-nav,
  .search-overlay {
    display: none;
  }
  
  /* Reset main margin */
  .main {
    margin-top: 0;
    margin-bottom: 0;
  }
  
  /* Show all content */
  .hero-visual {
    display: none;
  }
  
  /* Better print layout */
  .models-grid,
  .tools-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  /* Remove shadows and transitions */
  * {
    box-shadow: none !important;
    transition: none !important;
  }
  
  /* Print-friendly colors */
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
  .header-content {
    height: 48px;
  }
  
  .hero {
    padding: var(--space-lg) 0;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
}

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

/* Dark mode adjustments for mobile */
@media (max-width: 768px) {
  [data-theme="dark"] .mobile-nav {
    background: var(--bg-secondary);
  }
  
  [data-theme="dark"] .card {
    border-color: var(--border-color);
  }
}