/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mobile First Approach */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .hero-description {
    font-size: var(--font-size-base);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .service-card {
    padding: var(--space-6);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .about-stats {
    justify-content: space-around;
    gap: var(--space-4);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .about-text .section-title {
    text-align: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .nav-menu {
    gap: var(--space-6);
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .about-text .section-title {
    text-align: center;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Navigation */
@media (max-width: 767.98px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--background-color);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8);
    transition: left var(--transition-normal);
    border-top: 1px solid var(--border-color);
    z-index: var(--z-dropdown);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-link {
    font-size: var(--font-size-lg);
    padding: var(--space-4) var(--space-6);
    width: 100%;
    text-align: center;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
  }
  
  .nav-link:hover {
    background-color: var(--surface-hover);
  }
  
  .nav-link::after {
    display: none;
  }
  
  /* Hamburger Animation */
  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero adjustments for mobile */
  .hero {
    padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
    min-height: auto;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-4);
  }
  
  .hero-description {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-6);
    max-width: 100%;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .btn {
    width: 100%;
  }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .theme-toggle {
    top: var(--space-6);
    right: var(--space-6);
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
  }
  
  .service-card {
    padding: var(--space-6);
  }
  
  .contact-form {
    padding: var(--space-6);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo,
  .footer-logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -webkit-crisp-edges;
    image-rendering: crisp-edges;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }
  
  .hero-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-3);
  }
  
  .hero-description {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
  }
}

/* Print styles */
@media print {
  .theme-toggle,
  .nav-toggle,
  .hero-buttons,
  .service-link,
  .contact-form {
    display: none;
  }
  
  .navbar {
    position: static;
    background: white;
    border-bottom: 1px solid black;
  }
  
  .hero {
    padding: var(--space-8) 0;
    min-height: auto;
    background: white;
  }
  
  .footer {
    background: white;
    color: black;
    border-top: 1px solid black;
  }
  
  * {
    color: black !important;
    background: white !important;
  }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .hero-image,
  .about-image {
    animation: none;
  }
  
  .service-card:hover,
  .btn:hover,
  .hero-img:hover,
  .theme-toggle:hover {
    transform: none;
  }
  
  .nav-link::after {
    transition: none;
  }
}

/* Focus improvements for keyboard navigation */
@media (any-hover: none) {
  .service-card:hover,
  .btn:hover,
  .nav-link:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid;
  }
  
  .service-card {
    border: 2px solid var(--border-color);
  }
  
  .nav-link::after {
    height: 3px;
  }
} 