@import url("responsive.css");
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@300;400&display=swap');
:root {
  --primary-color: #e91e63;
  --secondary-color: #9c27b0;
  --accent-color: #673ab7;
  --background-white: #fff;
  --text-dark: #333;
  --text-medium: #666;
  --shadow-light: rgba(0,0,0,0.15);
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f8bbd9, #ce93d8);
  margin: 0;
  padding: 0;
}

/* === SECCIÓN PRINCIPAL === */
.gestion-especialidades {
  max-width: 900px;
  margin: 60px auto;
  background: linear-gradient(135deg, #f8b1d3, #f6c2cb);
  border-radius: 20px;
  box-shadow: 0 4px 12px var(--shadow-light);
  padding: 30px;
  text-align: center;
  font-family: 'Roboto', sans-serif;
}

.header-gestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-gestion h2 {
  font-family: 'Poppins', sans-serif;
  color: var(--secondary-color);
  margin: 0;
}

/* === BOTONES === */
.botones-gestion {
  display: flex;
  gap: 8px;
}

.btn-agregar,
.btn-reset {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-agregar:hover,
.btn-reset:hover {
  transform: translateY(-2px);
  background-color: var(--secondary-color);
}

.plus-icon {
  font-size: 1.2rem;
  margin-right: 5px;
}

/* === LISTA DE ELEMENTOS === */
.lista-especialidades {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* === ITEM INDIVIDUAL === */
.item-especialidad {
  background: var(--background-white);
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px var(--shadow-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-especialidad span {
  font-weight: 600;
  color: var(--text-dark);
}

/* === BOTÓN EDITAR === */
.item-especialidad .btn-editar {
  background: #216424; 
  border: none;
  color: rgb(255, 255, 255);
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
   font-weight: 600; 
   font-size: 1rem;
  transition: 0.3s;

}

.item-especialidad .btn-editar:hover {
  background: #43a047;
     display: flex;

}

/* === BOTÓN ELIMINAR === */
.item-especialidad .btn-eliminar {
  background: #da0e0a;
  border: none;
  color: white;
  border-radius: 14px;
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.3s; 
    font-size: 1rem;
}

.item-especialidad .btn-eliminar:hover {
  background: #df4141;
}

/* === MENSAJE SIN ELEMENTOS === */
.no-especialidades {
  color: var(--text-medium);
  font-style: italic;
  text-align: center;
  margin-top: 10px;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: var(--background-white);
  margin: 8% auto;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 4px 15px var(--shadow-light);
  animation: fadeIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--secondary-color);
  font-family: 'Poppins', sans-serif;
}

.close {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-medium);
}

.close:hover {
  color: var(--primary-color);
}

/* === FORMULARIO DEL MODAL === */
.form-group {
  text-align: left;
  margin-bottom: 15px;
}

.form-group label {
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary-color);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancelar,
.btn-listo {
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  cursor: pointer;
  font-weight: 600;
  color: white;
  transition: transform 0.3s ease;
}

.btn-cancelar {
  background: #aaa;
}
.btn-listo {
  background: var(--primary-color);
}
.btn-cancelar:hover,
.btn-listo:hover {
  transform: translateY(-2px);
}

/* === ANIMACIÓN === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .header-gestion {
    flex-direction: column;
    gap: 10px;
  }
}
