/* ── Servicios Pro Section ──────────────────────────────────── */
.trp-services-section {
  padding: 90px 0 100px;
  overflow: hidden;
}

.trp-services-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.trp-services-header {
  text-align: center;
  margin-bottom: 64px;
}

.trp-services-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #E72846;
  margin-bottom: 18px;
}

.trp-services-label svg {
  width: 16px;
  height: 16px;
  fill: #E72846;
}

.trp-services-title {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  max-width: 640px;
  margin: 0 auto;
}

/* Grid — 4 cols desktop */
.trp-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Card */
.trp-service-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/4;
  opacity: 0;
  transform: translateY(36px);
  /* entrance animation only — hover overrides inline */
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.35s ease;
}

.trp-service-card.trp-visible {
  opacity: 1;
  transform: translateY(0);
}

.trp-service-card:hover {
  box-shadow: 0 20px 60px rgba(231, 40, 70, 0.22), 0 8px 24px rgba(0,0,0,0.35);
  transform: translateY(-6px) scale(1.01);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image */
.trp-service-card figure {
  margin: 0;
  width: 100%;
  height: 100%;
}

.trp-service-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.trp-service-card:hover figure img {
  transform: scale(1.08);
}

/* Overlay */
.trp-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 8, 14, 0.95) 0%,
    rgba(5, 8, 14, 0.50) 45%,
    rgba(5, 8, 14, 0.05) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px 18px;
  transition: background 0.35s ease;
}

.trp-service-card:hover .trp-card-overlay,
.trp-service-card.trp-touched .trp-card-overlay {
  background: linear-gradient(
    to top,
    rgba(5, 8, 14, 0.98) 0%,
    rgba(5, 8, 14, 0.75) 55%,
    rgba(5, 8, 14, 0.15) 100%
  );
}

/* Red accent line */
.trp-card-overlay::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #E72846;
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.trp-service-card:hover .trp-card-overlay::before,
.trp-service-card.trp-touched .trp-card-overlay::before {
  width: 100%;
}

/* Description body — hidden by default, slides up */
.trp-card-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
}

.trp-service-card:hover .trp-card-body,
.trp-service-card.trp-touched .trp-card-body {
  max-height: 300px;
  opacity: 1;
  margin-bottom: 10px;
}

/* Card bottom row: title + arrow as link */
.trp-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  position: relative;
  z-index: 6;
}

/* Card title */
.trp-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  flex: 1;
}

/* Card description */
.trp-card-desc {
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.6;
  margin: 0;
}

/* Arrow */
.trp-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding-bottom: 2px;
}

.trp-service-card:hover .trp-card-arrow,
.trp-service-card.trp-touched .trp-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger entrance delays */
.trp-service-card:nth-child(1) { transition-delay: 0.05s; }
.trp-service-card:nth-child(2) { transition-delay: 0.12s; }
.trp-service-card:nth-child(3) { transition-delay: 0.19s; }
.trp-service-card:nth-child(4) { transition-delay: 0.26s; }
.trp-service-card:nth-child(5) { transition-delay: 0.33s; }
.trp-service-card:nth-child(6) { transition-delay: 0.40s; }
.trp-service-card:nth-child(7) { transition-delay: 0.47s; }
.trp-service-card:nth-child(8) { transition-delay: 0.54s; }

/* Cancel stagger on hover/touch so they respond instantly */
.trp-service-card:hover,
.trp-service-card.trp-touched {
  transition-delay: 0s !important;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet: 3 cols */
@media (max-width: 1100px) {
  .trp-services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Small tablet: 2 cols */
@media (max-width: 768px) {
  .trp-services-section {
    padding: 64px 0 72px;
  }
  .trp-services-inner {
    padding: 0 16px;
  }
  .trp-services-header {
    margin-bottom: 36px;
  }
  .trp-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  /* Disable hover on touch devices */
  .trp-service-card:hover {
    transform: translateY(0) scale(1);
    box-shadow: none;
  }
  .trp-service-card:hover figure img {
    transform: scale(1);
  }
  .trp-service-card:hover .trp-card-body {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
  }
  .trp-service-card:hover .trp-card-arrow {
    opacity: 0;
    transform: translateX(-6px);
  }
  .trp-service-card:hover .trp-card-overlay::before {
    width: 0;
  }
  .trp-service-card:hover .trp-card-overlay {
    background: linear-gradient(
      to top,
      rgba(5, 8, 14, 0.95) 0%,
      rgba(5, 8, 14, 0.50) 45%,
      rgba(5, 8, 14, 0.05) 100%
    );
  }
  /* Touch active state */
  .trp-service-card.trp-touched {
    box-shadow: 0 8px 32px rgba(231, 40, 70, 0.2);
  }
  .trp-card-title {
    font-size: 14px;
  }
  .trp-card-desc {
    font-size: 12px;
  }
}

/* Mobile: 1 col */
@media (max-width: 420px) {
  .trp-services-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .trp-service-card {
    aspect-ratio: 16/9;
  }
}
