/**
 * Responsive CSS File
 * Contains all media queries for responsive design
 */

/* ============================================
   Small Devices (phones, 576px and up)
   ============================================ */

@media (min-width: 576px) {
  /* Hero Section */
  .hero-title {
    font-size: 3rem;
  }

  /* Contact Form */
  .contact-container {
    padding: 4rem 5rem;
  }
}

/* ============================================
   Medium Devices (tablets, 768px and up)
   ============================================ */

@media (min-width: 768px) {
  /* Navigation */
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }

  /* Logo */
  .nav-logo img {
    height: 2.5rem;
    max-width: 10rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 3.125rem;
  }

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

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

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

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

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

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

  .footer-brand {
    grid-column: span 2;
  }

  /* Section Header */
  .section-divider {
    display: block;
  }
}

/* ============================================
   Large Devices (desktops, 992px and up)
   ============================================ */

@media (min-width: 992px) {
  /* Typography */
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 3.75rem;
  }

  /* Materials Grid */
  .materials-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Contact Container */
  .contact-container {
    padding: 5rem 6rem;
  }
}

/* ============================================
   Extra Large Devices (large desktops, 1200px and up)
   ============================================ */

@media (min-width: 1200px) {
  /* Hero Section */
  .hero-title {
    font-size: 4rem;
  }

  /* Section */
  .section {
    padding: 8rem 2rem;
  }
}

/* ============================================
   Extra Extra Large Devices (1400px and up)
   ============================================ */

@media (min-width: 1400px) {
  /* Hero Section */
  .hero-title {
    font-size: 4.5rem;
  }
}

/* ============================================
   Mobile Specific Adjustments
   ============================================ */

@media (max-width: 767px) {
  /* Navigation */
  .nav-menu {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Logo */
  .nav-logo img {
    height: 2rem;
    max-width: 8rem;
  }

  /* Hero Section */
  .hero {
    height: 75vh;
  }

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

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

  /* Section */
  .section {
    padding: 4rem 1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-divider {
    display: none;
  }

  /* Portfolio */
  .portfolio-card {
    height: 25rem;
  }

  /* Materials */
  .materials-grid {
    grid-template-columns: 1fr;
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    padding: 2rem;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Contact Form */
  .contact-container {
    padding: 2rem 1.5rem;
  }

  .contact-label {
    left: 1rem;
    font-size: 0.5rem;
    padding: 0 1rem;
  }

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

  .form-group {
    margin-bottom: 2rem;
  }

  .btn {
    width: 100%;
  }

  /* Footer */
  .footer {
    padding: 3rem 1rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
    margin-bottom: 2rem;
  }

  .footer-brand {
    grid-column: span 1;
  }

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

  .footer-bottom-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ============================================
   Small Mobile Devices (375px and down)
   ============================================ */

@media (max-width: 374px) {
  /* Hero Section */
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
  }

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

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  /* Buttons */
  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.625rem;
  }

  /* Cards */
  .material-card,
  .pricing-card {
    padding: 1.5rem;
  }

  /* Contact Form */
  .contact-container {
    padding: 1.5rem 1rem;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  /* Hide non-essential elements */
  .nav,
  .mobile-nav,
  .theme-toggle,
  .footer-bottom,
  .btn {
    display: none !important;
  }

  /* Adjust colors for print */
  body {
    background-color: white !important;
    color: black !important;
  }

  .section {
    page-break-inside: avoid;
  }

  /* Ensure text is readable */
  * {
    color: black !important;
    background-color: white !important;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

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

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --border-light: #000000;
    --border-medium: #000000;
    --shadow-sm: rgba(0, 0, 0, 0.5);
    --shadow-md: rgba(0, 0, 0, 0.7);
    --shadow-lg: rgba(0, 0, 0, 0.9);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .nav-link:hover,
  .mobile-link:hover {
    text-decoration: underline;
  }
}

/* ============================================
   Landscape Orientation (Mobile)
   ============================================ */

@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    height: 100vh;
    min-height: 400px;
  }

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

  .section {
    padding: 3rem 1rem;
  }

  .portfolio-card {
    height: 20rem;
  }
}

/* ============================================
   Portrait Orientation (Tablet)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .materials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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