/**
 * PCES Services Custom Styles
 * Version: 2.0
 * 
 * This file contains all custom styles for the PCES services shortcodes.
 * It works alongside Bootstrap 5.3.0 for layout and components.
 */

body {
    /* background-image: url(https://stagingpces.bilishire.com/wp-content/uploads/designs/services-backdrop.webp); */
    background-color: #eefbff !important;
    margin: 0;
    padding: 0;
}

/* Hero Header Sectio n */
.hero-header {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 2rem;
}

.hero-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 4rem;
    font-weight: 300;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif !important;
    font-size: 4rem;
    font-weight: 700;
    color: #4a90e2;
    margin: 0;
    line-height: 1.2;
    /* text-shadow: 0 2px 8px rgba(0,0,0,0.3); */
}

h1, h2, p {
    font-family: 'Poppins' !important;
}

b, strong {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
}

h2 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #03045E;
}

/* Container - maximize width for desktop side-by-side layout */
.pces-services-container {
  border-radius: 20px;
  margin: 0 auto 2rem;
  padding: 1rem 0;  /* Removed horizontal padding */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  align-items: center; /* Center content horizontally */
}

/* Mobile container adjustments */
@media (max-width: 767px) {
  .pces-services-container {
    width: calc(100% - 2rem);
    padding: 1rem;
  }
}

/* Service section styling - CLEAN APPROACH */
.service-section {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.25rem;
  margin: 0 auto;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  width: 100%;
  max-width: 100%;
  flex-direction: column; /* Default: mobile stacked layout */
}

.service-section:hover {
  background-color: #D1E5EB;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Image wrapper - base styles */
.service-img-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.service-section:hover .service-img {
  transform: scale(1.02);
}

/* DESKTOP STYLES */
@media (min-width: 768px) {
  .service-section {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
  }
  
  .service-normal {
    flex-direction: row;
  }
  
  .service-reverse {
    flex-direction: row-reverse;
  }
  
  .service-text {
    padding: 0 1.5rem;
  }
}

/* MOBILE STYLES - Image first, text second */
@media (max-width: 767px) {
  .service-section {
    flex-direction: column !important;
    padding: 1.25rem;
  }
  
  .service-image {
    order: 1 !important;
    margin-bottom: 1rem;
  }
  
  .service-text {
    order: 2 !important;
  }
  
  .service-img-wrapper {
    height: auto;
    margin-bottom: 0;
  }
  
  .service-img {
    height: auto;
    object-fit: contain;
  }
  
  .service-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .service-section p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }
}

/* DESKTOP STYLES - Side by side with alternating positions */
@media (min-width: 768px) {
  /* Ensure container has enough width */
  .pces-services-container {
    width: 90% !important;
    max-width: 1200px !important;
    padding: 2rem 3rem !important;
  }
  
  .service-section {
    display:flex;           /* you already do this */
    flex-direction:row !important;
    flex-wrap: nowrap !important;     /* <<< stop wrapping */
    gap: 2rem;  
  }
  
  /* Override Bootstrap column classes */
  .service-text {
    flex: 0 0 45% !important;
    max-width: none !important;
  }
  
  .service-image {
    flex: 0 0 calc(55% - 1rem) !important;
    max-width: none !important;
  }
  
  .service-img-wrapper {
    height: 280px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }
  
  /* Normal layout: Text left (order 1), Image right (order 2) */
  .service-normal .service-text {
    order: 1 !important;
  }
  
  .service-normal .service-image {
    order: 2 !important;
  }
  
  /* Reverse layout: Image left (order 1), Text right (order 2) */
  .service-reverse .service-text {
    order: 2 !important;
  }
  
  .service-reverse .service-image {
    order: 1 !important;
  }
}

/* Large desktop optimization */
@media (min-width: 1200px) {
  .pces-services-container {
    width: 100% !important;
    max-width: 1600px !important;
    padding: 1rem 0;
  }
  
  .service-section {
    padding: 3rem 8% !important;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .service-text {
    padding: 0 2.5rem !important;
    min-width: 40%;
  }
  
  .service-image {
    min-width: 50%;
  }
  
  .service-section {
    gap: 3rem !important;
  }
  
  .service-img-wrapper {
    height: 320px !important;
    width: 100%;
  }
  
  h2 {
    white-space: nowrap;
    overflow: visible;
  }
}