/* =====================================================
   Estilos para la sección de Productos y Servicios
   Integra elementos 3D y diseño moderno
====================================================== */

/* Contenedor principal de la sección */
.products-services-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 6rem;
}

/* Contenedor 3D interactivo */
.products-3d-container {
  position: relative;
  width: 100%;
  height: 400px; /* Altura aumentada para mejor visualización */
  margin-bottom: 3rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(22, 152, 176, 0.3);
  background: rgba(1, 27, 55, 0.7);
}

#products-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Selector de categorías */
.category-selector {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  z-index: 2;
}

.category-btn {
  padding: 0.8rem 2rem;
  background: rgba(1, 27, 55, 0.9);
  border: 1px solid rgba(22, 152, 176, 0.6);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.category-btn:hover, .category-btn.active {
  background: rgba(22, 152, 176, 0.2);
  border-color: rgba(22, 152, 176, 0.8);
  box-shadow: 0 0 15px rgba(22, 152, 176, 0.3);
}

/* Contenido de categorías */
.category-content {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.category-content.active {
  display: block;
  opacity: 1;
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Tarjetas de productos */
.product-card {
  position: relative;
  padding: 2rem;
  border-radius: 12px;
  background: rgba(1, 27, 55, 0.7);
  border: 1px solid rgba(22, 152, 176, 0.3);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(22, 152, 176, 0.3);
  border-color: rgba(22, 152, 176, 0.8);
}

.product-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.tech-line {
  position: absolute;
  left: -5%;
  width: 110%;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(22, 152, 176, 0), 
    rgba(22, 152, 176, 0.3), 
    rgba(22, 152, 176, 0.1), 
    rgba(22, 152, 176, 0));
  animation: tech-line-move 8s infinite linear;
}

@keyframes tech-line-move {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(30%); }
}

.product-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #1698b0, #16b098);
  color: #fff;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(22, 152, 176, 0.3);
  overflow: hidden;
}

.product-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.product-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1698b0;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.product-card p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

.product-card-button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: rgba(22, 152, 176, 0.1);
  border: 1px solid rgba(22, 152, 176, 0.5);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  text-align: center;
}

.product-card-button:hover {
  background: rgba(22, 152, 176, 0.2);
  border-color: rgba(22, 152, 176, 0.8);
  box-shadow: 0 0 15px rgba(22, 152, 176, 0.2);
}

/* Grid de servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Tarjetas de servicios */
.service-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 8px;
  background: rgba(1, 27, 55, 0.5);
  border: 1px solid rgba(22, 152, 176, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #1698b0, transparent);
}

.service-card:hover {
  transform: translateY(-5px);
  background: rgba(1, 27, 55, 0.7);
  border-color: rgba(22, 152, 176, 0.5);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #1698b0;
  margin-bottom: 1rem;
  position: relative;
  border-radius: 50%;
  background: rgba(22, 152, 176, 0.1);
  border: 1px solid rgba(22, 152, 176, 0.3);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #1698b0;
  font-weight: 600;
}

.service-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .products-3d-container {
    height: 250px;
  }
  
  .products-grid, .services-grid {
    grid-template-columns: 1fr;
  }
  
  .product-card, .service-card {
    max-width: 100%;
  }
}
