/* =========================================
   Features / Servicios Section
   ========================================= */

.features-section {
  padding: 80px 0 40px;
  position: relative;
  z-index: 10;
}

/* Versión con título (resumen en index) */
.servicios-resumen {
  padding: 140px 0 120px;
  background-color: #f8fafc;
}

.servicios-resumen-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.servicios-resumen-subtitle {
  font-size: 1rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 48px;
}

.servicios-resumen-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  padding: 40px 0;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 45px;
  position: relative;
  cursor: pointer;
}

/* Vertical dividers */
.feature-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background-color: #cbd5e1;
}

.feature-icon-wrapper {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform var(--transition-normal);
}

.feature-item:hover .feature-icon-wrapper {
  transform: translateY(-5px);
}

.feature-icon-wrapper img {
  width: 50%;
  height: 50%;
  object-fit: contain;
}

/* Specific colors matching the design */
.icon-green {
  background-color: #22c55e;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

.icon-blue {
  background-color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.icon-navy {
  background-color: #1e3a8a;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.25);
}

.icon-light-green {
  background-color: #3b82f6; /* Fallback */
  background-image: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 8px 20px rgba(74, 222, 128, 0.25);
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a8a; /* Navy blue */
  margin-bottom: 8px;
}

.feature-description {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  font-weight: 400;
}

/* Responsive */
@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 0;
  }
  
  .feature-item:nth-child(2)::after {
    display: none;
  }
  
  .feature-item:nth-child(1)::after,
  .feature-item:nth-child(3)::after {
    right: 0;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 40px 0;
    padding: 40px 20px;
  }
  
  .feature-item::after {
    display: none;
  }
}

/* Modal styles */
.servicio-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.servicio-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.servicio-modal {
  background: #f8fafc;
  width: 90%;
  max-width: 800px;
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.servicio-modal-overlay.active .servicio-modal {
  transform: translateY(0);
}

.servicio-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
  font-size: 18px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.servicio-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .modal-content-grid.multi-item {
    grid-template-columns: 1fr 1fr;
  }
}

.modal-content-item {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.modal-content-item-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-content-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-content-item-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

/* Specific icon background colors */
.icon-green-bg { background: #22c55e; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3); }
.icon-blue-bg { background: #1877f2; box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3); }
.icon-teal-bg { background: #14b8a6; box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3); }
.icon-navy-bg { background: #1e3a8a; box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3); }
.icon-purple-bg { background: #8b5cf6; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.icon-orange-bg { background: #f97316; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }

.modal-content-item h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.modal-content-item p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
  margin: 0 0 20px 0;
}

.modal-content-item-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: auto;
}

.modal-content-item .servicio-audience {
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 0;
}
