/* Services Pages Shared Styles */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.8;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Service Grid */
.service-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.service-grid .service-card {
  flex: 1 1 350px;
  min-width: 350px;
  max-width: 400px;
}

/* Ensure minimum 2 items per row for odd numbers */
.service-grid:has(.service-card:nth-child(odd):last-child) .service-card:last-child {
  flex: 1 1 calc(50% - 1rem);
  max-width: calc(50% - 1rem);
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before {
  transform: scaleY(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.service-card:hover h3 {
  color: #667eea;
}

.service-card p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Feature Lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  color: #475569;
  position: relative;
  padding-left: 1.5rem;
  transition: color 0.3s ease;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.1rem;
}

.service-card:hover .feature-list li {
  color: #334155;
}

/* Methodology Section */
.methodology-section {
  padding: 4rem 0;
  background: white;
  position: relative;
}

.methodology-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.3;
}

.methodology-section .container {
  position: relative;
  z-index: 2;
}

/* Methodology Steps */
.methodology-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.methodology-steps .step {
  flex: 1 1 250px;
  min-width: 250px;
  max-width: 300px;
}

/* Ensure minimum 2 items per row for odd numbers */
.methodology-steps:has(.step:nth-child(odd):last-child) .step:last-child {
  flex: 1 1 calc(50% - 1rem);
  max-width: calc(50% - 1rem);
}

.step {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  background: white;
}

.step:hover::before {
  transform: scaleX(1);
}

.step-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.step:hover .step-number {
  transform: scale(1.1);
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

.step p {
  color: #64748b;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.125rem;
  color: #64748b;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.cta-section .btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-outline {
  background: white;
  color: #3b82f6;
  border-color: #3b82f6 !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.btn-outline:hover {
  background: #337aec;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  text-decoration: none;
}

/* Process Flow */
.process-flow {
  padding: 4rem 0;
  background: #f8fafc;
}

/* Process Steps */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  position: relative;
  gap: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.process-steps .process-step {
  flex: 1 1 250px;
  min-width: 250px;
  max-width: 300px;
}

/* Ensure minimum 2 items per row for odd numbers */
.process-steps:has(.process-step:nth-child(odd):last-child) .process-step:last-child {
  flex: 1 1 calc(50% - 1rem);
  max-width: calc(50% - 1rem);
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #e2e8f0, #3b82f6, #e2e8f0);
  z-index: 1;
}

.process-step {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid #e2e8f0;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.process-step:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.process-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.process-step:hover .process-icon {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1400px) {
  .service-grid .service-card {
    flex: 1 1 320px;
    min-width: 320px;
    max-width: 380px;
  }

  .methodology-steps .step {
    flex: 1 1 230px;
    min-width: 230px;
    max-width: 280px;
  }

  .process-steps .process-step {
    flex: 1 1 230px;
    min-width: 230px;
    max-width: 280px;
  }
}

@media (max-width: 1200px) {
  .service-grid {
    max-width: 900px;
  }

  .service-grid .service-card {
    flex: 1 1 calc(50% - 1rem);
    min-width: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .methodology-steps {
    max-width: 800px;
  }

  .methodology-steps .step {
    flex: 1 1 calc(50% - 1rem);
    min-width: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .process-steps {
    max-width: 800px;
  }

  .process-steps .process-step {
    flex: 1 1 calc(50% - 1rem);
    min-width: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 1024px) {
  .service-grid {
    max-width: 800px;
  }

  .methodology-steps {
    max-width: 700px;
  }

  .process-steps {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .service-grid {
    max-width: 100%;
    gap: 1.5rem;
  }

  .service-grid .service-card {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .methodology-steps {
    max-width: 100%;
    gap: 1.5rem;
  }

  .methodology-steps .step {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .process-steps {
    max-width: 100%;
    flex-direction: column;
    gap: 2rem;
  }

  .process-steps .process-step {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .process-steps::before {
    display: none;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .btn {
    display: block;
    margin: 0.5rem auto;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 4rem 0 3rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .step {
    padding: 1.5rem;
  }

  .process-step {
    padding: 1.5rem;
  }

  .cta-section {
    padding: 3rem 0;
  }

  .service-grid,
  .methodology-steps,
  .process-steps {
    gap: 1rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
  .service-grid .service-card:nth-child(3n + 1):nth-last-child(1) {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .methodology-steps .step:nth-child(3n + 1):nth-last-child(1) {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .process-steps .process-step:nth-child(3n + 1):nth-last-child(1) {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}
