/* Services Page Mobile Responsive CSS */

/* Mobile-first responsive design for services page */
@media (max-width: 768px) {
  /* Hero Section Mobile */
  .services-hero {
    padding: 80px 0 40px 0;
  }
  
  .col-lg-12.d-flex {
    flex-direction: column !important;
  }
  
  .hero-content {
    order: 2;
    text-align: center;
    margin-top: 2rem;
  }
  
  .service-hero-container {
    order: 1;
    margin: 0 0 1rem 0;
  }
  
  .hero-image-flip {
    width: 280px;
    height: 400px;
  }
  
  .hero-title {
    font-size: 2rem;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    text-align: center;
  }
  
  .mt-4.d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile adjustments */
  .services-hero {
    padding: 70px 0 30px 0;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-image-flip {
    width: 240px;
    height: 340px;
  }
  
  .service-hero-container {
    margin: 0;
  }
  
  /* Service cards mobile */
  .service-card-enhanced {
    margin-bottom: 1.5rem;
  }
  
  .service-features {
    font-size: 0.85rem;
  }
  
  /* Process steps mobile */
  .process-step-enhanced {
    padding: 1.5rem 1rem;
  }
  
  /* Call to action mobile */
  .call-container {
    height: auto;
    padding: 2rem 0;
  }
  
  .call-sub-container {
    width: 95%;
    height: auto;
    padding: 1.5rem;
    flex-direction: column;
  }
  
  .call-action-slider {
    width: 100%;
    height: 200px;
    margin: 0 0 1.5rem 0;
    transform: none;
  }
  
  .col-lg-8 {
    width: 100%;
    padding: 0;
  }
  
  .fade-in.text-start {
    text-align: center !important;
  }
  
  /* Table responsive */
  .service-comparison-table {
    font-size: 0.8rem;
  }
  
  .service-comparison-table th,
  .service-comparison-table td {
    padding: 0.4rem 0.2rem;
  }
}

/* Why Choose Professional Writers Section Mobile */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .service-comparison-table {
    font-size: 0.75rem;
  }
  
  .service-comparison-table th,
  .service-comparison-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .service-comparison-table .fa-check,
  .service-comparison-table .fa-times,
  .service-comparison-table .fa-question,
  .service-comparison-table .fa-minus {
    font-size: 1.2rem;
  }
}

/* Ready to Get Started Section Mobile */
@media (max-width: 768px) {
  .call-container {
    height: auto;
    padding: 2rem 0;
  }
  
  .call-sub-container {
    width: 95%;
    height: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .call-action-slider {
    width: 100%;
    height: 250px;
    margin: 0 0 2rem 0;
    transform: none;
    position: static;
  }
  
  .col-lg-8.mr-4 {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .text-start {
    text-align: center !important;
  }
  
  .btn-light,
  .btn-outline-light {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    max-width: 280px;
  }
}

@media (max-width: 576px) {
  .call-action-slider {
    height: 200px;
  }
  
  .service-comparison-table {
    font-size: 0.7rem;
  }
  
  .service-comparison-table th,
  .service-comparison-table td {
    padding: 0.4rem 0.2rem;
  }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .services-hero {
    padding: 60px 0 20px 0;
    min-height: auto;
  }
  
  .hero-image-flip {
    width: 200px;
    height: 280px;
  }
}

/* --- Extra mobile responsiveness for Services Grid and Process Section --- */
@media (max-width: 575.98px) {
  /* Services Grid: Stack cards, remove side margins, shrink paddings */
  .row.g-4 > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .service-card-enhanced {
    margin-bottom: 1.2rem !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 12px rgba(102,126,234,0.08) !important;
    padding: 0.7rem 0.3rem !important;
  }
  .service-card-enhanced .p-4 {
    padding: 1rem 0.5rem !important;
  }
  .service-icon-enhanced {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.3rem !important;
    margin-bottom: 0.7rem !important;
    border-radius: 12px !important;
  }
  .service-title-enhanced {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }
  .service-features {
    margin: 1rem 0 !important;
    font-size: 0.9rem !important;
  }
  .btn-service-enhanced {
    font-size: 0.95rem !important;
    padding: 0.6rem 1rem !important;
    border-radius: 10px !important;
  }

  /* Process Section: Stack steps vertically, shrink paddings */
  .row.g-4 > .col-lg-3,
  .row.g-4 > .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 1rem !important;
  }
  .process-step-enhanced {
    padding: 1rem 0.7rem !important;
    margin-bottom: 1.2rem !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08) !important;
  }
  .process-number {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.6rem !important;
  }
  .process-step-enhanced h5 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }
  .process-step-enhanced p {
    font-size: 0.95rem !important;
    margin-bottom: 0.3rem !important;
  }
}

/* --- Ultra-compact mobile tweaks for "Why Choose Professional Writers" section --- */
@media (max-width: 480px) {
  /* Section heading and lead */
  .section h2,
  .section .lead,
  .service-comparison-table th,
  .service-comparison-table td {
    font-size: 0.85rem !important;
    padding: 0.3rem 0.1rem !important;
    line-height: 1.2 !important;
  }
  .section h2 {
    margin-bottom: 0.5rem !important;
    font-weight: 700 !important;
  }
  .section .lead {
    margin-bottom: 0.7rem !important;
  }

  /* Table container */
  .table-responsive,
  .service-comparison-table {
    font-size: 0.8rem !important;
    border-radius: 7px !important;
    margin-bottom: 0.7rem !important;
  }
  .service-comparison-table th,
  .service-comparison-table td {
    padding: 0.3rem 0.1rem !important;
    font-size: 0.8rem !important;
    min-width: 60px !important;
    max-width: 80px !important;
    word-break: break-word !important;
  }
  .service-comparison-table th {
    font-size: 0.85rem !important;
    letter-spacing: 0.5px !important;
  }
  .service-comparison-table td strong {
    font-size: 0.8rem !important;
  }
  .service-comparison-table .fa-check,
  .service-comparison-table .fa-times,
  .service-comparison-table .fa-question,
  .service-comparison-table .fa-minus {
    font-size: 1rem !important;
  }
  /* Remove extra spacing */
  .service-comparison-table tr,
  .service-comparison-table tbody tr {
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Make table scrollable if needed */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  /* Remove horizontal padding from container */
  .container {
    padding-left: 2px !important;
    padding-right: 2px !important;
    max-width: 100vw !important;
  }
}

/* --- Ultra-compact mobile tweaks for "Ready to Get Started" call-to-action section --- */
@media (max-width: 480px) {
  .call-container {
    height: auto !important;
    padding: 1rem 0 !important;
    min-height: unset !important;
    overflow: visible !important;
  }
  .call-sub-container {
    width: 99% !important;
    max-width: 99vw !important;
    padding: 0.7rem 0.3rem !important;
    height: auto !important;
    min-height: unset !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .call-action-slider {
    width: 98vw !important;
    max-width: 220px !important;
    height: 120px !important;
    min-height: 90px !important;
    margin: 0 auto 0.7rem auto !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  }
  .call-action-slider img {
    height: 110px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 22px !important;
    height: 22px !important;
    top: 40% !important;
  }
  .col-lg-8,
  .col-lg-8.mr-4,
  .col-lg-8.px-4 {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .col-lg-8 h2,
  .col-lg-8 .lead {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }
  .fade-in.text-start,
  .col-lg-8 .fade-in {
    text-align: center !important;
  }
  .btn-light,
  .btn-outline-light {
    display: block !important;
    width: 95vw !important;
    max-width: 220px !important;
    margin: 0.4rem auto !important;
    font-size: 0.95rem !important;
    padding: 0.5rem 0.2rem !important;
    border-radius: 8px !important;
  }
  .d-flex.justify-content-center.text-center.text-white {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
}