/* Services Page Fixes */

/* EMERGENCY OVERRIDES - Must be first to ensure they take precedence */
* {
  position: relative !important;
  max-width: 100% !important;
}

*::before,
*::after {
  position: absolute !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Remove ALL decorative elements that might cause issues */
.shape-blob,
.shape-blob-1,
.shape-blob-2,
[class*="blob"],
[class*="shape"] {
  display: none !important;
}

/* AGGRESSIVE HEIGHT RESET - Override any height issues */
.service-card,
.career-card,
.price-card,
.casestudy-card,
.feature-box {
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
}

/* Ensure cards only take the height of their content */
.service-content,
.career-card > *,
.price-card > *,
.casestudy-content,
.feature-box > * {
  height: auto !important;
  min-height: auto !important;
}

/* Override any flex or grid stretching */
.row {
  align-items: flex-start !important;
}

.col-lg-12,
.col-md-6,
.col-md-4,
.col-lg-4,
[class*="col-"] {
  display: flex;
  flex-direction: column;
}

[class*="col-"] > * {
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}

/* CRITICAL: Override problematic pseudo-elements with huge sizes */
.casestudy-card::before,
.testimonial-card::before,
.section::before,
.section::after,
.service-card::before,
.service-card::after,
.career-card::before,
.career-card::after,
.price-card::before,
.price-card::after,
.feature-box::before,
.feature-box::after {
  display: none !important;
  width: auto !important;
  height: auto !important;
  position: static !important;
}

/* Override any problematic absolute positioning */
.section {
  position: relative !important;
  overflow: hidden !important;
}

/* Ensure no element can break out of its container */
.section * {
  max-width: 100% !important;
}

/* Override animations that might cause layout issues */
@keyframes float {
  0%, 100% { transform: none !important; }
}

@keyframes blob {
  0%, 100% { transform: none !important; }
}

/* Reset any calc() functions that might be problematic */
#space {
  min-height: auto !important;
}

/* Fix section-title pseudo-elements */
.section-title h2::after {
  position: absolute !important;
  width: 60px !important;
  height: 3px !important;
  /* Keep other styles intact */
}

/* Override transform effects that can break layout */
.service-card:hover,
.career-card:hover,
.price-card:hover,
.casestudy-card:hover,
.feature-box:hover {
  transform: translateY(-5px) !important;
}

/* Ensure gradient backgrounds don't create layout issues */
.bg-gradient-3::before,
.bg-gradient-3::after,
.bg-gradient-2::before,
.bg-gradient-2::after,
.bg-gradient-1::before,
.bg-gradient-1::after {
  display: none !important;
}

/* Fix for service cards in Section 1 */
.services-section .service-card,
.section .service-card {
  background: #f8f9fa;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.services-section .service-card:hover,
.section .service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.service-content {
  padding: 0;
}

.service-name {
  font-size: 1.25rem;
  color: #2c5f2d;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-description {
  font-size: 1rem;
  color: #343a40;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Fix for career cards in Section 2 */
.bg-gradient-3 .career-card {
  background: rgba(255,255,255,0.95);
  color: #212529;
  border: none;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bg-gradient-3 .career-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,1);
}

.career-title {
  color: #2c5f2d;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.career-description {
  color: #343a40;
  opacity: 1;
  font-size: 1rem;
  line-height: 1.6;
}

/* Fix for price cards in Section 3 */
.section .price-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 2rem;
  text-align: left;
  height: auto;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.section .price-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.price-name {
  color: #2c5f2d;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: left;
}

.price-description {
  color: #343a40;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

/* Fix for casestudy cards in Section 4 */
.bg-light .casestudy-card {
  background: white;
  border: 1px solid #e9ecef;
  padding: 2rem;
  margin-bottom: 1.5rem;
  overflow: visible;
}

.bg-light .casestudy-card::before {
  display: none;
}

.casestudy-title {
  color: #2c5f2d;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.casestudy-desc {
  color: #343a40;
  font-size: 1rem;
  line-height: 1.6;
}

/* Fix for feature boxes in Section 5 */
.section .feature-box {
  background: #f8f9fa;
  border-radius: 1rem;
  padding: 2rem;
  text-align: left;
  height: 100%;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.section .feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  background: white;
}

.feature-box i {
  font-size: 2rem;
  color: #e8b04b;
  margin-bottom: 1rem;
  display: inline-block;
}

.feature-name {
  color: #2c5f2d;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-desc {
  color: #343a40;
  font-size: 1rem;
  line-height: 1.6;
}

/* General fixes */
.section {
  overflow: visible;
}

.container {
  max-width: 1200px;
}

/* Ensure proper spacing */
.row {
  margin-left: -15px;
  margin-right: -15px;
}

.row > [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

/* Fix text overflow */
p {
  max-width: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Section title fixes */
.section-title {
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-title h3 {
  font-size: 1.5rem;
  color: #97bc62;
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.125rem;
  color: #4a4a4a;
  max-width: 800px;
  margin: 0 auto;
}

/* Fix gradient backgrounds */
.bg-gradient-3 {
  background: linear-gradient(135deg, #4a4a4a 0%, #8b5a3c 100%);
  color: white;
}

.bg-gradient-3 .section-title h2,
.bg-gradient-3 .section-title h3,
.bg-gradient-3 .section-title p {
  color: white !important;
}

/* Responsive fixes */
@media (max-width: 768px) {
  .service-card,
  .career-card,
  .price-card,
  .casestudy-card,
  .feature-box {
    margin-bottom: 1rem;
  }
  
  .col-md-4,
  .col-md-6,
  .col-lg-4 {
    margin-bottom: 1rem;
  }
}

/* Additional fixes for proper layout */

/* Fix Bootstrap column spacing */
.row.g-4 {
  --bs-gutter-y: 1.5rem;
  --bs-gutter-x: 1.5rem;
}

/* Ensure cards fill their containers */
.col-lg-12 .service-card,
.col-md-6 .career-card,
.col-md-4 .price-card,
.col-lg-12 .casestudy-card,
.col-md-6.col-lg-4 .feature-box {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Fix for long text content */
.service-description,
.career-description,
.price-description,
.casestudy-desc,
.feature-desc {
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
}

/* Ensure proper margin between sections */
main > .section {
  margin-bottom: 2rem;
}

main > .section:last-child {
  margin-bottom: 0;
}

/* Fix breadcrumb positioning */
.breadcrumb {
  margin-top: 80px;
  margin-bottom: 2rem;
}

/* Ensure icons are properly displayed */
.feature-box i {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 176, 75, 0.1);
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

/* Fix for gradient background text visibility */
.bg-gradient-3 h4,
.bg-gradient-3 p {
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Ensure consistent card shadows */
.service-card,
.career-card,
.price-card,
.casestudy-card,
.feature-box {
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* Fix for very long titles */
.service-name,
.career-title,
.price-name,
.casestudy-title,
.feature-name {
  line-height: 1.4;
  word-break: break-word;
}

/* Ensure proper image display if any */
img {
  max-width: 100%;
  height: auto;
}

/* Fix potential z-index issues */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Ensure main content starts below navbar */
main {
  padding-top: 80px;
}

/* Additional responsive adjustments */
@media (max-width: 576px) {
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .service-card,
  .career-card,
  .price-card,
  .casestudy-card,
  .feature-box {
    padding: 1.5rem;
  }
} 