/**
 * DigiFoxStudio - Responsive Styles
 * Mobile-first responsive design breakpoints
 * 
 * @package DigiFoxStudio
 */

/* ===================================
   LARGE DESKTOP (1400px and up)
   =================================== */

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .container-wide {
    max-width: 1500px;
  }
  
  h1 { font-size: 4rem; }
  h2 { font-size: 3rem; }
  
  .hero-title {
    font-size: 5rem;
  }
}

/* ===================================
   DESKTOP (1200px - 1399px)
   =================================== */

@media (max-width: 1399px) {
  .container,
  .container-wide {
    max-width: 1140px;
  }
}

/* ===================================
   LAPTOP (1024px - 1199px)
   =================================== */

@media (max-width: 1199px) {
  .container,
  .container-wide {
    max-width: 960px;
  }
  
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.85rem; }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 1023px) {
  .container,
  .container-wide {
    max-width: 720px;
    padding: 0 1.5rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.65rem; }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-description {
    font-size: 1.15rem;
  }
  
  /* Navigation becomes hamburger menu */
  .main-navigation {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Two column layouts become single column */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Service cards adjust */
  .services-grid {
    gap: 2rem;
  }
  
  /* Footer adjusts */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* ===================================
   MOBILE LARGE (576px - 767px)
   =================================== */

@media (max-width: 767px) {
  .container,
  .container-wide {
    max-width: 540px;
    padding: 0 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  h3 { font-size: 1.45rem; }
  h4 { font-size: 1.25rem; }
  
  p {
    font-size: 1rem;
  }
  
  /* Hero section */
  .hero-section {
    min-height: 60vh;
    padding-top: 100px;
  }
  
  .hero-title {
    font-size: 2.25rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Header */
  .header-inner {
    padding: 1rem;
  }
  
  .site-logo img {
    height: 40px;
  }
  
  /* Grid layouts become single column */
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Cards */
  .service-card {
    padding: 2rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .site-footer {
    padding: 3rem 0 1.5rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }
  
  /* Forms */
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Tables scroll horizontally */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Post navigation */
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Sidebar */
  .content-wrapper {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar {
    margin-top: 3rem;
  }
}

/* ===================================
   MOBILE SMALL (up to 575px)
   =================================== */

@media (max-width: 575px) {
  .container,
  .container-wide {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.35rem; }
  h4 { font-size: 1.15rem; }
  h5 { font-size: 1.05rem; }
  
  p {
    font-size: 0.95rem;
  }
  
  /* Hero section */
  .hero-section {
    min-height: 50vh;
    padding-top: 80px;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .hero-tagline {
    font-size: 0.9rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  /* Header */
  .site-logo img {
    height: 35px;
  }
  
  /* Cards */
  .service-card,
  .contact-form {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
  
  /* Forms */
  .form-group input,
  .form-group textarea {
    padding: 0.875rem;
    font-size: 0.95rem;
  }
  
  /* Portfolio */
  .portfolio-grid {
    gap: 1rem;
  }
  
  /* Footer */
  .site-footer {
    padding: 2.5rem 0 1rem;
  }
  
  .footer-content {
    gap: 1.5rem;
  }
  
  /* Comments */
  #comments {
    padding: 2rem 1.5rem;
  }
  
  .comment {
    padding: 1.5rem;
  }
  
  /* Widget spacing */
  .widget {
    padding: 1.5rem !important;
  }
}

/* ===================================
   MOBILE EXTRA SMALL (up to 375px)
   =================================== */

@media (max-width: 375px) {
  .container,
  .container-wide {
    padding: 0 0.75rem;
  }
  
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.45rem; }
  
  .hero-title {
    font-size: 1.65rem;
  }
  
  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
  }
  
  .service-card {
    padding: 1.25rem;
  }
}

/* ===================================
   LANDSCAPE MOBILE ORIENTATION
   =================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black !important;
    page-break-after: avoid;
  }
  
  p, blockquote {
    orphans: 3;
    widows: 3;
  }
  
  blockquote, pre {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  .site-header,
  .site-footer,
  .sidebar,
  .mobile-menu-toggle,
  .btn,
  .portfolio-overlay,
  .back-to-top {
    display: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  @page {
    margin: 2cm;
  }
}

/* ===================================
   HIGH RESOLUTION DISPLAYS
   =================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images and icons for retina displays */
  .site-logo img {
    image-rendering: -webkit-optimize-contrast;
  }
}

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

/* ===================================
   TOUCH DEVICE OPTIMIZATIONS
   =================================== */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  .btn,
  a,
  button,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .service-card:hover,
  .portfolio-item:hover,
  .btn:hover {
    transform: none;
  }
  
  /* Adjust tap highlights */
  * {
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2);
  }
}

/* ===================================
   WIDE ASPECT RATIO DEVICES
   =================================== */

@media (min-aspect-ratio: 16/9) {
  .hero-section {
    padding: 4rem 0;
  }
}

/* ===================================
   ACCESSIBILITY - FORCED COLORS MODE
   =================================== */

@media (prefers-contrast: high) {
  .btn-outline {
    border-width: 2px;
  }
  
  .service-card,
  .portfolio-item {
    border-width: 2px;
  }
}