/* ================================================================
   RESPONSIVE DESIGN - Mobile First
   Breakpoints: Tablet (768px), Desktop (1024px)
   ================================================================ */

/* ================================================================
   MOBILE (320px - 767px) - DEFAULT STYLES
   ================================================================ */

/* Hamburger Menu */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
  }

  /* Header responsive */
  .header-main {
    padding: 0.5rem 1rem;
  }

  .logo img {
    height: 50px;
  }

  .logo {
    gap: 8px;
    font-size: 1.125rem;
  }

  /* Hero section */
  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-features {
    flex-direction: column;
    gap: 1rem;
  }

  /* Contact banner */
  .contact-banner-content {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-banner-link {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  /* Sections */
  section {
    padding: 2rem 1rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  /* Grid layouts */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .vendor-grid {
    grid-template-columns: 1fr;
  }

  /* Quote form */
  .quote-form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Typography adjustments */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    width: 100%;
  }

  .btn-large {
    padding: 14px 28px;
  }

  /* Service cards */
  .service-card {
    padding: 1.5rem 1rem;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.75rem;
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section ul {
    padding: 0;
  }

  /* Tables */
  .pricing-table {
    font-size: 0.9rem;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ================================================================
   TABLET (768px - 1023px)
   ================================================================ */

@media (min-width: 768px) {
  /* Navigation */
  nav {
    position: static !important;
    display: flex !important;
    flex-direction: row;
    gap: 2rem;
    background: transparent;
    box-shadow: none;
  }

  nav a {
    padding: 0 !important;
    border-bottom: none;
  }

  /* Typography */
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Grid layouts */
  .grid,
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Quote form */
  .quote-form {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Forms */
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Buttons */
  .btn {
    width: auto;
  }

  /* Service cards */
  .service-card {
    padding: 2rem;
  }

  /* Hero section */
  .hero {
    padding: 3rem 2rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   DESKTOP (1024px and above)
   ================================================================ */

@media (min-width: 1024px) {
  /* Navigation */
  .hamburger {
    display: none;
  }

  nav {
    position: static !important;
    display: flex !important;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  /* Grid layouts */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Quote form */
  .quote-form {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    align-items: flex-end;
  }

  .quote-form-group:last-child {
    padding-top: 20px;
  }

  /* Forms */
  .form-row {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Sections */
  section {
    padding: 4rem 2rem;
  }
}

/* ================================================================
   EXTRA LARGE (1400px and above)
   ================================================================ */

@media (min-width: 1400px) {
  .container,
  .section-container,
  .header-main,
  .hero-content,
  .footer-content {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
  header,
  footer,
  .emergency-banner,
  .btn,
  .navigation {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* ================================================================
   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 (if user preference)
   ================================================================ */

@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles if needed */
  /* Currently not implemented - can be added later */
}

/* ================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  a {
    min-height: 44px;
    display: inline-block;
  }

  .service-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .service-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

/* ================================================================
   HIGH CONTRAST MODE
   ================================================================ */

@media (prefers-contrast: more) {
  :root {
    --primary-copper: #2B5CB8;
    --secondary-black: #000;
  }

  body {
    color: #000;
  }

  .btn-primary {
    border: 2px solid #000;
  }
}

/* ================================================================
   LANDSCAPE MODE (Mobile)
   ================================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 2rem 1rem;
    min-height: auto;
  }

  header {
    position: relative;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  section {
    padding: 1.5rem 1rem;
  }
}
