/*
 * Service Header Row Emergency Fix
 * Ensures the service heading and call button stay in a row on all screens
 * Using maximum specificity for overrides
 */

/* Ultra-specific selector to override any existing styles */
html body .services-cards-section .container .services-header-row,
html body section.services-cards-section div.container div.services-header-row {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
  margin-bottom: 20px !important;
  flex-wrap: nowrap !important;
  position: relative !important;
}

/* Title specific styling */
html body .services-cards-section .container .services-header-row h2,
html body section.services-cards-section div.container div.services-header-row h2 {
  margin: 0 !important;
  text-align: left !important;
  flex: 0 1 auto !important;
  font-size: 20px !important;
  padding: 0 !important;
  position: relative !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

/* Button specific styling */
html body .services-cards-section .container .services-header-row .btn-call,
html body section.services-cards-section div.container div.services-header-row a.btn-call {
  margin-left: auto !important; /* Push to right */
  flex: 0 0 auto !important;
  position: relative !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 15px !important;
  border-radius: 30px !important;
  background-color: #D4AF37 !important;
  color: white !important;
  text-decoration: none !important;
}

/* Mobile optimization */
@media (max-width: 767px) {
  html body .services-cards-section .container .services-header-row,
  html body section.services-cards-section div.container div.services-header-row {
    flex-direction: row !important; /* Force row */
    padding: 0 10px !important;
  }
  
  html body .services-cards-section .container .services-header-row h2,
  html body section.services-cards-section div.container div.services-header-row h2 {
    font-size: 16px !important;
    max-width: 60% !important;
  }
  
  html body .services-cards-section .container .services-header-row .btn-call,
  html body section.services-cards-section div.container div.services-header-row a.btn-call {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
}

/* Direct style injection for each service page */
.services-header-row::before {
  display: none !important;
  content: "" !important;
}

.services-header-row::after {
  display: none !important;
  content: "" !important;
}

/* Container fix */
.container {
  box-sizing: border-box !important;
}
