/* Titan Fire Door Website - Responsive CSS */

/* Tablet Breakpoint (768px and below) */
@media (max-width: 768px) {
  /* Typography Adjustments */
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  /* Container Adjustments */
  .container {
    padding: 0 1.5rem;
  }
  
  /* Section Padding */
  .section {
    padding: var(--section-padding-mobile);
  }
  
  /* Grid Adjustments */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Navigation */
  .nav-list {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Header Logo */
  .logo {
    height: 40px;
  }
  
  /* Hero Section */
  .hero-content {
    padding: 1.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  /* Cards */
  .overview-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  /* Forms */
  .form-input,
  .form-textarea {
    padding: 10px;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  .btn-large {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* Mobile Breakpoint (480px and below) */
@media (max-width: 480px) {
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  /* Container */
  .container {
    padding: 0 1rem;
  }
  
  /* Section Padding */
  .section {
    padding: 50px 0;
  }
  
  /* Grid System */
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  /* Header */
  .header {
    padding: 0.75rem 0;
  }
  
  .logo {
    height: 35px;
  }
  
  /* Hero */
  .hero-content {
    padding: 1rem;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Cards */
  .overview-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card {
    padding: 1.2rem;
  }
  
  .card-icon {
    font-size: 2.5rem;
  }
  
  /* Product Cards */
  .product-card-content {
    padding: 1rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 280px;
  }
  
  .btn-large {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  /* Mobile Navigation Improvements */
  .mobile-nav-list {
    padding: 1rem;
  }
  
  .mobile-nav-list a {
    font-size: 1.1rem;
    padding: 0.8rem 0;
  }
}

/* Large Desktop Breakpoint (1200px and above) */
@media (min-width: 1200px) {
  /* Container */
  .container {
    padding: 0 2.5rem;
  }
  
  /* Typography */
  .hero h1 {
    font-size: 4.5rem;
  }
  
  /* Section Spacing */
  .section {
    padding: 100px 0;
  }
  
  /* Cards */
  .card {
    padding: 2.5rem;
  }
}

/* Very Large Desktop (1600px and above) */
@media (min-width: 1600px) {
  :root {
    --container-max-width: 1400px;
  }
  
  .hero h1 {
    font-size: 5rem;
  }
  
  .section {
    padding: 120px 0;
  }
}

/* Print Styles */
@media print {
  .header,
  .mobile-nav,
  .mobile-menu-toggle,
  .btn,
  .footer {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #000;
    page-break-after: avoid;
  }
  
  p, li {
    orphans: 2;
    widows: 2;
  }
  
  .section {
    padding: 20px 0;
  }
  
  .hero {
    min-height: auto;
    padding: 40px 0;
    background: #f5f5f5 !important;
    color: #000 !important;
  }
  
  .hero h1,
  .hero p {
    color: #000 !important;
  }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure images remain crisp on high-DPI displays */
  .logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .fade-in-up {
    animation: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .product-card:hover {
    transform: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Only apply if user prefers dark mode and no explicit theme is set */
  :root:not([data-theme]) {
    --primary-white: #1a1a1a;
    --primary-black: #ffffff;
    --secondary-gray: #e0e0e0;
    --light-gray: #2a2a2a;
    --border-gray: #404040;
  }
  
  :root:not([data-theme]) body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  :root:not([data-theme]) .card {
    background-color: #2a2a2a;
    color: #e0e0e0;
  }
  
  :root:not([data-theme]) .product-card {
    background-color: #2a2a2a;
    color: #e0e0e0;
  }
}

/* Focus Styles for Better Accessibility */
.btn:focus,
.nav-link:focus,
.form-input:focus,
.form-textarea:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-orange);
  color: white;
  padding: 8px;
  z-index: 100;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  .section {
    padding: 40px 0;
  }
}

/* Hover Effects Only on Non-Touch Devices */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
  }
  
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
  }
}

/* Touch Device Optimizations */
@media (hover: none) {
  .btn,
  .nav-link,
  .card {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  .btn {
    min-height: 44px; /* iOS recommendation for touch targets */
  }
  
  .nav-link {
    padding: 10px 5px;
  }
}
