/**
 * SERVICES PAGE - ORGANIZED LAYOUT & FLOW
 * Created: November 3, 2025
 * Purpose: Clean, professional layout for the three service pathways
 */

/* ========================================
   SERVICE OVERVIEW SECTION
   ======================================== */

.service-overview {
  background: var(--bg-light);
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More side padding */
  margin-bottom: var(--spacing-xxl);
}

.service-overview .section-lead {
  text-align: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  padding: 0 var(--spacing-md); /* ADDED: Prevent text from touching edges */
}

/* ========================================
   SERVICE DETAILS SECTION
   ======================================== */

.service-details {
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More horizontal padding */
  background: white;
}

.service-details h2 {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xxl);
  padding: 0 var(--spacing-md); /* ADDED: Prevent heading from touching edges */
}

/* ========================================
   SERVICE CARDS - EXPANDABLE DESIGN
   ======================================== */

.service-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxl); /* INCREASED: More space between cards */
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-md); /* ADDED: Ensure cards don't touch container edges */
}

.service-card {
  background: white;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card.recommended {
  border-color: var(--color-accent-gold);
  border-width: 3px;
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.15);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--transition-fast);
  background: var(--bg-white);
}

.card-header:hover {
  background: var(--bg-light);
}

.card-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--color-primary-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: 1.75rem;
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.2);
}

.card-title-section {
  flex: 1;
}

.card-title-section h3 {
  font-family: var(--font-secondary);
  font-size: 1.75rem;
  color: var(--color-secondary);
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
}

.card-title-section .service-intro {
  font-size: var(--font-size-md);
  color: var(--color-secondary); /* FIXED: Changed from muted to secondary for better contrast */
  margin: 0;
  line-height: 1.5;
  opacity: 0.8; /* Slightly dimmed but still readable */
}

.recommended-badge {
  display: inline-block;
  background: var(--color-accent-gold);
  color: white;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
}

/* Expand Button */
.expand-button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.875rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-md);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.3);
}

.expand-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
}

.expand-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-base);
  line-height: 1;
}

.expandable-card[data-expanded="true"] .expand-icon {
  transform: rotate(45deg);
}

.expandable-card[data-expanded="true"] .expand-text::after {
  content: " Less";
}

/* Card Content - Collapsible */
.service-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  border-top: 1px solid transparent;
  background: var(--bg-light);
}

.expandable-card[data-expanded="true"] .service-details-content {
  max-height: 2000px;
  padding: var(--spacing-xxl) var(--spacing-xxl); /* INCREASED: More horizontal padding */
  border-top-color: var(--color-border-light);
}

.service-details-content .service-intro {
  font-size: var(--font-size-lg);
  line-height: 1.8; /* INCREASED: More line height for readability */
  color: var(--color-text);
  margin-bottom: var(--spacing-xl);
}

.service-fit,
.service-deliverables {
  margin-top: var(--spacing-xxl); /* INCREASED: More space between sections */
}

.service-fit h4,
.service-deliverables h4 {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg); /* INCREASED: More space after headings */
  font-family: var(--font-secondary);
}

.service-fit ul,
.service-deliverables ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-fit li,
.service-deliverables li {
  margin-bottom: var(--spacing-lg); /* INCREASED: More space between list items */
  padding-left: 2rem;
  position: relative;
  line-height: 1.8; /* INCREASED: More line height */
  color: var(--color-text);
  font-size: var(--font-size-md);
}

.service-fit li::before {
  content: "✓";
  color: var(--color-accent-gold);
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1.25rem;
}

.service-deliverables li::before {
  content: "•"; /* CHANGED: From arrow to bullet point for cleaner look */
  color: var(--color-primary);
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1.5rem;
}

/* ========================================
   IMPLEMENTATION PROCESS SECTION
   ======================================== */

.implementation-process {
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More horizontal padding */
  background: var(--bg-light);
}

.implementation-process h2 {
  font-family: var(--font-secondary);
  font-size: 2.25rem;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-md); /* ADDED: Prevent heading from touching edges */
}

.implementation-process .section-lead {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 800px;
  margin: 0 auto var(--spacing-xxl);
  line-height: 1.6;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md); /* ADDED: Prevent grid items from touching edges */
}

.process-step {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-light);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-secondary);
  color: white;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.process-step h3 {
  font-family: var(--font-secondary);
  font-size: var(--font-size-xl);
  color: var(--color-secondary);
  margin: 0 0 var(--spacing-md) 0;
  line-height: 1.3;
}

.process-step p {
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
  font-size: var(--font-size-md);
}

/* ========================================
   CODEX IN ACTION SECTION
   ======================================== */

.codex-in-action {
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More horizontal padding */
  background: white;
}

.codex-in-action h2 {
  font-family: var(--font-secondary);
  font-size: 2.25rem;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-md); /* ADDED: Prevent heading from touching edges */
}

.codex-in-action .section-lead {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 900px;
  margin: 0 auto var(--spacing-xxl);
  line-height: 1.6;
}

.stakeholder-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md); /* ADDED: Prevent cards from touching edges */
}

.preview-card {
  background: var(--bg-light);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-light);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.preview-card h3 {
  font-family: var(--font-secondary);
  font-size: var(--font-size-xl);
  color: var(--color-secondary);
  margin: 0 0 var(--spacing-sm) 0;
}

.preview-card .role-description {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-gold);
  margin-bottom: var(--spacing-md);
}

.preview-card p {
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
  font-size: var(--font-size-md);
}

/* ========================================
   PRIVACY COMMITMENT SECTION
   ======================================== */

.privacy-commitment {
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More horizontal padding */
  background: var(--bg-light);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.privacy-commitment h2 {
  font-family: var(--font-secondary);
  font-size: 1.875rem;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-md); /* ADDED: Prevent heading from touching edges */
}

.privacy-commitment p {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: var(--font-weight-medium);
}

/* ========================================
   CTA SECTION
   ======================================== */

.services-cta {
  padding: var(--spacing-xxl) var(--spacing-lg); /* INCREASED: More horizontal padding */
  background: var(--color-primary-dark);
  color: white;
  text-align: center;
}

.services-cta h2 {
  font-family: var(--font-secondary);
  font-size: 2.25rem;
  color: white;
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-md); /* ADDED: Prevent heading from touching edges */
}

.services-cta .section-lead {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.6;
}

.services-cta .primary-button {
  display: inline-block;
  background: white !important; /* FIXED: Ensure white background */
  color: var(--color-primary-dark) !important; /* FIXED: Dark text on white */
  padding: 1.125rem 2.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 2px solid white; /* ADDED: Ensure visibility */
}

.services-cta .primary-button:hover {
  background: var(--bg-light) !important; /* FIXED: Light background on hover */
  color: var(--color-secondary) !important; /* FIXED: Darker text on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  border: 2px solid var(--bg-light); /* ADDED: Match background */
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .service-details h2,
  .implementation-process h2,
  .codex-in-action h2,
  .services-cta h2 {
    font-size: 1.875rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .card-number {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .card-title-section h3 {
    font-size: 1.5rem;
  }
  
  .expand-button {
    width: 100%;
    justify-content: center;
  }
  
  .process-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .stakeholder-preview {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .service-overview .section-lead {
    font-size: var(--font-size-lg);
  }
  
  .card-title-section h3 {
    font-size: 1.25rem;
  }
  
  .service-details h2 {
    font-size: 1.625rem;
  }
}
