/* ==========================================================================
   Seanjackson Services - Media Queries
   Responsive design for all devices
   ========================================================================== */

@media screen and (max-width: 1400px) {
  #hero {
    height: 83vh;
    margin-bottom: 6rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  /* Adjust parallax for smaller screens */
  .parallax-element.circle {
    opacity: 0.03;
  }
  
  .parallax-element.dots {
    opacity: 0.15;
    background-size: 15px 15px;
  }
  
  /* Adjust animations for medium screens */
  .animate-on-scroll {
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
}

@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }
  
  #hamburger-nav {
    display: flex;
  }
  
  section,
  .content-section {
    margin: 0 5%;
  }
  
  #hero,
  .section-container {
    display: block;
  }
  
  #hero {
    height: fit-content;
    padding: 2rem 0;
    text-align: center;
  }
  
  .section__pic-container {
    width: 275px;
    height: 275px;
    margin: 0 auto 2rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Adjust animations for tablet screens */
  .animate-on-scroll {
    transform: translateY(20px); /* Smaller transform distance */
  }
  
  .details-container:hover {
    transform: translateY(-5px); /* Reduce hover animation intensity */
  }
  
  .portfolio-item:hover {
    transform: scale(1.02); /* Reduce scale effect */
  }
}

@media screen and (max-width: 768px) {
  nav {
    height: 12vh;
    padding: 0 1rem;
  }
  
  #hero {
    margin-top: 12vh;
    padding: 3rem 0;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .section__text__p2 {
    font-size: 1.5rem;
  }
  
  .section__pic-container {
    width: 250px;
    height: 250px;
  }
  
  .btn-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .btn {
    width: 200px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .portfolio-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
    gap: 0.5rem;
  }
  
  .filter-btn {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .section-title .title {
    font-size: 2rem;
  }
  
  .content-section {
    padding: 3rem 0;
    margin: 0 1rem;
  }
}

@media screen and (max-width: 600px) {
  nav {
    height: 10vh;
  }
  
  #hero {
    margin-top: 10vh;
    padding: 2rem 0;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .section__text__p1 {
    font-size: 1rem;
  }
  
  .section__text__p2 {
    font-size: 1.25rem;
  }
  
  .section__pic-container {
    width: 200px;
    height: 200px;
  }
  
  .details-container {
    padding: 1.5rem;
    margin: 0.5rem 0;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .portfolio-item img {
    height: 200px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .modal-content {
    margin: 10% auto;
    padding: 1.5rem;
    width: 95%;
  }
  
  /* Adjust parallax for mobile screens */
  .parallax-element.circle {
    opacity: 0.02;
    filter: blur(15px);
  }
  
  .parallax-element.dots {
    opacity: 0.1;
    background-size: 10px 10px;
  }
  
  .parallax-element.circle-1 {
    width: 100px;
    height: 100px;
  }
  
  .parallax-element.circle-2 {
    width: 120px;
    height: 120px;
  }
  
  .parallax-element.circle-3 {
    width: 80px;
    height: 80px;
  }
  
  /* Optimize animations for mobile */
  .animate-on-scroll {
    transform: translateY(10px); /* Minimal transform distance for mobile */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Faster animations on mobile */
  }
  
  /* Reduce or eliminate hover effects that don't make sense on touch devices */
  .btn:hover::before,
  .details-container:hover,
  .portfolio-item:hover,
  .filter-btn:hover {
    transform: none;
  }
  
  /* Increase touch targets */
  .btn {
    padding: 1rem;
    margin-bottom: 0.5rem;
    min-height: 44px; /* Minimum touch target size */
  }
  
  .filter-btn {
    min-height: 44px;
    padding: 0.8rem 1rem;
  }
  
  /* Better spacing for cards on mobile */
  .details-container {
    margin-bottom: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .title {
    font-size: 1.8rem;
  }
  
  .section__text__p2 {
    font-size: 1.1rem;
  }
  
  .section__pic-container {
    width: 180px;
    height: 180px;
  }
  
  .btn-container {
    width: 100%;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .details-container {
    padding: 1.2rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .portfolio-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .content-section {
    margin: 0 0.5rem;
    padding: 2rem 0;
  }
  
  .section-title .title {
    font-size: 1.6rem;
  }
  
  .modal-content {
    padding: 1rem;
    margin: 5% auto;
  }
}

/* Landscape orientation adjustments for mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
  #hero {
    height: auto;
    padding: 1rem 0;
  }
  
  .section__pic-container {
    width: 150px;
    height: 150px;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .section__text__p2 {
    font-size: 1rem;
  }
  
  nav {
    height: 8vh;
  }
  
  #hero {
    margin-top: 8vh;
  }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
  .portfolio-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .parallax-element {
    transform: none !important;
  }
  
  .animate-on-scroll {
    transform: none;
    opacity: 1;
  }
}

/* Print styles */
@media print {
  .parallax-bg,
  .theme-toggle,
  .hamburger-menu,
  .btn,
  .portfolio-filters {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .portfolio-item {
    break-inside: avoid;
  }
}
