/* Estilos para la sección de valores */
.values-section {
  position: relative;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow: hidden;
}

.values-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/placeholder.svg?height=500&width=1920&query=cruz roja patrón sutil");
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  z-index: 0;
}

.values-container {
  position: relative;
  z-index: 1;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #e30613;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 3rem;
}

.value-card {
  position: relative;
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.value-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #e30613;
  z-index: 2;
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(227, 6, 19, 0.1);
}

.value-card:hover::after {
  height: 100%;
}

.value-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, rgba(227, 6, 19, 0.05), transparent);
  transition: height 0.5s ease;
  z-index: -1;
}

.value-icon {
  width: 70px;
  height: 70px;
  margin: 30px auto 20px;
  background-color: rgba(227, 6, 19, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  background-color: #e30613;
  transform: scale(1.1) rotate(5deg);
}

.value-icon i {
  font-size: 2rem;
  color: #e30613;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon i {
  color: #fff;
}

.value-content {
  padding: 0 25px 30px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.value-title {
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.value-card:hover .value-title {
  color: #e30613;
}

.value-description {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Animación para los valores */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.value-card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.value-card:nth-child(1) {
  animation-delay: 0.1s;
}
.value-card:nth-child(2) {
  animation-delay: 0.2s;
}
.value-card:nth-child(3) {
  animation-delay: 0.3s;
}
.value-card:nth-child(4) {
  animation-delay: 0.4s;
}
.value-card:nth-child(5) {
  animation-delay: 0.5s;
}
.value-card:nth-child(6) {
  animation-delay: 0.6s;
}
.value-card:nth-child(7) {
  animation-delay: 0.7s;
}
.value-card:nth-child(8) {
  animation-delay: 0.8s;
}
.value-card:nth-child(9) {
  animation-delay: 0.9s;
}
.value-card:nth-child(10) {
  animation-delay: 1s;
}
.value-card:nth-child(11) {
  animation-delay: 1.1s;
}
.value-card:nth-child(12) {
  animation-delay: 1.2s;
}
.value-card:nth-child(13) {
  animation-delay: 1.3s;
}
.value-card:nth-child(14) {
  animation-delay: 1.4s;
}

/* Responsive */
@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }

  .value-icon {
    width: 60px;
    height: 60px;
    margin: 20px auto 15px;
  }

  .value-icon i {
    font-size: 1.5rem;
  }

  .value-title {
    font-size: 1.1rem;
  }

  .value-content {
    padding: 0 15px 20px;
  }
}

/* Efecto de hover para dispositivos táctiles */
@media (hover: none) {
  .value-card:active {
    transform: translateY(-5px);
  }

  .value-card:active .value-icon {
    background-color: #e30613;
  }

  .value-card:active .value-icon i {
    color: #fff;
  }

  .value-card:active .value-title {
    color: #e30613;
  }
}
