/* ================================
   ReDevelopment Digital - Responsive Styles
   ================================ */

/* Tablet Styles (1024px and below) */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Mobile Styles (768px and below) */
@media (max-width: 768px) {
  /* Navigation */
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(25px);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-link {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-primary);
    width: 100%;
    color: var(--text-secondary);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .nav-link:hover {
    color: var(--primary-light);
    background: var(--bg-tertiary);
    padding-left: var(--space-sm);
  }
  
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  /* Layout */
  .section {
    padding: var(--space-xl) 0;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .flex {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .flex-between {
    flex-direction: row;
  }
  
  /* Buttons */
  .btn {
    width: 100%;
    text-align: center;
  }
  
  .btn-group {
    flex-direction: column;
    gap: var(--space-md);
    max-width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
    min-width: auto;
  }
  
  /* Cards */
  .card {
    padding: var(--space-md);
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  /* Forms */
  .form-row {
    flex-direction: column;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Logo adjustments for mobile */
  .logo {
    font-size: 1.3rem;
  }
  
  .logo-image {
    width: 28px;
    height: 28px;
  }
  
  /* Projects responsive styles */
  .project-images {
    height: 300px;
  }
  
  .project-details {
    padding: var(--space-md);
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .carousel-prev {
    left: 10px;
  }
  
  .carousel-next {
    right: 10px;
  }
  
  .tech-stack-container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .tech-stack {
    justify-content: center;
  }
}

/* Small Mobile Styles (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .hero {
    padding: var(--space-lg) 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
  
  .card {
    padding: var(--space-sm);
  }
  
  .btn {
    padding: var(--space-sm) var(--space-md);
  }
  
  .btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
  }
  
  /* Projects responsive styles */
  .project-images {
    height: 250px;
  }
  
  .project-tags {
    justify-content: center;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Touch-friendly adjustments */
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: var(--space-sm) var(--space-lg);
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px;
    font-size: 16px;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .nav-toggle,
  .btn {
    display: none;
  }
  
  .section {
    padding: var(--space-sm) 0;
  }
  
  .card {
    border: 1px solid var(--gray-300);
    box-shadow: none;
  }
  
  a {
    color: var(--gray-800);
    text-decoration: underline;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-blue: #0000ff;
    --primary-dark: #000080;
    --gray-600: #000000;
    --gray-700: #000000;
    --gray-800: #000000;
    --gray-900: #000000;
  }
  
  .card {
    border: 2px solid var(--gray-800);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}
