/* ==========================================================
   SERVICES
========================================================== */

.services {
  padding: 40px 0 90px;

  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.services .container {
  display: flex;

  flex-direction: column;

  max-width: 1400px;

  gap: 36px;
}

/* ==========================================================
   SECTION HEADER
========================================================== */

.section-header {
  text-align: center;

  margin: 0 auto;
}

.section-tag {
  display: inline-block;

  margin-bottom: 16px;

  font-size: 0.9rem;

  font-weight: 700;

  letter-spacing: 3px;

  text-transform: uppercase;

  color: var(--primary);
}

.section-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);

  font-weight: 800;

  line-height: 1.15;

  color: #0f172a;

  margin-bottom: 10px;
}

.section-header p {
  max-width: 650px;

  margin: 0 auto;

  margin-top: 8px;

  font-size: 1.08rem;

  color: #64748b;

  line-height: 1.8;
}

/* ==========================================================
   CARD
========================================================== */

.service-card {
  background: #fff;

  border-radius: 22px;

  overflow: hidden;

  border: 1px solid #e2e8f0;

  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

  transition: 0.35s;

  display: flex;

  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-12px);

  border-color: #2563eb;

  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.18);
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.55rem;

  font-weight: 700;

  color: #0f172a;

  margin-bottom: 18px;
}

.service-card p {
  color: #64748b;

  line-height: 1.8;

  margin-bottom: 34px;
}

.service-card a {
  margin-top: auto;

  display: flex;

  align-items: center;

  gap: 10px;

  color: #2563eb;

  text-decoration: none;

  font-weight: 600;
}

.service-card a i {
  transition: 0.3s;
}

.service-card:hover a i {
  transform: translateX(6px);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
  align-items: start;
}

.service-image {
  overflow: hidden;

  border-radius: 22px 22px 0 0;

  margin: -36px -28px 26px;
}

.service-image img {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
  transition: 0.5s ease;
}

.service-content {
  padding: 16px 22px;

  display: flex;

  flex-direction: column;

  gap: 10px;
}

.service-content h3 {
  font-size: 1.75rem;

  margin: 0;

  color: #0f172a;
}

.service-content p {
  margin: 0;

  line-height: 1.7;

  color: #64748b;
}

.service-link {
  margin-top: 8px;

  display: inline-flex;

  align-items: center;

  gap: 8px;

  color: #2563eb;

  font-weight: 600;

  text-decoration: none;
}

@media (min-width: 769px) and (max-width: 991px) {
  .service-image {
    margin: 0;
  }
}

/* Desktop */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(6, 1fr);

    column-gap: 32px;
    row-gap: 20px;
  }

  .service-card {
    grid-column: span 2;
  }

  /* Tarjeta 4 */
  .service-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  /* Tarjeta 5 */
  .service-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .service-image {
    width: 100%;
    height: 140px;
    margin: 0;
    border-radius: 22px 22px 0 0;
  }

  .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}
