/* ===================================
   Responsive Design Styles
   =================================== */

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

@media (max-width: 1023px) {
  /* Typography adjustments */
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.875rem;
  }
  
  h3 {
    font-size: 1.375rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  /* Container adjustments */
  .container,
  .container-wide {
    padding: 0 1.5rem;
  }
  
  /* Section spacing */
  .section {
    padding: 3rem 0;
  }
  
  /* Grid adjustments */
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================
   Mobile (max-width: 767px)
   =================================== */

@media (max-width: 767px) {
  /* Typography */
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.625rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  h4 {
    font-size: 1.125rem;
  }
  
  /* Hero section */
  .hero {
    min-height: 400px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  /* Header & Navigation */
  .header-container {
    padding: 1rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    display: block;
    border-bottom: 1px solid #EEE;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Cards */
  .card {
    padding: 1.5rem;
  }
  
  /* Grid layouts */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .service-image {
    height: 200px;
  }
  
  /* Contact */
  .map-container {
    height: 300px;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  /* Section spacing */
  .section {
    padding: 2rem 0;
  }
  
  /* Container */
  .container,
  .container-wide {
    padding: 0 1rem;
  }
  
  /* Legal content */
  .legal-content {
    padding: 2rem 1rem;
  }
}

/* ===================================
   Small Mobile (max-width: 480px)
   =================================== */

@media (max-width: 480px) {
  /* Typography */
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Hero */
  .hero {
    min-height: 350px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  /* Logo */
  .logo {
    font-size: 1.25rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  /* Cards */
  .card {
    padding: 1rem;
  }
  
  .card-image {
    height: 180px;
  }
  
  /* Service cards */
  .service-image {
    height: 180px;
  }
  
  .service-content {
    padding: 1rem;
  }
  
  /* Contact */
  .contact-info {
    padding: 1rem;
  }
  
  .map-container {
    height: 250px;
  }
  
  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.625rem;
    font-size: 0.95rem;
  }
  
  /* Footer */
  .footer-section h3 {
    font-size: 1.125rem;
  }
  
  /* Spacing utilities */
  :root {
    --spacing-xs: 0.375rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
  }
}

/* ===================================
   Large Desktop (min-width: 1400px)
   =================================== */

@media (min-width: 1400px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero p {
    font-size: 1.375rem;
  }
  
  .container {
    max-width: 1300px;
  }
  
  .container-wide {
    max-width: 1500px;
  }
}

/* ===================================
   Landscape Mobile
   =================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 300px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* ===================================
   Touch Device Optimizations
   =================================== */

@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .card:hover {
    transform: none;
  }
  
  .service-card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* ===================================
   Print Optimizations
   =================================== */

@media print {
  /* Hide interactive elements */
  .header,
  .footer,
  .cookie-banner,
  .cookie-modal,
  .btn,
  .menu-toggle,
  .nav-menu {
    display: none !important;
  }
  
  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .container,
  .container-wide {
    max-width: 100%;
    padding: 0;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  .card,
  .service-card {
    page-break-inside: avoid;
  }
  
  /* Links */
  a {
    color: #000;
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
  
  /* Images */
  img {
    max-width: 100% !important;
  }
}

/* ===================================
   Accessibility - Reduced Motion
   =================================== */

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

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

@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
  
  .card,
  .service-card {
    border: 2px solid currentColor;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    border: 2px solid currentColor;
  }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */

@media (prefers-color-scheme: dark) {
  /* This is optional - uncomment if dark mode is desired
  
  :root {
    --white: #1A1A1A;
    --light-gray: #2A2A2A;
    --dark-gray: #E0E0E0;
  }
  
  body {
    background-color: #1A1A1A;
    color: #E0E0E0;
  }
  
  .header {
    background-color: #2A2A2A;
  }
  
  .card,
  .service-card {
    background-color: #2A2A2A;
  }
  
  */
}
