/* ===================================
   Responsive Design - Media Queries
   =================================== */

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1400px;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .section-title h2 {
    font-size: 3rem;
  }
}

/* Desktop (1024px to 1439px) */
@media (max-width: 1439px) {
  :root {
    --container-max: 1200px;
  }
}

/* Tablet (768px to 1023px) */
@media (max-width: 1023px) {
  :root {
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3rem;
  }
  
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.375rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  /* Hero */
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  /* Page Header */
  .page-header h1 {
    font-size: 2rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Grid */
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile and Tablet (max-width: 767px) */
@media (max-width: 767px) {
  :root {
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --container-padding: 1rem;
  }
  
  /* Typography */
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .section-title p {
    font-size: 1rem;
  }
  
  /* Header */
  .header-container {
    padding: var(--spacing-sm);
  }
  
  .logo-main {
    font-size: 1.125rem;
  }
  
  .logo-sub {
    font-size: 0.6875rem;
  }
  
  /* Navigation - Mobile Menu */
  .menu-toggle {
    display: flex;
  }
  
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 80px var(--spacing-lg) var(--spacing-lg);
    transition: right var(--transition-base);
    overflow-y: auto;
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-link {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-link::after {
    display: none;
  }
  
  /* Mobile Menu Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .nav-overlay.active {
    display: block;
  }
  
  /* Hero */
  .hero {
    padding: var(--spacing-xl) 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  /* Page Header */
  .page-header {
    padding: var(--spacing-lg) 0;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Cards */
  .card-image {
    height: 200px;
  }
  
  .card-content {
    padding: var(--spacing-md);
  }
  
  /* Grid */
  .grid {
    gap: var(--spacing-md);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-legal-links {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
  }
  
  .footer-legal-links li::after {
    display: none;
  }
  
  /* Cookie Consent */
  .cookie-consent {
    padding: var(--spacing-md);
  }
  
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-consent-text {
    min-width: auto;
  }
  
  .cookie-consent-actions {
    flex-direction: column;
  }
  
  .cookie-consent-actions .btn {
    width: 100%;
  }
  
  /* Cookie Modal */
  .cookie-modal {
    padding: var(--spacing-sm);
  }
  
  .cookie-modal-content {
    max-height: 95vh;
  }
  
  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding: var(--spacing-md);
  }
  
  .cookie-modal-header h2 {
    font-size: 1.25rem;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
  }
  
  .cookie-modal-footer .btn {
    width: 100%;
  }
  
  /* Forms */
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Section Spacing */
  section {
    padding: var(--spacing-xl) 0;
  }
}

/* Small Mobile (max-width: 374px) */
@media (max-width: 374px) {
  :root {
    --container-padding: 0.75rem;
  }
  
  html {
    font-size: 14px;
  }
  
  .logo-main {
    font-size: 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }
  
  .nav {
    width: 100%;
    right: -100%;
  }
  
  .cookie-consent {
    padding: var(--spacing-sm);
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .page-header {
    padding: var(--spacing-md) 0;
  }
  
  section {
    padding: var(--spacing-lg) 0;
  }
  
  .nav {
    padding-top: 60px;
  }
}

/* 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;
  }
  
  .menu-toggle {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for retina displays */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* 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;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Can be implemented if needed */
}

/* Print Optimizations */
@media print {
  /* Hide non-essential elements */
  .header,
  .nav,
  .menu-toggle,
  .cookie-consent,
  .cookie-modal,
  .hero-buttons,
  .btn {
    display: none !important;
  }
  
  /* Optimize layout for print */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  /* Page breaks */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    page-break-inside: avoid;
  }
  
  /* Show URLs for links */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: normal;
  }
  
  /* Footer adjustments */
  .footer {
    background: none;
    color: #000;
    border-top: 2px solid #000;
  }
  
  .footer a {
    color: #000;
  }
}