/* Responsive CSS for Ghost-Blogging Network Template */
/* Mobile-first approach with Bootstrap 5 breakpoints */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  /* No animations on mobile as per requirements */
  [data-sal] {
    transform: none !important;
    opacity: 1 !important;
  }
  
  /* Conservative Typography for Mobile */
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  /* Hero Section Mobile */
  .hero-section {
    min-height: 70vh;
    text-align: center;
  }
  
  .hero-content {
    padding: 60px 0;
    padding-top: 125px;
}
  
  .hero-decorative {
    display: none; /* Hide decorative elements on mobile */
  }
  
  /* Section Padding */
  .section-padding {
    padding: 50px 0;
  }
  
  /* Service Cards */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Price Cards */
  .price-card.featured {
    transform: none; /* Remove scale on mobile */
    margin-bottom: 2rem;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Team Photos */
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Process Numbers */
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  /* Blog Images */
  .blog-image {
    height: 180px;
  }
  
  /* Gallery Images */
  .gallery-image img {
    height: 200px;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* No animations when scrolling on mobile resolution */
  [data-sal] {
    transform: none !important;
    opacity: 1 !important;
  }
  
  .hero-content {
    padding: 70px 0;
    padding-top: 125px;
}
  
  .section-padding {
    padding: 60px 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-content {
    padding: 80px 0;
    padding-top: 125px;
}
  
  .section-padding {
    padding: 70px 0;
  }
  
  /* Adjust grid spacing */
  .service-card,
  .price-card,
  .team-member {
    margin-bottom: 2rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
  /* Full animations enabled on desktop */
  .hero-content {
    padding: 100px 0;
    padding-top: 125px;
}
  
  .section-padding {
    padding: 80px 0;
  }
  
  /* Enhanced hover effects on larger screens */
  .service-card:hover {
    transform: translateY(-8px);
  }
  
  .blog-post:hover {
    transform: translateY(-8px);
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-content {
    padding: 120px 0;
    padding-top: 125px;
}
  
  .section-padding {
    padding: 100px 0;
  }
  
  /* Larger decorative elements on big screens */
  .hero-decorative:nth-child(1) {
    width: 250px;
    height: 250px;
  }
  
  .hero-decorative:nth-child(2) {
    width: 200px;
    height: 200px;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp rendering on high-DPI displays */
  .hero-decorative,
  .service-card::before {
    will-change: transform;
  }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: auto;
    padding: 40px 0;
  }
  
  .hero-content {
    padding: 40px 0;
    padding-top: 125px;
}
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .service-card:hover,
  .blog-post:hover,
  .about-feature:hover {
    transform: none;
  }
  
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  
  .navbar-nav .nav-link {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .hero-decorative,
  .navbar,
  .footer {
    display: none;
  }
  
  .hero-section {
    min-height: auto;
    background: white;
    color: black;
  }
  
  .section-padding {
    padding: 30px 0;
  }
  
  .service-card,
  .price-card,
  .contact-form {
    border: 1px solid #ccc;
    background: white;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations and transitions */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-decorative {
    display: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-soft: #0000ff;
    --secondary-soft: #ff0000;
    --accent-soft: #008000;
    --text-primary: #000000;
    --text-secondary: #000000;
    --bg-primary: #ffffff;
  }
  
  .service-card,
  .price-card,
  .contact-form {
    border: 2px solid #000000;
  }
}

/* Dark Mode Preferences */

/* Container Max-width Adjustments */
@media (min-width: 1400px) {
  .container-xxl {
    max-width: 1320px;
  }
}

/* Navigation Responsive Adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-link {
    border-bottom: 1px solid var(--neutral-light);
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

/* Form Responsive Adjustments */
@media (max-width: 767.98px) {
  .contact-form .row > div {
    margin-bottom: 1rem;
  }
  
  .form-control {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Grid Adjustments for Edge Cases */
@media (min-width: 768px) and (max-width: 991.98px) {
  .col-md-6:nth-child(odd) {
    clear: left;
  }
}

/* Loading Performance on Mobile */
@media (max-width: 767.98px) {
  .gallery-image img,
  .blog-image {
    loading: lazy;
  }
}

/* Utility Classes for Responsive Spacing */
@media (max-width: 575.98px) {
  .mobile-text-center {
    text-align: center;
  }
  
  .mobile-mb-3 {
    margin-bottom: 1rem;
  }
  
  .mobile-p-2 {
    padding: 0.5rem;
  }
}