/* Estilos para las tarjetas de categorías */
.categories-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.category-card {
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 350px;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: height 0.3s ease;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
  height: 8px;
}

.category-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.category-card p {
  color: var(--light-text);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.btn-more {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.btn-more:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Estilos para los modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1100;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 2rem auto;
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  background: rgba(255, 255, 255, 0.95);
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.dark-mode .modal-content {
  background: rgba(30, 41, 59, 0.95);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  z-index: 10;
}

.close-modal:hover {
  transform: rotate(90deg);
  color: var(--primary-color);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.modal-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.modal-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.modal-body {
  padding: 1rem 2rem;
}

.modal-body > p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  text-align: center;
}

.modal-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .modal-section {
  background: rgba(30, 41, 59, 0.5);
}

.modal-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.modal-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.modal-section h3 i {
  margin-right: 0.8rem;
}

.modal-section p {
  margin-bottom: 1rem;
  text-align: left;
}

.modal-section ul {
  list-style: none;
  padding-left: 1.5rem;
}

.modal-section ul li {
  margin-bottom: 0.5rem;
  position: relative;
}

.modal-section ul li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: -1rem;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  text-align: center;
}

/* Animaciones para los modales */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header h2 {
    font-size: 1.8rem;
  }

  .modal-section h3 {
    font-size: 1.2rem;
  }
}
