/* ========================
   Services Section
========================= */
.services-section {
  padding: 96px 24px;
  background: #f9fafb;
}

.services-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.services-header h2 {
  font-size: 48px;
  font-weight: 700;
  color: #0f172a;
}

.services-header p {
  font-size: 20px;
  color: #475569;
}

/* Services Grid using Flexbox */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  padding-left: 15%;
  padding-right: 15%;
  justify-content: center;
  gap: 32px;
  align-items: stretch; /* Ensures all cards in the row stretch to same height */
}

/* Service Card */
.service-card {
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  width: 100%;
  max-width: 300px; /* Adjust card width per row */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Add flex-grow so all cards in the same row are equal height */
  flex: 1 1 300px;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

/* Service Icon */
.service-icon {
  width: 56px;
  height: 56px;
  background: #dbeafe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: popIn 0.6s ease forwards;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Service Text */
.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 16px;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .services-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .services-grid {
    flex-direction: column;
    align-items: center;
  }
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 25px;
}

.category {
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.metric {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    nav a {
        margin: 0 10px;
    }
}